Browse Source

合同支付,本期实付计算问题

MaiXinRong 5 năm trước cách đây
mục cha
commit
2e3dc503f7
2 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 3 1
      app/lib/pay_calc.js
  2. 6 0
      app/public/js/stage_pay.js

+ 3 - 1
app/lib/pay_calc.js

@@ -215,8 +215,10 @@ class PayCalculate {
             p.end_tp = this.ctx.helper.round(this.ctx.helper.add(p.tp, p.pre_tp), this.decimal);
         }
         this.yf.end_tp = this.ctx.helper.add(this.yf.tp, this.yf.pre_tp);
-        if (this.sf.tp === null) {
+        if (this.sf.expr === null || this.sf.expr === '') {
             this.sf.tp = this.yf.tp;
+        } else {
+            this.sf.tp = this.ctx.helper._.toNumber(this.sf.expr);
         }
         this.sf.end_tp = this.ctx.helper.add(this.sf.tp, this.sf.pre_tp);
     }

+ 6 - 0
app/public/js/stage_pay.js

@@ -618,6 +618,9 @@ $(document).ready(() => {
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);
                         return;
                     }
+                    if (payBase.isSF(select)) {
+                        data.updateData.expr = data.updateData.tp;
+                    }
                 } else if (col.field === 'name') {
                     data.updateData.pid = select.pid;
                     data.updateData.name = validText;
@@ -784,6 +787,9 @@ $(document).ready(() => {
                                 SpreadJsObj.reLoadSheetData(paySpread.getActiveSheet());
                                 return;
                             }
+                            if (payBase.isSF(node)) {
+                                data.updateData.expr = data.updateData.tp;
+                            }
                         } else if (col.field === 'name') {
                             updateData.pid = node.pid;
                             updateData.name = validText;