Explorar el Código

导出接口费用构成变更

zhongzewei hace 6 años
padre
commit
5f8501ac08

+ 23 - 5
web/building_saas/main/js/models/exportStandardInterface.js

@@ -238,16 +238,34 @@ const XMLStandard = (function () {
             XML_EXPORT_BASE.Element.call(this, '系统信息', attrs);
         }
         //费用构成定义
+        /*
+         * 1.投标文件时:
+         * 在标段下,则取建设项目对应汇总数值;是在单项工程,则取单项工程对应汇总数值。
+         * 2.招标文件时,全部取0。
+         * 3.控制价文件时,分部分项清单合计、措施项目清单合计、其他项目清单合计、计日工合计、总承包服务费合计、签证索赔合计、规费、税金,均取0;其他按项目中汇总数据取值。
+         * */
         function FeeFrom(summaryInfo) {
+            let tenderKind = _config.EXPORT_KIND.Tender,
+                controlKind = _config.EXPORT_KIND.Control;
             let attrs = [
-                {name: '工程费合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.engineeringCost : '0', required: true, type: _config.TYPE.NUM2},
+                {name: '工程费合计',
+                    value: [tenderKind, controlKind].includes(exportKind) ? summaryInfo.engineeringCost : '0',
+                    required: true, type: _config.TYPE.NUM2},
                 {name: '分部分项清单合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.subEngineering : '0', required: true, type: _config.TYPE.NUM2},
                 {name: '措施项目清单合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.measure : '0', required: true, type: _config.TYPE.NUM2},
-                {name: '安全文明施工专项费', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.safetyConstruction : '0', required: true, type: _config.TYPE.NUM2},
+                {name: '安全文明施工专项费',
+                    value: [tenderKind, controlKind].includes(exportKind) ? summaryInfo.safetyConstruction : '0',
+                    required: true, type: _config.TYPE.NUM2},
                 {name: '其他项目清单合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.other : '0', required: true, type: _config.TYPE.NUM2},
-                {name: '暂列金额合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.provisional : '0', type: _config.TYPE.NUM2},
-                {name: '材料暂估价合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.materialProvisional : '0', type: _config.TYPE.NUM2},
-                {name: '专业工程暂估价合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.engineeringEstimate : '0', type: _config.TYPE.NUM2},
+                {name: '暂列金额合计',
+                    value: [tenderKind, controlKind].includes(exportKind) ? summaryInfo.provisional : '0',
+                    type: _config.TYPE.NUM2},
+                {name: '材料暂估价合计',
+                    value: [tenderKind, controlKind].includes(exportKind) ? summaryInfo.materialProvisional : '0',
+                    type: _config.TYPE.NUM2},
+                {name: '专业工程暂估价合计',
+                    value: [tenderKind, controlKind].includes(exportKind) ? summaryInfo.engineeringEstimate : '0',
+                    type: _config.TYPE.NUM2},
                 {name: '计日工合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.daywork : '0', type: _config.TYPE.NUM2},
                 {name: '总承包服务费合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.turnKeyContract : '0', type: _config.TYPE.NUM2},
                 {name: '签证索赔合计', value: exportKind === _config.EXPORT_KIND.Tender ? summaryInfo.claimVisa : '0', type: _config.TYPE.NUM2},

+ 1 - 1
web/building_saas/main/js/models/exportStdInterfaceBase.js

@@ -41,7 +41,7 @@ const XML_EXPORT_BASE = (() => {
         coe: 'priceCoe' // 价格指数调整法
     };
     // 加载数据间隔,减少服务器压力
-    const TIMEOUT_TIME = 200;
+    const TIMEOUT_TIME = 400;
     // 导出粒度
     const GRANULARITY = {
         PROJECT: 1,         //导出建设项目

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

@@ -1516,6 +1516,9 @@ const ImportXML = (() => {
                 tenderData.gljSummary.forEach(pGLJ => {
                     pGLJ.project_id = tenderData.ID;
                     pGLJ.id = IDPlaceholder.projectGLJ++;
+                    // 如果人材机数据的类型为空,默认设置成201先,具体需要后台匹配
+                    pGLJ.type = pGLJ.type || 201;
+                    pGLJ.shortName = pGLJ.shortName || '材';
                     //gljCodeMap[pGLJ.code] = pGLJ;
                     projectGLJMap[pGLJ.customCode] = pGLJ;
                     projectGLJMap[pGLJ.original_code] = pGLJ;