|
|
|
@ -5,40 +5,40 @@
|
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item label="配送服务类型"> |
|
|
|
|
<el-select |
|
|
|
|
class="el_Cselect" |
|
|
|
|
style="width: 100%;" |
|
|
|
|
v-model="form.dispatchServiceType" |
|
|
|
|
filterable |
|
|
|
|
placeholder="选择计费类型" |
|
|
|
|
disabled |
|
|
|
|
@change="chargetype" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Warehousebillingmode" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
class="el_Cselect" |
|
|
|
|
style="width: 100%" |
|
|
|
|
v-model="form.dispatchServiceType" |
|
|
|
|
filterable |
|
|
|
|
placeholder="选择计费类型" |
|
|
|
|
disabled |
|
|
|
|
@change="chargetype" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Warehousebillingmode" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="计费模式"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.dispatchPricingType" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请选择配送计费模式" |
|
|
|
|
:popper-append-to-body="false" |
|
|
|
|
style="width:100%;" |
|
|
|
|
disabled |
|
|
|
|
multiple |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in ServiceList" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
v-model="form.dispatchPricingType" |
|
|
|
|
filterable |
|
|
|
|
placeholder="请选择配送计费模式" |
|
|
|
|
:popper-append-to-body="false" |
|
|
|
|
style="width: 100%" |
|
|
|
|
disabled |
|
|
|
|
multiple |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in ServiceList" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -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"> |
|
|
|
|
<div class="el_flex_row_1" v-if="form.dispatchIsByCategory"> |
|
|
|
|
<el-form-item label="统一计费(元/件)"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.ss" |
|
|
|
@ -63,17 +63,17 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-form-item label="品类计费"> |
|
|
|
|
<el-form-item label="品类计费" v-else> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.perpieceBillingData" |
|
|
|
|
:Surcharge="form.perpieceBilling" |
|
|
|
|
:SurchargeData="form.pieceCategoryData" |
|
|
|
|
:Surcharge="form.pieceCategory" |
|
|
|
|
/> |
|
|
|
|
</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,20 +86,18 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-form-item label="品类计费"> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.perpieceBillingData" |
|
|
|
|
:Surcharge="form.perpieceBilling" |
|
|
|
|
/> |
|
|
|
|
<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> |
|
|
|
|
<div> |
|
|
|
|
<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" |
|
|
|
@ -109,18 +107,17 @@
|
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-form-item label="品类计费"> |
|
|
|
|
<el-form-item label="品类计费" v-else> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.perpieceBillingData" |
|
|
|
|
:Surcharge="form.perpieceBilling" |
|
|
|
|
:SurchargeData="form.weightCategoryData" |
|
|
|
|
:Surcharge="form.weightCategory" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</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)"> |
|
|
|
@ -136,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="统一计费(元/吨/吨公里)"> |
|
|
|
@ -152,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)"> |
|
|
|
@ -168,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="按点位计费点位(元/点位)"> |
|
|
|
@ -185,17 +182,22 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- 整车计费 --> |
|
|
|
|
<el-form-item label="品类计费" style="width: 48%"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.VehiclebillingData" :Surcharge="form.Vehiclebilling"> |
|
|
|
|
<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 === '操作'"> |
|
|
|
|
<div class="eml_btn"> |
|
|
|
|
<span @click="categoriesplus(item.id)" class="el_btn_a"> |
|
|
|
|
<span @click="storageplus" class="el_btn_a"> |
|
|
|
|
<el-icon style="font-size: 12px; color: #409eff; margin-right: 3px" |
|
|
|
|
><CirclePlus /></el-icon |
|
|
|
|
>新增 |
|
|
|
|
</span> |
|
|
|
|
<span @click="categoriesduce(item.id)" class="el_btn_b"> |
|
|
|
|
<span @click="storagereduce(slotProps.scope.row.index)" class="el_btn_b"> |
|
|
|
|
<el-icon style="font-size: 12px; color: #f00; margin-right: 3px" |
|
|
|
|
><Delete /></el-icon |
|
|
|
|
>删除 |
|
|
|
@ -207,13 +209,12 @@
|
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- 附加费用 --> |
|
|
|
|
<div class="el_flex_Surcharge"> |
|
|
|
|
<div class="el_sever_title"> |
|
|
|
|
<span>附加费用</span> |
|
|
|
|
<div class="el_sever_title"> |
|
|
|
|
<span>附加费用</span> |
|
|
|
|
</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 |
|
|
|
@ -228,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" |
|
|
|
@ -244,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 |
|
|
|
@ -260,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 |
|
|
|
@ -276,18 +274,33 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 品类计费 --> |
|
|
|
|
<el-form-item label="品类计费" class="el_flex_row"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.SurchargeData" :Surcharge="form.Surcharge" /> |
|
|
|
|
<SurchargeTable |
|
|
|
|
: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> |
|
|
|
|
<div class="el_sever_title"> |
|
|
|
|
<span> |
|
|
|
|
最低计费等级 |
|
|
|
|
</span> |
|
|
|
|
<span> 最低计费等级 </span> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_flex_Minimum"> |
|
|
|
|
<template v-for="item in form.Minimumbilling" :key="item.label"> |
|
|
|
@ -304,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 |
|
|
|
@ -318,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> |
|
|
|
@ -329,7 +373,7 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
import { ref , defineEmits, defineComponent} from 'vue'; |
|
|
|
|
import { ref, defineEmits, defineComponent, computed } from 'vue'; |
|
|
|
|
import SurchargeTable from '@/components/pric/tablePric.vue'; |
|
|
|
|
import { putBasicdataPrice } from '@/api/Pricesystem/index'; |
|
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
@ -345,40 +389,73 @@ const props = defineProps({
|
|
|
|
|
templateData: Object, |
|
|
|
|
}); |
|
|
|
|
console.log(props, '来自父页面参数'); |
|
|
|
|
const ServiceList=ref([]) |
|
|
|
|
const ServiceList = ref([]); |
|
|
|
|
const requestInfo = ref({}); //价格回显 |
|
|
|
|
const request=ref({}) |
|
|
|
|
const Warehousebillingmode=ref([]);//服务类型 |
|
|
|
|
const request = ref({}); |
|
|
|
|
const Warehousebillingmode = ref([]); //服务类型 |
|
|
|
|
const pricevehicle = ref([]); //车型 |
|
|
|
|
const form = ref({ |
|
|
|
|
// 按件计费 |
|
|
|
|
perpieceBilling: [ |
|
|
|
|
pieceCategory: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'category', type: 'string', width: 'auto', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'categoryId', type: 'select', width: 'auto', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
label: '单价(元/件)', |
|
|
|
|
prop: 'storageFee', |
|
|
|
|
prop: 'price', |
|
|
|
|
type: 'number', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '遗留件单价(元/件)', |
|
|
|
|
prop: 'managementFeea', |
|
|
|
|
prop: 'leaveBehindPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
//按件品类 |
|
|
|
|
pieceCategoryData: [], |
|
|
|
|
|
|
|
|
|
perpieceBillingData: [ |
|
|
|
|
// 按方品类计费 |
|
|
|
|
cubeCategory: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'categoryId', type: 'select', width: 'auto', disabled: true }, |
|
|
|
|
{ label: '单价(元/m³)', prop: 'price', type: 'number', width: 'auto', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
index: 0, |
|
|
|
|
category: '暂无', |
|
|
|
|
storageFee: 0, |
|
|
|
|
managementFee: 0, |
|
|
|
|
managementFeea: 0, |
|
|
|
|
label: '遗留单价(元/m³)', |
|
|
|
|
prop: 'leaveBehindPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
// 按件品类 |
|
|
|
|
cubeCategoryData: [], |
|
|
|
|
// 按重量品类计费 |
|
|
|
|
weightCategory: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'categoryId', type: 'select', width: 'auto', disabled: true }, |
|
|
|
|
{ label: '单价(元/kg)', prop: 'price', type: 'number', width: 'auto', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
label: '遗留单价(元/kg)', |
|
|
|
|
prop: 'leaveBehindPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
// 按重量品类 |
|
|
|
|
weightCategoryData: [], |
|
|
|
|
// 按整车计费 |
|
|
|
|
fullVehicle: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ label: '车型', prop: 'vehicleType', type: 'select', width: 'auto', disabled: true }, |
|
|
|
|
{ label: '分拣费(元/车)', prop: 'price', type: 'number', width: 'auto', disabled: true }, |
|
|
|
|
{ label: '操作', prop: '', type: '', width: 'auto', disabled: true }, |
|
|
|
|
], |
|
|
|
|
// 按整车计费 |
|
|
|
|
fullVehicleData: [], |
|
|
|
|
|
|
|
|
|
// 品类计费 |
|
|
|
|
Billingcategory: [ |
|
|
|
@ -431,10 +508,6 @@ const form = ref({
|
|
|
|
|
prop: 'category', |
|
|
|
|
type: 'select', |
|
|
|
|
width: 'auto', |
|
|
|
|
options: [ |
|
|
|
|
{ value: 'option1', label: 'Option 1' }, |
|
|
|
|
{ value: 'option2', label: 'Option 2' }, |
|
|
|
|
], |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -447,77 +520,82 @@ const form = ref({
|
|
|
|
|
{ label: '操作', prop: '', type: '', width: '130', disabled: true }, |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
VehiclebillingData: [ |
|
|
|
|
// 附加费品类 |
|
|
|
|
additionalCategory: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
index: 1, |
|
|
|
|
category: '暂无', |
|
|
|
|
storageFee: 0, |
|
|
|
|
managementFee: 0, |
|
|
|
|
label: '产品品类(元/件)', |
|
|
|
|
prop: 'categoryId', |
|
|
|
|
type: 'select', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
// 附加费用 |
|
|
|
|
Surcharge: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '78', disabled: true }, |
|
|
|
|
{ label: '产品品类(元/件)', prop: 'category', type: 'string', width: '200', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
label: '操作/装卸费(元/件)', |
|
|
|
|
prop: 'storageFee', |
|
|
|
|
prop: 'handlingPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '200', |
|
|
|
|
width: '150', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '分贷费(元/件)', |
|
|
|
|
prop: 'managementFeea', |
|
|
|
|
label: '分货费(元/件)', |
|
|
|
|
prop: 'sortPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '200', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '平移费(元/件)', |
|
|
|
|
prop: 'managementFeea', |
|
|
|
|
prop: 'relocationPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '200', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '上楼费(元/层)', |
|
|
|
|
prop: 'managementFeea', |
|
|
|
|
label: '上楼费价格(元/层)', |
|
|
|
|
prop: 'upstairsDeliveryPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '200', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
SurchargeData: [ |
|
|
|
|
|
|
|
|
|
additionalCategoryData: [], |
|
|
|
|
|
|
|
|
|
VehiclebillingData: [ |
|
|
|
|
{ |
|
|
|
|
index: 1, |
|
|
|
|
category: '暂无', |
|
|
|
|
storageFee: 0, |
|
|
|
|
managementFee: 0, |
|
|
|
|
managementFeea: 0, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
// 最低计费等级 |
|
|
|
|
Minimumbilling: [ |
|
|
|
|
{ |
|
|
|
|
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: '加算价格', |
|
|
|
@ -530,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, |
|
|
|
|
}, |
|
|
|
@ -578,26 +655,231 @@ function updateDictionary(targetArray, dictionaryType) {
|
|
|
|
|
.catch(() => {}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
} |
|
|
|
|
const onLoad= async()=>{ |
|
|
|
|
await updateDictionary(Warehousebillingmode.value, 'dispatch_type'); //仓储计费类型 |
|
|
|
|
await updateDictionary(ServiceList.value, 'dispatch_pricing_type'); //仓储计费类型 |
|
|
|
|
if(props.templateData.request){ |
|
|
|
|
console.log(props.templateData.request,'props.templateData.request'); |
|
|
|
|
request.value =await deepClone(props.templateData.request) |
|
|
|
|
form.value.dispatchServiceType= request.value.dispatchServiceType;//配送服务类型 |
|
|
|
|
|
|
|
|
|
form.value.dispatchPricingType = request.value.dispatchPricingType |
|
|
|
|
? request.value.dispatchPricingType.split(',').map(Number) |
|
|
|
|
: []; //服务类型 |
|
|
|
|
|
|
|
|
|
// 移除对象 |
|
|
|
|
function removeItemById(array, id) { |
|
|
|
|
const index = array.findIndex(item => item.index === id); |
|
|
|
|
if (index !== -1) { |
|
|
|
|
array.splice(index, 1); |
|
|
|
|
array.forEach((item, index) => { |
|
|
|
|
item.index = index + 1; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
onLoad() |
|
|
|
|
function addItemAfterId(array) { |
|
|
|
|
console.log(array); |
|
|
|
|
const newItem = { |
|
|
|
|
index: array.length + 1, // 新对象的 ID 为当前数组长度加 1 |
|
|
|
|
plus: false, // 是否显示加号 |
|
|
|
|
reduce: true, // 是否显示减号 |
|
|
|
|
vehicleType: '', // 车型 |
|
|
|
|
loading: false, |
|
|
|
|
price: 0, //价格 |
|
|
|
|
options: pricevehicle.value, //选择框列表 |
|
|
|
|
}; |
|
|
|
|
array.push(newItem); |
|
|
|
|
} |
|
|
|
|
// 仓储减 |
|
|
|
|
const storagereduce = id => { |
|
|
|
|
removeItemById(form.value.fullVehicleData, id); //传入配置项和对应的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'); //仓储计费类型 |
|
|
|
|
await updateDictionary(ServiceList.value, 'dispatch_pricing_type'); //仓储计费类型 |
|
|
|
|
await updateDictionary(pricevehicle.value, 'price_vehicle_type'); //车型 |
|
|
|
|
|
|
|
|
|
// 回显 |
|
|
|
|
if (props.templateData.request) { |
|
|
|
|
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); //整车计费(缺少判断) |
|
|
|
|
// 缺少判断 |
|
|
|
|
// 按件品类计费 |
|
|
|
|
if (form.value.dispatchPricingType.includes(1)) { |
|
|
|
|
request.value.dispatchPieceCategorys.forEach((item, index) => { |
|
|
|
|
form.value.pieceCategoryData.push({ |
|
|
|
|
index: index + 1, |
|
|
|
|
categoryId: item.id, //品类 |
|
|
|
|
price: 0, //价格 |
|
|
|
|
leaveBehindPrice: 0, //遗留单价 |
|
|
|
|
options: [{ label: item.name, value: item.id }], |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// 按方计费 |
|
|
|
|
if (form.value.dispatchPricingType.includes(3)) { |
|
|
|
|
request.value.dispatchCubeCategorys.forEach((item, index) => { |
|
|
|
|
form.value.cubeCategoryData.push({ |
|
|
|
|
index: index + 1, |
|
|
|
|
categoryId: item.id, //品类 |
|
|
|
|
price: 0, //价格 |
|
|
|
|
leaveBehindPrice: 0, //遗留单价 |
|
|
|
|
options: [{ label: item.name, value: item.id }], |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// 按重量 |
|
|
|
|
if (form.value.dispatchPricingType.includes(3)) { |
|
|
|
|
request.value.dispatchWeightCategorys.forEach((item, index) => { |
|
|
|
|
form.value.weightCategoryData.push({ |
|
|
|
|
index: index + 1, |
|
|
|
|
categoryId: item.id, //品类 |
|
|
|
|
price: 0, //价格 |
|
|
|
|
leaveBehindPrice: 0, //遗留单价 |
|
|
|
|
options: [{ label: item.name, value: item.id }], |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
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 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
onLoad(); |
|
|
|
|
const btn = () => { |
|
|
|
|
console.log(form.value); |
|
|
|
|
}; |
|
|
|
|
const view = val => { |
|
|
|
|
console.log(val); |
|
|
|
|
}; |
|
|
|
|
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"> |
|
|
|
@ -675,17 +957,14 @@ const view = val => {
|
|
|
|
|
.el_row { |
|
|
|
|
width: 48%; |
|
|
|
|
} |
|
|
|
|
:deep(.el_flex_row_1){ |
|
|
|
|
|
|
|
|
|
.el-form-item__content{ |
|
|
|
|
:deep(.el_flex_row_1) { |
|
|
|
|
.el-form-item__content { |
|
|
|
|
width: 48% !important; |
|
|
|
|
.el-input-number { |
|
|
|
|
width: 100%; |
|
|
|
|
width: 100%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
.el_flex_row { |
|
|
|
|
width: 48%; |
|
|
|
@ -712,29 +991,33 @@ const view = val => {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.el_sever_title{ |
|
|
|
|
span{ |
|
|
|
|
.el_sever_title { |
|
|
|
|
span { |
|
|
|
|
padding-left: 10px; |
|
|
|
|
color: #d58833; |
|
|
|
|
font-size: 18px; |
|
|
|
|
font-weight: bold; |
|
|
|
|
position: relative; |
|
|
|
|
color: #d58833; |
|
|
|
|
font-size: 18px; |
|
|
|
|
font-weight: bold; |
|
|
|
|
position: relative; |
|
|
|
|
} |
|
|
|
|
span::before{ |
|
|
|
|
content: ''; |
|
|
|
|
width: 4px; |
|
|
|
|
height: 70%; |
|
|
|
|
background-color: #d58833; |
|
|
|
|
position: absolute; |
|
|
|
|
left: 0px; |
|
|
|
|
top:4px; |
|
|
|
|
|
|
|
|
|
span::before { |
|
|
|
|
content: ''; |
|
|
|
|
width: 4px; |
|
|
|
|
height: 70%; |
|
|
|
|
background-color: #d58833; |
|
|
|
|
position: absolute; |
|
|
|
|
left: 0px; |
|
|
|
|
top: 4px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
.Subtitle{ |
|
|
|
|
.Subtitle { |
|
|
|
|
display: block; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
color: #d58833; |
|
|
|
|
} |
|
|
|
|
:deep(.Wholevehicle) { |
|
|
|
|
.el-form-item__label { |
|
|
|
|
color: #d58833; |
|
|
|
|
font-size: 18px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|