Browse Source

2025-05-21

master
qiezi 8 months ago
parent
commit
3e0d0b1fdf
  1. 28
      src/views/modules/quote/detail/primary/quoteDetailCost.vue

28
src/views/modules/quote/detail/primary/quoteDetailCost.vue

@ -132,14 +132,24 @@ export default {
// this.quoteDetail.totalCost += this.quoteDetail.otherCost; // this.quoteDetail.totalCost += this.quoteDetail.otherCost;
// } // }
// //
this.computedTotalPartCost();
// let val = 0;
// let editInput = this.editInput.toLowerCase();
// if (editInput === 'va'){
// val = this.quoteDetail.quoteProfitRate
// }
this.computeProfitAmount();
this.computeCurrencyTotalCost();
this.computedTotalPartCost();//
this.computeMarkup();//
this.computeProfitAmount(); // CNY
this.computeCurrencyTotalCost();//
},
computeMarkup(){
let val = 0;
let editInput = this.editInput.toLowerCase();
if (editInput === 'va'){
val = this.quoteDetail.quoteProfitRate
}else if (editInput === 'contribution'){
val = this.quoteDetail.quoteProfitAmount
}else if (editInput === 'margin'){
val = this.quoteDetail.quoteTaxRate
}else if (editInput === 'price'){
val = this.quoteDetail.quoteTaxTotalPrice
}
this.computePriceByRate(val,editInput)
}, },
computeProfitAmount(){ computeProfitAmount(){
this.quoteDetail.profitAmount = this.quoteDetail.profitAmount =
@ -236,7 +246,7 @@ export default {
} }
}, },
computePriceByRate(val,type){ computePriceByRate(val,type){
if (val === undefined || val === null || val <=0){
if (val === undefined || val === null){
return; return;
} }
let value = 0; let value = 0;

Loading…
Cancel
Save