/** * Standard Bills Lib * Created by Mai on 2017/5/16. */ var billsLibObj = { stdBillsSpread: null, stdBillsJobSpread: null, stdBillsFeatureSpread: null, refreshSettingForHint: function () { TREE_SHEET_HELPER.initSetting($('#stdBillsSpread')[0], billsLibObj.stdBillsTreeSetting); }, checkBillsSpread: function () { if (!this.stdBillsSpread) { this.stdBillsSpread = SheetDataHelper.createNewSpread($('#stdBillsSpread')[0]); // 刷新setting中记录的spread的位置 this.refreshSettingForHint(); } }, refreshBillsSpread: function () { if (this.stdBillsSpread) { this.stdBillsSpread.refresh(); } }, checkBillsRelaSpread: function () { if (!this.stdBillsJobSpread) { this.stdBillsJobSpread = SheetDataHelper.createNewSpread($('#stdBillsJobs')[0]); } if (!this.stdBillsFeatureSpread) { this.stdBillsFeatureSpread = SheetDataHelper.createNewSpread($('#stdBillsFeatures')[0]); } }, refreshBillsRelaSpread: function () { if (this.stdBillsJobSpread) { this.stdBillsJobSpread.refresh(); } if (this.stdBillsFeatureSpread) { this.stdBillsFeatureSpread.refresh(); } }, clearHighLight: function (spread) { if (spread) { let sheet = spread.getActiveSheet(); sheet.suspendPaint(); sheet.getRange(0, -1, sheet.getRowCount(), -1, GC.Spread.Sheets.SheetArea.viewport).backColor(undefined); sheet.resumePaint(); } }, loadStdBillsLib: function () { let i, select = $('#stdBillsLibSelect'); select.empty(); let bills_lib = projectInfoObj.projectInfo.engineeringInfo.bill_lib; bills_lib.forEach(function (data) { var option = $('