Quellcode durchsuchen

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/YangHuOperation

lishihao vor 1 Tag
Ursprung
Commit
962195dab5

+ 2 - 1
modules/all_models/stdRation_coe.js

@@ -29,7 +29,8 @@ const coeListSchema = new Schema({
     original_code: String,               //原人材机编码
     original_code: String,               //原人材机编码
     option_codes: String,                //可选人材机编码
     option_codes: String,                //可选人材机编码
     option_list: [Schema.Types.Mixed],//下拉列表选项
     option_list: [Schema.Types.Mixed],//下拉列表选项
-    coes: [coeSchema]
+    coes: [coeSchema],
+    displayCompilation: String, // 显示编办
 }, { versionKey: false });
 }, { versionKey: false });
 
 
 mongoose.model('std_ration_lib_coe_list', coeListSchema, 'std_ration_lib_coe_list');
 mongoose.model('std_ration_lib_coe_list', coeListSchema, 'std_ration_lib_coe_list');

+ 4 - 1
modules/common/const/bills_fixed.js

@@ -257,7 +257,9 @@ if (process.env.NODE_ENV.indexOf('hw') !== -1) {
         // 日常养护管理费
         // 日常养护管理费
         DAILY_MAINTENANCE_MANAGEMENT: 213,
         DAILY_MAINTENANCE_MANAGEMENT: 213,
         // 交通机电设施、设备备品备件合计
         // 交通机电设施、设备备品备件合计
-        TRAFFIC_ELECTROMECHANICAL_EQUIPMENT_TOTAL: 214,
+        TRAFFIC_ELECTROMECHANICAL_EQUIPMENT_TOTAL: 215,
+        // 监测系统建设费
+        MONITORING_SYSTEM_CONSTRUCTION: 216,
 
 
     };
     };
 }
 }
@@ -347,6 +349,7 @@ const fixedFlagList = [
     { name: '除雪融冰', value: fixedFlag.SNOWICE_REMOVAL },
     { name: '除雪融冰', value: fixedFlag.SNOWICE_REMOVAL },
     { name: '日常养护管理费', value: fixedFlag.DAILY_MAINTENANCE_MANAGEMENT },
     { name: '日常养护管理费', value: fixedFlag.DAILY_MAINTENANCE_MANAGEMENT },
     { name: '交通机电设施、设备备品备件合计', value: fixedFlag.TRAFFIC_ELECTROMECHANICAL_EQUIPMENT_TOTAL },
     { name: '交通机电设施、设备备品备件合计', value: fixedFlag.TRAFFIC_ELECTROMECHANICAL_EQUIPMENT_TOTAL },
+    { name: '监测系统建设费', value: fixedFlag.MONITORING_SYSTEM_CONSTRUCTION },
 ];
 ];
 
 
 export { fixedFlag as default, fixedFlagList as List };
 export { fixedFlag as default, fixedFlagList as List };

+ 25 - 0
modules/ration_repository/models/ration_item.js

@@ -22,6 +22,8 @@ const installationDao = new InstallationDao();
 import GljDao from "../../std_glj_lib/models/gljModel";
 import GljDao from "../../std_glj_lib/models/gljModel";
 const stdGljDao = new GljDao();
 const stdGljDao = new GljDao();
 import stdgljutil from "../../../public/cache/std_glj_type_util";
 import stdgljutil from "../../../public/cache/std_glj_type_util";
+const lossRateModel = mongoose.model('std_ration_lib_loss_rate_list');
+const uuidV1 = require('uuid/v1');
 //add
 //add
 const stdGLJItemModel = mongoose.model('std_glj_lib_gljList');
 const stdGLJItemModel = mongoose.model('std_glj_lib_gljList');
 const stdGLJItemModelBackup = mongoose.model('std_glj_lib_gljList_backup');
 const stdGLJItemModelBackup = mongoose.model('std_glj_lib_gljList_backup');
@@ -72,6 +74,25 @@ async function copyCoeData(sourceLibID, targetLibID) {
     return IDMapping;
     return IDMapping;
 }
 }
 
 
