md
This commit is contained in:
parent
e3a60c6245
commit
d2aacd439e
@ -1369,6 +1369,16 @@ methods: {
|
|||||||
this.form.feeItems=[];
|
this.form.feeItems=[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let expr="s+w*d";
|
||||||
|
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);
|
||||||
|
newItem.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
newItem.fee=newItem.realFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.form.feeItems.push(newItem);
|
this.form.feeItems.push(newItem);
|
||||||
|
|
||||||
this.form.blSpecialQuote='1';
|
this.form.blSpecialQuote='1';
|
||||||
@ -1903,7 +1913,7 @@ methods: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newFee=newFee.toFixed(2);
|
newFee=Number(newFee).toFixed(2);
|
||||||
totalFee=Number(totalFee)+Number(newFee);
|
totalFee=Number(totalFee)+Number(newFee);
|
||||||
|
|
||||||
if(item.blAutoGen==0){
|
if(item.blAutoGen==0){
|
||||||
|
|||||||
@ -1369,6 +1369,16 @@ methods: {
|
|||||||
this.form.feeItems=[];
|
this.form.feeItems=[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let expr="s+w*d";
|
||||||
|
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);
|
||||||
|
newItem.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
newItem.fee=newItem.realFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.form.feeItems.push(newItem);
|
this.form.feeItems.push(newItem);
|
||||||
|
|
||||||
this.form.blSpecialQuote='1';
|
this.form.blSpecialQuote='1';
|
||||||
@ -1903,7 +1913,7 @@ methods: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newFee=newFee.toFixed(2);
|
newFee=Number(newFee).toFixed(2);
|
||||||
totalFee=Number(totalFee)+Number(newFee);
|
totalFee=Number(totalFee)+Number(newFee);
|
||||||
|
|
||||||
if(item.blAutoGen==0){
|
if(item.blAutoGen==0){
|
||||||
|
|||||||
@ -1361,6 +1361,16 @@ export default {
|
|||||||
if(!this.form.feeItems){
|
if(!this.form.feeItems){
|
||||||
this.form.feeItems=[];
|
this.form.feeItems=[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let expr="s+w*d";
|
||||||
|
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);
|
||||||
|
newItem.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
newItem.fee=newItem.realFee;
|
||||||
|
}
|
||||||
|
|
||||||
this.form.feeItems.push(newItem);
|
this.form.feeItems.push(newItem);
|
||||||
this.handleCalcFeeItem();
|
this.handleCalcFeeItem();
|
||||||
}
|
}
|
||||||
@ -1789,14 +1799,31 @@ export default {
|
|||||||
},
|
},
|
||||||
async handleCalcFeeItem(row){
|
async handleCalcFeeItem(row){
|
||||||
if(row!=null && this.form.settlementWeight!=null){
|
if(row!=null && this.form.settlementWeight!=null){
|
||||||
let expr="s+w*d";
|
if(row.calcExp&&row.calcExp!='undefined'){
|
||||||
if(row.initialWeightFee>0||row.addWeightPrice>0){
|
let expr=row.calcExp;
|
||||||
expr=expr.replace("s",row.initialWeightFee);
|
// 如果公式包含变量,使用变量进行计算
|
||||||
expr=expr.replace("d",row.addWeightPrice);
|
if(expr.indexOf('s')!=-1 || expr.indexOf('d')!=-1){
|
||||||
expr=expr.replace("w",this.form.settlementWeight);
|
expr=expr.replace("s",row.initialWeightFee);
|
||||||
row.realFee=parseFloat(eval(expr));
|
expr=expr.replace("d",row.addWeightPrice);
|
||||||
row.realFee=realFee.toFixed(2);
|
expr=expr.replace("w",this.form.settlementWeight);
|
||||||
|
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
}else{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
let expr="s+w*d";
|
||||||
|
if(row.initialWeightFee>0||row.addWeightPrice>0){
|
||||||
|
|
||||||
|
expr=expr.replace("s",row.initialWeightFee);
|
||||||
|
expr=expr.replace("d",row.addWeightPrice);
|
||||||
|
expr=expr.replace("w",this.form.settlementWeight);
|
||||||
|
row.realFee=parseFloat(eval(expr)).toFixed(2);
|
||||||
|
// console.log("===>calcExp222==expr==>",expr);
|
||||||
|
// console.log("===>calcExp222==row==>",row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let totalFee=Number(0);
|
let totalFee=Number(0);
|
||||||
@ -1814,13 +1841,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newFee=Number(newFee).toFixed(2);
|
||||||
|
totalFee=Number(totalFee)+Number(newFee);
|
||||||
|
|
||||||
if(item.blAutoGen==0){
|
if(item.blAutoGen==0){
|
||||||
item.fee=item.realFee;
|
item.fee=item.realFee;
|
||||||
}
|
}
|
||||||
|
|
||||||
newFee=newFee.toFixed(2);
|
|
||||||
totalFee=Number(totalFee)+Number(newFee);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.form.freight = totalFee.toFixed(2);
|
this.form.freight = totalFee.toFixed(2);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user