From c8d6eef8733e6e92073fe5c887b1d73de93a8d3f Mon Sep 17 00:00:00 2001 From: linfso Date: Fri, 18 Oct 2024 07:14:19 +0800 Subject: [PATCH] md --- src/views/emis/emisWaybill/waybillModify.vue | 23 +++++++++++++++++-- src/views/emis/emisWaybill/waybillRecord.vue | 4 ++++ .../emisWaybillAjustApply/adjustPanel.vue | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 2129c25d..6d652a10 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -1347,6 +1347,14 @@ methods: { this.calcBillFee(); } + }, + + onCalcFeeTypeChange(){ + if(this.form.calcFeeType == '3' ){ + } + + this.calcBillFee(); + }, onSelectMonthUser(item){ if(item!=null){ @@ -1376,7 +1384,13 @@ methods: { if((newItem.initialWeightFee>0||newItem.addWeightPrice>0) && this.form.settlementWeight!=null){ expr=expr.replace("s",newItem.initialWeightFee); expr=expr.replace("d",newItem.addWeightPrice); - expr=expr.replace("w",this.form.settlementWeight); + // 如果按重量计费,则计算重量使用体积计算费用 + let calcWeight = this.form.settlementWeight; + if(this.form.calcFeeType==2){ + calcWeight=this.form.totalVolume; + } + expr=expr.replace("w",calcWeight); + // expr=expr.replace("w",this.form.settlementWeight); newItem.realFee=parseFloat(eval(expr)).toFixed(2); newItem.fee=newItem.realFee; } @@ -1924,7 +1938,12 @@ methods: { let item=this.form.feeItems[i]; let newFee=Number(item.realFee); if(item.currency&&item.currency !='CNY'){ - let res= await getValidExchangeRate({from:item.currency,to:'CNY',rateDate:this.form.sendDate}); + if(this.form.sendDate==undefined||this.form.sendDate==null||this.form.sendDate==''){ + this.form.sendDate =this.sendDate; + } + let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate}; + console.log("===>getValidExchangeRate==>",qObj); + let res= await getValidExchangeRate(qObj); if(res.code==200){ newFee=newFee*Number(res.data); newFee=newFee.toFixed(2); diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index 2ea0b169..8d04104d 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -1938,7 +1938,11 @@ methods: { let item=this.form.feeItems[i]; let newFee=Number(item.realFee); if(item.currency&&item.currency !='CNY'){ + if(this.form.sendDate==undefined||this.form.sendDate==null||this.form.sendDate==''){ + this.form.sendDate =this.sendDate; + } let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate}; + console.log("===>getValidExchangeRate==>",qObj); let res= await getValidExchangeRate(qObj); if(res.code==200){ newFee=newFee*Number(res.data); diff --git a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue index 605c2431..fed54520 100644 --- a/src/views/emis/emisWaybillAjustApply/adjustPanel.vue +++ b/src/views/emis/emisWaybillAjustApply/adjustPanel.vue @@ -1871,6 +1871,7 @@ export default { let newFee=Number(item.realFee); if(item.currency&&item.currency !='CNY'){ let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate}; + console.log("===>getValidExchangeRate==>",qObj); let res= await getValidExchangeRate(qObj); if(res.code==200){ newFee=newFee*Number(res.data);