Browse Source

自动调用变更,定位无计量单元台账相关

MaiXinRong 1 year ago
parent
commit
c15d5e155d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      app/public/js/stage.js
  2. 1 1
      app/service/stage_change.js

+ 2 - 2
app/public/js/stage.js

@@ -4078,7 +4078,7 @@ $(document).ready(() => {
                 const node = stageTree.nodes.find(x => {return x.id === changeBills.gcl_id});
                 posData = stagePos.getLedgerPos(node.id) || [];
                 const changePos = posData.find(x => { return x.name === changeBills.bwmx; });
-                return { lid: node.id, pid: changePos ? changePos.id : (posData.length > 0 ? posData[0].id : -1) };
+                return { lid: node.id, pid: changePos ? changePos.id : (posData.length > 0 ? posData[0].id : '-1') };
             } else {
                 const cb = {
                     b_code: changeBills.code || '',
@@ -4097,7 +4097,7 @@ $(document).ready(() => {
                     };
                     if (_.isMatch(cb, b)) {
                         posData = stagePos.getLedgerPos(node.id);
-                        return { lid: node.id, pid: posData.length > 0 ? posData[0].id : -1 };
+                        return { lid: node.id, pid: posData.length > 0 ? posData[0].id : '-1' };
                     }
                 }
                 return null;

+ 1 - 1
app/service/stage_change.js

@@ -88,7 +88,7 @@ class autoUseChange {
         const minus = bamount < 0;
         this.changeDetail.push({
             tid: this.default.tid, sid: this.default.sid,
-            lid: billsPos.lid, pid: billsPos.pid, cid: bills.cid, cbid: bills.id,
+            lid: billsPos.lid, pid: billsPos.pid + '', cid: bills.cid, cbid: bills.id,
             qty: bills.valid_qty, stimes: 1, sorder: 0, unit_price: bills.unit_price, minus, no_value: false,
         });