|  | @@ -1,12 +1,12 @@
 | 
	
		
			
				|  |  |  const rptOtherStage = (function (){
 | 
	
		
			
				|  |  |      const info = {
 | 
	
		
			
				|  |  | -        advance: { title: '请选择预付款', colHeader: ['类型', '期', '审批状态'], colValue: ['typeStr', 'orderStr', 'statusStr'] },
 | 
	
		
			
				|  |  | -        pm_deal: { title: '请选择合同管理', colHeader: ['名称'], colValue: ['name'], active: true },
 | 
	
		
			
				|  |  | +        advance: { title: '请选择预付款', colHeader: ['类型', '期', '审批状态'], colValue: ['typeStr', 'orderStr', 'statusStr'], key: 'id' },
 | 
	
		
			
				|  |  | +        pm_deal: { title: '请选择合同管理', colHeader: ['名称'], colValue: ['name'], active: true, key: 'bidsectionId' },
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      const data = {};
 | 
	
		
			
				|  |  |      let curType = '';
 | 
	
		
			
				|  |  |      const initList = function () {
 | 
	
		
			
				|  |  | -        const header = info[curType].colHeader, value = info[curType].colValue;
 | 
	
		
			
				|  |  | +        const header = info[curType].colHeader, value = info[curType].colValue, key = info[curType].key;
 | 
	
		
			
				|  |  |          const headerHtml = [];
 | 
	
		
			
				|  |  |          headerHtml.push('<tr class="text-center"><th>选择</th>');
 | 
	
		
			
				|  |  |          for (const h of header) {
 | 
	
	
		
			
				|  | @@ -18,7 +18,7 @@ const rptOtherStage = (function (){
 | 
	
		
			
				|  |  |          for (const a of arr) {
 | 
	
		
			
				|  |  |              const aHtml = [];
 | 
	
		
			
				|  |  |              const checked = a.selected ? 'checked' : '';
 | 
	
		
			
				|  |  | -            aHtml.push(`<tr class="text-center"><td><input type="checkbox" name="sos-check" ${checked} value="${a.id}"></td>`);
 | 
	
		
			
				|  |  | +            aHtml.push(`<tr class="text-center"><td><input type="checkbox" name="sos-check" ${checked} value="${a[key]}"></td>`);
 | 
	
		
			
				|  |  |              for (const v of value) {
 | 
	
		
			
				|  |  |                  aHtml.push(`<td>${a[v]}</td>`);
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -42,10 +42,11 @@ const rptOtherStage = (function (){
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      const updateOtherStage = async function () {
 | 
	
		
			
				|  |  | +        const key = info[curType].key;
 | 
	
		
			
				|  |  |          const updateData = {};
 | 
	
		
			
				|  |  |          updateData[curType] = [];
 | 
	
		
			
				|  |  |          $('[name=sos-check]').each((i, c) => {
 | 
	
		
			
				|  |  | -            const ci = data[curType].find(x => { return x.id == c.value });
 | 
	
		
			
				|  |  | +            const ci = data[curType].find(x => { return x[key] == c.value });
 | 
	
		
			
				|  |  |              const checked = c.checked ? 1 : 0;
 | 
	
		
			
				|  |  |              if (ci && ci.selected !== checked) {
 | 
	
		
			
				|  |  |                  updateData[curType].push({id: c.value, selected: c.checked})
 |