Bläddra i källkod

部位明细,调用变更令问题

MaiXinRong 6 år sedan
förälder
incheckning
1552e9373f
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 1 1
      app/service/change.js
  2. 3 1
      app/service/stage_pos.js

+ 1 - 1
app/service/change.js

@@ -685,7 +685,7 @@ module.exports = app => {
             const filter = 'cb.`code` = ' + this.db.escape(bills.b_code) + (pos ? ' And cb.`bwmx` = ' + this.db.escape(pos.name) : '');
             const sql = 'SELECT c.cid, c.code, c.name, c.w_code, c.p_code, c.peg, c.org_name, c.org_code, c.new_name, c.new_code,' +
                         '    c.content, c.basis, c.memo, c.type, c.class, c.quality, c.company, c.charge, ' +
-                        '    cb.id As cbid, cb.code As b_code, cb.name As b_name, cb.unit As b_unit, cb.samount As b_amount, cb.detail As b_detail, cb.bwmx As b_bwmx ' +
+                        '    cb.id As cbid, cb.code As b_code, cb.name As b_name, cb.unit As b_unit, cb.samount As b_amount, cb.detail As b_detail, cb.bwmx As b_bwmx, ' +
                         '    scb.used_amount' +
                         '  FROM ' + this.tableName + ' As c ' +
                         '  Left Join ' + this.ctx.service.changeAuditList.tableName +' As cb On c.cid = cb.cid ' +

+ 3 - 1
app/service/stage_pos.js

@@ -209,6 +209,7 @@ module.exports = app => {
          * @private
          */
         async _updateStagePosData(transaction, data) {
+            console.log(data);
             let bills, precision;
             const result = {ledger: [], pos: [], stageUpdate: true}, ledgerCalc = [];
             const datas = data instanceof Array ? data : [data];
@@ -351,6 +352,7 @@ module.exports = app => {
                         result.pos.curStageData = await this.getLastestStageData(this.ctx.tender.id, this.ctx.stage.id, refreshData.pos);
                     }
                 }
+                console.log(result);
                 return result;
             } catch(err) {
                 throw '获取数据异常,请刷新页面。';
@@ -366,7 +368,7 @@ module.exports = app => {
                     tid: this.ctx.tender.id,
                     sid: this.ctx.stage.id,
                     lid: pos.lid,
-                    pid: pos.pid,
+                    pid: pos.id,
                     said: this.ctx.session.sessionUser.accountId,
                     times: this.ctx.stage.curTimes,
                     order: this.ctx.stage.curOrder,