|
@@ -751,7 +751,7 @@ module.exports = app => {
|
|
|
});
|
|
});
|
|
|
c.attNames = names.join('\n');
|
|
c.attNames = names.join('\n');
|
|
|
}
|
|
}
|
|
|
- const changeBills = await this.ctx.service.changeAuditList.getChangeAuditBills(tid);
|
|
|
|
|
|
|
+ const changeBills = await this.ctx.service.changeAuditList.getChangeAuditBills(tid, this.ctx.session.sessionProject.page_show.isOnlyChecked);
|
|
|
for (const d of changeBills) {
|
|
for (const d of changeBills) {
|
|
|
d.o_qty = d.oamount;
|
|
d.o_qty = d.oamount;
|
|
|
d.o_tp = this.ctx.helper.mul(d.o_qty, d.unit_price, decimal.tp);
|
|
d.o_tp = this.ctx.helper.mul(d.o_qty, d.unit_price, decimal.tp);
|
|
@@ -760,7 +760,7 @@ module.exports = app => {
|
|
|
d.s_qty = d.samount ? parseFloat(d.samount) : 0;
|
|
d.s_qty = d.samount ? parseFloat(d.samount) : 0;
|
|
|
d.s_tp = this.ctx.helper.mul(d.s_qty, d.unit_price, decimal.tp);
|
|
d.s_tp = this.ctx.helper.mul(d.s_qty, d.unit_price, decimal.tp);
|
|
|
|
|
|
|
|
- const auditAmount = d.audit_amount.split(',');
|
|
|
|
|
|
|
+ const auditAmount = d.audit_amount ? d.audit_amount.split(',') : [];
|
|
|
const relaChange = ctx.helper._.find(change, {cid: d.cid});
|
|
const relaChange = ctx.helper._.find(change, {cid: d.cid});
|
|
|
for (const [i, aa] of auditAmount.entries()) {
|
|
for (const [i, aa] of auditAmount.entries()) {
|
|
|
const amountField = 'qty_' + (i+1), tpField = 'tp_' + (i+1);
|
|
const amountField = 'qty_' + (i+1), tpField = 'tp_' + (i+1);
|
|
@@ -1264,7 +1264,7 @@ module.exports = app => {
|
|
|
async getChangeInfo(tid, sid) {
|
|
async getChangeInfo(tid, sid) {
|
|
|
await this.ctx.service.tender.checkTender(tid);
|
|
await this.ctx.service.tender.checkTender(tid);
|
|
|
await this.ctx.service.stage.checkStage(sid);
|
|
await this.ctx.service.stage.checkStage(sid);
|
|
|
- this.changeInfo = await this.ctx.service.change.getChangeAndUsedInfo(tid);
|
|
|
|
|
|
|
+ this.changeInfo = await this.ctx.service.stageChange.getChangeWithUsedInfo(this.ctx.stage);
|
|
|
const usedChangesId = await this.ctx.service.stageChange.getStageUsedChangeId(sid);
|
|
const usedChangesId = await this.ctx.service.stageChange.getStageUsedChangeId(sid);
|
|
|
for (const c of this.changeInfo) {
|
|
for (const c of this.changeInfo) {
|
|
|
c.cur_used = usedChangesId.indexOf(c.cid) >= 0;
|
|
c.cur_used = usedChangesId.indexOf(c.cid) >= 0;
|