|
@@ -467,7 +467,13 @@ var projectObj = {
|
|
|
return
|
|
|
}
|
|
|
if (value) {
|
|
|
- if(fieldName === 'feesIndex.common.unitFee') value = parseFloat(value).toDecimal(decimalObj.decimal("unitPrice", node));
|
|
|
+ if(fieldName === 'feesIndex.common.unitFee') {
|
|
|
+ value = parseFloat(value).toDecimal(decimalObj.decimal("unitPrice", node));
|
|
|
+ //当前是量价/人材机,综合单价可输入,输入的值读取到市场单价,重算综合单价。
|
|
|
+ if(node.sourceType == ModuleNames.ration && node.data.type != rationType.ration){
|
|
|
+ fieldName = 'marketUnitFee';
|
|
|
+ }
|
|
|
+ }
|
|
|
if(fieldName === 'feesIndex.common.totalFee'){//修改了综合合价后,反算综合单价,然后再由计算程序算个综合合价出来
|
|
|
let unitfee = 0;
|
|
|
if(node.data.quantity){//如果工程量为0或空,综合合单直接填到综合单价
|
|
@@ -1284,7 +1290,7 @@ var projectObj = {
|
|
|
}*/
|
|
|
},
|
|
|
"insertLJ": {
|
|
|
- name: "插入量价",
|
|
|
+ name: "插入量价",//插入量价不需要自动定位到编号列
|
|
|
icon: 'fa-sign-in',
|
|
|
disabled: function () {
|
|
|
// var selected = project.mainTree.selected;
|
|
@@ -1292,22 +1298,48 @@ var projectObj = {
|
|
|
return !project.Ration.canAdd(project.mainTree.selected);
|
|
|
},
|
|
|
callback: function (key, opt) {
|
|
|
- project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {//插入量价不需要自动定位到编号列
|
|
|
+ /* project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {
|
|
|
projectObj.selectColAndFocus(newNode,null);
|
|
|
- },true);
|
|
|
-
|
|
|
- // ProjectController.addRation(project, controller, rationType.volumePrice);
|
|
|
+ },true);*/
|
|
|
},
|
|
|
- /* items:{
|
|
|
- firstCommand:{
|
|
|
- name: "插入量价",
|
|
|
+ items:{
|
|
|
+ insertLabour:{
|
|
|
+ name: "人工",
|
|
|
icon: 'fa-sign-in',
|
|
|
callback:function(key){
|
|
|
-
|
|
|
+ project.Ration.insertVolumePrice(gljType.LABOUR);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ insertMaterial:{
|
|
|
+ name:"材料" ,
|
|
|
+ icon: 'fa-sign-in',
|
|
|
+ callback:function(key){
|
|
|
+ project.Ration.insertVolumePrice(gljType.GENERAL_MATERIAL);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ insertMachine:{
|
|
|
+ name:"机械" ,
|
|
|
+ icon: 'fa-sign-in',
|
|
|
+ callback:function(key){
|
|
|
+ project.Ration.insertVolumePrice(gljType.GENERAL_MACHINE);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ insertMainMaterial:{
|
|
|
+ name:"主材" ,
|
|
|
+ icon: 'fa-sign-in',
|
|
|
+ callback:function(key){
|
|
|
+ project.Ration.insertVolumePrice(gljType.MAIN_MATERIAL);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ insertEquipment:{
|
|
|
+ name:"设备" ,
|
|
|
+ icon: 'fa-sign-in',
|
|
|
+ callback:function(key){
|
|
|
+ project.Ration.insertVolumePrice(gljType.EQUIPMENT);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }*/
|
|
|
+ }
|
|
|
},
|
|
|
"insertGLJ": {
|
|
|
name: "插入人材机",
|
|
@@ -1367,6 +1399,9 @@ var projectObj = {
|
|
|
icon: 'fa-calculator',
|
|
|
callback: function () {
|
|
|
project.calcProgram.calcAllNodesAndSave();
|
|
|
+ },
|
|
|
+ visible:function(key, opt){//2018-11-15 新需求隐藏右键“造价计算”。
|
|
|
+ return false;
|
|
|
}
|
|
|
},
|
|
|
"spr4":'--------',
|
|
@@ -1458,6 +1493,9 @@ var projectObj = {
|
|
|
},
|
|
|
callback:function(){
|
|
|
MaterialController.replaceMaterial([project.mainTree.selected]);
|
|
|
+ },
|
|
|
+ visible: function(key, opt){//2018-11-15 暂时隐藏
|
|
|
+ return false
|
|
|
}
|
|
|
}
|
|
|
}
|