|
|
@@ -1192,9 +1192,10 @@ var gljOprObj = {
|
|
|
mreplace == true ? $("#mreplace_next_div").modal('show'):me.doReplaceGLJ(selectCode, oldData,selected);
|
|
|
}
|
|
|
},
|
|
|
- doReplaceGLJ: function (selectCode, oldData,selected) {
|
|
|
+ doReplaceGLJ: function (selectCode, oldData,selected,is) {
|
|
|
let me = this;
|
|
|
let project = projectObj.project;
|
|
|
+ let oldType = oldData.type;
|
|
|
project.ration_glj.replaceGLJ(selectCode, oldData, function (result) {
|
|
|
if (result) {
|
|
|
//result.adjustState;
|
|
|
@@ -1216,17 +1217,28 @@ var gljOprObj = {
|
|
|
selected.data.adjustState = result.adjustState;
|
|
|
selected.data.name = result.name;
|
|
|
projectObj.mainController.refreshTreeNode(nodes);
|
|
|
- project.calcProgram.calcAndSave(selected);
|
|
|
+ project.calcProgram.calcAndSave(selected,function(){
|
|
|
+ me.replaceProgramInfo(oldType,result.projectGLJ.type);
|
|
|
+ });
|
|
|
gljOprObj.refreshView();
|
|
|
$.bootstrapLoading.end();
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ replaceProgramInfo:function(oldType,newType){
|
|
|
+ //检查是否由混凝土替换为商品砼或者商品砂浆
|
|
|
+ if(gljUtil.isConcreteToCommercialConcrete(oldType,newType)){
|
|
|
+ alert("请手动修改取费类别为构造物III");
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
doMReplaceGLJ: function () {
|
|
|
let me = this;
|
|
|
let project = projectObj.project;
|
|
|
let oldData = me.sheetData[gljContextMenu.selectedRow];
|
|
|
let selectCode = gljOprObj.GLJSelection[0];
|
|
|
+ let oldType = oldData.type;
|
|
|
project.ration_glj.mReplaceGLJ(selectCode, oldData, function (result,updateMap) {
|
|
|
if(result == null){
|
|
|
return;
|
|
|
@@ -1258,7 +1270,9 @@ var gljOprObj = {
|
|
|
})
|
|
|
project.projectGLJ.loadNewProjectGLJToCaches([result.projectGLJ],true);
|
|
|
var rationNodes = me.refreshStateAfterMreplace(stateList, nodes);
|
|
|
- project.calcProgram.calcNodesAndSave(rationNodes);
|
|
|
+ project.calcProgram.calcNodesAndSave(rationNodes,function(){
|
|
|
+ me.replaceProgramInfo(oldType,result.projectGLJ.type);
|
|
|
+ });
|
|
|
me.refreshView();
|
|
|
$.bootstrapLoading.end();
|
|
|
|