|
@@ -410,9 +410,18 @@ module.exports = app => {
|
|
|
this.ctx.helper.assignRelaData(billsData, [
|
|
|
{ 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'], prefix: '', relaId: 'lid' },
|
|
|
- { data: endBpcStage, fields: ['end_contract_pc_tp', 'end_qc_pc_tp', 'end_pc_tp'], prefix: '', 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' },
|
|
|
]);
|
|
|
+ billsData.forEach(x => {
|
|
|
+ if (x.org_price_his && x.org_price_his.length > 0) {
|
|
|
+ for (const prop of x.org_price_his) {
|
|
|
+ x[`org_price_${prop}`] = x.org_price_his[prop];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ x.org_price_0 = x.unit_price;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
const billsTree = this._getNewBillsTree();
|
|
|
billsTree.loadDatas(billsData);
|
|
@@ -561,9 +570,18 @@ 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: bpcStage, fields: ['contract_pc_tp', 'qc_pc_tp', 'pc_tp'], prefix: '', relaId: 'lid' },
|
|
|
- { data: endBpcStage, fields: ['end_contract_pc_tp', 'end_qc_pc_tp', 'end_pc_tp'], prefix: '', 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' },
|
|
|
]);
|
|
|
+ billsData.forEach(x => {
|
|
|
+ if (x.org_price_his && x.org_price_his.length > 0) {
|
|
|
+ for (const prop of x.org_price_his) {
|
|
|
+ x[`org_price_${prop}`] = x.org_price_his[prop];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ x.org_price_0 = x.unit_price;
|
|
|
+ }
|
|
|
+ });
|
|
|
const billsTree = this._getNewBillsTree();
|
|
|
billsTree.loadDatas(billsData);
|
|
|
|