|  | @@ -49,6 +49,44 @@ function calcOneBQJC(xmj) {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  $(document).ready(() => {
 | 
	
		
			
				|  |  | +    function TipCellType()
 | 
	
		
			
				|  |  | +    {
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    TipCellType.prototype = new GC.Spread.Sheets.CellTypes.ColumnHeader();
 | 
	
		
			
				|  |  | +    TipCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
 | 
	
		
			
				|  |  | +        var hitInfo = { x: x, y: y, row: context.row, col: context.col, cellRect: cellRect, sheetArea: context.sheetArea, sheet: context.sheet };
 | 
	
		
			
				|  |  | +        return hitInfo;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    TipCellType.prototype.processMouseEnter = function (hitInfo){
 | 
	
		
			
				|  |  | +        console.log(hitInfo);
 | 
	
		
			
				|  |  | +        if (!this._toolTipElement) {
 | 
	
		
			
				|  |  | +            var div = document.createElement("div");
 | 
	
		
			
				|  |  | +            $(div).css("position", "absolute")
 | 
	
		
			
				|  |  | +                .css("border", "1px #C0C0C0 solid")
 | 
	
		
			
				|  |  | +                .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
 | 
	
		
			
				|  |  | +                .css("font", "9pt Arial")
 | 
	
		
			
				|  |  | +                .css("background", "#fff")
 | 
	
		
			
				|  |  | +                // .css("color", "#fff")
 | 
	
		
			
				|  |  | +                .css("z-index", "1000")
 | 
	
		
			
				|  |  | +                .css("padding", 5);
 | 
	
		
			
				|  |  | +            this._toolTipElement = div;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $(this._toolTipElement).text("单位数量:每一单位清单下所需工料消耗量。")
 | 
	
		
			
				|  |  | +            .css("top", hitInfo.y + 15)
 | 
	
		
			
				|  |  | +            .css("left", hitInfo.x - 15);
 | 
	
		
			
				|  |  | +        $(this._toolTipElement).hide();
 | 
	
		
			
				|  |  | +        // document.body.insertBefore(this._toolTipElement, null);
 | 
	
		
			
				|  |  | +        $('#material-spread-div').append(this._toolTipElement, null);
 | 
	
		
			
				|  |  | +        $(this._toolTipElement).show("fast");
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  | +    TipCellType.prototype.processMouseLeave = function (hitInfo) {
 | 
	
		
			
				|  |  | +        if (this._toolTipElement) {
 | 
	
		
			
				|  |  | +            // document.body.removeChild(this._toolTipElement);
 | 
	
		
			
				|  |  | +            // $('#material-spread-div').removeChild(this._toolTipElement);
 | 
	
		
			
				|  |  | +            this._toolTipElement.remove();
 | 
	
		
			
				|  |  | +            this._toolTipElement = null;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |      autoFlashHeight();
 | 
	
		
			
				|  |  |      // 清单table
 | 
	
		
			
				|  |  |      const ledgerSpread = SpreadJsObj.createNewSpread($('#ledger-spread')[0]);
 | 
	
	
		
			
				|  | @@ -86,7 +124,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              // console.log(gcl.leafXmjs);
 | 
	
		
			
				|  |  |              SpreadJsObj.loadSheetData(leafXmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, gcl.leafXmjs);
 | 
	
		
			
				|  |  |              // 对清单调差工料table的单位数量进行改变
 | 
	
		
			
				|  |  | -            materialSpreadSetting.cols[materialSpreadSetting.cols.length - 1].title = '|' + gcl.unit + '数量';
 | 
	
		
			
				|  |  | +            materialSpreadSetting.cols[materialSpreadSetting.cols.length - 1].title = '|' + gcl.unit + '数量�';
 | 
	
		
			
				|  |  |              SpreadJsObj.initSheet(materialSpread.getActiveSheet(), materialSpreadSetting);
 | 
	
		
			
				|  |  |          } else {
 | 
	
		
			
				|  |  |              SpreadJsObj.loadSheetData(leafXmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, []);
 | 
	
	
		
			
				|  | @@ -146,7 +184,7 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              {title: '清单调差工料|编号', colSpan: '4|1', rowSpan: '1|1', field: 'code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
 | 
	
		
			
				|  |  |              {title: '|名称', colSpan: '|1', rowSpan: '|1', field: 'name', hAlign: 0, width: 100, formatter: '@', readOnly: true},
 | 
	
		
			
				|  |  |              {title: '|单位', colSpan: '|1', rowSpan: '|1', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true},
 | 
	
		
			
				|  |  | -            {title: '|数量', colSpan: '1', rowSpan: '|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number', readOnly: 'readOnly.isEdit'},
 | 
	
		
			
				|  |  | +            {title: '|数量�', colSpan: '1', rowSpan: '|1', field: 'quantity', hAlign: 2, width: 80, type: 'Number', readOnly: 'readOnly.isEdit'},
 | 
	
		
			
				|  |  |          ],
 | 
	
		
			
				|  |  |          emptyRows: 0,
 | 
	
		
			
				|  |  |          headRows: 2,
 | 
	
	
		
			
				|  | @@ -407,6 +445,12 @@ $(document).ready(() => {
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          };
 | 
	
		
			
				|  |  |          materialSpread.bind(spreadNS.Events.EditEnded, materialSpreadObj.editEnded);
 | 
	
		
			
				|  |  | +        const sheet = materialSpread.getActiveSheet();
 | 
	
		
			
				|  |  | +        sheet.suspendPaint();
 | 
	
		
			
				|  |  | +        // const basic_range = sheet.getRange(1, 3);
 | 
	
		
			
				|  |  | +        sheet.setCellType(1, 3, new TipCellType(), spreadNS.SheetArea.colHeader);
 | 
	
		
			
				|  |  | +        // console.log(basic_range);
 | 
	
		
			
				|  |  | +        sheet.resumePaint();
 | 
	
		
			
				|  |  |          // 应用调差工料至其他清单明细
 | 
	
		
			
				|  |  |          $('#user_all_material').click(function () {
 | 
	
		
			
				|  |  |              const sheet = materialSpread.getActiveSheet();
 |