|
@@ -41,9 +41,20 @@ let MainTreeCol = {
|
|
|
}
|
|
|
},
|
|
|
readOnly: {
|
|
|
- // CSL, 2017-11-28
|
|
|
+ // Vincent, 2018-01-09
|
|
|
subType: function (node) {
|
|
|
- return MainTreeCol.readOnly.bills(node)||(node.data.type != 2 && node.data.type != 3 && !MainTreeCol.readOnly.glj(node)) || (node.data.type == rationType.gljRation && MainTreeCol.readOnly.non_editSubType(node));
|
|
|
+ if(MainTreeCol.readOnly.bills(node)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if(MainTreeCol.readOnly.ration(node)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if(MainTreeCol.readOnly.non_editSubType(node)){
|
|
|
+ return true;
|
|
|
+ }else if(gljOprObj.hasComposition(node.data,node.sourceType === ModuleNames.ration)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
},
|
|
|
calcProgramName: function (node) {
|
|
|
if (
|
|
@@ -173,20 +184,25 @@ let MainTreeCol = {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- // CSL, 2017-11-28
|
|
|
+ // Vincent, 2018-01-09
|
|
|
subType: function (node) {
|
|
|
if(node.sourceType!=projectObj.project.Bills.getSourceType()){
|
|
|
- if (node.data.type == rationType.volumePrice || node.data.type == rationType.gljRation || node.sourceType === projectObj.project.ration_glj.getSourceType()) {
|
|
|
- let VPType = sheetCommonObj.getDynamicCombo();
|
|
|
- if (node.data.type == rationType.volumePrice)
|
|
|
+ let VPType = sheetCommonObj.getDynamicCombo();
|
|
|
+ if(node.sourceType == projectObj.project.Ration.getSourceType()){//是定额类型
|
|
|
+ if(node.data.type == rationType.volumePrice){
|
|
|
VPType.itemHeight(5).items(["人工", "材料", "机械", "主材", "设备"])
|
|
|
- else if (node.data.type == rationType.gljRation || node.sourceType === projectObj.project.ration_glj.getSourceType())
|
|
|
- if (!MainTreeCol.readOnly.non_editSubType(node)) {
|
|
|
+ return VPType;
|
|
|
+ }else if(node.data.type == rationType.gljRation){
|
|
|
+ if(!MainTreeCol.readOnly.non_editSubType(node)&&gljOprObj.hasComposition(node.data,true)==false){
|
|
|
VPType.itemHeight(3).items(["材料", "主材", "设备"]);
|
|
|
- } else {
|
|
|
- return null;
|
|
|
+ return VPType;
|
|
|
}
|
|
|
- return VPType;
|
|
|
+ }
|
|
|
+ }else if(node.sourceType === projectObj.project.ration_glj.getSourceType()){//是工料机类型
|
|
|
+ if(!MainTreeCol.readOnly.non_editSubType(node)&&gljOprObj.hasComposition(node.data)==false){
|
|
|
+ VPType.itemHeight(3).items(["材料", "主材", "设备"]);
|
|
|
+ return VPType;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|