Browse Source

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

zhangweicheng 5 years ago
parent
commit
a8676c1d1a

+ 5 - 1
modules/pm/models/project_model.js

@@ -192,7 +192,11 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
                         let assign = {
                             valuationType: data.updateData.property.valuationType === ValuationType.BUDGET ? '预算' : '工程量清单',
                             engineering: data.updateData.property.engineeringName,
-                            feeStandard: data.updateData.property.feeStandardName
+                            feeStandard: data.updateData.property.feeStandardName,
+                            // 新建分段文件时,默认将“工程特征”-“单项工程名称”、“编制范围”填写分段文件的名称
+                            // 为了防止用户漏填,导出电子招标文件时,有数据
+                            compilationScope: data.updateData.name,
+                            singleProjName: data.updateData.name,
                         };
                         data.updateData.property.projectFeature = await pmFacade.getProjectFeature(data.updateData.property.featureLibID, assign);
                     }

+ 31 - 3
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -314,12 +314,32 @@ INTERFACE_EXPORT = (() => {
       [fixedFlag.PROVISIONAL]: '5',
       [fixedFlag.TOTAL_COST]: '6',
     };
+    // 标题映射
+    /*     写死:
+    “第100章至700章清单”输出=1、
+    “已包含在清单合计中的材料、工程设备、专业工程暂估价合计”输出=9、
+    “清单合计减去材料、工程设备、专业工程暂估价合计”输出=10、
+    “计日工合计”输出=11、
+    “暂列金额(不含计日工总额)”输出=12、
+    “投标报价”输出=13;
+    如果有新增的同级的大项费用,则以14开始编号 */
+    const BillsTitleValue = {
+      [fixedFlag.ONE_SEVEN_BILLS]: '1',
+      [fixedFlag.PROVISIONAL_TOTAL]: '9',
+      [fixedFlag.BILLS_TOTAL_WT_PROV]: '10',
+      [fixedFlag.DAYWORK_LABOR]: '11',
+      [fixedFlag.PROVISIONAL]: '12',
+      [fixedFlag.TOTAL_COST]: '13',
+    };
+    let curTitleValue;
     // 清单标题 造价书的第一层数据。
     function QdBt(node, allNodes) {
       const row = node.row();
       const orgFee = getFee(node.data.fees, 'common.tenderTotalFee');
       const fee = isBidInvitation ? '0' : orgFee;
-      const titleType = BillsTitleType[node.getFlag()];
+      const flag = node.getFlag();
+      const bm = BillsTitleValue[flag] || curTitleValue++;
+      const titleType = BillsTitleType[flag];
       const calcBase = titleType === '5'
         ? orgFee
         : node.data.calcBase
@@ -327,7 +347,7 @@ INTERFACE_EXPORT = (() => {
           : '';
       const attrs = [
         { name: 'Xh', value: row, type: TYPE.INT }, // 序号
-        { name: 'Bm', value: node.data.code }, // 编码
+        { name: 'Bm', value: bm }, // 编码
         { name: 'Name', value: node.data.name }, // 名称
         { name: 'Je', value: fee, type: TYPE.DECIMAL }, // 金额
         { name: 'Code', value: `F${row}` }, // 行引用
@@ -341,6 +361,13 @@ 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];
+      }
       const iszg = node.data.specialProvisional === '专业工程';
       const calcBaseBeFee = iszg || node.getFlag() === fixedFlag.PROVISIONAL;
       const orgFee = getFee(node.data.fees, 'common.tenderTotalFee');
@@ -351,7 +378,7 @@ INTERFACE_EXPORT = (() => {
           : '';
       const attrs = [
         { name: 'Xh', value: row, type: TYPE.INT }, // 序号
-        { name: 'Qdbm', value: node.data.code, minLen: 1 }, // 编码
+        { name: 'Qdbm', value: code, minLen: 1 }, // 编码
         { name: 'Name', value: node.data.name }, // 名称
         { name: 'Dw', value: node.data.unit }, // 单位
         { name: 'Sl', value: node.data.quantity, type: TYPE.DECIMAL }, // 工程量
@@ -617,6 +644,7 @@ INTERFACE_EXPORT = (() => {
         projectGLJIDToRcjID[glj.id] = index + 1;
         projectGLJMap[glj.id] = glj;
       });
+      curTitleValue = 14;
       const dwgcxx = new Dwgcxx(tenderData.name, feature);
       dwgcxx.children.push(
         setupFeeRate(curDetail.FeeRate, info),

+ 49 - 0
web/over_write/js/hunan_2014.js

@@ -1,3 +1,52 @@
+
+let isHN2014 = true;
+
+function overwriteRationCalcBases(taxType) {
+  if (typeof rationCalcBases == 'undefined') return;
+  for (let key in rationCalcBases) delete rationCalcBases[key];
+  // let isJY = taxType == '2';
+  rationCalcBases['人工费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, [gljType.LABOUR], priceTypes.ptMarketPrice, isTender);
+  };
+  rationCalcBases['材料费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, baseMaterialTypes, priceTypes.ptMarketPrice, isTender);
+  };
+  rationCalcBases['施工机械使用费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, baseMachineTypes, priceTypes.ptMarketPrice, isTender);
+  };
+  rationCalcBases['商品砼费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, [gljType.COMMERCIAL_CONCRETE, gljType.COMMERCIAL_MORTAR], priceTypes.ptMarketPrice, isTender);
+  };
+  rationCalcBases['外购砼构件费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, [gljType.PURCHASE_COMPONENT], priceTypes.ptMarketPrice, isTender);
+  };
+  rationCalcBases['设备购置费'] = function (node, isTender) {
+    return calcTools.rationBaseFee(node, [gljType.EQUIPMENT], priceTypes.ptMarketPrice, isTender);
+  }
+};
+
+(function overwriteFeeTypes() {
+  if (typeof cpFeeTypes == 'undefined') return;
+  cpFeeTypes = [
+    { type: 'marketDirect', name: '直接费' },
+    { type: 'marketDirectWork', name: '直接工程费' },
+    { type: 'marketLabour', name: '人工费' },
+    { type: 'marketMaterial', name: '材料费' },
+    { type: 'marketMachine', name: '施工机械使用费' },
+    { type: 'otherFee', name: '其他工程费' },
+    { type: 'otherFee1', name: '其他工程费I' },
+    { type: 'otherFee2', name: '其他工程费II' },
+    { type: "indirect", name: '间接费' },
+    { type: 'manage', name: '企业管理费' },
+    { type: 'force', name: '规费' },
+    { type: 'profit', name: '利润' },
+    { type: 'tax', name: '税金' },
+    { type: 'common', name: '建安费' }
+  ];
+})();
+
+
+
 // 清单基数
 const progression = ['养护工程管理经费(大修工程)', '养护工程管理经费(中修工程)', '养护工程监理费(路线工程)', '养护工程监理费(桥梁及隧道工程)', '养护工程设计文件审查费', '工程设计费(路线工程)', '工程设计费(桥梁、隧道工程)'];
 const deficiency = { '养护工程设计文件审查费': 4500 };