瀏覽代碼

feat: 安徽导出接口,清单标题和清单编码处理变更

vian 5 年之前
父節點
當前提交
8b0fa90896
共有 1 個文件被更改,包括 9 次插入6 次删除
  1. 9 6
      web/building_saas/standard_interface/export/anhui_maanshan.js

+ 9 - 6
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -338,7 +338,8 @@ INTERFACE_EXPORT = (() => {
       const orgFee = getFee(node.data.fees, 'common.tenderTotalFee');
       const fee = isBidInvitation ? '0' : orgFee;
       const flag = node.getFlag();
-      const bm = BillsTitleValue[flag] || curTitleValue++;
+      // 编号:清单编码有值则直接取,无值则写死
+      const bm = node.data.code || BillsTitleValue[flag] || curTitleValue++;
       const titleType = BillsTitleType[flag];
       const calcBase = titleType === '5'
         ? orgFee
@@ -361,12 +362,14 @@ INTERFACE_EXPORT = (() => {
     // 清单明细 (只有100-700章清单标题输出)
     function QdMx(node, allNodes) {
       const row = node.row();
-      // 编码: 清单非章级的,读取清单编码列。章级的清单,写死:“清单第100章总则”输出=100,“清单第200章”输出=200,依次类推。可以判断章级的,取清单名称中的数字。
-      let code = node.data.code || '';
       const name = node.data.name || '';
-      const codeMatched = name.match(/第\s*(\d+)\s*章/);
-      if (codeMatched && codeMatched[1]) {
-        code = codeMatched[1];
+      // 编码: 清单编码有值则取清单编码,无值则:清单非章级的,读取清单编码列。章级的清单,写死:“清单第100章总则”输出=100,“清单第200章”输出=200,依次类推。可以判断章级的,取清单名称中的数字。
+      let code = node.data.code || '';
+      if (!code) {
+        const codeMatched = name.match(/第\s*(\d+)\s*章/);
+        if (codeMatched && codeMatched[1]) {
+          code = codeMatched[1];
+        }
       }
       const iszg = node.data.specialProvisional === '专业工程';
       const calcBaseBeFee = iszg || node.getFlag() === fixedFlag.PROVISIONAL;