Browse Source

暂存计量,兼容清单计量方式变更

MaiXinRong 6 months ago
parent
commit
538a970bf1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/controller/stage_controller.js
  2. 1 1
      app/service/stage_stash.js

+ 1 - 1
app/controller/stage_controller.js

@@ -2274,7 +2274,7 @@ module.exports = app => {
                 ctx.body = { err: 0, msg: '', data: null };
             } catch (err) {
                 ctx.log(err);
-                ctx.ajaxErrorBody(err, '保存当前计量数据失败');
+                ctx.ajaxErrorBody(err, '导入计量数据失败');
             }
         }
 

+ 1 - 1
app/service/stage_stash.js

@@ -289,7 +289,7 @@ module.exports = app => {
                 };
                 if (d.pos) {
                     for (const bp of d.pos) {
-                        const p = b.pos.find(x => { return x.id === bp.pid});
+                        const p = b.pos ? b.pos.find(x => { return x.id === bp.pid}) : null;
                         if (!p || p.settle_status === settleStatus.finish) continue;
 
                         const nps = { tid: stage.tid, sid: stage.id, said, lid: b.id, pid: p.id, times: 1, order: 0 };