| 
					
				 | 
			
			
				@@ -86,10 +86,15 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const accountInfo = await this.ctx.service.projectAccount.getDataById(ctx.session.sessionUser.accountId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const userPermission = accountInfo !== undefined && accountInfo.permission !== '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     ? JSON.parse(accountInfo.permission) : null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                const tenderList = await ctx.service.tender.getContractList('', userPermission, ctx.session.sessionUser.is_admin); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                let tenderList = await ctx.service.tender.getContractList('', userPermission, ctx.session.sessionUser.is_admin); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const projectList = await ctx.service.subProject.getSubProjectByTender(ctx.session.sessionProject.id, tenderList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                const removeTidList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (const t of tenderList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     const spInfo = ctx.helper._.find(projectList, { id: t.spid }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!spInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        removeTidList.push(t.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     spInfo.child_order = spInfo.child_order ? spInfo.child_order : 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     spInfo.is_folder = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     t.tree_pid = spInfo.id; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -105,6 +110,9 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     t.income_total_price = incomeList.reduce((total, item) => ctx.helper.add(total, item.total_price), 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     t.income_yf_price = incomeList.reduce((total, item) => ctx.helper.add(total, item.yf_price), 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (removeTidList.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    tenderList = tenderList.filter(item => !removeTidList.includes(item.id)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const categoryData = await ctx.service.category.getAllCategory(ctx.session.sessionProject.id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 const renderData = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     // jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.contract.tender), 
			 |