|  | @@ -153,24 +153,20 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |          font: '12px 微软雅黑',
 | 
	
		
			
				|  |  |          readOnly: true,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | -    // 解析清单汇总数据
 | 
	
		
			
				|  |  | -    gclGatherModel.loadLedgerData(ledger, curLedgerData);
 | 
	
		
			
				|  |  | -    gclGatherModel.loadPosData(pos, curPosData);
 | 
	
		
			
				|  |  | -    let gclGatherData = gclGatherModel.gatherGclData().filter(item => {
 | 
	
		
			
				|  |  | -        return item.qc_qty || item.contract_qty
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | -    calculateJiaCha(gclGatherData);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      // let gclGatherData = gclGatherModel.gatherGclData()
 | 
	
		
			
				|  |  |      // 获取项目节数据
 | 
	
		
			
				|  |  |      function loadLeafXmjData(iGclRow) {
 | 
	
		
			
				|  |  |          const gcl = gclGatherData[iGclRow];
 | 
	
		
			
				|  |  |          if (gcl) {
 | 
	
		
			
				|  |  | +            gcl.leafXmjs = gcl.leafXmjs.filter(item => {
 | 
	
		
			
				|  |  | +                return item.qc_qty || item.contract_qty
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  |              for (const [index, xmj] of gcl.leafXmjs.entries()) {
 | 
	
		
			
				|  |  |                  const jiacha = calcOneBQJC(xmj);
 | 
	
		
			
				|  |  |                  gcl.leafXmjs[index].jiacha = jiacha !== 0 ? ZhCalc.round(jiacha, 2) : null;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              SpreadJsObj.loadSheetData(leafXmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, gcl.leafXmjs);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              // 对清单调差工料table的单位数量进行改变
 | 
	
		
			
				|  |  |              materialSpreadSetting.cols[materialSpreadSetting.cols.length - 2].title = '|' + gcl.unit + '数量 �';
 | 
	
		
			
				|  |  |              // SpreadJsObj.initSheet(materialSpread.getActiveSheet(), materialSpreadSetting);
 | 
	
	
		
			
				|  | @@ -205,6 +201,32 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |          font: '12px 微软雅黑',
 | 
	
		
			
				|  |  |          readOnly: true,
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | +    // 加载清单数据 - 暂时统一加载,如有需要,切换成动态加载并缓存
 | 
	
		
			
				|  |  | +    postData(window.location.pathname + '/load', {}, function (result) {
 | 
	
		
			
				|  |  | +        ledger = result.ledger;
 | 
	
		
			
				|  |  | +        curLedgerData = result.curLedgerData;
 | 
	
		
			
				|  |  | +        pos = result.pos;
 | 
	
		
			
				|  |  | +        curPosData = result.curPosData;
 | 
	
		
			
				|  |  | +        materialListData = result.materialListData;
 | 
	
		
			
				|  |  | +        notJoinList = result.materialNotJoinListData;
 | 
	
		
			
				|  |  | +        // 解析清单汇总数据
 | 
	
		
			
				|  |  | +        gclGatherModel.loadLedgerData(ledger, curLedgerData);
 | 
	
		
			
				|  |  | +        gclGatherModel.loadPosData(pos, curPosData);
 | 
	
		
			
				|  |  | +        gclGatherData = gclGatherModel.gatherGclData().filter(item => {
 | 
	
		
			
				|  |  | +            return item.qc_qty || item.contract_qty
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        calculateJiaCha(gclGatherData);
 | 
	
		
			
				|  |  | +        SpreadJsObj.initSheet(leafXmjSpread.getActiveSheet(), leafXmjSpreadSetting);
 | 
	
		
			
				|  |  | +        // 加载清单数据
 | 
	
		
			
				|  |  | +        SpreadJsObj.loadSheetData(ledgerSpread.getActiveSheet(), SpreadJsObj.DataType.Data, gclGatherData);
 | 
	
		
			
				|  |  | +        loadLeafXmjData(0);
 | 
	
		
			
				|  |  | +        loadMaterialData(0, 0);
 | 
	
		
			
				|  |  | +        const sheet = materialSpread.getActiveSheet();
 | 
	
		
			
				|  |  | +        sheet.suspendPaint();
 | 
	
		
			
				|  |  | +        sheet.setCellType(1, 3, new TipCellType(), spreadNS.SheetArea.colHeader);
 | 
	
		
			
				|  |  | +        sheet.resumePaint();
 | 
	
		
			
				|  |  | +        checkNotJoinMaterialData();
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |      // const leafXmjCol = {
 | 
	
		
			
				|  |  |      //     getValue: {
 | 
	
		
			
				|  |  |      //         jiacha: function (data) {
 | 
	
	
		
			
				|  | @@ -222,9 +244,6 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |      //     }
 | 
	
		
			
				|  |  |      // };
 | 
	
		
			
				|  |  |      // SpreadJsObj.initSpreadSettingEvents(leafXmjSpreadSetting, leafXmjCol);
 | 
	
		
			
				|  |  | -    SpreadJsObj.initSheet(leafXmjSpread.getActiveSheet(), leafXmjSpreadSetting);
 | 
	
		
			
				|  |  | -    // 加载清单数据
 | 
	
		
			
				|  |  | -    SpreadJsObj.loadSheetData(ledgerSpread.getActiveSheet(), SpreadJsObj.DataType.Data, gclGatherData);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 调差清单工料table
 | 
	
		
			
				|  |  |      const materialSpread = SpreadJsObj.createNewSpread($('#material-spread')[0]);
 | 
	
	
		
			
				|  | @@ -283,12 +302,12 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // SpreadJsObj.locateTreeNode(ledgerSpread.getActiveSheet(), )
 | 
	
		
			
				|  |  | -    loadLeafXmjData(0);
 | 
	
		
			
				|  |  | -    loadMaterialData(0, 0);
 | 
	
		
			
				|  |  | -    const sheet = materialSpread.getActiveSheet();
 | 
	
		
			
				|  |  | -    sheet.suspendPaint();
 | 
	
		
			
				|  |  | -    sheet.setCellType(1, 3, new TipCellType(), spreadNS.SheetArea.colHeader);
 | 
	
		
			
				|  |  | -    sheet.resumePaint();
 | 
	
		
			
				|  |  | +    // loadLeafXmjData(0);
 | 
	
		
			
				|  |  | +    // loadMaterialData(0, 0);
 | 
	
		
			
				|  |  | +    // const sheet = materialSpread.getActiveSheet();
 | 
	
		
			
				|  |  | +    // sheet.suspendPaint();
 | 
	
		
			
				|  |  | +    // sheet.setCellType(1, 3, new TipCellType(), spreadNS.SheetArea.colHeader);
 | 
	
		
			
				|  |  | +    // sheet.resumePaint();
 | 
	
		
			
				|  |  |      // 不参与调差数据值变灰
 | 
	
		
			
				|  |  |      function checkNotJoinMaterialData() {
 | 
	
		
			
				|  |  |          const sheet = ledgerSpread.getActiveSheet();
 | 
	
	
		
			
				|  | @@ -304,7 +323,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | -    checkNotJoinMaterialData();
 | 
	
		
			
				|  |  | +    // checkNotJoinMaterialData();
 | 
	
		
			
				|  |  |      // 对添加工料表格赋值
 | 
	
		
			
				|  |  |      function changeMaterialTable() {
 | 
	
		
			
				|  |  |          $('#materialBills tr').removeClass('table-secondary');
 |