/** * Created by zhang on 2019/12/12. */ let electrovalenceObj = { setting:{ header:[ {headerName: "代号", headerWidth: 70, dataCode: "code", dataType: "String"}, {headerName: "名称", headerWidth: 150, dataCode: "name",dataType: "String"}, {headerName: "规格", headerWidth: 60, dataCode: "specs", dataType: "Number",validator:"number"}, {headerName: "预算价", headerWidth: 75, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"}, {headerName: "加权系数", headerWidth: 60, dataCode: "coe", hAlign: "right", dataType: "Number",validator:"number"} ], view: { lockColumns: ["code","specs"], rowHeaderWidth:25, colHeaderHeight:36 } }, spread:null, sheet:null, datas:[], initSpread:function () { if(this.spread) return; this.spread = SheetDataHelper.createNewSpread($("#electrovalence_sheet")[0]); sheetCommonObj.spreadDefaultStyle(this.spread); this.sheet = this.spread.getSheet(0); sheetCommonObj.initSheet(this.sheet, this.setting, 30); /* this.materialSheet.bind(GC.Spread.Sheets.Events.ValueChanged, this.onMaterialValueChange); this.materialSheet.bind(GC.Spread.Sheets.Events.SelectionChanged,this.onMaterialSelectionChange); this.materialSheet.bind(GC.Spread.Sheets.Events.EditStarting,this.onMaterialEditStarting);*/ this.sheet.name('electrovalence_sheet'); if(projectReadOnly){ disableSpread(this.spread); } } }; $(function () { $("#electrovalenceDiv").on('shown.bs.modal', function () { electrovalenceObj.initSpread(); }); });