/** * Standard Ration Lib * Created by Mai on 2017/5/16. */ /*var rationChapterSpread, sectionRationsSpread;*/ var rationLibObj = { rationChapterSpread: null, sectionRationsSpread: null, rationChapterTreeController: null, checkSpread: function () { if (!this.rationChapterSpread) { this.rationChapterSpread = SheetDataHelper.createNewSpread($('#stdRationChapter')[0]); } if (!this.sectionRationsSpread) { this.sectionRationsSpread = SheetDataHelper.createNewSpread($('#stdSectionRations')[0]); this.sectionRationsSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, this.onRationSpreadCellDoubleClick); } }, refreshSpread: function () { if (this.rationChapterSpread) { this.rationChapterSpread.refresh(); } if (this.sectionRationsSpread) { this.sectionRationsSpread.refresh(); } }, loadStdRationLibs: function () { CommonAjax.postRationLib('/rationRepository/api/getRationDisplayNames', {user_id: userID}, function (datas) { var select = $('#stdRationLibSelect'); select.empty(); datas.forEach(function (data) { select.append($('