This commit is contained in:
aihe 2024-05-26 23:21:59 +08:00
parent 90540bd696
commit 70d4609cbc
4 changed files with 85 additions and 41 deletions

View File

@ -4,7 +4,7 @@
<u-row>
<view class="lft1 font-28">计费方式</view>
<view style="flex: 1;">
<u-radio-group v-model="modelInfo.calcFeeType" @change="handleFeeTypeChange">
<u-radio-group v-model="modelInfo.calcFeeType">
<u-radio v-for="(item, index) in dicData.emis_calc_fee_type" :label="item.title"
:name="item.val" activeColor="#B12D29" size="30" labelSize="26"
:custom-style="`margin-right: ${index+1<dicData.emis_calc_fee_type.length?30:0}rpx;`">
@ -75,6 +75,33 @@
},
dicData() {
return this.$store.getters.dicData
},
searchParam() {
let info = this.modelInfo
let param = {
productType: info.productType,
// customerCode: info.customerCode,
customsClear: info.customsClear,
customsEclaration: info.customsEclaration,
calcFeeType: info.calcFeeType,
settlementWeight: info.settlementWeight,
totalVolume: info.totalVolume,
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
dispatchUnderlingSiteCode: info.dispatchUnderlingSiteCode,
}
return param
}
},
watch: {
searchParam: {
handler(newVal){
let vals = Object.values(newVal)
// 所有关联入参都有值再 执行自动计算
if(vals.length == vals.filter(v => !!v).length) {
this.calcWaybillFee(newVal);
}
},
deep: true,
}
},
props: {
@ -83,17 +110,11 @@
return {}
}
},
searchParam: {
default () {
return {}
}
}
},
data() {
return {}
},
created() {
this.calcWaybillFee();
},
onHide() {
@ -113,11 +134,8 @@
feeName: this.dicData.emis_fee_type.filter(t => t.val == val)[0].title
})
},
handleFeeTypeChange(val) {
this.calcWaybillFee({ calcFeeType: val })
},
async calcWaybillFee(params = {}) {
let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...this.searchParam, ...params })
let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...params })
this.modelInfo.feeItems = res.data.feeList
this.modelInfo.freight = res.data.totalFee

View File

@ -42,6 +42,18 @@
return totalVolume
},
isCargoListOnchange() {
return this.modelInfo.cargoList
}
},
watch: {
isCargoListOnchange: {
handler(newVal){
console.log("===bpe-goodsize-tmp isCargoListOnchange===")
this.handleCargoChange(newVal)
},
deep: true,
}
},
props: {
@ -65,6 +77,15 @@
},
methods: {
handleCargoChange(list){
let parcelQty = 0, totalVolume = 0
list.map(t=> {
parcelQty += (+t.cargoQty) || 0
totalVolume += (+t.volume) || 0
})
this.modelInfo.parcelQty = parcelQty
this.modelInfo.totalVolume = totalVolume
},
async calceOther() {
let { totalVolume, productType, billWeight } = this.modelInfo
let voRes = await apiService.calcVolumeWeight({ productType, totalVolume })

View File

@ -2,15 +2,39 @@
<view v-for="(item) in modelInfo.cargoList" class="yditem">
<view class="ydi-lab">
<text class="font-weight">{{item.goodsName}}</text>
<text>实发: {{item.cargoQty}}</text>
</view>
<view class="ydi-lab mt-10">
<text class="clr-sub">{{item.nationArea}}</text>
<!-- <text>实入仓: 0</text> -->
</view>
<view class="ydi-lab mt-10">
<text class="clr-prm">{{item.price}} CNY</text>
</view>
<u-row justify="between" custom-style="flex-wrap: wrap;">
<u-col v-if="item.nationArea" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">产地</text>{{item.nationArea}}
</view>
</u-col>
<u-col span="6">
<view class="pt-5">
<text class="clr-sub pr-10">实发</text> {{item.cargoQty}}
</view>
</u-col>
<u-col v-if="item.price" span="6">
<view class="pt-5">
<text class="clr-sub pr-10">单价</text>{{item.price}} CNY
</view>
</u-col>
<u-col span="12">
<view class="pt-5">
<text class="clr-sub pr-10">尺寸</text>
{{item.length || '0'}}cm<text class="clr-sub pl-10 pr-10">*</text>
{{item.width || '0'}}cm<text class="clr-sub pl-10 pr-10 ">*</text>
{{item.length || '0'}}cm
</view>
</u-col>
<u-col span="12">
<view class="pt-5">
<text class="clr-sub pr-10">体积</text>
{{item.volume || '0'}}m³
</view>
</u-col>
</u-row>
</view>
<view class="">

View File

@ -208,16 +208,16 @@
<bpe-goodstatic-tmp v-model:value="submitParam"></bpe-goodstatic-tmp>
</view>
<template v-if="isShowJifei">
<view>
<view class="com-section mt-30">
<u-row justify="space-between">
<text>计费信息</text>
</u-row>
</view>
<view class="blcok-white">
<bpe-cost-tmp v-model:value="submitParam" :searchParam="jifeiParam"></bpe-cost-tmp>
<bpe-cost-tmp v-model:value="submitParam"></bpe-cost-tmp>
</view>
</template>
</view>
<view class="com-section mt-30">
<u-row justify="space-between">
@ -298,25 +298,6 @@
dicData() {
return this.$store.getters.dicData
},
jifeiParam(){
let info = this.submitParam
let param = {
productType: info.productType,
// customerCode: info.customerCode,
customsClear: info.customsClear,
customsEclaration: info.customsEclaration,
calcFeeType: info.calcFeeType,
settlementWeight: info.settlementWeight,
totalVolume: info.totalVolume,
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
dispatchUnderlingSiteCode: info.dispatchUnderlingSiteCode,
}
return param
},
isShowJifei(){
let vals = Object.values(this.jifeiParam)
return vals.length == vals.filter(v => !!v).length
},
isShowYueJie(){
let { submitParam } = this
return submitParam.paymentType == 2 || submitParam.paymentType == 4 || submitParam.paymentType == 5