Browse Source

清单对比/汇总,原设计量调整

MaiXinRong 11 months ago
parent
commit
66ae287d41

+ 1 - 1
app/controller/ledger_controller.js

@@ -714,7 +714,7 @@ module.exports = app => {
                 orders: [['code', 'asc']],
             });
             const changeBills = await ctx.service.changeAuditList.getAllDataByCondition({
-                columns: [ 'cid', 'code', 'name', 'unit', 'unit_price', 'oamount', 'checked_amount', 'checked_price' ],
+                columns: [ 'cid', 'code', 'name', 'unit', 'unit_price', 'oamount2', 'checked_amount', 'checked_price' ],
                 where: { tid: ctx.tender.id }
             });
             const changeIndex = {};

+ 1 - 1
app/controller/stage_controller.js

@@ -341,7 +341,7 @@ module.exports = app => {
                 orders: [['code', 'asc']],
             });
             const changeBills = await ctx.service.changeAuditList.getAllDataByCondition({
-                columns: [ 'id', 'cid', 'code', 'name', 'unit', 'unit_price', 'oamount', 'checked_amount', 'checked_price' ],
+                columns: [ 'id', 'cid', 'code', 'name', 'unit', 'unit_price', 'oamount2', 'checked_amount', 'checked_price' ],
                 where: { tid: ctx.tender.id }
             });
             const changeIndex = {};

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

@@ -407,8 +407,8 @@ const gclGatherModel = (function () {
                     gcb = { cid: c.cid, code: c.code, name: c.name };
                     gcl.change.push(gcb);
                 }
-                gcb.org_qty = ZhCalc.add(gcb.org_qty, cb.oamount);
-                gcb.org_tp = ZhCalc.add(gcb.org_tp, ZhCalc.mul(cb.oamount, gcl.unit_price, decimal));
+                gcb.org_qty = ZhCalc.add(gcb.org_qty, cb.oamount2);
+                gcb.org_tp = ZhCalc.add(gcb.org_tp, ZhCalc.mul(cb.oamount2, gcl.unit_price, decimal));
                 gcb.c_qty = ZhCalc.add(gcb.c_qty, cb.checked_amount);
                 gcb.c_tp = ZhCalc.add(gcb.c_tp, cb.checked_price);