Browse Source

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

vian 5 năm trước cách đây
mục cha
commit
9ff2c73b47

+ 11 - 11
gulpfile.js

@@ -99,8 +99,8 @@ let compleGljOptions = {
     htmlDest: 'web/building_saas/complementary_glj_lib/html',
     htmlName: 'tools-gongliaoji.html',
     injectList: [
-        'web/dest/scripts/compleGlj.all.min' + version + '.js',
-        'web/dest/css/compleGlj.all.min' + version + '.css',
+        'web/dest/scripts/compleGlj.all.min.' + version + '.js',
+        'web/dest/css/compleGlj.all.min.' + version + '.css',
         'web/dest/css/common.all.min.' + version + '.css'
     ]
 };
@@ -115,8 +115,8 @@ let compleRation_rationOptions = {
     htmlDest: 'web/building_saas/complementary_ration_lib/html',
     htmlName: 'dinge.html',
     injectList: [
-        'web/dest/scripts/compleRation_ration.all.min' + version + '.js',
-        'web/dest/css/compleRation_ration.all.min' + version + '.css',
+        'web/dest/scripts/compleRation_ration.all.min.' + version + '.js',
+        'web/dest/css/compleRation_ration.all.min.' + version + '.css',
         'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
     ]
@@ -132,8 +132,8 @@ let compleRation_gljOptions = {
     htmlDest: 'web/building_saas/complementary_ration_lib/html',
     htmlName: 'gongliao.html',
     injectList: [
-        'web/dest/scripts/compleRation_glj.all.min' + version + '.js',
-        'web/dest/scripts/compleRation_glj.all.min' + version + '.css',
+        'web/dest/scripts/compleRation_glj.all.min.' + version + '.js',
+        'web/dest/scripts/compleRation_glj.all.min.' + version + '.css',
         'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
     ]
@@ -149,8 +149,8 @@ let compleRation_coeOptions = {
     htmlDest: 'web/building_saas/complementary_ration_lib/html',
     htmlName: 'fuzhu.html',
     injectList: [
-        'web/dest/scripts/compleRation_coe.all.min' + version + '.js',
-        'web/dest/scripts/compleRation_coe.all.min' + version + '.css',
+        'web/dest/scripts/compleRation_coe.all.min.' + version + '.js',
+        'web/dest/scripts/compleRation_coe.all.min.' + version + '.css',
         'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
     ]
@@ -166,8 +166,8 @@ let compleRation_instOptions = {
     htmlDest: 'web/building_saas/complementary_ration_lib/html',
     htmlName: 'anzhuang.html',
     injectList: [
-        'web/dest/scripts/compleRation_inst.all.min' + version + '.js',
-        'web/dest/scripts/compleRation_inst.all.min' + version + '.css',
+        'web/dest/scripts/compleRation_inst.all.min.' + version + '.js',
+        'web/dest/scripts/compleRation_inst.all.min.' + version + '.css',
         'web/dest/scripts/common.all.min.'+version+'.js',
         'web/dest/css/common.all.min.' + version + '.css'
     ]
@@ -387,4 +387,4 @@ gulp.task('unit_price',gulp.series('unitPrice_inject', function (){
   return htmlmin(unitPriceOptions);
 }));
 
-gulp.task('build',gulp.series('common','header','login','pm','main', 'compleGlj', 'compleRation_ration', 'compleRation_glj', 'compleRation_coe', 'compleRation_inst','unit_price'));
+gulp.task('build', gulp.series('common', 'header', 'login', 'pm', 'main', 'compleGlj', 'compleRation_ration', 'compleRation_glj', 'compleRation_coe', 'compleRation_inst', 'unit_price'));

+ 2 - 1
modules/pm/models/project_property_template.js

@@ -11,7 +11,8 @@ const defaultDecimal = {
     quantity_detail: 4,
     material:5,//三材系数
     process: 6,
-    marketPriceProcess:2
+    marketPriceProcess: 2,
+    temProcess:6
 };
 const displaySetting = {
     autoHeight:true,

+ 4 - 4
public/web/gljUtil.js

@@ -330,9 +330,10 @@ let gljUtil = {
             tem_marketPrice = ext[tem.id].marketPrice;
           };
 
-          let temP = scMathUtil.roundForObj(
-            scMathUtil.roundForObj(tem_marketPrice * priceCoe, price_decimal) *
-            scMathUtil.roundForObj(ratio.consumption, quantity_decimal), process_decimal);
+
+          let temP = scMathUtil.roundForObj(tem_marketPrice * priceCoe, price_decimal) * scMathUtil.roundForObj(ratio.consumption, quantity_decimal);
+          if(decimalObj.temProcess) temP = scMathUtil.roundForObj(temP, decimalObj.temProcess);//取两次防止中间过程使用两位导致 4舍5入后少0.01的情况
+          temP = scMathUtil.roundForObj(temP,process_decimal);
           p = scMathUtil.roundForObj(temP + p, process_decimal);
         }
       }
@@ -656,7 +657,6 @@ let gljUtil = {
     CONSTRUCTION_TECH: 3
   },
 
-
   gljType: {
     LABOUR: 1, // 人工
     // ==============材料类型 ↓=================

+ 4 - 4
web/building_saas/main/html/main.html

@@ -2157,10 +2157,10 @@
     <script type="text/javascript" src="/web/building_saas/main/js/views/divide_view.js"></script>
     <script type="text/javascript" src="/public/web/storageUtil.js"></script>
     <script type="text/javascript" src="/web/building_saas/report/js/rpt_jspdf.js"></script>
-    <script src="/web/building_saas/standard_interface/config.js"></script>;
-    <script src="/web/building_saas/standard_interface/index.js"></script>;
-    <script src="/web/building_saas/standard_interface/export/base.js"></script>;
-    <script src="/web/building_saas/standard_interface/export/view.js"></script>;
+    <script src="/web/building_saas/standard_interface/config.js"></script>
+    <script src="/web/building_saas/standard_interface/index.js"></script>
+    <script src="/web/building_saas/standard_interface/export/base.js"></script>
+    <script src="/web/building_saas/standard_interface/export/view.js"></script>
 
     <!-- endinject -->
 

+ 2 - 1
web/building_saas/main/js/views/project_property_decimal_view.js

@@ -13,7 +13,8 @@ let defaultDecimal = {
         feeRate: {editable: true, data: 3},
         quantity_detail: {editable: false, data: 4},
         process: {editable: false, data: 6},
-        marketPriceProcess:{editable: false, data: 2}
+        marketPriceProcess: { editable: false, data: 2 },
+        temProcess:{editable: false, data: 6}
     }
 };
 

+ 1 - 1
web/building_saas/pm/js/pm_tree.js

@@ -333,7 +333,7 @@ const pmTree = {
           node.children = parentMap[node.data.ID] || [];
           node.parent = IDMap[node.data.ParentID] || this._root;
         });
-        const roots = parentMap['-1'];
+        const roots = parentMap['-1'] || [];
         // 将各节点的children进行排序,并设置nextSibling
         this._root.children = sortChildren(roots);
         // 生成tree.items

+ 95 - 100
web/building_saas/standard_interface/export/anhui_chizhou.js

@@ -42,124 +42,105 @@ INTERFACE_EXPORT = (() => {
         // 节点定义--------------------------------
         const subArea = areaKey.split('@')[1];
 
-        function ChiZGLGC() {
-            Element.call(this, '池州公路工程');
+        function CreateNode(nodeName) {
+            Element.call(this, nodeName);
         }
 
+
         function GongCXX(information) {
             const attrs = [
-                { name: '项目编号', value: getValueByKey(information, 'tendereeName') }, // 招标人
-                { name: '项目名称', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
-                { name: '建设单位', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
-                { name: '起始桩号', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
-                { name: '终点桩号', value: getValueByKey(information, 'tenderCompiler') }, // 编制人
-                { name: '建设地址', value: getValueByKey(information, 'tenderExaminer') }, // 复核人
-                { name: '项目概况', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE }, // 编制时间
-                { name: '建设性质', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '专业划分', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '道路里程', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '设计单位', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '计税方式', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '文件类型', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: '标准版本号', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: 'GUID', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
+                { name: '项目编号', value: getValueByKey(information, 'projNum') },
+                { name: '项目名称', value: getValueByKey(information, '') },
+                { name: '建设单位', value: getValueByKey(information, 'constructingUnits') },
+                { name: '起始桩号', value: getValueByKey(information, 'startAndChainages') },
+                { name: '终点桩号', value: getValueByKey(information, 'startAndChainages') },
+                { name: '建设地址', value: getValueByKey(information, '') },
+                { name: '项目概况', value: getValueByKey(information, '') },
+                { name: '建设性质', value: getValueByKey(information, '') },
+                { name: '专业划分', value: getValueByKey(information, '') },
+                { name: '道路里程', value: getValueByKey(information, '') },
+                { name: '设计单位', value: getValueByKey(information, '') },
+                { name: '计税方式', value: getValueByKey(information, 'taxMode') },
+                { name: '文件类型', value: getValueByKey(information, 'projType') },
+                { name: '标准版本号', value: getValueByKey(information, '') },
+                { name: 'GUID', value: getValueByKey(information, '') }
             ];
             Element.call(this, '工程信息', attrs);
         }
 
-        function ZhaoTBXX(){
-            Element.call(this, '招投标信息');
-        }
-
-        function GongLGCSJ(){
-            Element.call(this, '公路工程数据');
-        }
-
         function ZhaoBiaoXx(information) {
             const attrs = [
-                { name: '招标人', value: getValueByKey(information, 'tendereeName') }, // 招标人
-                { name: 'Zxr', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
-                { name: 'ZbrDb', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
-                { name: 'ZxrDb', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
-                { name: 'Bzr', value: getValueByKey(information, 'tenderCompiler') }, // 编制人
-                { name: 'Fhr', value: getValueByKey(information, 'tenderExaminer') }, // 复核人
-                { name: 'BzTime', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE }, // 编制时间
-                { name: 'FhTime', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
+                { name: '招标人', value: getValueByKey(information, 'tendereeName') },
+                { name: '招标人纳税识别号', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') },
+                { name: '招标法定代表人或其授权人', value: getValueByKey(information, 'tenderAuthorizer') },
+                { name: '招标法人或其授权人身份证号', value: getValueByKey(information, 'tenderAuthorizerIDNo') },
+                { name: '造价咨询人', value: getValueByKey(information, 'costConsultant') },
+                { name: '造价咨询人纳税识别号', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') },
+                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(information, 'consultantAuthorizer') },
+                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') },
+                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(information, '') },
+                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(information, '') },
+                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }
             ];
-            // 额外字段
-            const extraMap = {
-                '淮北': [
-                    { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
-                    { name: 'ZxrNssbh', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') }, // 造价咨询人纳税识别号
-                    { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
-                    { name: 'ZxrNssbh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
-                ]
-            };
-            if (extraMap[subArea]) {
-                attrs.push(...extraMap[subArea]);
-            }
             Element.call(this, '招标信息', attrs);
         }
-
         function ZhaoBiaoKzXx(information, totalCost) {
             const attrs = [
-                { name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
-                { name: 'Zxr', value: getValueByKey(information, 'costConsultant') }, // 造价咨询人
-                { name: 'ZbrDb', value: getValueByKey(information, 'tenderAuthorizer') }, // 招标人法定代表人或其授权人
-                { name: 'ZxrDb', value: getValueByKey(information, 'consultantAuthorizer') }, // 造价咨询人法定代表人或其授权人
-                { name: 'Bzr', value: getValueByKey(information, 'tenderCompiler') }, // 编制人
-                { name: 'Fhr', value: getValueByKey(information, 'tenderExaminer') }, // 复核人
-                { name: 'BzTime', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE }, // 编制时间
-                { name: 'FhTime', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE }, // 复核时间
-                { name: 'Zbkzj', value: totalCost, type: TYPE.DECIMAL }, // 控制价总价(元),取“投标报价”的金额。
+                { name: '招标人', value: getValueByKey(information, 'tendereeName') },
+                { name: '招标人纳税识别号', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') },
+                { name: '招标法定代表人或其授权人', value: getValueByKey(information, 'tenderAuthorizer') },
+                { name: '招标法人或其授权人身份证号', value: getValueByKey(information, 'tenderAuthorizerIDNo') },
+                { name: '造价咨询人', value: getValueByKey(information, 'costConsultant') },
+                { name: '造价咨询人纳税识别号', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') },
+                { name: '造价咨询人法定代表人或其授权人', value: getValueByKey(information, 'consultantAuthorizer') },
+                { name: '造价咨询法人或其授权人身份证号', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') },
+                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(information, '') },
+                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(information, '') },
+                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
+                { name: '审核人', value: getValueByKey(information, 'tenderExaminer') },
+                { name: '审核人资格证号', value: getValueByKey(information, '') },
+                { name: '审核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
+                { name: '控制价总价', value: totalCost, type: TYPE.DECIMAL },
+                { name: '工期', value: getValueByKey(information, '') },
+                { name: '质量要求', value: getValueByKey(information, '') }
             ];
-            // 额外字段
-            const extraMap = {
-                '淮北': [
-                    { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
-                    { name: 'ZxrNssbh', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') }, // 造价咨询人纳税识别号
-                    { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
-                    { name: 'ZxrNssbh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
-                ]
-            };
-            if (extraMap[subArea]) {
-                attrs.push(...extraMap[subArea]);
-            }
             Element.call(this, '招标控制价', attrs);
         }
-
         function TouBiaoXx(information, totalCost) {
             const attrs = [
-                { name: 'Zbr', value: getValueByKey(information, 'tendereeName') }, // 招标人
-                { name: 'Tbr', value: getValueByKey(information, 'bidder') }, // 投标人
-                { name: 'TbrDb', value: getValueByKey(information, 'bidderAuthorizer') }, // 投标人法定代表或其授权
-                { name: 'Bzr', value: getValueByKey(information, 'tenderCompiler') }, // 编制人
-                { name: 'BzTime', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE }, // 编制时间
-                { name: 'Tbzj', value: totalCost, type: TYPE.DECIMAL }, // 控制价总价(元),取“投标报价”的金额。
+                { name: '投标人', value: getValueByKey(information, 'bidderName') },
+                { name: '投标人纳税识别号', value: getValueByKey(information, '') },
+                { name: '投标人法定代表或其授权人', value: getValueByKey(information, 'bidderAuthorizer') },
+                { name: '投标人法人或其授权人身份证号', value: getValueByKey(information, '') },
+                { name: '编制人', value: getValueByKey(information, 'tenderCompiler') },
+                { name: '编制人资格证号', value: getValueByKey(information, '') },
+                { name: '编制日期', value: getValueByKey(information, 'compilationTime'), type: TYPE.DATE},
+                { name: '复核人', value: getValueByKey(information, 'tenderExaminer') },
+                { name: '复核人资格证号', value: getValueByKey(information, '') },
+                { name: '复核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
+                { name: '审核人', value: getValueByKey(information, 'tenderExaminer') },
+                { name: '审核人资格证号', value: getValueByKey(information, '') },
+                { name: '审核日期', value: getValueByKey(information, 'reviewTime'), type: TYPE.DATE },
+                { name: '投标总价', value: totalCost, type: TYPE.DECIMAL },
+                { name: '工期', value: getValueByKey(information, '') },
+                { name: '投标担保金额', value: getValueByKey(information, '') },
+                { name: '质量承诺', value: getValueByKey(information, '') },
+                { name: '投标担保方式', value: getValueByKey(information, '') },
+                { name: '造价软件品牌', value: getValueByKey(information, '') },
+                { name: '造价软件版本', value: getValueByKey(information, '') },
+                { name: '造价软件加密锁编号', value: getValueByKey(information, '') },
+                { name: '计算机硬件信息', value: getValueByKey(information, '') },
+                { name: '', value: getValueByKey(information, '') }
             ];
-            // 额外字段
-            const extraMap = {
-                '淮北': [
-                    { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
-                    { name: 'TbrNssbh', value: getValueByKey(information, 'bidderTaxpayerIdentificationNo') }, // 投标人纳税识别号
-                    { name: 'TbrDbsfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 投标人法定代表或其授权人身份证号
-                ]
-            };
-            if (extraMap[subArea]) {
-                attrs.push(...extraMap[subArea]);
-            }
             Element.call(this, '投标信息', attrs);
         }
 
-        // 单项工程信息,因项目管理中无“单项工程”这一层,从单位工程的工程特征信息中拼凑出来
-        function Dxgcxx(code, name) {
-            const attrs = [
-                { name: 'Dxgcbh', value: code, minLen: 1, whiteSpace: WHITE_SPACE.COLLAPSE }, // 单项工程编号
-                { name: 'Dxgcmc', value: name }, // 单项工程名称
-            ];
-            Element.call(this, 'Dxgcxx', attrs);
-        }
-
         // 单位工程信息
         function Dwgcxx(tenderName, feature) {
             const attrs = [
@@ -520,25 +501,37 @@ INTERFACE_EXPORT = (() => {
             const information = constructionData.property && constructionData.property.basicInformation || [];
             const summaryInfo = constructionData.summaryInfo[constructionData.ID];
 
-            const chiZGLGC = new ChiZGLGC(constructionData.name, information);
+            const chiZGLGC = new CreateNode('池州公路工程');
+
             chiZGLGC.children.push(new GongCXX(information));
 
-            const zhaoTBXX = new ZhaoTBXX();
+            const zhaoTBXX = new CreateNode('招投标信息');
             chiZGLGC.children.push(zhaoTBXX);
+
+            const gongLGCSJ = new CreateNode('公路工程数据');
+            chiZGLGC.children.push(gongLGCSJ);
+
             if (isBidInvitation) {
                 zhaoTBXX.children.push(new ZhaoBiaoXx(information));
             } else if (isControl) {
                 zhaoTBXX.children.push(new ZhaoBiaoKzXx(information, summaryInfo.totalCost));
             } else {
                 zhaoTBXX.children.push(new TouBiaoXx(information, summaryInfo.totalCost));
-            }
-
-            const gongLGCSJ = new GongLGCSJ(constructionData.name, information);
-            chiZGLGC.children.push(gongLGCSJ);
+            };
 
             // 将单位工程工程特征中,单项工程编号、名称相同的,插入到建设项目和分段(单位工程)的中间层。
             const midLayerMap = {}; // 单项工程key(code@name)与单项工程节点映射
+            debugger;
             for (const tenderData of constructionData.children) {
+                const gongLBDGC = new CreateNode('公路标段工程');
+                gongLGCSJ.children.push(gongLBDGC);
+                const attrs = [
+                    { name: '序号', value: getValueByKey(information, '') },
+                    { name: '标段名称', value: getValueByKey(information, '') },
+                    { name: '金额', value: getValueByKey(information, '') },
+                    { name: '唯一标识-Guid', value: getValueByKey(information, 'xxxxxxxxxxxxxxxxxx') }
+                ];
+
                 const feature = tenderData.property && tenderData.property.projectFeature || [];
                 const midLayerCode = getValueByKey(feature, 'singleProjNo');
                 const midLayerName = getValueByKey(feature, 'singleProjName');
@@ -548,6 +541,8 @@ INTERFACE_EXPORT = (() => {
                 // }
                 // midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
             }
+            const gongLGCHZ = new CreateNode('公路工程汇总');
+            gongLGCSJ.children.push(gongLGCHZ);
             // 校验信息
             const [cpuID, diskID, macID] = generateHardwareId().split(';');
             const suffix = INTERFACE_CONFIG[areaKey]['fileSuffix'][exportKind];

+ 109 - 11
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -17,12 +17,12 @@ INTERFACE_EXPORT = (() => {
     行车干扰施工增加费: "XCGRGCSGZJFFL",
     行车干扰: "XCGRGCSGZJFFL",
     工地转移费: "GDZYFFL",
-    工地转移: "GDZYFFL",
+    '工地转移(km)': "GDZYFFL",
     施工辅助费: "SGFZFFL",
     施工辅助: "SGFZFFL",
     基本费用: "JBFYFL",
     主副食运费补贴: "ZFSYFBTFL",
-    综合里程: "ZFSYFBTFL",
+    '综合里程(km)': "ZFSYFBTFL",
     职工探亲路费: "ZGTQLFFL",
     职工探亲: "ZGTQLFFL",
     职工取暖补贴: "ZGQNBTFL",
@@ -76,6 +76,19 @@ INTERFACE_EXPORT = (() => {
     'rationCommon': 'DEJAF'
   };
 
+  const feeLibNoMap = {
+    'eba0e7c0-cfe6-11ea-ba15-739be477d1fe': 'GYSFL-000000-2018-86',
+    '451d3180-e02e-11ea-8056-1514dfc2f39e': 'GYSFL-340000-2019-210'
+  };
+
+  const FixedCostMap = {
+    //折旧费、检修费、维护费、安拆辅助费
+    '折旧费': 1,
+    '检修费': 1,
+    '维护费': 1,
+    '安拆辅助费':1
+  }
+
   function getBasePrice(projectGLJID, tenderProject) {
     let glj = _.find(tenderProject.projectGLJ.datas.gljList, {
       id: projectGLJID
@@ -220,7 +233,7 @@ INTERFACE_EXPORT = (() => {
       function NormLib() {
         const attrs = [{
             name: "NormLibNo",
-            value: "0",
+            value: "YSDE-000000-2018-86",
           },
           {
             name: "NormLibName",
@@ -248,7 +261,7 @@ INTERFACE_EXPORT = (() => {
         },
         {
           name: "RateLibNo",
-          value: feeRateInfo.libID,
+          value: feeLibNoMap[feeRateInfo.libID],
         },
       ];
       Element.call(this, "Rate", attrs);
@@ -333,6 +346,7 @@ INTERFACE_EXPORT = (() => {
 
     function Pract(tpdata, seriNo) {
       let pgljData = tpdata.projectGLJ.datas;
+      let decimalObj = tpdata.property.decimal;
       const attrs = [{
           name: "PractNo",
           value: seriNo,
@@ -586,7 +600,7 @@ INTERFACE_EXPORT = (() => {
         }
       }
 
-      function Mech(g) {
+      function Mech(g,gljKeyMap) {
         const attrs = [{
             name: "Code",
             value: g.code,
@@ -617,22 +631,104 @@ INTERFACE_EXPORT = (() => {
           },
         ];
         Element.call(this, "Mech", attrs);
+        let FixedCostItems = [];
+        let fcsum = 0;
+        let VariableCostItems = [];
+        let vcsum = 0;
+        if (g.ratio_data && g.ratio_data.length > 0) { 
+          for (let ratio of g.ratio_data) { 
+            let rIndex = gljUtil.getIndex(ratio);
+            let rglj = gljKeyMap[rIndex];
+            let ts = scMathUtil.roundForObj(parseFloat(ratio.consumption) * rglj.priceInfo.tenderPrice, decimalObj.glj.unitPrice);
+            if (FixedCostMap[ratio.name]) {
+              FixedCostItems.push(new FixedCostItem(ratio));
+              fcsum = scMathUtil.roundForObj(fcsum + ts, decimalObj.glj.unitPrice);
+            } else { 
+              VariableCostItems.push(new VariableCostItem(ratio));
+              vcsum = scMathUtil.roundForObj(vcsum + ts, decimalObj.glj.unitPrice);
+            } 
+          }
+        }
+
+
+        if (FixedCostItems.length > 0) {
+          let fc = new FixedCost(fcsum);
+          fc.children = FixedCostItems;
+          this.children.push(fc);
+        }
+          
+        if (VariableCostItems.length > 0) {
+          let vc = new VariableCost(vcsum);
+          vc.children = VariableCostItems;
+          this.children.push(vc);
+        }
+
+        function VariableCost(sum) { 
+          const attrs = [{
+            name: "VariableCostSum",
+            value: sum,
+          }];
+          Element.call(this, "VariableCost", attrs);
+        }
+        
+        function VariableCostItem(item) { 
+          const attrs = [{
+            name: "VariableCostNo",
+            value: item.code,
+          },{
+            name: "Consumption",
+            value: item.consumption,
+          }]
+          Element.call(this, "VariableCostItem", attrs);
+        }
+
+        function FixedCost(sum) { 
+          const attrs = [{
+            name: "FixedCostSum",
+            value: sum,
+          }, {
+            name: "FixedRate",
+            value: 1,
+          }];
+          Element.call(this, "FixedCost", attrs);
+        }
+
+        function FixedCostItem(item) { 
+          const attrs = [{
+            name: "FixedCostNo",
+            value: item.code,
+          },{
+            name: "Sum",
+            value: item.consumption,
+          }]
+          Element.call(this, "FixedCostItem", attrs);
+
+        }
+        
+        
+
       }
 
       let Mps = new emptyElement("Mps");
       let Materials = new emptyElement("Materials");
       let Mechs = new emptyElement("Mechs");
+      let gljKeyMap = {};
+      let temMechs = [];
       for (let g of pgljData.gljList) {
         let type = g.type + "";
+        gljKeyMap[gljUtil.getIndex(g)] = g;
         type = type.charAt(0);
         if (type == "1") {
           Mps.children.push(new MP(g));
         } else if (type == "2" || type == 5) {
           Materials.children.push(new Material(g));
         } else if (type == "3") {
-          Mechs.children.push(new Mech(g));
+          temMechs.push(g);
         }
       }
+      for (let t of temMechs) { 
+        Mechs.children.push(new Mech(t,gljKeyMap));
+      }
 
       this.children.push(Mps);
       this.children.push(Materials);
@@ -1325,16 +1421,18 @@ INTERFACE_EXPORT = (() => {
     data.children.push(new SystemInfo());
     data.children.push(new CostBasis());
     let seriNo = 1;
+    let Rates = [];
+    let Practs = [];
+    let EprjInfos = [];
     for (let c of projectData.children) {
       let tenderProject = tenderDetailMap[c.ID];
       let feeRataDatas = tenderProject.FeeRate.datas;
-      data.children.push(new Rate(tenderProject, feeRataDatas, seriNo));
-
-      data.children.push(new Pract(tenderProject, seriNo));
-      data.children.push(new EprjInfo(tenderProject));
+      Rates.push(new Rate(tenderProject, feeRataDatas, seriNo));
+      Practs.push(new Pract(tenderProject, seriNo));
+      EprjInfos.push(new EprjInfo(tenderProject));
       seriNo++;
     }
-
+    data.children.push(...Rates,...Practs,...EprjInfos);
     return [{
       data: data,
       exportKind: exportKind,