Browse Source

修复清单新增不入库bug

ellisran 1 year ago
parent
commit
506e3e5348
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/service/material_list.js

+ 4 - 1
app/service/material_list.js

@@ -41,6 +41,9 @@ module.exports = app => {
                     gcl_id: data.gcl_id,
                     xmj_id: data.xmj_id,
                     mx_id: data.mx_id,
+                    contract_qty: data.contract_qty,
+                    qc_qty: data.qc_qty,
+                    qc_minus_qty: data.qc_minus_qty,
                     gather_qty: data.gather_qty,
                     is_join: data.is_join,
                     is_self: 1,
@@ -564,7 +567,7 @@ module.exports = app => {
                         // }
                         const mbId = typeof mb === 'object' ? mb.id : mb;
                         const quantity = typeof mb === 'object' ? mb.quantity : 0;
-                        if (xmj.gather_qty && this._.findIndex(selfList, { gcl_id: xmj.gcl_id, xmj_id: xmj.xmj_id, mx_id: xmj.mx_id }) === -1) {
+                        if ((xmj.contract_qty || xmj.qc_qty || xmj.qc_minus_qty || xmj.gather_qty) && this._.findIndex(selfList, { gcl_id: xmj.gcl_id, xmj_id: xmj.xmj_id, mx_id: xmj.mx_id }) === -1) {
                             const mlInfo = this._.find(oldMaterialList, { gcl_id: xmj.gcl_id, xmj_id: xmj.xmj_id, mx_id: xmj.mx_id, mb_id: mbId, ms_id: xmj.ms_id ? xmj.ms_id : null });
                             if (mlInfo) {
                                 uplist.push({ id: mlInfo.id, quantity, expr: '' });