/** * Standard Ration Lib * Created by Mai on 2017/5/16. */ /*var rationChapterSpread, sectionRationsSpread;*/ var rationLibObj = { rationChapterSpread: null, sectionRationsSpread: null, rationChapterTreeController: null, refreshSettingForHint: function () { TREE_SHEET_HELPER.initSetting($('#stdSectionRations')[0], rationLibObj.sectionRationsSetting); }, checkSpread: function () { if (!this.rationChapterSpread) { this.rationChapterSpread = SheetDataHelper.createNewSpread($('#stdRationChapter')[0]); this.rationChapterSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onChapterSpreadCellDoubleClick); } if (!this.sectionRationsSpread) { this.sectionRationsSpread = SheetDataHelper.createNewSpread($('#stdSectionRations')[0]); this.sectionRationsSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onRationSpreadCellDoubleClick); this.refreshSettingForHint(); } }, refreshSpread: function () { if (this.rationChapterSpread) { this.rationChapterSpread.refresh(); } if (this.sectionRationsSpread) { this.sectionRationsSpread.refresh(); } }, loadStdRationLibs: function () { let select = $('#stdRationLibSelect'); select.empty(); let ration_lib = projectInfoObj.projectInfo.engineeringInfo.ration_lib; ration_lib.forEach(function (data) { select.append($('