瀏覽代碼

合同支付,起扣金额、扣款限额调整

MaiXinRong 5 月之前
父節點
當前提交
b7898e68e8
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 2 2
      app/public/js/phase_pay_detail.js
  2. 3 3
      app/service/phase_pay_detail.js

+ 2 - 2
app/public/js/phase_pay_detail.js

@@ -348,7 +348,7 @@ $(document).ready(() => {
             checkRangeExpr(payNode, text, data) {
                 if (!payNode) return [false, '数据错误'];
 
-                const num = text ? _.toNumber(text) : 0;
+                const num = text ? _.toNumber(text) || 0 : 0;
                 let expr = text ? (num ? '' : text) : '';
                 expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
                 const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);
@@ -378,7 +378,7 @@ $(document).ready(() => {
             checkStartExpr(payNode, text, data) {
                 if (!payNode) return [false, '数据错误'];
 
-                const num = text ? _.toNumber(text) : 0;
+                const num = text ? _.toNumber(text) || 0 : 0;
                 let expr = text ? (num ? '' : text) : '';
                 expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
                 const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);

+ 3 - 3
app/service/phase_pay_detail.js

@@ -156,9 +156,9 @@ class PayCalculator {
                 p.start_tp = this.ctx.helper.round(p.start_tp, this.decimal);
             }
             if (p.range_expr) {
-                p.range_price = this.ctx.helper.round(this._calculateExpr(p.range_expr), this.decimal);
-            } else if (p.range_price && !p.range_expr) {
-                p.range_price = this.ctx.helper.round(p.range_price, this.decimal);
+                p.range_tp = this.ctx.helper.round(this._calculateExpr(p.range_expr), this.decimal);
+            } else if (p.range_tp && !p.range_expr) {
+                p.range_tp = this.ctx.helper.round(p.range_tp, this.decimal);
             }
         }
     }