| 
					
				 | 
			
			
				@@ -77,11 +77,11 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (custFolders2.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     rst.push(custFolders2[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    await ctx.service.rptTreeNodeCust.createCustNodeByTenderId(tender_id, custFolders1[0].rpt_tpl_items); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    await ctx.service.rptTreeNodeCust.createCustNodeByTenderId(acc_id, tender_id, custFolders1[0].rpt_tpl_items); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     rst.push(custFolders1[0]); // 直接拿原先的用了 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                // 考虑不同的用户会有同一个标段,需要不断地删除用户的自定义设置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                await ctx.service.rptTreeNodeCust.removeCustFolder(custFolders1[0].id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                // 现在会记录最后一个修改用户的id,所以不能直接删除,需要先判断 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (custFolders1[0].id !== custFolders2[0].id) await ctx.service.rptTreeNodeCust.removeCustFolder(custFolders1[0].id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else if (custFolders2.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 rst.push(custFolders2[0]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1617,8 +1617,9 @@ module.exports = app => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         async updateCustNode(ctx) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const params = JSON.parse(ctx.request.body.params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // console.log(params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const custId = this.ctx.session.sessionUser.accountId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const newNodeItems = JSON.stringify(params.nodeItems); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            const rst = await ctx.service.rptTreeNodeCust.updateCustNodeByTenderId(params.tender_id, newNodeItems); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const rst = await ctx.service.rptTreeNodeCust.updateCustNodeByTenderId(custId, params.tender_id, newNodeItems); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // console.log(rst); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ctx.body = { data: rst }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // ctx.body = { data: { msg: 'test the network' } }; 
			 |