瀏覽代碼

甲供材料、奖罚金、其他,历史记录问题

MaiXinRong 4 年之前
父節點
當前提交
4039487fb7
共有 3 個文件被更改,包括 9 次插入6 次删除
  1. 3 2
      app/service/stage_bonus.js
  2. 3 2
      app/service/stage_jgcl.js
  3. 3 2
      app/service/stage_other.js

+ 3 - 2
app/service/stage_bonus.js

@@ -165,11 +165,12 @@ module.exports = app => {
             if (datas.length === 0) return;
 
             const updateDatas = [];
+            const times = this.ctx.stage.curTimes, order = this.ctx.stage.curOrder;
             for (const d of datas) {
                 const history = d.shistory && d.shistory !== '' ? JSON.parse(d.shistory) : [];
                 const his = history.find(function (x) {
-                    return x.stimes && x.stimes === this.ctx.stage.curTimes
-                        && x.sorder && x.sorder === this.ctx.stage.curOrder;
+                    return x.stimes && x.stimes === times
+                        && x.sorder && x.sorder === order;
                 });
                 if (his) {
                     his.tp = d.tp;

+ 3 - 2
app/service/stage_jgcl.js

@@ -186,11 +186,12 @@ module.exports = app => {
             if (datas.length === 0) return;
 
             const updateDatas = [];
+            const times = this.ctx.stage.curTimes, order = this.ctx.stage.curOrder;
             for (const d of datas) {
                 const history = d.shistory && d.shistory !== '' ? JSON.parse(d.shistory) : [];
                 const his = history.find(function (x) {
-                    return x.stimes && x.stimes === this.ctx.stage.curTimes
-                        && x.sorder && x.sorder === this.ctx.stage.curOrder;
+                    return x.stimes && x.stimes === times
+                        && x.sorder && x.sorder === order;
                 });
                 if (his) {
                     his.arrive_qty = d.arrive_qty;

+ 3 - 2
app/service/stage_other.js

@@ -159,11 +159,12 @@ module.exports = app => {
             if (datas.length === 0) return;
 
             const updateDatas = [];
+            const times = this.ctx.stage.curTimes, order = this.ctx.stage.curOrder;
             for (const d of datas) {
                 const history = d.shistory && d.shistory !== '' ? JSON.parse(d.shistory) : [];
                 const his = history.find(function (x) {
-                    return x.stimes && x.stimes === this.ctx.stage.curTimes
-                        && x.sorder && x.sorder === this.ctx.stage.curOrder;
+                    return x.stimes && x.stimes === times
+                        && x.sorder && x.sorder === order;
                 });
                 if (his) {
                     his.tp = d.tp;