Преглед на файлове

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

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);
             }
         }
     }