|
@@ -373,21 +373,24 @@ let calcProgramManage = {
|
|
return;
|
|
return;
|
|
};
|
|
};
|
|
|
|
|
|
- template.calcItems.splice(idx, 1);
|
|
|
|
- let data = {
|
|
|
|
- 'projectID': projectObj.project.ID(),
|
|
|
|
- 'ID': template.ID,
|
|
|
|
- 'calcItems': template.calcItems
|
|
|
|
|
|
+ hintBox.infoBox('系统提示', `确定要删除计算规则“${item.name}”吗?`, 2, cbYes);
|
|
|
|
+ function cbYes() {
|
|
|
|
+ template.calcItems.splice(idx, 1);
|
|
|
|
+ let data = {
|
|
|
|
+ 'projectID': projectObj.project.ID(),
|
|
|
|
+ 'ID': template.ID,
|
|
|
|
+ 'calcItems': template.calcItems
|
|
|
|
+ };
|
|
|
|
+ calcProgramManage.updateTemplate(data, function (rst) {
|
|
|
|
+ if (rst){
|
|
|
|
+ projectObj.project.calcProgram.compileTemplate(template);
|
|
|
|
+ calcProgramManage.refreshDetailSheet();
|
|
|
|
+ let relationNodes = calcTools.getNodesByProgramID(template.ID);
|
|
|
|
+ projectObj.project.calcProgram.calcNodesAndSave(relationNodes);
|
|
|
|
+ $.bootstrapLoading.end();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
- calcProgramManage.updateTemplate(data, function (rst) {
|
|
|
|
- if (rst){
|
|
|
|
- projectObj.project.calcProgram.compileTemplate(template);
|
|
|
|
- calcProgramManage.refreshDetailSheet();
|
|
|
|
- let relationNodes = calcTools.getNodesByProgramID(template.ID);
|
|
|
|
- projectObj.project.calcProgram.calcNodesAndSave(relationNodes);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- $.bootstrapLoading.end();
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|