|
@@ -1351,6 +1351,14 @@ module.exports = app => {
|
|
this.pmDeal = await pm.dealData(this.ctx, this.ctx.session.sessionProject.code, selects);
|
|
this.pmDeal = await pm.dealData(this.ctx, this.ctx.session.sessionProject.code, selects);
|
|
|
|
|
|
result = this.pmDeal.contracts ? this.pmDeal.contracts.filter(x => { return x.ContractsType === 2 }) : [];
|
|
result = this.pmDeal.contracts ? this.pmDeal.contracts.filter(x => { return x.ContractsType === 2 }) : [];
|
|
|
|
+ const fields = ['Code', 'Name', 'ContractName', 'ContractCode', 'ContractPrice', 'ContractReturned', 'ContractsPaid', 'ContractStatus', 'ContractLocking', 'CreateTime'], self = this;
|
|
|
|
+ result.forEach(x => {
|
|
|
|
+ const treeNode = self.pmDeal.tree_contracts.find(y => { return x.TreeId === y.Id });
|
|
|
|
+ if (!treeNode) return;
|
|
|
|
+ for (const f of fields) {
|
|
|
|
+ x['Tree_' + f] = treeNode[f];
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// 排序:标段-合同类别-创建时间
|
|
// 排序:标段-合同类别-创建时间
|
|
result.sort((x, y) => {
|
|
result.sort((x, y) => {
|
|
const bidSort = selects.indexOf(x.BidsectionId + '') - selects.indexOf(y.BidsectionId + '');
|
|
const bidSort = selects.indexOf(x.BidsectionId + '') - selects.indexOf(y.BidsectionId + '');
|