|
@@ -1275,13 +1275,13 @@ var gljOprObj = {
|
|
|
//project.ration_glj.datas = project.ration_glj.datas.concat(result.newRecodes);//显示和缓存统一,这样的话就不用更新两个位置了
|
|
|
project.ration_glj.datas = project.ration_glj.datas.concat(result.showData);
|
|
|
gljOprObj.sheetData = gljOprObj.sheetData.concat(result.showData);
|
|
|
- project.projectGLJ.loadData(function () {
|
|
|
- project.ration_glj.addToMainTree(result.showData);
|
|
|
- gljOprObj.showRationGLJSheetData();
|
|
|
- project.calcProgram.calcAndSave(selected);
|
|
|
- projectObj.mainController.refreshTreeNode([selected]);
|
|
|
- $.bootstrapLoading.end();
|
|
|
- });
|
|
|
+ project.projectGLJ.loadNewProjectGLJToCaches(result.projectGLJList,true);
|
|
|
+ project.ration_glj.addToMainTree(result.showData);
|
|
|
+ gljOprObj.showRationGLJSheetData();
|
|
|
+ project.calcProgram.calcAndSave(selected);
|
|
|
+ projectObj.mainController.refreshTreeNode([selected]);
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+
|
|
|
}
|
|
|
});//doc.rationID=selected.data.ID;
|
|
|
}
|
|
@@ -1302,29 +1302,29 @@ var gljOprObj = {
|
|
|
let nodes = [selected];
|
|
|
gljOprObj.sheetData[index] = data;
|
|
|
glj_list[list_index] = data;
|
|
|
- project.projectGLJ.loadData(function () {//加载完项目工料机再计算
|
|
|
- gljOprObj.showRationGLJSheetData();
|
|
|
- let node = project.ration_glj.updateGLJNodeAfterReplace(data);
|
|
|
- if(node) nodes.push(node);
|
|
|
- /*if (project.ration_glj.needShowToTree(data)) {//当替换的是主材或设备时,刷新对应的树节点
|
|
|
- var node = project.ration_glj.findGLJNodeByID(data.ID);
|
|
|
- if (node) {
|
|
|
- project.ration_glj.transferToNodeData(data);
|
|
|
- node.source = data;
|
|
|
- node.data = data;
|
|
|
- }
|
|
|
- node ? nodes.push(node) : "";
|
|
|
- }*/
|
|
|
- //project.ration_glj.addToMainTree(data);
|
|
|
- selected.data.adjustState = result.adjustState;
|
|
|
- selected.data.name = result.name;
|
|
|
- projectObj.mainController.refreshTreeNode(nodes);
|
|
|
- project.calcProgram.calcAndSave(selected, async function () {
|
|
|
- await OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
- await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes([selected]);
|
|
|
- });
|
|
|
- $.bootstrapLoading.end();
|
|
|
+ project.projectGLJ.loadNewProjectGLJToCaches([result.projectGLJ],true);
|
|
|
+ gljOprObj.showRationGLJSheetData();
|
|
|
+ let node = project.ration_glj.updateGLJNodeAfterReplace(data);
|
|
|
+ if(node) nodes.push(node);
|
|
|
+ /*if (project.ration_glj.needShowToTree(data)) {//当替换的是主材或设备时,刷新对应的树节点
|
|
|
+ var node = project.ration_glj.findGLJNodeByID(data.ID);
|
|
|
+ if (node) {
|
|
|
+ project.ration_glj.transferToNodeData(data);
|
|
|
+ node.source = data;
|
|
|
+ node.data = data;
|
|
|
+ }
|
|
|
+ node ? nodes.push(node) : "";
|
|
|
+ }*/
|
|
|
+ //project.ration_glj.addToMainTree(data);
|
|
|
+ selected.data.adjustState = result.adjustState;
|
|
|
+ selected.data.name = result.name;
|
|
|
+ projectObj.mainController.refreshTreeNode(nodes);
|
|
|
+ project.calcProgram.calcAndSave(selected, async function () {
|
|
|
+ await OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
+ await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes([selected]);
|
|
|
});
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -1353,15 +1353,15 @@ var gljOprObj = {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- project.projectGLJ.loadData(function () {
|
|
|
- me.showRationGLJSheetData();
|
|
|
- var rationNodes = me.refreshStateAfterMreplace(stateList, nodes);
|
|
|
- project.calcProgram.calcNodesAndSave(rationNodes, async function () {
|
|
|
- await OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
- await await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes(rationNodes);
|
|
|
- });
|
|
|
- $.bootstrapLoading.end();
|
|
|
+ project.projectGLJ.loadNewProjectGLJToCaches([result.projectGLJ],true);
|
|
|
+ me.showRationGLJSheetData();
|
|
|
+ var rationNodes = me.refreshStateAfterMreplace(stateList, nodes);
|
|
|
+ project.calcProgram.calcNodesAndSave(rationNodes, async function () {
|
|
|
+ await OVER_HEIGHT.reCalcOverHeightFee();
|
|
|
+ await await itemIncreaseFeeObj.calcItemIncreaseFeeByNodes(rationNodes);
|
|
|
});
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
updateProperty: function (obj, doc) {
|