Browse Source

合同支付,只读状态,也需显示表达式

MaiXinRong 6 years ago
parent
commit
8ee99ce2b3
3 changed files with 7 additions and 3 deletions
  1. 1 1
      app/public/js/stage_pay.js
  2. 3 1
      app/service/stage_bills_final.js
  3. 3 1
      app/service/stage_pos_final.js

+ 1 - 1
app/public/js/stage_pay.js

@@ -470,9 +470,9 @@ $(document).ready(() => {
         },
     };
     paySpreadObj.refreshActn();
+    paySpread.bind(spreadNS.Events.SelectionChanged, paySpreadObj.selectionChanged);
     if (!readOnly) {
         paySpread.bind(spreadNS.Events.EditEnded, paySpreadObj.editEnded);
-        paySpread.bind(spreadNS.Events.SelectionChanged, paySpreadObj.selectionChanged);
         paySpread.bind(spreadNS.Events.ButtonClicked, paySpreadObj.buttonClicked);
         paySpread.bind(spreadNS.Events.EditStarting, paySpreadObj.editStarting);
         paySpread.bind(spreadNS.Events.ClipboardPasted, paySpreadObj.clipboardPasted);

+ 3 - 1
app/service/stage_bills_final.js

@@ -63,7 +63,9 @@ module.exports = app => {
                     delete c.order;
                     delete c.postil;
                     c.sorder = stage.order;
-                    const p = this.ctx.helper._.find(pre, {lid: cur.lid});
+                    const p = this.ctx.helper._.find(pre, function (x) {
+                        return x.lid === c.lid;
+                    });
                     if (!p) continue;
                     c.contract_qty = this.ctx.helper.add(c.contract_qty, p.contract_qty);
                     c.contract_tp = this.ctx.helper.add(c.contract_tp, p.contract_tp);

+ 3 - 1
app/service/stage_pos_final.js

@@ -67,7 +67,9 @@ module.exports = app => {
                     delete c.order;
                     delete c.postil;
                     c.sorder = stage.order;
-                    const p = this.ctx.helper._.find(pre, {pid: cur.pid});
+                    const p = this.ctx.helper._.find(pre, function (x) {
+                        return x.pid === c.pid;
+                    });
                     if (!p) continue;
                     c.contract_qty = this.ctx.helper.add(c.contract_qty, p.contract_qty);
                     c.qc_qty = this.ctx.helper.add(c.qc_qty, p.qc_qty);