|
@@ -100,19 +100,27 @@ let divideObj = {
|
|
|
showRationGLJDatas:function(){
|
|
showRationGLJDatas:function(){
|
|
|
if(!$('#divide_glj_nav').hasClass('active')) return;
|
|
if(!$('#divide_glj_nav').hasClass('active')) return;
|
|
|
this.divideSubSpread.setActiveSheetIndex(0);
|
|
this.divideSubSpread.setActiveSheetIndex(0);
|
|
|
- this.rationGLJDatas = getRationGLJDatas();
|
|
|
|
|
|
|
+ this.rationGLJDatas = this.getRationGLJDatas();
|
|
|
let rationGLJSheet = this.divideSubSpread.getSheet(0)
|
|
let rationGLJSheet = this.divideSubSpread.getSheet(0)
|
|
|
rationGLJSheet.setRowCount(this.rationGLJDatas.length);
|
|
rationGLJSheet.setRowCount(this.rationGLJDatas.length);
|
|
|
sheetCommonObj.showTreeData(rationGLJSheet, gljCol.ration_glj_setting,this.rationGLJDatas);
|
|
sheetCommonObj.showTreeData(rationGLJSheet, gljCol.ration_glj_setting,this.rationGLJDatas);
|
|
|
- function getRationGLJDatas(){
|
|
|
|
|
- let datas = [];
|
|
|
|
|
- let selected = divideObj.getSelectedItem();
|
|
|
|
|
- let divideSetting = projectObj.project.divide_setting.datas;
|
|
|
|
|
- if(selected){
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ getRationGLJDatas : function (){
|
|
|
|
|
+ let datas = [];
|
|
|
|
|
+ let selected = divideObj.getSelectedItem();
|
|
|
|
|
+ let divideSetting = projectObj.project.divide_setting.datas;
|
|
|
|
|
+ if(selected && selected.itemType=="定额"){
|
|
|
|
|
+ for(r of divideSetting.ration_gljs){
|
|
|
|
|
+ if(r.rationID == selected.ID){
|
|
|
|
|
+ let newr = Object.assign(r);
|
|
|
|
|
+ newr.ParentID = -1;
|
|
|
|
|
+ datas.push(newr);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- return datas;
|
|
|
|
|
|
|
+ gljOprObj.combineWithProjectGlj(datas);
|
|
|
}
|
|
}
|
|
|
|
|
+ return datas;
|
|
|
},
|
|
},
|
|
|
getProgramOptions:function(){
|
|
getProgramOptions:function(){
|
|
|
let names = projectObj.project.calcProgram.compiledTemplateNames;
|
|
let names = projectObj.project.calcProgram.compiledTemplateNames;
|
|
@@ -328,6 +336,7 @@ let divideObj = {
|
|
|
let oldSel = args.oldSelections?args.oldSelections[0]:{};
|
|
let oldSel = args.oldSelections?args.oldSelections[0]:{};
|
|
|
if(newSel.row != oldSel.row){
|
|
if(newSel.row != oldSel.row){
|
|
|
me.initNavItem();
|
|
me.initNavItem();
|
|
|
|
|
+ me.showRationGLJDatas();
|
|
|
}
|
|
}
|
|
|
args.sheet.repaint();
|
|
args.sheet.repaint();
|
|
|
},
|
|
},
|