|
@@ -662,6 +662,7 @@ projectGljObject={
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
showProjectGljData:function () {
|
|
showProjectGljData:function () {
|
|
|
|
|
+ let me = this;
|
|
|
this.projectGljSpread.setActiveSheetIndex(0);
|
|
this.projectGljSpread.setActiveSheetIndex(0);
|
|
|
let sel = this.projectGljSheet.getSelections()[0];
|
|
let sel = this.projectGljSheet.getSelections()[0];
|
|
|
let oldData = sel.row<this.projectGljSheetData.length?this.projectGljSheetData[sel.row]:"";
|
|
let oldData = sel.row<this.projectGljSheetData.length?this.projectGljSheetData[sel.row]:"";
|
|
@@ -674,10 +675,12 @@ projectGljObject={
|
|
|
}
|
|
}
|
|
|
this.projectGljSheetData = projectGljSheetData;
|
|
this.projectGljSheetData = projectGljSheetData;
|
|
|
this.projectGljSheet.setRowCount(this.projectGljSheetData.length);
|
|
this.projectGljSheet.setRowCount(this.projectGljSheetData.length);
|
|
|
- sheetCommonObj.showData(this.projectGljSheet, this.projectGljSetting,this.projectGljSheetData);
|
|
|
|
|
- //this.projectGljSheet.setRowCount(this.projectGljSheetData.length);
|
|
|
|
|
- sel.row = oldData?_.findIndex(this.projectGljSheetData,{'id':oldData.id}):0;
|
|
|
|
|
- this.projectGljSheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
|
|
|
|
|
|
|
+ sheetCommonObj.showData(this.projectGljSheet, this.projectGljSetting,this.projectGljSheetData,null,function(){
|
|
|
|
|
+ //this.projectGljSheet.setRowCount(this.projectGljSheetData.length);
|
|
|
|
|
+ sel.row = oldData?_.findIndex(me.projectGljSheetData,{'id':oldData.id}):0;
|
|
|
|
|
+ me.projectGljSheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
showMaterialTreeData:function () {
|
|
showMaterialTreeData:function () {
|
|
|
this.projectGljSpread.setActiveSheetIndex(1);
|
|
this.projectGljSpread.setActiveSheetIndex(1);
|
|
@@ -692,22 +695,24 @@ projectGljObject={
|
|
|
this.materialTreeSheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
|
|
this.materialTreeSheet.setSelection(sel.row==-1?0:sel.row,sel.col,sel.rowCount,sel.colCount);
|
|
|
this.materialTreeController.setTreeSelected(this.materialTree.items[sel.row==-1?0:sel.row]);
|
|
this.materialTreeController.setTreeSelected(this.materialTree.items[sel.row==-1?0:sel.row]);
|
|
|
},
|
|
},
|
|
|
- refreshDataSheet:function () {
|
|
|
|
|
|
|
+ refreshDataSheet:function (refresh) {//refresh = true 的时候不用更新表头信息
|
|
|
let me = projectGljObject;
|
|
let me = projectGljObject;
|
|
|
if(!me.projectGljSpread) return;
|
|
if(!me.projectGljSpread) return;
|
|
|
- let quantityCol = _.findIndex(me.projectGljSetting.header,function (header) {
|
|
|
|
|
|
|
+ if(!refresh){
|
|
|
|
|
+ let quantityCol = _.findIndex(me.projectGljSetting.header,function (header) {
|
|
|
return header.dataCode == 'quantity'|| header.dataCode == 'techQuantity' || header.dataCode =='subdivisionQuantity';
|
|
return header.dataCode == 'quantity'|| header.dataCode == 'techQuantity' || header.dataCode =='subdivisionQuantity';
|
|
|
- });
|
|
|
|
|
- if(me.displayType == filterType.FBFX){//分部分项人材机,将“总消耗量”替换显示为“分部分项总消耗量”。
|
|
|
|
|
- me.projectGljSetting.header[quantityCol].dataCode = 'subdivisionQuantity';
|
|
|
|
|
- if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "分部分项总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
- }else if(me.displayType == filterType.TECH) {//措施项目人材机,将“总消耗量”替换显示为“措施项目总消耗量”。
|
|
|
|
|
- me.projectGljSetting.header[quantityCol].dataCode = 'techQuantity';
|
|
|
|
|
- if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "措施项目总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
- }else {
|
|
|
|
|
- me.projectGljSetting.header[quantityCol].dataCode = 'quantity';
|
|
|
|
|
- if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ if(me.displayType == filterType.FBFX){//分部分项人材机,将“总消耗量”替换显示为“分部分项总消耗量”。
|
|
|
|
|
+ me.projectGljSetting.header[quantityCol].dataCode = 'subdivisionQuantity';
|
|
|
|
|
+ if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "分部分项总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
+ }else if(me.displayType == filterType.TECH) {//措施项目人材机,将“总消耗量”替换显示为“措施项目总消耗量”。
|
|
|
|
|
+ me.projectGljSetting.header[quantityCol].dataCode = 'techQuantity';
|
|
|
|
|
+ if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "措施项目总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ me.projectGljSetting.header[quantityCol].dataCode = 'quantity';
|
|
|
|
|
+ if(me.projectGljSheet) me.projectGljSheet.setValue(0, quantityCol, "总消耗量", GC.Spread.Sheets.SheetArea.colHeader);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if(me.displayType == filterType.SCHZ){//三材汇总树节点
|
|
if(me.displayType == filterType.SCHZ){//三材汇总树节点
|
|
|
me.showMaterialTreeData();
|
|
me.showMaterialTreeData();
|
|
|
}else {
|
|
}else {
|