计算问题修复
This commit is contained in:
parent
93663328c4
commit
8c6174a115
@ -167,6 +167,7 @@
|
||||
totalVolume: info.totalVolume,
|
||||
sendSiteCode: this.$store.getters.userInfo.ownerSiteCode,
|
||||
dispatchUnderlingSiteCode: info.dispatchUnderlingSiteCode,
|
||||
custNo: info.custNo,
|
||||
}
|
||||
return param
|
||||
}
|
||||
@ -174,12 +175,15 @@
|
||||
watch: {
|
||||
searchParam: {
|
||||
handler(newVal, oldVal){
|
||||
let vals = Object.values(newVal)
|
||||
let notMustKey = ['custNo']
|
||||
if(JSON.stringify(newVal) == JSON.stringify(oldVal || {})) {
|
||||
return false
|
||||
}
|
||||
let mustObj = JSON.parse(JSON.stringify(newVal))
|
||||
notMustKey.map(key=> { delete mustObj[key] })
|
||||
let mustVals = Object.values(mustObj)
|
||||
// 所有关联入参都有值或者为0再 执行自动计算,数据未变化不做计算
|
||||
if(vals.length == vals.filter(v => (v==0 || !!v)).length) {
|
||||
if(mustVals.length == mustVals.filter(v => (v==0 || !!v)).length) {
|
||||
console.log("====watch cost calcWaybillFee===")
|
||||
this.calcWaybillFee(newVal);
|
||||
}
|
||||
@ -241,7 +245,7 @@
|
||||
async calcWaybillFee(params = {}) {
|
||||
// calcFeeType计算入参特殊处理
|
||||
params.calcFeeType == 3 && (params.calcFeeType = 1);
|
||||
let res = await apiService.calcWaybillFee({ custNo: this.modelInfo.custNo, ...params })
|
||||
let res = await apiService.calcWaybillFee({ ...params })
|
||||
this.modelInfo.feeItems = res.data.feeList
|
||||
this.modelInfo.freight = res.data.totalFee
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"appid" : "__UNI__BCB0FB5",
|
||||
"description" : "探路国际速运",
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : "1049",
|
||||
"versionCode" : "1050",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user