|
@@ -430,16 +430,7 @@ var gljOprObj = {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
hasComposition:function (ration_glj,isRationType) {//判断是否有组成物,有则返回true 现在主材类型的工料机也有可能有组成物。
|
|
hasComposition:function (ration_glj,isRationType) {//判断是否有组成物,有则返回true 现在主材类型的工料机也有可能有组成物。
|
|
|
- let type = isRationType==true? ration_glj.subType:ration_glj.type;
|
|
|
|
|
- if(gljUtil.notEditType.indexOf(type)!=-1||type==gljType.MAIN_MATERIAL){
|
|
|
|
|
- let keyArray = isRationType==true? rationKeyArray:gljKeyArray;
|
|
|
|
|
- let con_key = this.getIndex(ration_glj,keyArray);
|
|
|
|
|
- var mixRatioMap = projectObj.project.projectGLJ.datas.mixRatioMap;
|
|
|
|
|
- if(mixRatioMap[con_key]&&mixRatioMap[con_key].length>0){
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return false;
|
|
|
|
|
|
|
+ return gljUtil.hasComposition(ration_glj,isRationType);
|
|
|
},
|
|
},
|
|
|
onRangeChanged: function (sender, args) {
|
|
onRangeChanged: function (sender, args) {
|
|
|
var me = gljOprObj;
|
|
var me = gljOprObj;
|
|
@@ -771,14 +762,7 @@ var gljOprObj = {
|
|
|
return gljUtil.calcPriceDiff(glj,calcOptions);
|
|
return gljUtil.calcPriceDiff(glj,calcOptions);
|
|
|
},
|
|
},
|
|
|
getIndex(obj, pops){
|
|
getIndex(obj, pops){
|
|
|
- let t_index = '';
|
|
|
|
|
- let k_arr = [];
|
|
|
|
|
- for (let p of pops) {
|
|
|
|
|
- let tmpK = (obj[p] == undefined || obj[p] == null || obj[p] == '') ? 'null' : obj[p];
|
|
|
|
|
- k_arr.push(tmpK);
|
|
|
|
|
- }
|
|
|
|
|
- t_index = k_arr.join("|-|");
|
|
|
|
|
- return t_index;
|
|
|
|
|
|
|
+ return gljUtil.getIndex(obj,pops);
|
|
|
},
|
|
},
|
|
|
getConditionByKey(conKey){//将连接字符串转换成对象
|
|
getConditionByKey(conKey){//将连接字符串转换成对象
|
|
|
let valueArray = conKey.split("|-|");
|
|
let valueArray = conKey.split("|-|");
|
|
@@ -1379,13 +1363,11 @@ var gljOprObj = {
|
|
|
return cellType;
|
|
return cellType;
|
|
|
},
|
|
},
|
|
|
marketPriceReadOnly: function (node) {
|
|
marketPriceReadOnly: function (node) {
|
|
|
- let hasCom = false;
|
|
|
|
|
- if(node.sourceType==ModuleNames.ration&&node.data.type==rationType.gljRation){
|
|
|
|
|
- hasCom = this.hasComposition(node.data,true);
|
|
|
|
|
- }else {
|
|
|
|
|
- hasCom = this.hasComposition(node.data);
|
|
|
|
|
- }
|
|
|
|
|
- return hasCom;//2018-9-14 需求变更暂估工料机也能修改市场价原语句:return hasCom|| node.data.isEstimate == 1
|
|
|
|
|
|
|
+ let isRationType = node.sourceType==ModuleNames.ration&&node.data.type==rationType.gljRation;
|
|
|
|
|
+ let type = isRationType==true? node.data.subType:node.data.type;
|
|
|
|
|
+ if(gljUtil.isConcreteType(type)) return true;
|
|
|
|
|
+ return this.hasComposition(node.data,isRationType); //2018-9-14 需求变更暂估工料机也能修改市场价原语句:return hasCom|| node.data.isEstimate == 1
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
locateZTree: function(ID) {
|
|
locateZTree: function(ID) {
|
|
|
let zTree = $.fn.zTree.getZTreeObj("gljTree");
|
|
let zTree = $.fn.zTree.getZTreeObj("gljTree");
|
|
@@ -1609,7 +1591,6 @@ $(function () {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-
|
|
|
|
|
function operationWithRound(value1,value2,field,symble) {
|
|
function operationWithRound(value1,value2,field,symble) {
|
|
|
let decimal = getDecimal(field);
|
|
let decimal = getDecimal(field);
|
|
|
value1 = scMathUtil.roundForObj(value1,decimal);
|
|
value1 = scMathUtil.roundForObj(value1,decimal);
|