Browse Source

财务

dev-xx
马远东 12 months ago
parent
commit
7cc22d0681
  1. 368
      src/views/Pricesystem/Price/PriceDelivery.vue

368
src/views/Pricesystem/Price/PriceDelivery.vue

@ -48,9 +48,9 @@
</div>
<div class="el_flex">
<div class="el_flex_row el_flex_right el_flex_input">
<div class="el_flex_row el_flex_right el_flex_input" v-if="form.piece">
<span class="Subtitle">按件计费 </span>
<div class="el_flex_row_1" v-if="billing">
<div class="el_flex_row_1" v-if="form.dispatchIsByCategory">
<el-form-item label="统一计费(元/件)">
<el-input-number
v-model="form.ss"
@ -63,7 +63,7 @@
</el-form-item>
</div>
<el-form-item label="品类计费">
<el-form-item label="品类计费" v-else>
<SurchargeTable
:SurchargeData="form.pieceCategoryData"
:Surcharge="form.pieceCategory"
@ -71,9 +71,9 @@
</el-form-item>
</div>
<!-- 按方计费 -->
<div class="el_flex_row el_flex_input">
<div class="el_flex_row el_flex_input" v-if="form.square">
<span class="Subtitle">按方计费</span>
<div class="el_flex_row_1">
<div class="el_flex_row_1" v-if="form.dispatchIsByCategory">
<el-form-item label="统一计费(元/m³)">
<el-input-number
v-model="form.ss"
@ -86,28 +86,28 @@
</el-form-item>
</div>
<el-form-item label="品类计费">
<el-form-item label="品类计费" v-else>
<SurchargeTable :SurchargeData="form.cubeCategoryData" :Surcharge="form.cubeCategory" />
</el-form-item>
</div>
<!-- 按重量计费 -->
<div class="el_flex_row el_flex_right">
<div class="el_flex_row el_flex_right" v-if="form.heavy">
<span class="Subtitle">按重量计费</span>
<el-form-item label="统一计费(元/KG)" style="margin-right: 0">
<el-input-number
style="width: 48%"
v-model="form.ss"
:precision="2"
:min="0"
:max="10"
:controls="false"
placeholder="请输入价格"
/>
</el-form-item>
<el-form-item label="品类计费">
<div v-if="form.dispatchIsByCategory">
<el-form-item label="统一计费(元/KG)" style="margin-right: 0">
<el-input-number
style="width: 48%"
v-model="form.ss"
:precision="2"
:min="0"
:max="10"
:controls="false"
placeholder="请输入价格"
/>
</el-form-item>
</div>
<el-form-item label="品类计费" v-else>
<SurchargeTable
:SurchargeData="form.weightCategoryData"
:Surcharge="form.weightCategory"
@ -117,7 +117,7 @@
</div>
<div class="el_flex">
<div class="el_flex_h">
<div class="el_flex_h" v-if="form.tonkilometer">
<span class="Subtitle">按公里计费</span>
<div>
<el-form-item label="按公里计费(元/km)">
@ -133,7 +133,7 @@
</div>
</div>
<div class="el_flex_h">
<div class="el_flex_h" v-if="form.ton">
<span class="Subtitle">按吨公里计费</span>
<div>
<el-form-item label="统一计费(元/吨/吨公里)">
@ -149,7 +149,7 @@
</div>
</div>
<div class="el_flex_h">
<div class="el_flex_h" v-if="form.kilometre">
<span class="Subtitle">按吨计费</span>
<div>
<el-form-item label="按吨位计费(元/t)">
@ -165,7 +165,7 @@
</div>
</div>
<div class="el_flex_h">
<div class="el_flex_h" v-if="form.spot">
<span class="Subtitle">按点位计费</span>
<div>
<el-form-item label="按点位计费点位(元/点位)">
@ -182,7 +182,12 @@
</div>
</div>
<!-- 整车计费 -->
<el-form-item label="整车计费" class="Subtitle Wholevehicle" style="width: 48%">
<el-form-item
label="整车计费"
class="Subtitle Wholevehicle"
style="width: 48%"
v-if="form.Wholevehicle"
>
<SurchargeTable :SurchargeData="form.fullVehicleData" :Surcharge="form.fullVehicle">
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
@ -209,8 +214,7 @@
</div>
<span class="Subtitle">统一计费</span>
<div class="el_flex">
<div class="el_flex_h">
<span>按公里计费</span>
<div class="el_flex_h" v-if="request.dispatchIsOperateFee">
<div>
<el-form-item label="操作/装卸费(元/件)">
<el-input-number
@ -225,10 +229,9 @@
</div>
</div>
<div class="el_flex_h">
<span>按吨公里计费</span>
<div class="el_flex_h" v-if="request.dispatchIsSortFee">
<div>
<el-form-item label="分费(元/件)">
<el-form-item label="分费(元/件)">
<el-input-number
v-model="form.ss"
:precision="2"
@ -241,8 +244,7 @@
</div>
</div>
<div class="el_flex_h">
<span>按吨计费</span>
<div class="el_flex_h" v-if="request.dispatchIsShiftingCharge">
<div>
<el-form-item label="平移费(元/件)">
<el-input-number
@ -257,8 +259,7 @@
</div>
</div>
<div class="el_flex_h">
<span>按点位计费</span>
<div class="el_flex_h" v-if="request.dispatchIsStairsCarryingCharge">
<div>
<el-form-item label="上楼费(元/层)">
<el-input-number
@ -273,13 +274,28 @@
</div>
</div>
</div>
<!-- 品类计费 -->
<el-form-item label="品类计1费" class="el_flex_row">
<el-form-item label="品类计费" class="el_flex_row">
<SurchargeTable
:SurchargeData="form.aaaData" :Surcharge="form.aaa"
:SurchargeData="form.additionalCategoryData"
:Surcharge="form.additionalCategory"
/>
</el-form-item>
<div class="el_flex_h" v-if="request.dispatchIsFeeFloor">
<div>
<el-form-item label="上楼费免费楼层">
<el-input-number
v-model="form.ss"
:precision="2"
:min="0"
:max="10"
:controls="false"
placeholder="请输入价格"
/>
</el-form-item>
</div>
</div>
</div>
<!-- 最低等级计费 -->
<div>
@ -301,7 +317,7 @@
</template>
</div>
<!-- 遗留件 -->
<div class="el_flex_Minimum">
<div class="el_flex_Minimum" v-if="request.dispatchIsLeaveBehind && request.dispatchIsMinCost">
<template v-for="item in form.Minimumlegacy" :key="item.label">
<el-form-item :label="item.label" v-if="item.disabled" class="el_row">
<el-input-number
@ -315,6 +331,37 @@
</el-form-item>
</template>
</div>
<div style="display:flex;" v-if="request.dispatchIsUpwardJudgment">
<div class="el_flex_h">
<div>
<el-form-item label="向上判断件数">
<el-input-number
v-model="form.ss"
:precision="2"
:min="0"
:max="10"
:controls="false"
placeholder="请输入价格"
/>
</el-form-item>
</div>
</div>
<div class="el_flex_h">
<div>
<el-form-item label="向上判断加价">
<el-input-number
v-model="form.ss"
:precision="2"
:min="0"
:max="10"
:controls="false"
placeholder="请输入价格"
/>
</el-form-item>
</div>
</div>
</div>
</div>
</div>
</el-form>
@ -348,56 +395,6 @@ const request = ref({});
const Warehousebillingmode = ref([]); //
const pricevehicle = ref([]); //
const form = ref({
//
aaa:[
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true },
{
label: '产品品类(元/件)',
prop: 'categoryId',
type: 'select',
width: 'auto',
disabled: true,
},
{
label: '操作/装卸费(元/件)',
prop: 'handlingPrice',
type: 'number',
width: 'auto',
disabled: true,
},
{
label: '分货费(元/件)',
prop: 'sortPrice',
type: 'number',
width: 'auto',
disabled: true,
},
{
label: '平移费(元/件)',
prop: 'relocationPrice',
type: 'number',
width: 'auto',
disabled: true,
},
{
label: '上楼费价格(元/层)',
prop: 'upstairsDeliveryPrice',
type: 'number',
width: 'auto',
disabled: true,
},
],
aaa: [
{
index:1,
handlingPrice:0,
sortPrice:0,
relocationPrice:0,
upstairsDeliveryPrice:0,
}
],
//
pieceCategory: [
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true },
@ -523,7 +520,47 @@ const form = ref({
{ label: '操作', prop: '', type: '', width: '130', disabled: true },
],
//
additionalCategory: [
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true },
{
label: '产品品类(元/件)',
prop: 'categoryId',
type: 'select',
width: 'auto',
disabled: true,
},
{
label: '操作/装卸费(元/件)',
prop: 'handlingPrice',
type: 'number',
width: '150',
disabled: true,
},
{
label: '分货费(元/件)',
prop: 'sortPrice',
type: 'number',
width: 'auto',
disabled: true,
},
{
label: '平移费(元/件)',
prop: 'relocationPrice',
type: 'number',
width: 'auto',
disabled: true,
},
{
label: '上楼费价格(元/层)',
prop: 'upstairsDeliveryPrice',
type: 'number',
width: 'auto',
disabled: true,
},
],
additionalCategoryData: [],
VehiclebillingData: [
{
@ -540,21 +577,25 @@ const form = ref({
label: '最低计费价格',
input: 0,
disabled: true,
index: 1,
},
{
label: '最低计费件数',
input: 0,
disabled: true,
index: 2,
},
{
label: '最低计费方数',
input: 0,
disabled: true,
index: 3,
},
{
label: '最低计费重量',
input: 0,
disabled: true,
index: 4,
},
{
label: '加算价格',
@ -567,30 +608,29 @@ const form = ref({
{
label: '遗留件低于最低件数收费(元)',
input: 0,
index: 1,
disabled: true,
},
{
label: '遗留件最最低计费件数',
input: 0,
index: 2,
disabled: true,
},
{
label: '遗留件最低计费方数',
input: 0,
index: 3,
disabled: true,
},
{
label: '遗留件最低计费重量',
input: 0,
index: 4,
disabled: true,
},
{
label: '向上判断件数',
input: 0,
disabled: true,
},
{
label: '上上判断加价',
label: '遗留加算',
input: 0,
disabled: true,
},
@ -648,6 +688,37 @@ const storagereduce = id => {
const storageplus = data => {
addItemAfterId(form.value.fullVehicleData);
};
// const display=computed(()=>{
// })
const billing = async () => {
//
form.value.dispatchPricingType = (await request.value.dispatchPricingType)
? request.value.dispatchPricingType.split(',').map(Number)
: [];
console.log(request.value.dispatchPricingType, 'form.value.dispatchPricingType');
console.log(form.value.dispatchPricingType.includes(1), 'form.value.dispatchPricingType[=====>]');
// 使
const pricingTypeToProperty = {
1: 'piece', //
2: 'heavy', //
3: 'square', //
4: 'Wholevehicle', //
5: 'spot', //
6: 'ton', //
7: 'tonkilometer', //
8: 'kilometre', //
};
//
Object.entries(pricingTypeToProperty).forEach(([type, property]) => {
const typeNumber = parseInt(type, 10);
form.value[property] = form.value.dispatchPricingType.includes(typeNumber);
});
};
const onLoad = async () => {
await updateDictionary(Warehousebillingmode.value, 'dispatch_type'); //
@ -659,10 +730,12 @@ const onLoad = async () => {
console.log(props.templateData.request, 'props.templateData.request');
request.value = await deepClone(props.templateData.request);
form.value.dispatchServiceType = request.value.dispatchServiceType; //
console.log(form.value, 'form.value===>>');
form.value.dispatchPricingType = request.value.dispatchPricingType
? request.value.dispatchPricingType.split(',').map(Number)
: []; //
billing(); //
addItemAfterId(form.value.fullVehicleData); //()
//
//
@ -701,11 +774,53 @@ const onLoad = async () => {
});
});
}
console.log(request.value, ' request.value');
// (if)
if (request.value.dispatchSubjoinCategorys && request.value.dispatchSubjoinCategorys.length) {
request.value.dispatchSubjoinCategorys.forEach((item, index) => {
form.value.additionalCategoryData.push({
index: index + 1,
categoryId: item.id,
handlingPrice: 0,
sortPrice: 0,
relocationPrice: 0,
upstairsDeliveryPrice: 0,
options: [
{
label: item.name,
value: item.id,
},
],
});
});
}
//
console.log(form.value.Minimumbilling, 'Minimumbilling');
console.log(request.dispatchMinCostType);
form.value.Minimumbilling.forEach(res => {
if (res.index == request.value.dispatchMinCostType) {
res.disabled = true;
} else {
res.disabled = false;
}
});
if(request.dispatchMinCostType !=1){
form.value.Minimumbilling.find(res=>res.label=='加算价格').disabled=true
}
//
form.value.Minimumlegacy.forEach(res => {
if (res.index == request.value.dispatchMinCostType) {
res.disabled = true;
} else {
res.disabled = false;
}
});
if(request.dispatchMinCostType !=1){
form.value.Minimumlegacy.find(res=>res.label=='遗留加算').disabled=true
}
//
// request.value.dispatchAdditionalCategorys.forEach((item,index)=>{
// form.value.additionalCategoryData.push()
// })
}
};
@ -716,14 +831,55 @@ const btn = () => {
const view = val => {
console.log(val);
};
const billing = computed(() => {
if (!request.value.value) {
return true;
} else {
return false;
const handleSubmit=()=>{
let data={
checkType: '4',
id: $route.query.id,
dispatch:{
pieceCategory:[],//
cubeCategory:[],//
weightCategory:[],//
tonKilometerCost:[],//
}
}
});
//
form.value.pieceCategoryData.forEach(item=>{
data.dispatch['pieceCategory'].push({
categoryId:item.categoryId,//id
leaveBehindPrice:item.leaveBehindPrice,//
price:item.price,//
})
})
//
form.value.cubeCategoryData.forEach(item=>{
data.dispatch['cubeCategory'].push({
categoryId:item.categoryId,//id
leaveBehindPrice:item.leaveBehindPrice,//
price:item.price,//
})
})
//
form.value.weightCategoryData.forEach(item=>{
data.dispatch['weightCategory'].push({
categoryId:item.categoryId,//id
leaveBehindPrice:item.leaveBehindPrice,//
price:item.price,//
})
})
//
data.dispatch['weightCategory'].push({
categoryId:item.categoryId,//id
leaveBehindPrice:item.leaveBehindPrice,//
price:item.price,//
})
console.log(data,'准备提交的数据');
return
putBasicdataPrice(data).then(res=>{
console.log(res,'处理好的值');
})
}
</script>
<style scoped lang="scss">

Loading…
Cancel
Save