| 
															
																@@ -348,22 +348,7 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 //          没有计量期的概念!!! 
															 | 
															
															 | 
															
																                 //          没有计量期的概念!!! 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const paymentAuditorList = await ctx.service.paymentDetailAudit.getAuditors(paymentDetail_id); 
															 | 
															
															 | 
															
																                 const paymentAuditorList = await ctx.service.paymentDetailAudit.getAuditors(paymentDetail_id); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const tender = ctx.paymentTender; 
															 | 
															
															 | 
															
																                 const tender = ctx.paymentTender; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // const treeNodes = await ctx.service.rptTreeNode.getNodesByProjectId([-1, tender.pid]); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const treeNodes = await ctx.service.rptTreeNode.getNodesBySourceType([tender.pid], 101); // 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const commonTreeNodes = await ctx.service.rptTreeNode.getNodesByProjectId([-1]); // 这个查通用的 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const nodeItems = JSON.parse(commonTreeNodes[0].items); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const commonArrs = []; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                nodeItems.forEach(nodeItem => { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    if (nodeItem.source_type === 101) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        commonArrs.push(nodeItem); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                }); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // 加一个dummy的通用报表 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const dummyCommonRptNode = { id: 1, name: '通用报表', pid: -1, rpt_type: 0, items: JSON.stringify(commonArrs) }; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                treeNodes.push(dummyCommonRptNode); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // const custTreeNodes = await ctx.service.rptTreeNodeCust.getCustFoldersByUserId(this.ctx.session.sessionUser.accountId); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const custCfg = await ctx.service.rptCustomizeCfg.getCustomizeCfgByUserId('Administrator'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // const stageList = await ctx.service.stage.getValidStagesShort(tender.id); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                const { treeNodes, commonArrs, custCfg } = await this._createNodes(ctx, 101, tender.pid); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const stageList = []; 
															 | 
															
															 | 
															
																                 const stageList = []; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: tender.pid } }); // 找公司章用的 
															 | 
															
															 | 
															
																                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid: tender.pid } }); // 找公司章用的 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const isAdmin = ctx.session.sessionUser.is_admin; 
															 | 
															
															 | 
															
																                 const isAdmin = ctx.session.sessionUser.is_admin; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -520,21 +505,7 @@ module.exports = app => { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const budget_id = ctx.budget.id; 
															 | 
															
															 | 
															
																                 const budget_id = ctx.budget.id; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const subProj = await ctx.service.subProject.getDataByCondition({ budget_id }); 
															 | 
															
															 | 
															
																                 const subProj = await ctx.service.subProject.getDataByCondition({ budget_id }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const sp_id = subProj.id; 
															 | 
															
															 | 
															
																                 const sp_id = subProj.id; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const treeNodes = await ctx.service.rptTreeNode.getNodesBySourceType([pid], 200); // 这个查定制的 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const commonTreeNodes = await ctx.service.rptTreeNode.getNodesByProjectId([-1]); // 这个查通用的 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const nodeItems = JSON.parse(commonTreeNodes[0].items); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const commonArrs = []; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                nodeItems.forEach(nodeItem => { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    if (nodeItem.source_type === 200) { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                        commonArrs.push(nodeItem); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    } 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                }); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // 加一个dummy的通用报表 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const dummyCommonRptNode = { id: 1, name: '通用报表', pid: -1, rpt_type: 0, items: JSON.stringify(commonArrs) }; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // const dummyCommonRptNode = { id: 1, name: '通用报表', pid: -1, rpt_type: 0, items: '[]' }; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                treeNodes.push(dummyCommonRptNode); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                // const custTreeNodes = await ctx.service.rptTreeNodeCust.getCustFoldersByUserId(this.ctx.session.sessionUser.accountId); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                const custCfg = await ctx.service.rptCustomizeCfg.getCustomizeCfgByUserId('Administrator'); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                const { treeNodes, commonArrs, custCfg } = await this._createNodes(ctx, 200, pid); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const stageList = []; 
															 | 
															
															 | 
															
																                 const stageList = []; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid } }); // 找公司章用的 
															 | 
															
															 | 
															
																                 const unitList = await ctx.service.constructionUnit.getAllDataByCondition({ where: { pid } }); // 找公司章用的 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 const isAdmin = ctx.session.sessionUser.is_admin; 
															 | 
															
															 | 
															
																                 const isAdmin = ctx.session.sessionUser.is_admin; 
															 |