Parcourir la source

报表,变更概况数据表问题

MaiXinRong il y a 3 ans
Parent
commit
eb2aad8dbb
2 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 1 0
      app/service/report_memory.js
  2. 1 1
      app/service/stage_change.js

+ 1 - 0
app/service/report_memory.js

@@ -1083,6 +1083,7 @@ module.exports = app => {
             const usedChangesId = await this.ctx.service.stageChange.getStageUsedChangeId(sid);
             for (const c of this.changeInfo) {
                 c.cur_used = usedChangesId.indexOf(c.cid) >= 0;
+                c.used_ratio = c.used_pt;
             }
             return this.changeInfo;
         }

+ 1 - 1
app/service/stage_change.js

@@ -309,7 +309,7 @@ module.exports = app => {
             }
 
             const sql = 'SELECT c.lid, c.pid, SUM(c.qty) as used_qty,' +
-                        '    cb.tid, cb.cid, cb.id, cb.code, cb.name, cb.unit, cb.unit_price, cb.detail, cb.samount' +
+                        '    cb.tid, cb.cid, cb.id, cb.code, cb.name, cb.unit, cb.unit_price, cb.detail, cb.samount, cb.bwmx, cb.detail' +
                         '  FROM ' + this.ctx.service.changeAuditList.tableName + ' As cb' +
                         '  LEFT JOIN ' + this.tableName + ' As c ON cb.id = c.cbid ' +
                         '  INNER JOIN (' +