|
@@ -162,13 +162,15 @@ class BudgetFinal {
|
|
|
? await this.ctx.service.stageBills.getAuditorStageData2(id, stage.id, stage.curTimes, stage.curOrder)
|
|
|
: await this.ctx.service.stageBills.getLastestStageData2(id, stage.id);
|
|
|
const preBills = stage.order > 1 ? await this.ctx.service.stageBillsFinal.getFinalData({id}, stage.order - 1) : [];
|
|
|
+ const bpcData = await ctx.service.stageBillsPc.getAllDataByCondition({ where: { sid: ctx.stage.id } });
|
|
|
helper.assignRelaData(bills, [
|
|
|
{ data: curBills, fields: ['contract_tp', 'qc_tp'], prefix: '', relaId: 'lid' },
|
|
|
{ data: preBills, fields: ['contract_tp', 'qc_tp'], prefix: 'pre_', relaId: 'lid' },
|
|
|
{ data: dgnData, fields: ['deal_dgn_qty1', 'deal_dgn_qty2', 'c_dgn_qty1', 'c_dgn_qty2'], prefix: '', relaId: 'id' },
|
|
|
+ { data: bpcData, fields: ['pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
|
|
|
]);
|
|
|
bills.forEach(b => {
|
|
|
- b.end_gather_tp = helper.sum([b.qc_tp, b.contract_tp, b.pre_qc_tp, b.pre_contract_tp]);
|
|
|
+ b.end_gather_tp = helper.sum([b.qc_tp, b.contract_tp, b.pre_qc_tp, b.pre_contract_tp, b.pc_tp]);
|
|
|
});
|
|
|
this.final.tender_info.push({ id, stageOrder: stage.order, stageStatus: stage.status, stageFlow: stage.curTimes + '-' + stage.curOrder });
|
|
|
}
|