|
@@ -478,6 +478,7 @@ module.exports = app => {
|
|
|
const billsData = this.ctx.stage.ledgerHis
|
|
|
? await this.ctx.helper.loadLedgerDataFromOss(this.ctx.stage.ledgerHis.bills_file)
|
|
|
: await this.ctx.service.ledger.getData(this.ctx.tender.id);
|
|
|
+ const memoData = this.ctx.stage.ledgerHis ? await ctx.service.ledger.getAllDataByCondition({ columns: ['id', 'memo'], where: { tender_id: this.ctx.tender.id } }) : [];
|
|
|
if (this._checkFieldsExist(fields, billsFields.stageDgn)) {
|
|
|
const dgnData = await this.ctx.service.stageBillsDgn.getDgnData(this.ctx.tender.id);
|
|
|
for (const d of dgnData) {
|
|
@@ -503,6 +504,7 @@ module.exports = app => {
|
|
|
? await this._loadStageBillsYear(this.ctx.tender, this.ctx.stage.s_time.split('-')[0])
|
|
|
: [];
|
|
|
this.ctx.helper.assignRelaData(billsData, [
|
|
|
+ { data: memoData, fields: ['memo'], prefix: '', relaId: 'id' },
|
|
|
{ data: curStage, fields: ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp', 'qc_minus_qty', 'postil'], prefix: '', relaId: 'lid' },
|
|
|
{ data: preStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp', 'qc_minus_qty'], prefix: 'pre_', relaId: 'lid' },
|
|
|
{ data: bpcStage, fields: ['contract_pc_tp', 'qc_pc_tp', 'pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
|
|
@@ -634,6 +636,7 @@ module.exports = app => {
|
|
|
const billsData = this.ctx.stage.ledgerHis
|
|
|
? await this.ctx.helper.loadLedgerDataFromOss(this.ctx.stage.ledgerHis.bills_file)
|
|
|
: await this.ctx.service.ledger.getData(this.ctx.tender.id);
|
|
|
+ const memoData = this.ctx.stage.ledgerHis ? await ctx.service.ledger.getAllDataByCondition({ columns: ['id', 'memo'], where: { tender_id: this.ctx.tender.id } }) : [];
|
|
|
const allStageBills = await this.ctx.service.stageBills.getAllDataByCondition({where: {sid: sid}});
|
|
|
|
|
|
const stageBillsIndex = {}, timesLen = 100;
|
|
@@ -667,7 +670,8 @@ module.exports = app => {
|
|
|
: [];
|
|
|
|
|
|
this.ctx.helper.assignRelaData(billsData, [
|
|
|
- {data: preStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp', 'qc_minus_qty'], prefix: 'pre_', relaId: 'lid'},
|
|
|
+ { data: memoData, fields: ['memo'], prefix: '', relaId: 'id' },
|
|
|
+ { data: preStage, fields: ['contract_qty', 'contract_tp', 'qc_qty', 'qc_tp', 'qc_minus_qty'], prefix: 'pre_', relaId: 'lid'},
|
|
|
{ data: bpcStage, fields: ['contract_pc_tp', 'qc_pc_tp', 'pc_tp', 'org_price'], prefix: '', relaId: 'lid' },
|
|
|
{ data: endBpcStage, fields: ['end_contract_pc_tp', 'end_qc_pc_tp', 'end_pc_tp', 'org_price_his'], prefix: '', relaId: 'lid' },
|
|
|
]);
|