|
@@ -75,7 +75,38 @@ let rationPM = {
|
|
|
var dData = me.datas[row].calcItems;
|
|
|
sheetCommonObj.showData(dSheet, me.detailSetting, dData);
|
|
|
me.detailSpread.resumePaint();
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ saveCalcItem: function (projectID, templatesID, calcItem) {
|
|
|
+ let me = this;
|
|
|
+/* let projectID = projectInfoObj.projectInfo.ID,
|
|
|
+ templatesID = me.datas,
|
|
|
+ calcItem = {
|
|
|
+ "ID" : 99,
|
|
|
+ "code" : "test",
|
|
|
+ "name" : "testName",
|
|
|
+ "fieldName" : "direct",
|
|
|
+ "dispExpr" : "F2+F5+F6+F10",
|
|
|
+ "expression" : "@('2') + @('5') + @('6') + @('10')",
|
|
|
+ "compiledExpr" : "",
|
|
|
+ "statement" : "基价人工费+基价材料费+基价机械费+未计价材料费"
|
|
|
+ };*/
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '/calcProgram/saveCalcItem',
|
|
|
+ data: {projectID: projectID, templatesID: templatesID, calcItem: calcItem},
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (result) {
|
|
|
+ if(!result.error){
|
|
|
+ alert('成功:' + result.message);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ alert('失败:' + result.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
};
|
|
|
|
|
|
$(document).ready(function(){
|