浏览代码

门诊收费取消非现金收款金额大于实收金额的限制

hurugang 2 年之前
父节点
当前提交
e02f483dfa

+ 4 - 4
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -91,10 +91,10 @@ public class TsmzServiceImpl implements TsmzService {
         String totalCost = (String) tempJSONO.get("totalCost");
         String acctPay = (String) tempJSONO.get("acctPay");
         Integer cardType = (Integer) tempJSONO.get("cardType");
-        payInfo.setFundPay(StringUtils.isBlank(fundPay) ? BigDecimal.ZERO : new BigDecimal(fundPay).setScale(1, BigDecimal.ROUND_HALF_UP));
-        payInfo.setSelfPay(StringUtils.isBlank(selfPay) ? BigDecimal.ZERO : new BigDecimal(selfPay).setScale(1, BigDecimal.ROUND_HALF_UP));
-        payInfo.setTotalCost(StringUtils.isBlank(totalCost) ? BigDecimal.ZERO : new BigDecimal(totalCost).setScale(1, BigDecimal.ROUND_HALF_UP));
-        payInfo.setAcctPay(StringUtils.isBlank(acctPay) ? BigDecimal.ZERO : new BigDecimal(acctPay).setScale(1, BigDecimal.ROUND_HALF_UP));
+        payInfo.setFundPay(StringUtils.isBlank(fundPay) ? BigDecimal.ZERO : new BigDecimal(fundPay).setScale(2, BigDecimal.ROUND_HALF_UP));
+        payInfo.setSelfPay(StringUtils.isBlank(selfPay) ? BigDecimal.ZERO : new BigDecimal(selfPay).setScale(2, BigDecimal.ROUND_HALF_UP));
+        payInfo.setTotalCost(StringUtils.isBlank(totalCost) ? BigDecimal.ZERO : new BigDecimal(totalCost).setScale(2, BigDecimal.ROUND_HALF_UP));
+        payInfo.setAcctPay(StringUtils.isBlank(acctPay) ? BigDecimal.ZERO : new BigDecimal(acctPay).setScale(2, BigDecimal.ROUND_HALF_UP));
         payInfo.setCardType(cardType);
         return payInfo;
     }

+ 11 - 11
src/main/resources/static/js/mz/toll_administration.js

@@ -1078,17 +1078,17 @@ function checkFee(flag) {
                 }
             }
         }
-        if (notCashAmount > realMoney) {
-            new PNotify({
-                title: '错误提示',
-                text: "非现金收款金额不能大于实收金额!",
-                type: 'error',
-                hide: true,
-                styling: 'bootstrap3'
-            });
-            $("#addPayType").parent().removeClass("in").addClass("hide");
-            return;
-        }
+        // if (notCashAmount > realMoney) {
+        //     new PNotify({
+        //         title: '错误提示',
+        //         text: "非现金收款金额不能大于实收金额!",
+        //         type: 'error',
+        //         hide: true,
+        //         styling: 'bootstrap3'
+        //     });
+        //     $("#addPayType").parent().removeClass("in").addClass("hide");
+        //     return;
+        // }
         var totalAmount = Add(cashAmount, notCashAmount);
         $("#surplusAmount").val(0.0);
         if (totalAmount < realMoney) {