|
|
@ -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; |
|
|
|