+// 拷贝损耗率
+async function copyLossRateData(sourceLibID, targetLibID) {
+    const sourceLossData = await lossRateModel.find({ libID: sourceLibID }, '-_id').lean();
+    const IDMapping = {};
+    sourceLossData.forEach(item => {
+        IDMapping[item.ID] = uuidV1();
+    });
+
+    const insertData = sourceLossData.map(item => ({
+        ...item,
+        libID: targetLibID,
+        ID: IDMapping[item.ID],
+    }));
+    if (insertData.length) {
+        await lossRateModel.insertMany(insertData);
+    }
+    return IDMapping;
+}
+
 
 
 // 拷贝定额库
 // 拷贝定额库
 rationItemDAO.prototype.copyLib = async function (sourceLibID, targetLibID, sourceGLJLibID, targetGLJLibID) {
 rationItemDAO.prototype.copyLib = async function (sourceLibID, targetLibID, sourceGLJLibID, targetGLJLibID) {
@@ -79,6 +100,7 @@ rationItemDAO.prototype.copyLib = async function (sourceLibID, targetLibID, sour
     const rationIDMapping = await getIDMapping(counter.moduleName.rations, sourceRationData);
     const rationIDMapping = await getIDMapping(counter.moduleName.rations, sourceRationData);
     const classIDMapping = await copyClassData(sourceLibID, targetLibID);
     const classIDMapping = await copyClassData(sourceLibID, targetLibID);
     const coeIDMapping = await copyCoeData(sourceLibID, targetLibID);
     const coeIDMapping = await copyCoeData(sourceLibID, targetLibID);
+    const lossRateIDMapping = await copyLossRateData(sourceLibID, targetLibID);
     const sourceGLJData = await stdGLJItemModel.find({ repositoryId: sourceGLJLibID }, '-_id code ID').lean();
     const sourceGLJData = await stdGLJItemModel.find({ repositoryId: sourceGLJLibID }, '-_id code ID').lean();
     const sourceGLJCodeMapping = {};
     const sourceGLJCodeMapping = {};
     sourceGLJData.forEach(glj => sourceGLJCodeMapping[glj.code] = glj.ID);
     sourceGLJData.forEach(glj => sourceGLJCodeMapping[glj.code] = glj.ID);
@@ -100,6 +122,9 @@ rationItemDAO.prototype.copyLib = async function (sourceLibID, targetLibID, sour
         });
         });
         const rationGLJList = [];
         const rationGLJList = [];
         ration.rationGljList.forEach(rGLJ => {
         ration.rationGljList.forEach(rGLJ => {
+            if (rGLJ.lossRateID) {
+                rGLJ.lossRateID = lossRateIDMapping[rGLJ.lossRateID];
+            }
             const newGLJID = gljIDMapping[rGLJ.gljId];
             const newGLJID = gljIDMapping[rGLJ.gljId];
             if (newGLJID) {
             if (newGLJID) {
                 rGLJ.gljId = newGLJID;
                 rGLJ.gljId = newGLJID;

+ 15 - 6
web/maintain/ration_repository/js/coe.js

@@ -46,8 +46,8 @@ $(document).ready(function () {
     function () {
     function () {
       //refreshAfterZmhs(false);
       //refreshAfterZmhs(false);
       let leftContentWidth = parseFloat(
       let leftContentWidth = parseFloat(
-          $("#leftContent")[0].style.width.replace("%", "")
-        ),
+        $("#leftContent")[0].style.width.replace("%", "")
+      ),
         mainContentWidth = parseFloat(
         mainContentWidth = parseFloat(
           $("#mainContent")[0].style.width.replace("%", "")
           $("#mainContent")[0].style.width.replace("%", "")
         );
         );
@@ -101,8 +101,8 @@ $(document).ready(function () {
       mainContentKey = `${moduleName}${$("#mainContent").attr("id")}Width`,
       mainContentKey = `${moduleName}${$("#mainContent").attr("id")}Width`,
       zmhsContentKey = `${moduleName}${$("#rightContent").attr("id")}Width`;
       zmhsContentKey = `${moduleName}${$("#rightContent").attr("id")}Width`;
     let zmhsWidth = getLocalCache(zmhsContentKey)
     let zmhsWidth = getLocalCache(zmhsContentKey)
-        ? getLocalCache(zmhsContentKey)
-        : $("#rightContent")[0].style.width,
+      ? getLocalCache(zmhsContentKey)
+      : $("#rightContent")[0].style.width,
       mainContentWidth = $("#mainContent")[0].style.width,
       mainContentWidth = $("#mainContent")[0].style.width,
       leftContentWidth;
       leftContentWidth;
     zmhsWidth = parseFloat(zmhsWidth.replace("%", ""));
     zmhsWidth = parseFloat(zmhsWidth.replace("%", ""));
@@ -347,6 +347,15 @@ let coeOprObj = {
         vAlign: "center",
         vAlign: "center",
         readOnly: false,
         readOnly: false,
       },
       },
+      {
+        headerName: "显示编办",
+        headerWidth: 180,
+        dataCode: "displayCompilation",
+        dataType: "String",
+        hAlign: "left",
+        vAlign: "center",
+        readOnly: false,
+      },
     ],
     ],
   },
   },
   buildSheet: function (container) {
   buildSheet: function (container) {
@@ -647,7 +656,7 @@ let coeOprObj = {
             me.coeSelInit(target.row);
             me.coeSelInit(target.row);
           }
           }
           return {
           return {
-            callback: function () {},
+            callback: function () { },
             items: {
             items: {
               getReference: {
               getReference: {
                 name: "查找引用",
                 name: "查找引用",
@@ -1059,7 +1068,7 @@ let gljAdjOprObj = {
         if (
         if (
           args.row < me.currentGljAdjList.length &&
           args.row < me.currentGljAdjList.length &&
           args.editingText.toString().trim() !==
           args.editingText.toString().trim() !==
-            me.currentGljAdjList[args.row][dataCode]
+          me.currentGljAdjList[args.row][dataCode]
         ) {
         ) {
           let updateObj = me.currentGljAdjList[args.row];
           let updateObj = me.currentGljAdjList[args.row];
           if (
           if (

+ 4 - 0
web/users/js/compilation.js

@@ -631,6 +631,10 @@ $(document).ready(function () {
     if ($("#" + id + "_changeBudget").attr("checked")) fileTypes.push(4);
     if ($("#" + id + "_changeBudget").attr("checked")) fileTypes.push(4);
     if ($("#" + id + "_settlement").attr("checked")) fileTypes.push(10);
     if ($("#" + id + "_settlement").attr("checked")) fileTypes.push(10);
     if ($("#" + id + "_cost_estimate").attr("checked")) fileTypes.push(20);
     if ($("#" + id + "_cost_estimate").attr("checked")) fileTypes.push(20);
+    if ($("#" + id + "_bill_budget_settlement").attr("checked"))
+      fileTypes.push(22);
+    if ($("#" + id + "_three_bill_settlement").attr("checked"))
+      fileTypes.push(23);
     let current = $(this);
     let current = $(this);
 
 
     console.log(id, this);
     console.log(id, this);

+ 2 - 0
web/users/views/compilation/index.html

@@ -194,6 +194,8 @@
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_changeBudget" <% if (bill.fileTypes && bill.fileTypes.includes(4)) { %> checked <% } %>  /> 变更预算
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_changeBudget" <% if (bill.fileTypes && bill.fileTypes.includes(4)) { %> checked <% } %>  /> 变更预算
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(10)) { %> checked <% } %>  /> 结算
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(10)) { %> checked <% } %>  /> 结算
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_cost_estimate" <% if (bill.fileTypes && bill.fileTypes.includes(20)) { %> checked <% } %> /> 成本测算  
                              <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_cost_estimate" <% if (bill.fileTypes && bill.fileTypes.includes(20)) { %> checked <% } %> /> 成本测算  
+                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_bill_budget_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(22)) { %> checked <% } %> /> 工程量清单结算决算  
+                             <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_three_bill_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(23)) { %> checked <% } %> /> 三级清单结算决算  
                          </td>
                          </td>
                         <% } %>
                         <% } %>
                         <td>
                         <td>