|
@@ -45,30 +45,35 @@ let zmhs_obj = {
|
|
|
}
|
|
|
},
|
|
|
initSpread:function () {
|
|
|
- this.coeSpread = SheetDataHelper.createNewSpread($("#coeSpread")[0]);
|
|
|
- sheetCommonObj.spreadDefaultStyle(this.coeSpread);
|
|
|
- this.assSpread = SheetDataHelper.createNewSpread($("#assSpread")[0]);
|
|
|
- sheetCommonObj.spreadDefaultStyle(this.assSpread);
|
|
|
-
|
|
|
- this.coeSheet = this.coeSpread.getSheet(0);
|
|
|
- sheetCommonObj.initSheet(this.coeSheet, this.coeSetting, 30);
|
|
|
- this.coeSheet.name('ration_coe');
|
|
|
- this.coeSheet.bind(GC.Spread.Sheets.Events.CellClick, this.onCoeCellClick);
|
|
|
- this.coeSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, this.onButtonClick);
|
|
|
- this.coeSheet.bind(GC.Spread.Sheets.Events.ValueChanged,this.onCoeValueChange);
|
|
|
- this.coeSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function (e,args) {
|
|
|
- args.sheet.repaint();
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- this.assSheet = this.assSpread.getSheet(0);
|
|
|
- sheetCommonObj.initSheet(this.assSheet, this.assSetting, 30);
|
|
|
- this.assSheet.bind(GC.Spread.Sheets.Events.EditEnded, this.onAssEditEnded);
|
|
|
- this.assSheet.bind(GC.Spread.Sheets.Events.RangeChanged, this.onAssRangeChanged);
|
|
|
- this.assSheet.name('ration_ass');
|
|
|
- SheetDataHelper.protectdSheet(this.coeSheet);
|
|
|
- if(projectReadOnly){
|
|
|
- disableSpread(zmhs_obj.coeSpread);
|
|
|
+ this.initCoeSpread();
|
|
|
+ this.initAssSpread();
|
|
|
+ },
|
|
|
+ initCoeSpread:function () {
|
|
|
+ if(zmhs_obj.coeSpread == null){
|
|
|
+ this.coeSpread = SheetDataHelper.createNewSpread($("#coeSpread")[0]);
|
|
|
+ sheetCommonObj.spreadDefaultStyle(this.coeSpread);
|
|
|
+ this.coeSheet = this.coeSpread.getSheet(0);
|
|
|
+ sheetCommonObj.initSheet(this.coeSheet, this.coeSetting, 30);
|
|
|
+ this.coeSheet.name('ration_coe');
|
|
|
+ this.coeSheet.bind(GC.Spread.Sheets.Events.CellClick, this.onCoeCellClick);
|
|
|
+ this.coeSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, this.onButtonClick);
|
|
|
+ this.coeSheet.bind(GC.Spread.Sheets.Events.ValueChanged,this.onCoeValueChange);
|
|
|
+ this.coeSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function (e,args) {
|
|
|
+ args.sheet.repaint();
|
|
|
+ });
|
|
|
+ SheetDataHelper.protectdSheet(this.coeSheet);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initAssSpread:function () {
|
|
|
+ if(zmhs_obj.assSheet == null){
|
|
|
+ this.assSpread = SheetDataHelper.createNewSpread($("#assSpread")[0]);
|
|
|
+ sheetCommonObj.spreadDefaultStyle(this.assSpread);
|
|
|
+ this.assSheet = this.assSpread.getSheet(0);
|
|
|
+ sheetCommonObj.initSheet(this.assSheet, this.assSetting, 30);
|
|
|
+ this.assSheet.bind(GC.Spread.Sheets.Events.EditEnded, this.onAssEditEnded);
|
|
|
+ this.assSheet.bind(GC.Spread.Sheets.Events.RangeChanged, this.onAssRangeChanged);
|
|
|
+ this.assSheet.name('ration_ass');
|
|
|
+ SheetDataHelper.protectdSheet(this.assSheet);
|
|
|
}
|
|
|
},
|
|
|
showCoeData:function (node) {
|
|
@@ -81,6 +86,8 @@ let zmhs_obj = {
|
|
|
}
|
|
|
sheetCommonObj.showData(this.coeSheet, this.coeSetting,coeList);
|
|
|
if (coeList.length > 0) {
|
|
|
+ this.coeSheet.suspendPaint();
|
|
|
+ this.coeSheet.suspendEvent();
|
|
|
for(let i =0;i<coeList.length;i++ ){
|
|
|
if(gljUtil.isDef(coeList[i].option_codes)&&coeList[i].option_codes!=""){
|
|
|
this.getComboBoxForCodes(coeList[i],i);//设置可选类型的下拉框
|
|
@@ -90,8 +97,13 @@ let zmhs_obj = {
|
|
|
this.coeSheet.setCellType(i, 1, sheetCommonObj.getCustomerCoeCellType(this.generateHtmlString,this.bindCusEditorValue,this.updateCusCoeAfterEditor), GC.Spread.Sheets.SheetArea.viewport);
|
|
|
}
|
|
|
}
|
|
|
+ this.coeSheet.resumeEvent();
|
|
|
+ this.coeSheet.resumePaint();
|
|
|
}
|
|
|
this.coeSheetData = coeList;
|
|
|
+ if(projectReadOnly){
|
|
|
+ disableSpread(zmhs_obj.coeSpread);
|
|
|
+ }
|
|
|
},
|
|
|
getComboBoxForCodes:function (coe,i) {
|
|
|
this.coeSheet.getCell(i, 2, GC.Spread.Sheets.SheetArea.viewport).locked(false);
|
|
@@ -103,7 +115,6 @@ let zmhs_obj = {
|
|
|
|
|
|
},
|
|
|
|
|
|
-
|
|
|
showAssData:function (node) {
|
|
|
this.assSheet.suspendPaint();
|
|
|
this.assSheet.suspendEvent();
|
|
@@ -115,7 +126,9 @@ let zmhs_obj = {
|
|
|
this.assSheet.getRange(assList.length,-1,this.assSheet.getRowCount()-assList.length, -1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
|
|
|
this.assSheet.resumePaint();
|
|
|
this.assSheet.resumeEvent();
|
|
|
-
|
|
|
+ if(projectReadOnly){
|
|
|
+ disableSpread(this.assSpread);
|
|
|
+ }
|
|
|
},
|
|
|
refreshAfterUpdate:function(result,reload){
|
|
|
let ration_glj = projectObj.project.ration_glj;
|
|
@@ -423,8 +436,8 @@ let zmhs_obj = {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-let zmhsResize = zmhs_obj.getSideResize();
|
|
|
+/*let zmhsResize = zmhs_obj.getSideResize();
|
|
|
SlideResize.horizontalSlide(zmhsResize.eleObj, zmhsResize.limit, function () {
|
|
|
zmhs_obj.refresh();
|
|
|
-});
|
|
|
+});*/
|
|
|
|