|
@@ -30,13 +30,14 @@ const billsFields = (function () {
|
|
|
const pre = ['pre_contract_qty', 'pre_contract_tp', 'pre_qc_qty', 'pre_qc_tp', 'pre_gather_qty', 'pre_gather_tp'];
|
|
|
const end = ['end_contract_qty', 'end_contract_tp', 'end_qc_qty', 'end_qc_tp', 'end_gather_qty', 'end_gather_tp'];
|
|
|
const final = ['final_tp', 'final_ratio'];
|
|
|
+ const stageDgn = ['deal_dgn_qty1', 'deal_dgn_qty2', 'c_dgn_qty1', 'c_dgn_qty2'];
|
|
|
|
|
|
const stage = cur.concat(pre, end, final);
|
|
|
const stageEnd = pre.concat(end, final);
|
|
|
const bgl = ['qc_bgl_code'];
|
|
|
const leafXmj = ['leaf_xmj_id'];
|
|
|
|
|
|
- return {cur, pre, end, final, stage, stageEnd, bgl, leafXmj};
|
|
|
+ return {cur, pre, end, final, stageDgn, stage, stageEnd, bgl, leafXmj};
|
|
|
})();
|
|
|
const posFields = (function () {
|
|
|
const cur = ['contract_qty', 'qc_qty', 'gather_qty', 'postil'];
|
|
@@ -348,6 +349,13 @@ module.exports = app => {
|
|
|
}
|
|
|
|
|
|
const billsData = await this.ctx.service.ledger.getData(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) {
|
|
|
+ const l = this.ctx.helper._.find(billsData, {id: d.id});
|
|
|
+ this.ctx.helper._.assignIn(l, d);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this._checkFieldsExist(fields, billsFields.stage)) {
|
|
|
if (this.ctx.stage.readOnly) {
|
|
|
const curStage = await this.ctx.service.stageBills.getAuditorStageData(this.ctx.tender.id,
|