@@ -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;
@@ -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 (' +