Browse Source

小数点精确到2位数再相比较

chenjun 7 tháng trước cách đây
mục cha
commit
ef93b8062e

+ 1 - 1
zjugis-business/src/main/resources/templates/FlowContractInvoice/js/apply.js

@@ -166,7 +166,7 @@
             }
         }
         if(contractInvoiceList.length>1){
-            if(Number(postData.contractInvoice.invoiceAmount) != Number(allInvoiceAmount)){
+            if(Number(postData.contractInvoice.invoiceAmount).toFixed(2) != Number(allInvoiceAmount).toFixed(2)){
                 all({success: false, errorMsg: "开票金额与所有项目开票金额之和不相等!"});
                 return;
             }