Browse Source

导出接口:
1.来自分部分项、措施项目清单的UnitWorksSummaryItem code设置为空
2.工作内容增加自检

vian 5 years ago
parent
commit
9b129c1891
1 changed files with 5 additions and 5 deletions
  1. 5 5
      web/over_write/js/guangdong_2018_export.js

+ 5 - 5
web/over_write/js/guangdong_2018_export.js

@@ -1245,7 +1245,7 @@ const XMLStandard = (function () {
             _base.Element.call(this, 'UnitWorksSummaryGroup', attrs, '单位工程费用汇总标题');
         }
         // 单位工程费汇总明细
-        function UnitWorksSummaryItem(node) {
+        function UnitWorksSummaryItem(node, isEmptyCode = false) {
             const bills = node.data;
             const row = node.serialNo() + 1;
             const attrs = [
@@ -1286,7 +1286,7 @@ const XMLStandard = (function () {
                 // 费用代号
                 {
                     name: 'Code', dName: '费用代号', required: true,
-                    value: getFeeCode(bills)
+                    value: isEmptyCode ? '' : getFeeCode(bills)
                 },
                 // 汇总类型
                 {
@@ -1516,7 +1516,7 @@ const XMLStandard = (function () {
         function WorkContent(contentText, fee) {
             const attrs = [
                 // 定额工作内容
-                { name: 'Name', dName: '定额工作内容', required: true, value: contentText },
+                { name: 'Name', dName: '定额工作内容', required: true, value: contentText, minLen: 1 },
                 // 取此工作内容下定额子目/量价/定额同级人材机的综合合价之和
                 { name: 'Total', type: _type.DECIMAL, value: fee },
                 { name: 'Remark', value: '' }
@@ -2448,7 +2448,7 @@ const XMLStandard = (function () {
             const fbfx = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.SUB_ENGINERRING);
             const fbfxGroup = new UnitWorksSummaryGroup(fbfx.data);
             // 分部分项工程的子项,取项目名称的首字母拼接
-            const fbfxChildren = fbfx.children.map(node => new UnitWorksSummaryItem(node));
+            const fbfxChildren = fbfx.children.map(node => new UnitWorksSummaryItem(node, true));
             fbfxGroup.children.push(...fbfxChildren);
             // 措施项目
             const csxm = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.MEASURE);
@@ -2456,7 +2456,7 @@ const XMLStandard = (function () {
             // 措施项目的子项,“绿色施工安全防护措施费”、“其他措施费”
             const csxmChildren = csxm.getPosterity()
                 .filter(node => [fixedFlag.SAFETY_CONSTRUCTION, fixedFlag.OTHER_MEASURE_FEE].includes(node.getFlag()))
-                .map(node => new UnitWorksSummaryItem(node));
+                .map(node => new UnitWorksSummaryItem(node, true));
             csxmGroup.children.push(...csxmChildren);
             // 其他项目
             const other = tenderDetail.mainTree.roots.find(node => node.getFlag() === fixedFlag.OTHER);