瀏覽代碼

计量台账,部位明细,删除本期合同计量时报错

MaiXinRong 6 年之前
父節點
當前提交
1382b0c1c6
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/service/stage_pos.js

+ 3 - 1
app/service/stage_pos.js

@@ -201,7 +201,9 @@ module.exports = app => {
                 if (d.contract_qty !== undefined || d.qc_qty !== undefined || d.postil !== undefined) {
                     const sp = {pid: d.pid, lid: d.lid, contract_qty: d.contract_qty, qc_qty: d.qc_qty, postil: d.postil};
                     const osp = this._.find(orgStagePos, function (p) { return p.pid === d.pid; });
-                    this.ctx.helper.checkFieldPrecision(sp, this.qtyFields, precision.value);
+                    if (precision) {
+                        this.ctx.helper.checkFieldPrecision(sp, this.qtyFields, precision.value);
+                    }
                     if (osp && osp.times === this.ctx.stage.curTimes && osp.order === this.ctx.stage.curOrder) {
                         await transaction.update(this.tableName, d, {where: {id: osp.id}});
                     } else {