Commit c24be753 by liuyang

2024-09-09 销售开票选择结算单增加含税金额,税率改为可修改

parent e5f883dd
......@@ -14,7 +14,31 @@ $(function() {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
}
},
loadComplete: function (grid) {
grid.dataSource.bind("change",function(e){
var item = e.items[0];
if(e.field == "taxPoints"){
if(item.thisSettlementTax && item.thisPriceTax){
let thisSettlementAmount = item.thisPriceTax / (item.taxPoints / 100 + 1);
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementAmount = Number(thisSettlementAmount.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementAmount',thisSettlementAmount)
}
if(item.taxPoints && item.thisPriceTax){
let thisSettlementTax = item.thisPriceTax-item.thisSettlementAmount;
// 使用toFixed方法四舍五入到两位小数,并转换为数字
thisSettlementTax = Number(thisSettlementTax.toFixed(2));
resultGrid.setCellValue(item,'thisSettlementTax',thisSettlementTax)
}
loadChange(grid,e,"thisAmount");
}
}
)
},
}
......
......@@ -42,8 +42,10 @@
<EF:EFColumn ename="settlementNumber" cname="结算编号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="contractDate" cname="结算日期" width="120" enable="false" readonly="true" align="center"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFColumn ename="taxPoints" cname="税率(%)" width="80" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFComboColumn ename="taxPoints" cname="税率" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
......@@ -52,6 +54,7 @@
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="thisPriceTax" cname="结算含税金额" enable="false" hidden="false" format="{0:N3}" align="right"/>
<EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" enable="true" readonly="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="15" required="false"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
......
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