|  | @@ -386,7 +386,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |                  // 变更性质
 | 
	
		
			
				|  |  |                  $('select[name=quality]').val(change.quality);
 | 
	
		
			
				|  |  |                  // 变更单位
 | 
	
		
			
				|  |  | -                $('select[name=company]').html('<option>' + change.company + '</option>');
 | 
	
		
			
				|  |  | +                $('select[name=company]').html('<option>' + (change.company ? change.company : '') + '</option>');
 | 
	
		
			
				|  |  |                  // 费用承担方
 | 
	
		
			
				|  |  |                  $('input[name=charge][value=' + change.charge + ']').prop('checked', true);
 | 
	
		
			
				|  |  |                  // 附件
 | 
	
	
		
			
				|  | @@ -878,7 +878,8 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |          editEnded: function (e, info) {
 | 
	
		
			
				|  |  |              if (info.sheet.zh_setting) {
 | 
	
		
			
				|  |  |                  // 未改变过,则直接跳过
 | 
	
		
			
				|  |  | -                const posData = info.sheet.zh_data ? info.sheet.zh_data[info.row] : null;
 | 
	
		
			
				|  |  | +                const sortData = info.sheet.zh_data;
 | 
	
		
			
				|  |  | +                const posData = sortData ? sortData[info.row] : null;
 | 
	
		
			
				|  |  |                  const col = info.sheet.zh_setting.cols[info.col];
 | 
	
		
			
				|  |  |                  const orgText = posData ? posData[col.field] : null;
 | 
	
		
			
				|  |  |                  if (orgText === info.editingText || ((!orgText || orgText === '') && (info.editingText === ''))) {
 | 
	
	
		
			
				|  | @@ -917,7 +918,8 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |                      } else if (!posData) {
 | 
	
		
			
				|  |  |                          if (info.editingText !== '') {
 | 
	
		
			
				|  |  |                              data.updateType = 'add';
 | 
	
		
			
				|  |  | -                            data.updateData = {name: info.editingText, lid: node.id, tid: tender.id};
 | 
	
		
			
				|  |  | +                            const order = (!sortData || sortData.length === 0) ? 1 : Math.max(sortData[sortData.length - 1].porder + 1, sortData.length + 1);
 | 
	
		
			
				|  |  | +                            data.updateData = {name: info.editingText, lid: node.id, tid: tender.id, porder: order};
 | 
	
		
			
				|  |  |                          } else {
 | 
	
		
			
				|  |  |                              return;
 | 
	
		
			
				|  |  |                          }
 |