This commit is contained in:
linfso 2024-10-18 07:14:19 +08:00
parent dd117d2f3c
commit c8d6eef873
3 changed files with 26 additions and 2 deletions

View File

@ -1347,6 +1347,14 @@ methods: {
this.calcBillFee(); this.calcBillFee();
} }
},
onCalcFeeTypeChange(){
if(this.form.calcFeeType == '3' ){
}
this.calcBillFee();
}, },
onSelectMonthUser(item){ onSelectMonthUser(item){
if(item!=null){ if(item!=null){
@ -1376,7 +1384,13 @@ methods: {
if((newItem.initialWeightFee>0||newItem.addWeightPrice>0) && this.form.settlementWeight!=null){ if((newItem.initialWeightFee>0||newItem.addWeightPrice>0) && this.form.settlementWeight!=null){
expr=expr.replace("s",newItem.initialWeightFee); expr=expr.replace("s",newItem.initialWeightFee);
expr=expr.replace("d",newItem.addWeightPrice); 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.realFee=parseFloat(eval(expr)).toFixed(2);
newItem.fee=newItem.realFee; newItem.fee=newItem.realFee;
} }
@ -1924,7 +1938,12 @@ methods: {
let item=this.form.feeItems[i]; let item=this.form.feeItems[i];
let newFee=Number(item.realFee); let newFee=Number(item.realFee);
if(item.currency&&item.currency !='CNY'){ 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){ if(res.code==200){
newFee=newFee*Number(res.data); newFee=newFee*Number(res.data);
newFee=newFee.toFixed(2); newFee=newFee.toFixed(2);

View File

@ -1938,7 +1938,11 @@ methods: {
let item=this.form.feeItems[i]; let item=this.form.feeItems[i];
let newFee=Number(item.realFee); let newFee=Number(item.realFee);
if(item.currency&&item.currency !='CNY'){ 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}; let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate};
console.log("===>getValidExchangeRate==>",qObj);
let res= await getValidExchangeRate(qObj); let res= await getValidExchangeRate(qObj);
if(res.code==200){ if(res.code==200){
newFee=newFee*Number(res.data); newFee=newFee*Number(res.data);

View File

@ -1871,6 +1871,7 @@ export default {
let newFee=Number(item.realFee); let newFee=Number(item.realFee);
if(item.currency&&item.currency !='CNY'){ if(item.currency&&item.currency !='CNY'){
let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate}; let qObj={from:item.currency,to:'CNY',rateDate:this.form.sendDate};
console.log("===>getValidExchangeRate==>",qObj);
let res= await getValidExchangeRate(qObj); let res= await getValidExchangeRate(qObj);
if(res.code==200){ if(res.code==200){
newFee=newFee*Number(res.data); newFee=newFee*Number(res.data);