Просмотр исходного кода

导入投标文件时,机上人工和动力燃料,都是机械大类,应给出具体细类,以正确计算机械费价差.

zhongzewei 6 лет назад
Родитель
Сommit
d01aa7e370

+ 1 - 0
modules/pm/facade/pm_facade.js

@@ -1480,6 +1480,7 @@ async function setupStdData(tenderData) {
         let stdGLJ = stdGLJCodeMap[pGLJ.original_code];
         if (stdGLJ) {
             pGLJ.glj_id = stdGLJ.ID;
+            pGLJ.model = stdGLJ.model;
             if (pGLJ.type !== stdGLJ.gljType) { //更新组成物connect_key
                 let keyStr = [pGLJ.code || 'null', pGLJ.name || 'null', pGLJ.specs || 'null', pGLJ.unit || 'null', pGLJ.type].join('|-|');
                 let ratios = tenderData.mixRatio.filter(ratio =>

+ 18 - 3
web/building_saas/main/js/models/importStandardInterface.js

@@ -734,7 +734,7 @@ const ImportXML = (() => {
             });
         }
         //根据费用类别、配比类比获取人材机类别(后端匹配不到标准人材机的时候用)
-        function getGljTypeData(feeType, ratioType) {
+        function getGljTypeData(feeType, ratioType, name) {
             let map = {
                 '-': {type: 201, shortName: '材'},
                 '1-': {type: 1, shortName: '人'},
@@ -747,7 +747,22 @@ const ImportXML = (() => {
                 '3-': {type: 301, shortName: '机'},
                 '4-': {type: 4, shortName: '主'},
             };
-            return map[`${feeType}-${ratioType}`] || '';
+            let nameMap = {
+                '柴油': {type: 305, shortName: '动'},
+                '柴油(机械用)': {type: 305, shortName: '动'},
+                '柴油(机械用)': {type: 305, shortName: '动'},
+                '汽油': {type: 305, shortName: '动'},
+                '汽油(机械用)': {type: 305, shortName: '动'},
+                '汽油(机械用)': {type: 305, shortName: '动'},
+                '电': {type: 305, shortName: '动'},
+                '电(机械用)': {type: 305, shortName: '动'},
+                '电(机械用)': {type: 305, shortName: '动'},
+                '机上人工': {type: 303, shortName: '机人'},
+            };
+            if (feeType === '3' && nameMap[name]) {
+                return nameMap[name] || null;
+            }
+            return map[`${feeType}-${ratioType}`] || null;
         }
         //主要材料类别-三材类别映射
         const MaterialMap = {
@@ -789,7 +804,7 @@ const ImportXML = (() => {
                     gljData.materialType = MaterialMap[getValue(gljSrc, ['_主要材料类别'])];
                     gljData.materialCoe = getValue(gljSrc, ['_主要材料单位系数']);
                 }
-                let typeData = getGljTypeData(getValue(gljSrc, ['_费用类别']), getValue(gljSrc, ['_配比类别']));
+                let typeData = getGljTypeData(getValue(gljSrc, ['_费用类别']), getValue(gljSrc, ['_配比类别']), gljData.name);
                 if (typeData) {
                     gljData.type = typeData.type;
                     gljData.shortName = typeData.shortName;