| 
					
				 | 
			
			
				@@ -619,6 +619,39 @@ $(document).ready(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _self.attr('disabled', false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 关联标段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#select-tender').on('show.bs.modal', function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        postData(`/sp/${spid}/setting/manage/tender/save`, { type: 'noSp-tenders' }, function (result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            const html = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (const t of result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                html.push('<tr>'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                html.push('<td><a target="_blank" href="/tender/', t.id, '">', t.name, '</a></td>'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                html.push('<td class="text-center">', '<input type="checkbox" data-tid="' + t.id + '">', '</td>'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                html.push('</tr>'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $('#no-project-tenders').html(html.join('')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    $('#bind-sp-btn').click(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const num = $('#no-project-tenders input:checked').length; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (num < 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            toastr.warning('请选择需要关联的标段'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const tidList = []; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (let i = 0; i < num; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tidList.push($('#no-project-tenders input:checked').eq(i).data('tid')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        postData(`/sp/${spid}/setting/manage/tender/save`, { type: 'bind-sp', spid, tidList: tidList.join(',') }, function (result) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            toastr.success('关联标段成功'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            $('#select-tender').modal('hide'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            setTimeout(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                window.location.reload(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }, 500); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 const tenderListSpec = (function(){ 
			 |