/** * Standard Bills Lib * Created by Mai on 2017/5/16. */ var billsLibObj = { stdBillsSpread: null, stdBillsJobSpread: null, stdBillsFeatureSpread: null, checkBillsSpread: function () { if (!this.stdBillsSpread) { this.stdBillsSpread = SheetDataHelper.createNewSpread($('#stdBillsSpread')[0]); } }, 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(); } }, loadStdBillsLib: function () { CommonAjax.post('/stdBillsEditor/getStdBillsLib', {userId: userID}, function (datas) { var i, select = $('#stdBillsLibSelect'); select.empty(); datas.forEach(function (data) { var option = $('