Forráskód Böngészése

插入量价、工料机时取单位工程取费专业

zhangweicheng 6 éve
szülő
commit
3f8fc9e81d

+ 8 - 6
web/building_saas/main/js/models/ration.js

@@ -109,19 +109,21 @@ var Ration = {
             controller.sheet.getCell(selected[0].row,col).value(data[fieldName]);
         };
         ration.prototype.getTempRationData = function (id, billsID, serialNo, rType) {
-            var newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
+            let newData = {'ID': id, 'serialNo': serialNo, projectID: this.project.ID()};
+            let pEngineer = projectInfoObj.projectInfo.property.projectEngineering;//量价默认使用后台设置的单位工程取费专业
             newData[project.masterField.ration] = billsID;
             newData['type'] = rType;
             if (rType == rationType.volumePrice){
                 newData['subType'] = gljType.GENERAL_MATERIAL;   // 默认的量价类型为材料
-                //newData['programID'] = projectInfoObj.projectInfo.property.engineering;
             };
-           /* if(rType == rationType.install){//是安装增加费生成的定额
-                newData['programID'] = projectInfoObj.projectInfo.property.engineering;
-            }*/
+            if(rType == rationType.ration){//空定额暂时不输入取费专业
+               // newData['programID'] = projectInfoObj.projectInfo.property.engineering;
+            }else {
+                if(pEngineer) newData['programID'] = pEngineer;
+            }
+
             return newData;
         };
-
         ration.prototype.getBillsSortRation = function (billsID) {     // 该方法只适用于叶子清单
             var rations = this.datas.filter(function (data) {
                 return data[project.masterField.ration] === billsID;

+ 2 - 0
web/building_saas/main/js/models/ration_glj.js

@@ -503,6 +503,7 @@ let ration_glj = {
             let gljList = [];
             let allGLJ = gljOprObj.AllRecode;
             let billsItemID = null, serialNo = 0,selectedSerialNo = null,nextNodeID = null, parentNodeID = null, billNode = null;
+            let pEngineer = projectInfoObj.projectInfo.property.projectEngineering;
             let children = [];
             if (selected.sourceType === project.Bills.getSourceType()) {
                 billsItemID = selected.data.ID;
@@ -549,6 +550,7 @@ let ration_glj = {
                         materialCoe:glj.materialCoe,
                         repositoryId: glj.repositoryId
                     };
+                    if(pEngineer) new_glj.programID = pEngineer;
                     if (glj.hasOwnProperty("compilationId")) {
                         new_glj.from = "cpt";
                         if (glj.code.indexOf('-') != -1) {//这条工料机是用户通过修改名称、规格、型号等保存到补充工料机库的

+ 2 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -2436,7 +2436,8 @@ function AddTender() {
             valuationType: valuationType,
             valuationName: valuationName,
             isInstall: libs.isInstall !== undefined ? libs.isInstall : false,
-            engineering: libs.engineering,
+            engineering: libs.engineering,//定额默认取费专业
+            projectEngineering:libs.projectEngineering,//单位工程默认取费专业(造价书中插入量价、工料机时用)
             engineering_id: libs._id,
             engineeringName: engineeringName,
             unitPriceFile: {name: unitPriceFileObj.name, id: unitPriceFileObj.id},