Commit 1cd2b399 by 江和松

Merge remote-tracking branch 'origin/dev' into dev

parents 082a87a9 1a7ee16d
...@@ -32,14 +32,19 @@ $(function() { ...@@ -32,14 +32,19 @@ $(function() {
grid.dataSource.bind("change",function(e){ grid.dataSource.bind("change",function(e){
var item = e.items[0]; var item = e.items[0];
if(e.field == "taxPoints"){ if(e.field == "taxPoints"){
if(item.thisSettlementTax && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding / (item.taxPoints / 100 + 1);
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount = Number(thisSettlementAmount.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
if(item.taxPoints && item.totalContractPriceIncluding){ if(item.taxPoints && item.totalContractPriceIncluding){
let thisSettlementTax = item.totalContractPriceIncluding-item.thisSettlementAmount; let thisSettlementTax = item.totalContractPriceIncluding-item.thisSettlementAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax = Number(thisSettlementTax.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax) resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax)
} }
if(item.thisSettlementTax && item.totalContractPriceIncluding){
let thisSettlementAmount = item.totalContractPriceIncluding/(item.taxPoints/100+1);
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
loadChange(grid,e,"price"); loadChange(grid,e,"price");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment