소스 검색

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

TonyKang 5 년 전
부모
커밋
5bac1e7378
39개의 변경된 파일842개의 추가작업 그리고 360개의 파일을 삭제
  1. 0 1
      config/gulpConfig.js
  2. 0 4
      gulpfile.js
  3. 99 69
      modules/all_models/bills.js
  4. 1 1
      modules/all_models/stdRation_ration.js
  5. 1 1
      modules/main/middleware/index.js
  6. 2 2
      modules/pm/facade/pm_facade.js
  7. 8 3
      public/web/sheet/sheet_common.js
  8. 5 4
      public/web/tree_sheet/tree_sheet_helper.js
  9. 2 2
      web/building_saas/complementary_ration_lib/html/gongliao.html
  10. 5 1
      web/building_saas/css/custom.css
  11. 3 7
      web/building_saas/main/html/main.html
  12. 1 1
      web/building_saas/main/html/tender_price.html
  13. 9 1
      web/building_saas/main/js/models/bills.js
  14. 14 9
      web/building_saas/main/js/models/calc_program.js
  15. 67 0
      web/building_saas/main/js/models/project.js
  16. 5 4
      web/building_saas/main/js/views/block_lib.js
  17. 0 4
      web/building_saas/main/js/views/calc_base_view.js
  18. 2 2
      web/building_saas/main/js/views/glj_col.js
  19. 5 1
      web/building_saas/main/js/views/main_tree_col.js
  20. 1 1
      web/building_saas/main/js/views/project_property_projFeature.js
  21. 14 2
      web/building_saas/main/js/views/project_view.js
  22. 12 12
      web/building_saas/main/js/views/tender_price_view.js
  23. 5 4
      web/building_saas/pm/js/pm_gc.js
  24. 5 4
      web/building_saas/pm/js/pm_newMain.js
  25. 5 4
      web/building_saas/pm/js/pm_share.js
  26. 2 1
      web/building_saas/standard_interface/export/anhui_chizhou.js
  27. 76 54
      web/building_saas/standard_interface/export/anhui_maanshan.js
  28. 19 3
      web/building_saas/standard_interface/export/base.js
  29. 186 50
      web/building_saas/standard_interface/export/guangdong_zhongshan.js
  30. 142 0
      web/building_saas/standard_interface/import/anhui_chizhou.js
  31. 11 8
      web/building_saas/standard_interface/import/anhui_maanshan.js
  32. 17 5
      web/building_saas/standard_interface/import/base.js
  33. 11 2
      web/building_saas/standard_interface/import/guangdong_zhongshan.js
  34. 11 3
      web/building_saas/standard_interface/import/view.js
  35. 1 1
      web/building_saas/unit_price_file/index.js
  36. 1 1
      web/common/html/header.html
  37. 3 0
      web/over_write/js/shandong_2016.js
  38. 3 0
      web/over_write/js/sichuan_2013.js
  39. 88 88
      web/users/js/login.js

+ 0 - 1
config/gulpConfig.js

@@ -239,7 +239,6 @@ module.exports = {
         'web/building_saas/complementary_ration_lib/js/explanatory.js',
         'web/building_saas/complementary_ration_lib/js/jobContent.js',
         'web/building_saas/complementary_ration_lib/js/annotation.js',
-        'public/web/scMathUtil.js',
         'public/web/common_ajax.js',
         'public/web/ztree_common.js',
         'public/web/ration_glj_units.js',

+ 0 - 4
gulpfile.js

@@ -117,7 +117,6 @@ let compleRation_rationOptions = {
     injectList: [
         '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'
     ]
 };
@@ -134,7 +133,6 @@ let compleRation_gljOptions = {
     injectList: [
         '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'
     ]
 };
@@ -151,7 +149,6 @@ let compleRation_coeOptions = {
     injectList: [
         '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'
     ]
 };
@@ -168,7 +165,6 @@ let compleRation_instOptions = {
     injectList: [
         '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'
     ]
 }

+ 99 - 69
modules/all_models/bills.js

@@ -6,75 +6,105 @@ let subSchema = require("../all_schemas/bills_sub_schemas");
 let deleteSchema = require('../all_schemas/delete_schema');
 let Schema = mongoose.Schema;
 let billsSchema = new Schema({
-    ID: {type: String, index: true},
-    ParentID: String,
-    NextSiblingID: String,
-    projectID:{type: Number, index: true} ,
-    serialNo: Number,
-    chapterID: Number,
-    billsLibId: Number,
-    code: String,
-    fullCode: String,
-    type:{type: Number,default:4},//1 :大项费用 2:分部 3分项 4清单;5补项
-    isAdd:{type: Number,default:0},//1 true 0 false是否新增
-    name: String,
-    unit: String,
-    quantity: String, // Decimal
-    quantity2:String,//预算项目中的数量2
-    quantityEXP:String,//工程量表达式
-    feeRateID:Number,
-    feeRate:String,
-    isFromDetail:{type: Number,default:0},//1 true 0 false
-    programID: Number,
-    calcBase: String,
-    calcBaseValue: String,     // 计算基数表达式的值
-    tenderCalcBaseValue: String,     // 调价后计算基数表达式的值
-    baseProgressiveFee: String, // 累进计算中的基准值(报表需要这个中间值)
-    // 工程量计算规则
-    ruleText: String,
-    // 说明
-    comments: String,
-    // 调价
-    xs_Labour: String, // Decimal
-    xs_Material: String, // Decimal
-    xs_Machine: String, // Decimal
-    xs_FeeRate: String, // Decimal
-    xs_LabourPrice: String, // Decimal
-    xs_MaterialPrice: String, // Decimal
-    xs_MachinePrice: String, // Decimal
-    isTender_Labour: Boolean,
-    isTender_Material: Boolean,
-    isTender_Machine: Boolean,
-    targetUnitFee:String,//目标单价
-    targetTotalFee:String,//目标合价
-    //工作内容//zhong 2017-8-31
-    jobContentText: String, //清单工作内容列显示文本, 减少第一次拉数据时的循环次数
-    jobContent: [subSchema.jobContentSchema],
-    //项目特征
-    itemCharacterText: String,//清单项目特征列显示文本
-    itemCharacter: [subSchema.itemCharacterSchema],
-    // 费用字段
-    fees: [subSchema.feesSchema],
-    // 标记字段
-    flags: [subSchema.flagsSchema],
-    //消耗量调整系数字段
-    quantityCoe:subSchema.quantityCoeSchema,
-    //子目工程量调整系数
-    rationQuantityCoe:String,
-    // 不调价
-    is_adjust_price: {type: Number,default: 0},
-    installationKey:String,//用来记录安装增加费的关联字段
-    deleteInfo: deleteSchema,
-    isEstimate:{type: Number,default:0},       // 1 true 0 false 是否暂估
-    unitPriceAnalysis:{type: Number,default:0},       // 1 true 0 false 单价分析
-    specialProvisional:String,
-    remark:String,
-    engineeringContent:String,//工程内容
-    serviceContent:String,//服务内容
-    claimVisa:String,//签证及索赔依据
-    calcFlag: {type: Number},    // 叶子清单的计算类型。末定义:按定额计算。1:用户输入金额。2:用户输入单价。3:用户输入设计单价。
-    bookmarkBackground:String,//书签背景色
-    bookmarkAnnotation:String//批注
+  ID: {
+    type: String,
+    index: true
+  },
+  ParentID: String,
+  NextSiblingID: String,
+  projectID: {
+    type: Number,
+    index: true
+  },
+  serialNo: Number,
+  chapterID: Number,
+  billsLibId: Number,
+  code: String,
+  fullCode: String,
+  type: {
+    type: Number,
+    default: 4
+  }, //1 :大项费用 2:分部 3分项 4清单;5补项
+  isAdd: {
+    type: Number,
+    default: 0
+  }, //1 true 0 false是否新增
+  name: String,
+  unit: String,
+  quantity: String, // Decimal
+  quantity2: String, //预算项目中的数量2
+  quantityEXP: String, //工程量表达式
+  feeRateID: Number,
+  feeRate: String,
+  isFromDetail: {
+    type: Number,
+    default: 0
+  }, //1 true 0 false
+  programID: Number,
+  calcBase: String,
+  calcBaseValue: String, // 计算基数表达式的值
+  tenderCalcBaseValue: String, // 调价后计算基数表达式的值
+  baseProgressiveFee: String, // 累进计算中的基准值(报表需要这个中间值)
+  // 工程量计算规则
+  ruleText: String,
+  // 说明
+  comments: String,
+  // 调价
+  xs_Labour: String, // Decimal
+  xs_Material: String, // Decimal
+  xs_Machine: String, // Decimal
+  xs_FeeRate: String, // Decimal
+  xs_LabourPrice: String, // Decimal
+  xs_MaterialPrice: String, // Decimal
+  xs_MachinePrice: String, // Decimal
+  isTender_Labour: Boolean,
+  isTender_Material: Boolean,
+  isTender_Machine: Boolean,
+  targetUnitFee: String, //目标单价
+  targetTotalFee: String, //目标合价
+  //工作内容//zhong 2017-8-31
+  jobContentText: String, //清单工作内容列显示文本, 减少第一次拉数据时的循环次数
+  jobContent: [subSchema.jobContentSchema],
+  //项目特征
+  itemCharacterText: String, //清单项目特征列显示文本
+  itemCharacter: [subSchema.itemCharacterSchema],
+  // 费用字段
+  fees: [subSchema.feesSchema],
+  // 标记字段
+  flags: [subSchema.flagsSchema],
+  //消耗量调整系数字段
+  quantityCoe: subSchema.quantityCoeSchema,
+  //子目工程量调整系数
+  rationQuantityCoe: String,
+  // 不调价
+  is_adjust_price: {
+    type: Number,
+    default: 0
+  },
+  installationKey: String, //用来记录安装增加费的关联字段
+  deleteInfo: deleteSchema,
+  isEstimate: {
+    type: Number,
+    default: 0
+  }, // 1 true 0 false 是否暂估
+  lockUnitPrice: {
+    type: Schema.Types.Mixed,
+    default: false
+  }, //  true  false 锁定综合单价,true 为锁定
+  unitPriceAnalysis: {
+    type: Number,
+    default: 0
+  }, // 1 true 0 false 单价分析
+  specialProvisional: String,
+  remark: String,
+  engineeringContent: String, //工程内容
+  serviceContent: String, //服务内容
+  claimVisa: String, //签证及索赔依据
+  calcFlag: {
+    type: Number
+  }, // 叶子清单的计算类型。末定义:按定额计算。1:用户输入金额。2:用户输入单价。3:用户输入设计单价。
+  bookmarkBackground: String, //书签背景色
+  bookmarkAnnotation: String //批注
 });
 
 mongoose.model("bills", billsSchema);

+ 1 - 1
modules/all_models/stdRation_ration.js

@@ -40,7 +40,7 @@ const rationItemSchema = new Schema({
     sectionId: {type: Number,index: true},
     rationRepId: Number,
     caption: String,
-    feeType: Number,
+    feeType: String,
     jobContent: String,
     annotation: String,
     rationGljList: [rationGljItemSchema],

+ 1 - 1
modules/main/middleware/index.js

@@ -54,7 +54,7 @@ function isAjax(req) {
 // 登录状态全局判断
 async function stateChecking(req, res, next) {
     const url = req.originalUrl;
-    if (url == "\/" || /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/cld/.test(url) || /^\/captcha/.test(url)) {
+    if (url == "\/" || /^\/login/.test(url) || /\.map|\.ico$/.test(url) || /^\/sms/.test(url) || /^\/captcha/.test(url)) {
         // 如果是登录页面或短信接口或cld接口则忽略判断数据
         next();
     } else {

+ 2 - 2
modules/pm/facade/pm_facade.js

@@ -1945,11 +1945,11 @@ async function importTenderDetail(tenderData) {
         task.push(billsModel.insertMany(tenderData.bills));
     }
     // 暂估价材料表
-    if (tenderData.evaluationList.length) {
+    if (tenderData.evaluationList && tenderData.evaluationList.length) {
         task.push(evaluateListModel.insertMany(tenderData.evaluationList));
     }
     // 评标材料表
-    if (tenderData.bidEvaluationList.length) {
+    if (tenderData.evaluationList && tenderData.bidEvaluationList.length) {
         task.push(bidListModel.insertMany(tenderData.bidEvaluationList));
     }
     if (task.length) {

+ 8 - 3
public/web/sheet/sheet_common.js

@@ -336,7 +336,7 @@ var sheetCommonObj = {
                 break;
         }
         return result;
-    },
+  },
     analyzePasteData: function (setting, pastedInfo) {
         var rst = [], propId = pastedInfo.cellRange.col, preStrIdx = 0, itemObj = {};//propId = 0 to proId = pastedInfo.cellRange.col, update by zhong
         for (var i = 0; i < pastedInfo.pasteData.text.length; i++) {
@@ -399,6 +399,11 @@ var sheetCommonObj = {
         sheet.getCell(row, col).hAlign(GC.Spread.Sheets.HorizontalAlign.center);
 
     },
+    getCheckBox(threeState = false) {
+      var c = new GC.Spread.Sheets.CellTypes.CheckBox();
+      c.isThreeState(threeState);
+      return c
+    },
     setComboBox(row, col, sheet, options, editorValueType, editable, maxDropDownItems) {
         //let combo = new GC.Spread.Sheets.CellTypes.ComboBox();
         let dynamicCombo = sheetCommonObj.getDynamicCombo(true);
@@ -1177,7 +1182,7 @@ var sheetCommonObj = {
         ctx.restore();
     },
     drawLine: function (ctx, x1, y1, x2, y2, color) {
-        let l_color = color ? color : "gray";
+        let l_color = color ? color : "#ababab";
         ctx.save();
         ctx.translate(0.5, 0.5);
         ctx.beginPath();
@@ -1216,7 +1221,7 @@ var sheetCommonObj = {
         let t_step = step ? step : 6;
         offset += t_step;
         ctx.save();
-        ctx.strokeStyle = "gray";
+        ctx.strokeStyle = "#ababab";
         ctx.translate(0.5, 0.5);
         ctx.beginPath();
         ctx.moveTo(x + offset, y);

+ 5 - 4
public/web/tree_sheet/tree_sheet_helper.js

@@ -388,19 +388,20 @@ var TREE_SHEET_HELPER = {
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             if (showTreeLine) {
                 // Draw Horizontal Line
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                 }
                 // Draw Vertical Line
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                 }
             }
@@ -414,7 +415,7 @@ var TREE_SHEET_HELPER = {
                 while (parent) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                     }
                     parent = parent.parent;

+ 2 - 2
web/building_saas/complementary_ration_lib/html/gongliao.html

@@ -11,9 +11,9 @@
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
+    <!--endinject-->
     <!--zTree-->
   	<link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
-    <!--endinject-->
     <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
     <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
@@ -226,13 +226,13 @@
         </div>
     </div>
     <!-- JS. -->
-    <script src="/public/web/PerfectLoad.js"></script>
     <script src = "/lib/spreadjs/sheets/gc.spread.sheets.all.11.1.2.min.js"></script>
     <script>GC.Spread.Sheets.LicenseKey =  '<%- LicenseKey %>';</script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.core.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.excheck.js"></script>
     <script type="text/javascript" src="/lib/ztree/jquery.ztree.exedit.js"></script>
     <!--inject:js-->
+    <script src="/public/web/PerfectLoad.js"></script>
     <script type="text/javascript" src="/web/building_saas/complementary_ration_lib/js/global.js"></script>
     <!-- zTree -->
     <script type="text/javascript" src="/public/web/common_ajax.js"></script>

+ 5 - 1
web/building_saas/css/custom.css

@@ -599,4 +599,8 @@ input.text-right {
 .export-check{
   overflow: auto;
   height: 400px;
-}
+}
+
+.top-msg{
+  top:35px !important;
+  }

+ 3 - 7
web/building_saas/main/html/main.html

@@ -92,13 +92,6 @@
                             <a id="uploadGld" class="dropdown-item" href="#import" data-toggle="modal" data-target="#import">导入广联达算量Excel清单</a>
                         </div>-->
                     </span>
-                    <% if(overWriteUrl === '/web/over_write/js/quanguo_2018.js' && boqType) { %>
-                    <span data-toggle="modal" data-target="#interface-export-modal">
-                        <span id="open-export-modal" class="btn btn-light btn-sm" data-toggle="tooltip" data-original-title="数据接口" data-placement="bottom">
-                            <a href="javascript:void(0);"><i class="fa fa-code-fork"></i></a>
-                        </span>
-                    </span>
-                    <% }%>
                    <!-- <a href="javascript:void(0)" class="btn btn-light btn-sm" id="insertRation" data-toggle="tooltip" data-placement="bottom" data-original-title="插入定额"><i class="fa fa-sign-in" aria-hidden="true"></i></a>-->
                     <a href="javascript:void(0)" class="btn btn-light btn-sm" id="delete" data-toggle="tooltip" data-placement="bottom" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
                     <a href="javascript:void(0)" class="btn btn-light btn-sm" id="upLevel" data-toggle="tooltip" data-placement="bottom" data-original-title="升级"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
@@ -119,6 +112,9 @@
                               </div>
                               <!--<a href="javascript:void(0);" id="ZLFB_btn" class="dropdown-item" data-placement="bottom"><i class="fa fa-retweet" aria-hidden="true"></i> 整理分部</a>
                                 <a id="switchTznr" href="javascript:void(0);"  class="dropdown-item"><i class="fa fa-eye" aria-hidden="true"></i> 显示特征</a>-->
+                            <% if(overWriteUrl === '/web/over_write/js/quanguo_2018.js' && boqType) { %>
+                                <a class="dropdown-item" id="open-export-modal" href="javascript:void(0);" data-toggle="modal" data-target="#interface-export-modal"><i class="fa fa-code-fork"></i> 数据接口</a>
+                            <% }%>
                             <% if (projectData.property.lockBills == true) { %>
                             <a href="javascript:void(0)"  class="dropdown-item" name="lockBills"> <i class="fa fa-unlock-alt" aria-hidden="true"></i> 解锁清单</a>
                             <% } else { %>

+ 1 - 1
web/building_saas/main/html/tender_price.html

@@ -5,7 +5,7 @@
             <select class="form-control form-control-sm" style="width: auto; font-size: .875rem" id="calcPriceOption">
                 <option value="priceBase_RCJ" >按目标价调整工料机消耗</option>
                 <option value="coeBase">按调价系数计算</option>
-                <option value="priceBase_ZM" >按目标价调整子目工程量</option>
+                <option value="priceBase_ZM" >按目标价调整定额工程量</option>
             </select>
         </div>
 

+ 9 - 1
web/building_saas/main/js/models/bills.js

@@ -618,7 +618,7 @@ var Bills = {
                 return false;
             }
         };
-        bills.prototype.isBelongOneToSeven = function (node) {//判读是否属于措施项目部分
+        bills.prototype.isBelongOneToSeven = function (node) {//判读是否属于措施项目部分100至700章清单
           let rootNode = this.getRootNode(node);
           if(isFlag(rootNode.data)&&rootNode.data.flagsIndex.fixed.flag==fixedFlag.ONE_SEVEN_BILLS){
               return true;
@@ -626,6 +626,14 @@ var Bills = {
               return false;
           }
         };
+        bills.prototype.isBelongDayWork = function (node) {//判读是否属于计日工合计
+          let rootNode = this.getRootNode(node);
+          if(isFlag(rootNode.data)&&rootNode.data.flagsIndex.fixed.flag==fixedFlag.DAYWORK_LABOR){
+              return true;
+          }else {
+              return false;
+          }
+        };
         bills.prototype.hasFlags = function (node) {
             return isFlag(node.data);
         };

+ 14 - 9
web/building_saas/main/js/models/calc_program.js

@@ -1881,8 +1881,10 @@
 
        ftObj.totalFee = btf.toDecimal(decimalObj.bills.totalPrice);
        ftObj.tenderTotalFee = bttf.toDecimal(decimalObj.bills.totalPrice);
-       ftObj.unitFee = buf.toDecimal(decimalObj.bills.unitPrice);
-       ftObj.tenderUnitFee = btuf.toDecimal(decimalObj.bills.unitPrice);
+       if (treeNode.parent) { // 非大项费用才需要计算、显示单价
+         ftObj.unitFee = buf.toDecimal(decimalObj.bills.unitPrice);
+         ftObj.tenderUnitFee = btuf.toDecimal(decimalObj.bills.unitPrice);
+       }
 
        calcTools.checkFeeField(treeNode, ftObj);
 
@@ -1911,13 +1913,16 @@
        tf = (uf * q).toDecimal(decimalObj.bills.totalPrice);
        ttf = (tuf * q).toDecimal(decimalObj.bills.totalPrice);
      };
-     calcTools.checkFeeField(treeNode, {
-       'fieldName': 'common',
-       'unitFee': uf,
-       'totalFee': tf,
-       'tenderUnitFee': tuf,
-       'tenderTotalFee': ttf
-     });
+     let feeItem = {
+      'fieldName': 'common',
+      'totalFee': tf,
+      'tenderTotalFee': ttf
+    };
+    if (treeNode.parent) { // 非大项费用才需要计算、显示单价
+      feeItem.unitFee = uf;
+      feeItem.tenderUnitFee = tuf;
+    }
+     calcTools.checkFeeField(treeNode, feeItem);
      //第一部分建安费下,使用基数计算的清单,定额建安费应=金额
      if (cbTools.getBelongFlagList(treeNode).includes(fixedFlag.CONSTRUCTION_INSTALL_FEE))
        calcTools.checkFeeField(treeNode, {

+ 67 - 0
web/building_saas/main/js/models/project.js

@@ -453,6 +453,73 @@ var PROJECT = {
                 }
             })
         };
+        project.prototype.updateCasCadeBills = function(node,newval,fieldName,needSetParent = true){
+          let datas = [];
+          let data =  {
+              type:node.sourceType,
+              data:{ID:node.data.ID}
+          };
+          setData(data.data,newval,fieldName);
+          datas.push(data);
+          setChildren(node,newval,datas);//同步设置所有子项
+          if(needSetParent) setParent(node,newval,datas);//设置父节点
+          $.bootstrapLoading.start();
+          this.updateNodes(datas,function () {
+              let nodes = [];
+              for(let d of datas){
+                  let node = projectObj.project.mainTree.findNode(d.data.ID);
+                  if(node){
+                      for(let key in d.data){
+                          if(key == 'ID') continue;
+                          node.data[key] = d.data[key];
+                      }
+                      nodes.push(node)
+                  }
+              }
+            projectObj.mainController.refreshTreeNode(nodes);
+            //取消锁定,则自动重新计算。
+            if(fieldName == "lockUnitPrice" && newval == false) projectObj.project.calcProgram.calcAllNodesAndSave();
+              $.bootstrapLoading.end();
+          });
+
+          function setChildren(pnode,newValue,datas) {//同步设置所有子项
+              if(pnode.children.length > 0 && pnode.children[0].sourceType == ModuleNames.bills){//设置子项不包括定额
+                  for(let c of pnode.children){
+                      let data =  {
+                          type:c.sourceType,
+                          data:{ID:c.data.ID}
+                      };
+                      setData(data.data,newval,fieldName);
+                      datas.push(data);
+                      setChildren(c,newValue,datas)
+                  }
+              }
+          }
+          function setParent(cnode,newValue,datas) {
+              let diferrent = false;
+              if(cnode.parent && !projectObj.project.Bills.isMeasureNode(cnode.parent)){//排除措施项目节点
+                  for(b of cnode.parent.children){
+                      if(b == cnode) continue
+                      if(b.data[fieldName]!== newValue){//有兄弟节点的值和本节点不一样,则父节点设置为null
+                          diferrent = true;
+                          break;
+                      }
+                  }
+                  let pvalue = diferrent === true?null:newValue;
+                  let data =  {
+                      type:cnode.parent.sourceType,
+                      data:{ID:cnode.parent.data.ID}
+                  };
+                  setData(data.data,pvalue,fieldName);
+                  datas.push(data);
+                  setParent(cnode.parent,pvalue,datas);
+              }
+          }
+          function setData(data,avalue,fieldName) {
+              data[fieldName] = avalue;
+              if(fieldName == "outPutMaxPrice") data.maxPrice = null;
+          }
+      };
         project.prototype.syncUpdateNodesAndRefresh =async function (datas) {
           let me = this;
           return new Promise(function (resolve, reject) {

+ 5 - 4
web/building_saas/main/js/views/block_lib.js

@@ -223,10 +223,11 @@ var blockLibObj = {
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
 
+            const lineColor = '#ababab';
             // Draw Horizontal Line、Image、sibling Vertical Line
             if (centerX < x + w) {
                 // Draw Horizontal Line
-                drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
 
                 // Draw Image
                 let imgId;
@@ -241,9 +242,9 @@ var blockLibObj = {
                 // Draw Vertical Line
                 y1 = node.isLast() ? centerY : y + h;
                 if (node.isFirst() && !node.parent/*.parent*/) {
-                    drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                    drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                 } else {
-                    drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                    drawLine(ctx, centerX, y, centerX, y1, lineColor);
                 }
             }
 
@@ -257,7 +258,7 @@ var blockLibObj = {
             while (curNode) {
                 if (!curNode.isLast()) {
                     if (parentCenterX < x + w) {
-                        drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                        drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                     }
                 }
                 curNode = curNode.parent;

+ 0 - 4
web/building_saas/main/js/views/calc_base_view.js

@@ -182,10 +182,6 @@ let calcBaseView = {
         $('#billsBaseSpread').removeClass('col-9');
         if (type === me.type.bills) {
             try{
-                //锁定的清单不显示
-                if(projectObj.project.isBillsLocked() && projectObj.project.withinBillsLocked(projectObj.project.mainTree.selected)){
-                    return;
-                }
                 let row = projectObj.mainSpread.getActiveSheet().getActiveRowIndex();
                 let node = projectObj.project.mainTree.items[row];
                 //输入框显示原本的

+ 2 - 2
web/building_saas/main/js/views/glj_col.js

@@ -16,7 +16,7 @@ let gljCol = {
             {headerName: "定额消耗", headerWidth: 65, dataCode: "rationItemQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},   // dataType: "Number", formatter: "0.00"
             {headerName: "总消耗量", headerWidth: 80, dataCode: "totalQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
             // {headerName: "暂估", headerWidth: 45, dataCode: "isEstimate", dataType: "String", hAlign: "center", vAlign: "center", cellType: "checkBox"},
-            {headerName: "调后市场价", headerWidth: 80, dataCode: "tenderPrice", dataType: "Number", hAlign: "right", visible: false},
+            {headerName: "调后预算价", headerWidth: 80, dataCode: "tenderPrice", dataType: "Number", hAlign: "right", visible: false},
             {headerName: "调后消耗量", headerWidth: 80, dataCode: "tenderQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity", visible: false}
         ],
         view: {
@@ -51,7 +51,7 @@ let gljCol = {
             {headerName: "备注", headerWidth: 100, dataCode: "remark", hAlign: "left", dataType: "String",spanRows: [2]},
             // {headerName: ["调价后","市场价"], headerWidth: 75, dataCode: "tenderPrice", hAlign: "right", dataType: "Number",validator:"number",spanCols: [2,1], visible: false},
             // {headerName: ["","总消耗量"], headerWidth: 90, dataCode: "tenderQuantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity',spanCols: [0,1], visible: false}
-            {headerName: ["调价后\n市场价"], headerWidth: 75, dataCode: "tenderPrice", hAlign: "right", dataType: "Number",validator:"number",spanCols: [2,1], visible: false},
+            {headerName: ["调价后\n预算价"], headerWidth: 75, dataCode: "tenderPrice", hAlign: "right", dataType: "Number",validator:"number",spanCols: [2,1], visible: false},
             {headerName: ["调价后\n总消耗量"], headerWidth: 90, dataCode: "tenderQuantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity',spanCols: [0,1], visible: false}
         ],
         view: {

+ 5 - 1
web/building_saas/main/js/views/main_tree_col.js

@@ -358,7 +358,11 @@ let MainTreeCol = {
         },
         unitPriceAnalysis:function (node) {
             if(node.sourceType == ModuleNames.bills) return new GC.Spread.Sheets.CellTypes.CheckBox();
-        },
+      },
+      lockUnitPrice: function (node) {
+        //仅未使用基数计算的清单有效
+        if(!(node.data.calcBase&&node.data.calcBase!="")) return sheetCommonObj.getCheckBox();
+    },
         evaluationProject:function (node) {
             if(node.sourceType == ModuleNames.ration) return new GC.Spread.Sheets.CellTypes.CheckBox();
         },

+ 1 - 1
web/building_saas/main/js/views/project_property_projFeature.js

@@ -378,7 +378,7 @@ let projFeatureView = {
         function drowSubItem(ctx,x,y,w,h,offset,nextItem) {
             offset+=6;
             ctx.save();
-            ctx.strokeStyle = "gray";
+            ctx.strokeStyle = "#ababab";
             ctx.translate(0.5, 0.5);
             ctx.beginPath();
             ctx.moveTo(x+offset, y);

+ 14 - 2
web/building_saas/main/js/views/project_view.js

@@ -1870,7 +1870,9 @@ var projectObj = {
             projectObj.onEvaluationProjectClic(node,info);
         }else if(fieldName == "unitPriceAnalysis"){
             projectObj.onUnitPriceAnalysisClick(node,info);
-        }
+        }else if(fieldName == "lockUnitPrice"){
+          projectObj.onCasCadeButtonClick(node,info,fieldName);
+      }
     },
     onEvaluationProjectClic:function (node,info) {
         let checkboxValue = info.sheet.getCell(info.row, info.col).value();
@@ -1941,7 +1943,17 @@ var projectObj = {
              };
              return data;
          }
-    },
+  },
+  onCasCadeButtonClick:function (node,info,fieldName) {
+    let checkboxValue = info.sheet.getCell(info.row, info.col).value();
+    let cell = info.sheet.getCell(info.row, info.col), newval = true;
+    if (checkboxValue == true) {
+        newval = false;
+    } else {
+        newval = true;
+    }
+    projectObj.project.updateCasCadeBills(node,newval,fieldName,fieldName != "lockUnitPrice");
+  },
     onSubcontractClick:function (node) {//点击分包费checkbox
         if (node.updateData.isSubcontract) node.updateData.isSubcontract = false;
         else node.updateData.isSubcontract = true;

+ 12 - 12
web/building_saas/main/js/views/tender_price_view.js

@@ -15,18 +15,18 @@ let tender_obj={
             {headerName: "计量\n单位", headerWidth: 60, dataCode: "unit", hAlign: "center", dataType: "String",spanRows: [2]},
             {headerName: "工程量", headerWidth: 70, dataCode: "quantity", hAlign: "right", dataType: "Number",validator:"number",spanRows: [2],getText:'getText.quantity'},
             // {headerName: "不调价", headerWidth: 55, dataCode: "is_adjust_price", hAlign: "center", cellType : "checkBox",dataType: "Number",spanRows: [2]},
-            {headerName: ["初始报价","综合单价"], headerWidth: 100, dataCode: "feesIndex.common.unitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
-            {headerName: ["","综合合价"], headerWidth: 100, dataCode: "feesIndex.common.totalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
-            {headerName: ["目标造价","综合单价"], headerWidth: 100, dataCode: "targetUnitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
-            {headerName: ["","综合合价"], headerWidth: 100, dataCode: "targetTotalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
-            {headerName: ["调整后报价","综合单价"], headerWidth: 100, dataCode: "feesIndex.common.tenderUnitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
-            {headerName: ["","综合合价"], headerWidth: 100, dataCode: "feesIndex.common.tenderTotalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
-            {headerName: ["消耗量调整系数","人工"], headerWidth: 80, dataCode: "quantityCoe.labour", hAlign: "right", dataType: "Number",validator:"number",spanCols : [5,1]},
+            {headerName: ["初始报价","单价"], headerWidth: 100, dataCode: "feesIndex.common.unitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
+            {headerName: ["","金额"], headerWidth: 100, dataCode: "feesIndex.common.totalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
+            {headerName: ["目标造价","单价"], headerWidth: 100, dataCode: "targetUnitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
+            {headerName: ["","金额"], headerWidth: 100, dataCode: "targetTotalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
+            {headerName: ["调整后报价","单价"], headerWidth: 100, dataCode: "feesIndex.common.tenderUnitFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [2,1]},
+            {headerName: ["","金额"], headerWidth: 100, dataCode: "feesIndex.common.tenderTotalFee", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
+            {headerName: ["消耗量调整系数","人工"], headerWidth: 80, dataCode: "quantityCoe.labour", hAlign: "right", dataType: "Number",validator:"number",spanCols : [4,1]},
             {headerName: ["","材料"], headerWidth: 80, dataCode: "quantityCoe.material", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
             {headerName: ["","机械"], headerWidth: 80, dataCode: "quantityCoe.machine", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
-            {headerName: ["","主材"], headerWidth: 80, dataCode: "quantityCoe.main", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
+            // {headerName: ["","主材"], headerWidth: 80, dataCode: "quantityCoe.main", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
             {headerName: ["","设备"], headerWidth: 80, dataCode: "quantityCoe.equipment", hAlign: "right", dataType: "Number",validator:"number",spanCols : [0,1]},
-            {headerName: "子目工程量\n调整系数", headerWidth: 80, dataCode: "rationQuantityCoe", hAlign: "right", dataType: "Number",spanRows: [2],validator:"number"}
+            {headerName: "定额工程量\n调整系数", headerWidth: 80, dataCode: "rationQuantityCoe", hAlign: "right", dataType: "Number",spanRows: [2],validator:"number"}
         ],
         view: {
             // lockColumns: [0,1,2,3,4,5,6,9,10]
@@ -235,12 +235,12 @@ let tender_obj={
     },
     onEnterCell : function (sender,args) {
         let me = tender_obj, row = args.row, col = args.col, lock = false;
-        if ([7, 8].includes(col)){                                  // 目标单价、目标合价
+        if ([6, 7].includes(col)){                       // 目标单价、目标合价
             let treeNode = me.tenderTree.items[row];
-            if (calcTools.isCalcBaseBill(treeNode))                   // 公式结点只读
+            if (calcTools.isCalcBaseBill(treeNode))     // 公式结点的目标单价、目标合价只读
                 lock = true;
 
-            if ((col = 7) && calcTools.isParentBill(treeNode))
+            if ((col = 6) && calcTools.isParentBill(treeNode))      // 反向调价时,父清单的目标单价只读
                 lock = true;
 
             if (lock)

+ 5 - 4
web/building_saas/pm/js/pm_gc.js

@@ -251,11 +251,12 @@ const gcTreeObj = {
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             if (showTreeLine) {
                 // Draw Horizontal Line
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     if(node.data.projType === projectType.folder){
                         img = document.getElementById('folder_open_pic');
@@ -279,9 +280,9 @@ const gcTreeObj = {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                 }
             }
@@ -295,7 +296,7 @@ const gcTreeObj = {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                     }
                     parent = parent.parent;

+ 5 - 4
web/building_saas/pm/js/pm_newMain.js

@@ -963,11 +963,12 @@ const projTreeObj = {
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             if (showTreeLine) {
                 // Draw Horizontal Line
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     if(node.data.projType === projectType.folder){
                         img = document.getElementById('folder_open_pic');
@@ -992,9 +993,9 @@ const projTreeObj = {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                 }
             }
@@ -1008,7 +1009,7 @@ const projTreeObj = {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                     }
                     parent = parent.parent;

+ 5 - 4
web/building_saas/pm/js/pm_share.js

@@ -270,11 +270,12 @@ const pmShare = (function () {
             let x1 = centerX + indent / 2;
             let centerY = Math.floor((y + (y + h)) / 2);
             let y1;
+            const lineColor = '#ababab';
             // Draw Sibling Line
             if (showTreeLine) {
                 // Draw Horizontal Line
                 if (centerX < x + w) {
-                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
+                    drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, lineColor);
                     let img;
                     if (node.data.projType === projectType.folder) {
                         img = document.getElementById('folder_open_pic');
@@ -298,9 +299,9 @@ const pmShare = (function () {
                 if (centerX < x + w) {
                     y1 = node.isLast() ? centerY : y + h;
                     if (node.isFirst() && !node.parent.parent) {
-                        drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, centerY, centerX, y1, lineColor);
                     } else {
-                        drawLine(ctx, centerX, y, centerX, y1, 'gray');
+                        drawLine(ctx, centerX, y, centerX, y1, lineColor);
                     }
                 }
             }
@@ -314,7 +315,7 @@ const pmShare = (function () {
                 while (parent.parent) {
                     if (!parent.isLast()) {
                         if (parentCenterX < x + w) {
-                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
+                            drawLine(ctx, parentCenterX, y, parentCenterX, y + h, lineColor);
                         }
                     }
                     parent = parent.parent;

+ 2 - 1
web/building_saas/standard_interface/export/anhui_chizhou.js

@@ -318,6 +318,7 @@ INTERFACE_EXPORT = (() => {
             }
 
             for (let i = 0; i < vJRG.children.length; i++) {
+                debugger;
                 vKind = vJRG.children[i];
                 let attrs = [
                     { name: '序号', value: vKind.row() },
@@ -328,7 +329,7 @@ INTERFACE_EXPORT = (() => {
                 vKindNode = new CreateNode('计日工信息标题', attrs);
                 jiRGXXB.children.push(vKindNode);
 
-                for (let j = 0; j < vKind.children.length; i++) {
+                for (let j = 0; j < vKind.children.length; j++) {
                     vChild = vKind.children[j];
 
                     let attrs = [

+ 76 - 54
web/building_saas/standard_interface/export/anhui_maanshan.js

@@ -69,7 +69,7 @@ INTERFACE_EXPORT = (() => {
         { name: 'Jsdw', value: getValueByKey(information, 'constructingUnits') }, // 建设单位
         { name: 'Czzt', value: czzt[exportKind] }, // 操作状态:招标、投标、招标控制,即导出接口时,所选的文件类型
         { name: 'Jsfs', value: taxModeMap[getValueByKey(information, 'taxMode')] || '1', type: TYPE.INT }, // 计税方式,默认1。1=一般计税 2=简易计税
-        { name: 'Version', value: ['淮北', '铜陵', '州'].includes(subArea) ? '1.1' : '1.0' },
+        { name: 'Version', value: ['淮北', '铜陵', '州'].includes(subArea) ? '1.1' : '1.0' },
       ];
       Element.call(this, 'JingJiBiao', attrs);
     }
@@ -101,6 +101,12 @@ INTERFACE_EXPORT = (() => {
           { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
           { name: 'ZxrDbSfzh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
         ],
+        '亳州': [
+          { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
+          { name: 'ZxrNssbh', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') }, // 造价咨询人纳税识别号
+          { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
+          { name: 'ZxrDbSfzh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
+        ],
       };
       if (extraMap[subArea]) {
         attrs.push(...extraMap[subArea]);
@@ -135,6 +141,12 @@ INTERFACE_EXPORT = (() => {
           { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
           { name: 'ZxrDbSfzh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
         ],
+        '亳州': [
+          { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
+          { name: 'ZxrNssbh', value: getValueByKey(information, 'costConsultantTaxpayerIdentificationNo') }, // 造价咨询人纳税识别号
+          { name: 'ZbrDbSfzh', value: getValueByKey(information, 'tenderAuthorizerIDNo') }, // 招标人法定代表人或其授权人身份证号
+          { name: 'ZxrDbSfzh', value: getValueByKey(information, 'consultantAuthorizerTaxpayerIdentificationNo') }, // 造价咨询人法定代表或其授权人纳税识别号
+        ],
       };
       if (extraMap[subArea]) {
         attrs.push(...extraMap[subArea]);
@@ -164,6 +176,11 @@ INTERFACE_EXPORT = (() => {
           { name: 'TbrNssbh', value: getValueByKey(information, 'bidderTaxpayerIdentificationNo') }, // 投标人纳税识别号
           { name: 'TbrDbSfzh', value: getValueByKey(information, 'bidderAuthorizerTaxpayerIdentificationNo') }, // 投标人法定代表或其授权人身份证号
         ],
+        '亳州': [
+          { name: 'ZbrNssbh', value: getValueByKey(information, 'tendereeTaxpayerIdentificationNo') }, // 招标人纳税识别号
+          { name: 'TbrNssbh', value: getValueByKey(information, 'bidderTaxpayerIdentificationNo') }, // 投标人纳税识别号
+          { name: 'TbrDbSfzh', value: getValueByKey(information, 'bidderAuthorizerTaxpayerIdentificationNo') }, // 投标人法定代表或其授权人身份证号
+        ],
       };
       if (extraMap[subArea]) {
         attrs.push(...extraMap[subArea]);
@@ -199,55 +216,56 @@ INTERFACE_EXPORT = (() => {
       Element.call(this, 'JjFlb');
     }
 
+    // 费率明细名称-编码映射表
+    const FeeRateCodeMap = {
+      '冬季施工增加费': 'DJF',
+      '雨季施工增加费': 'YJF',
+      '夜间施工增加费': 'YEF',
+      '工地转移费': 'ZYF',
+      '高原地区施工增加费': 'GYF',
+      '风沙地区施工增加费': 'FSF',
+      '沿海地区施工增加费': 'YHF',
+      '行车干扰施工增加费': 'XCF',
+      '施工辅助费': 'SFF',
+      '养老保险费': 'YLF',
+      '失业保险费': 'SYF',
+      '医疗保险费': 'YBF',
+      '住房公积金': 'ZFF',
+      '工伤保险费': 'GSF',
+      '基本费用': 'JBF',
+      '主副食运费补贴': 'YFF',
+      '职工探亲路费': 'TQF',
+      '职工取暖补贴': 'QNF',
+      '财务费用': 'CWF',
+      '利润': 'LR',
+      '税金': 'SJ',
+    };
+    // 费率工程名称-取费类别映射表
+    const FeeRateTypeMap = {
+      '土方': 1,
+      '石方': 3,
+      '运输': 2,
+      '路面': 4,
+      '隧道': 11,
+      '构造物Ⅰ': 5,
+      '构造物Ⅰ(不计冬)': 16,
+      '构造物Ⅱ': 6,
+      '构造物Ⅲ(桥梁)': 9,
+      '构造物Ⅲ(除桥以外不计雨夜)': 8,
+      '技术复杂大桥': 10,
+      '钢材及钢结构(桥梁)': 12,
+      '钢材及钢结构(除桥以外不计夜)': 13,
+      '费率为0': 17,
+      '路面(不计雨)': 18,
+      '构造物Ⅰ(不计雨)': 19,
+      '构造物Ⅲ(除桥以外)': 7,
+      '钢材及钢结构(除桥以外)': 20,
+      '设备': 15,
+      '量价': 14,
+    };
+
     // 计价费率表明细,造价书费率页面左侧最底层数据
     function JjFlbMx(rootItem, item) {
-      // 费率明细名称-编码映射表
-      const FeeRateCodeMap = {
-        '冬季施工增加费': 'DJF',
-        '雨季施工增加费': 'YJF',
-        '夜间施工增加费': 'YEF',
-        '工地转移费': 'ZYF',
-        '高原地区施工增加费': 'GYF',
-        '风沙地区施工增加费': 'FSF',
-        '沿海地区施工增加费': 'YHF',
-        '行车干扰施工增加费': 'XCF',
-        '施工辅助费': 'SFF',
-        '养老保险费': 'YLF',
-        '失业保险费': 'SYF',
-        '医疗保险费': 'YBF',
-        '住房公积金': 'ZFF',
-        '工伤保险费': 'GSF',
-        '基本费用': 'JBF',
-        '主副食运费补贴': 'YFF',
-        '职工探亲路费': 'TQF',
-        '职工取暖补贴': 'QNF',
-        '财务费用': 'CWF',
-        '利润': 'LR',
-        '税金': 'SJ',
-      };
-      // 费率工程名称-取费类别映射表
-      const FeeRateTypeMap = {
-        '土方': 1,
-        '石方': 3,
-        '运输': 2,
-        '路面': 4,
-        '隧道': 11,
-        '构造物Ⅰ': 5,
-        '构造物Ⅰ(不计冬)': 16,
-        '构造物Ⅱ': 6,
-        '构造物Ⅲ(桥梁)': 9,
-        '构造物Ⅲ(除桥以外不计雨夜)': 8,
-        '技术复杂大桥': 10,
-        '钢材及钢结构(桥梁)': 12,
-        '钢材及钢结构(除桥以外不计夜)': 13,
-        '费率为0': 17,
-        '路面(不计雨)': 18,
-        '构造物Ⅰ(不计雨)': 19,
-        '构造物Ⅲ(除桥以外)': 7,
-        '钢材及钢结构(除桥以外)': 20,
-        '设备': 15,
-        '量价': 14,
-      };
       const rate = isEmptyVal(item.rate) ? '100' : item.rate; // 为空时输出=100,为0时输出=0
       const attrs = [
         { name: 'Bm', value: FeeRateCodeMap[item.name] }, // 编码
@@ -555,7 +573,7 @@ INTERFACE_EXPORT = (() => {
         if (!midLayerMap[midLayerKey]) {
           jingJiBiao.children.push(midLayerMap[midLayerKey] = new Dxgcxx(midLayerCode, midLayerName));
         }
-        midLayerMap[midLayerKey].children.push(setupTender(tenderData, feature));
+        midLayerMap[midLayerKey].children.push(setupTender(tenderData, information, feature));
       }
       // 校验信息
       const [cpuID, diskID, macID] = generateHardwareId().split(';');
@@ -579,7 +597,7 @@ INTERFACE_EXPORT = (() => {
     const projectGLJMap = {}; // 项目人材机与项目人材机数据映射
 
     // 组装单位工程数据
-    function setupTender(tenderData, feature) {
+    function setupTender(tenderData, info, feature) {
       curDetail = tenderDetailMap[tenderData.ID];
       curDetail.projectGLJ.datas.gljList.forEach((glj, index) => {
         projectGLJIDToRcjID[glj.id] = index + 1;
@@ -587,7 +605,7 @@ INTERFACE_EXPORT = (() => {
       });
       const dwgcxx = new Dwgcxx(tenderData.name, feature);
       dwgcxx.children.push(
-        setupFeeRate(curDetail.FeeRate, feature),
+        setupFeeRate(curDetail.FeeRate, info),
         setupBills(curDetail.mainTree),
         ...setupGLJList(curDetail)
       );
@@ -595,7 +613,7 @@ INTERFACE_EXPORT = (() => {
     }
 
     // 组装费率数据
-    function setupFeeRate(feeRateDetail, feature) {
+    function setupFeeRate(feeRateDetail, info) {
       const qfxx = new Qfxx();
       const jjflb = new JjFlb();
       // 费率界面左侧底层数据
@@ -604,14 +622,18 @@ INTERFACE_EXPORT = (() => {
         if (!item.ParentID) {
           curRootItem = item;
         } else if (!item.sum) { // 最底层
-          jjflb.children.push(new JjFlbMx(curRootItem, item));
+          const curFeeRateType = FeeRateTypeMap[curRootItem.name];
+          const exclude = [18, 19, 20];
+          if (!exclude.includes(curFeeRateType)) {
+            jjflb.children.push(new JjFlbMx(curRootItem, item));
+          }
         }
       });
       // 费率界面右侧顶层数据
       // 除右侧数据外,还应拼凑工程所在地、费率标准的数据。
       const jjflx = new JjFlx();
       // 工程所在地取建设项目-基本信息中的“工程所在地”;
-      const locationItem = { name: '工程所在地', value: getValueByKey(feature, 'projLocation') };
+      const locationItem = { name: '工程所在地', value: getValueByKey(info, 'location') };
       jjflx.children.push(new JjFlxMx(locationItem));
       // 费率标准取,费率-重选标准中当前用的费率标准名称。
       const feeRateStandardItem = { name: '费率标准', value: feeRateDetail.datas.libName };

+ 19 - 3
web/building_saas/standard_interface/export/base.js

@@ -103,7 +103,7 @@ const INTERFACE_EXPORT_BASE = (() => {
   function Element(name, attrs = []) {
     this.name = name;
     this.attrs = attrs;
-    check(this.attrs);
+    this.attrs = check(this.attrs);
     handleXMLEntity(this.attrs);
     this.children = [];
   }
@@ -154,15 +154,21 @@ const INTERFACE_EXPORT_BASE = (() => {
    * 检查
    * 创建节点时检查节点的数据(原本是用于自检,现在来处理默认值)
    * @param {Array}datas 需要检查的属性数据
-   * @return {void}
+   * @return {Array}
    * */
   function check(datas) {
+    const rst = [];
     for (const data of datas) {
       // 错误提示
       if (data.fail && data.fail.hint) {
         _cache.failList.push(data.fail);
       }
       const isHasValue = hasValue(data.value);
+      // 设置了mustHasValue,意味着必须要有值才输出该属性
+      if (data.mustHasValue && !isHasValue) {
+        continue;
+      }
+      rst.push(data);
       // 值统一转换成String,并且处理各类型属性空值时的默认取值
       data.value = !isHasValue ?
         DEFAULT_VALUE[data.type] ?
@@ -198,7 +204,13 @@ const INTERFACE_EXPORT_BASE = (() => {
       } else if (data.type === TYPE.BOOL && !['true', 'false'].includes(String(data.value))) {
         data.value = DEFAULT_VALUE[TYPE.BOOL];
       }
+
+      //自动补0
+      if (data.toFix) {
+        data.value = scMathUtil.roundToString(data.value,data.toFix)
+      }
     }
+    return rst;
   }
   // 等待一段时间
   function setTimeoutSync(handle, time) {
@@ -290,12 +302,16 @@ const INTERFACE_EXPORT_BASE = (() => {
   }
 
   //获取当前时间,格式YYYY-MM-DD HH:mm
-  function getNowFormatTime() {
+  function getNowFormatTime(T) {
     var nowDate = new Date();
     var colon = ":";
     var h = nowDate.getHours();
     var m = nowDate.getMinutes();
     var s = nowDate.getSeconds();
+    if (T) {
+      return getNowFormatDay(nowDate) + "T" + completeDate(h) + colon + completeDate(m)+colon+completeDate(s);
+    }
+
     //补全0,并拼接
     return getNowFormatDay(nowDate) + " " + completeDate(h) + colon + completeDate(m);
   }

+ 186 - 50
web/building_saas/standard_interface/export/guangdong_zhongshan.js

@@ -81,7 +81,8 @@ INTERFACE_EXPORT = (() => {
 
   const feeLibNoMap = {
     'eba0e7c0-cfe6-11ea-ba15-739be477d1fe': 'GYSFL-000000-2018-86',
-    '451d3180-e02e-11ea-8056-1514dfc2f39e': 'GYSFL-340000-2019-210'
+    '451d3180-e02e-11ea-8056-1514dfc2f39e': 'GYSFL-340000-2019-210',
+    '32923ff0-e912-11ea-8b20-d93bc370e960': 'GYSFL-440000-2019-544'
   };
 
   const FixedCostMap = {
@@ -107,12 +108,19 @@ INTERFACE_EXPORT = (() => {
     "清单 第100章 总则": true,
     "清单 第200章 路基": true,
     "清单 第300章 路面": true,
-    "第400章 桥梁、涵洞工程": true,
-    "第500章 隧道": true,
-    "第600章 交通安全设施": true,
-    "第700章 绿化及环境保护设施": true,
-    "第800章 机电工程": true,
-    "第900章 附属区房建工程":true
+    "清单 第400章 桥梁、涵洞工程": true,
+    "清单 第500章 隧道": true,
+    "清单 第600章 交通安全设施": true,
+    "清单 第700章 绿化及环境保护设施": true,
+    "清单 第800章 机电工程": true,
+    "清单 第900章 附属区房建工程":true
+  }
+
+  const ratioCodeMap = { 
+    "01ZJF":"0",
+    "02JXF":"1",
+    "03WHF":"2",
+    "04ACFZF":"3"
   }
 
   function getBasePrice(projectGLJID, tenderProject) {
@@ -136,6 +144,57 @@ INTERFACE_EXPORT = (() => {
     return rate
   }
 
+  function billNameChecking(bNode,projectName,fixedFlag) { 
+    let data = bNode.data;
+    let fail = null;
+    let pass = true;
+    if (data.flagsIndex && data.flagsIndex.fixed) {
+      let flag = data.flagsIndex.fixed.flag;
+      switch (flag) {
+        case fixedFlag.ONE_SEVEN_BILLS:
+          pass = data.name == "第100章至900章清单";
+          break;
+        case fixedFlag.PROVISIONAL_TOTAL:
+          pass = data.name == "已包含在清单合计中的材料、工程设备、专业工程暂估价合计";
+          break;
+        case fixedFlag.BILLS_TOTAL_WT_PROV:
+          pass = data.name == "清单合计减去材料、工程设备、专业工程暂估价合计";
+          break;
+        case fixedFlag.DAYWORK_LABOR:
+          pass = data.name == "计日工合计";
+          break;
+        case fixedFlag.LABOUR_SERVICE:
+          pass = data.name == "劳务";
+          break;
+        case fixedFlag.MATERIAL:
+          pass = data.name == "材料";
+          break;
+        case fixedFlag.CONSTRUCTION_MACHINE:
+          pass = data.name == "机械";
+          break;
+        case fixedFlag.PROVISIONAL:
+          pass = data.name == "暂列金额(不含计日工总额)";
+          break;
+        case fixedFlag.TOTAL_COST:
+          pass = data.name == "投标报价";
+          break;
+        case fixedFlag.ONE_HUNDRED_BILLS:
+          pass = data.name == "清单 第100章 总则";
+          break;
+      }
+    } else { 
+      if (bNode.parent) { 
+        const pdata = bNode.parent.data;
+        if (pdata.flagsIndex && pdata.flagsIndex.fixed && pdata.flagsIndex.fixed.flag == fixedFlag.ONE_SEVEN_BILLS) { 
+          if (!sectionNameMap[data.name]) pass = false
+        }
+      }
+    }
+    if(pass == false)fail = { hint: `清单:"${data.name?data.name:""}",名字不符合规范!`, type: projectName }
+
+    return fail;
+  }
+
   /**
    *
    * @param {String} areaKey - 地区标识,如:'安徽@马鞍山',有些地区的接口只是取值上有不同,共有一个接口脚本, 需要通过地区标识确定一些特殊处理
@@ -146,6 +205,9 @@ INTERFACE_EXPORT = (() => {
    */
   async function entry(areaKey, exportKind, projectData, tenderDetailMap) {
     const {
+      CONFIG: {
+        TYPE
+      },
       UTIL,
       Element
     } = INTERFACE_EXPORT_BASE;
@@ -159,9 +221,9 @@ INTERFACE_EXPORT = (() => {
       fixedFlag,
     } = window.commonConstants;
     let cprjType = {
-      1: "ZBKZJ", // 招标
+      1: "GCLQD", // 招标
       2: "TBBJ", // 投标
-      3: "GCLQD", // 控制价
+      3: "ZBKZJ", // 控制价
     };
     const isBidInvitation = exportKind === BID_INVITATION; // 是否是招标
     const isBidSubmission = exportKind === BID_SUBMISSION; // 是否是投标
@@ -188,6 +250,10 @@ INTERFACE_EXPORT = (() => {
     }
     // 项目基本信息
     function SystemInfo(projectData) {
+      let baseInfo = _.find(projectData.property.basicInformation, {
+        dispName: "基本信息",
+      });
+      let makeData = _.find(baseInfo.items, { "key": "makeDate" });
       let hardID = UTIL.generateHardwareId();
       let [cpuId, diskId, macId] = hardID.split(";");
       const attrs = [{
@@ -212,7 +278,7 @@ INTERFACE_EXPORT = (() => {
         },
         {
           name: "MakeDate",
-          value: UTIL.getNowFormatTime(),
+          value: makeData?makeData.value:"",
         },
         {
           name: "Key1",
@@ -230,7 +296,7 @@ INTERFACE_EXPORT = (() => {
       if (isBidSubmission)
         attrs.splice(6, 0, {
           name: "BidderVer",
-          value: UTIL.getNowFormatTime(),
+          value: UTIL.getNowFormatTime(true),
         });
       Element.call(this, "SystemInfo", attrs);
     }
@@ -397,7 +463,7 @@ INTERFACE_EXPORT = (() => {
         ],
         children: [],
       };
-      if (isBidSubmission) { //导出到招标、招标控制价文件中,不输出这一部分。
+      if (isBidSubmission || isControl) { //导出到招标文件中,不输出这一部分。
         let elecDatas = electrovalenceObj.getElectrovalenceDatas(null, pgljData.com_electrovalence, pgljData.gljList);
         electrovalenceObj.calcPertElectrovalenceMarketPrice(elecDatas);
         for (let e of elecDatas) {
@@ -425,7 +491,7 @@ INTERFACE_EXPORT = (() => {
 
       this.children.push(Param);
 
-      function MP(g) {
+      function Mp(g) {
         const attrs = [{
             name: "Code",
             value: g.code,
@@ -443,7 +509,7 @@ INTERFACE_EXPORT = (() => {
             value: g.unit,
           },
           {
-            name: "BugetPrice",
+            name: "BudgetPrice",
             value: g.priceInfo.tenderPrice,
           },
           {
@@ -455,7 +521,7 @@ INTERFACE_EXPORT = (() => {
             value: g.unit_price.is_add,
           },
         ];
-        Element.call(this, "MP", attrs);
+        Element.call(this, "Mp", attrs);
       }
 
       function Material(g) {
@@ -476,7 +542,7 @@ INTERFACE_EXPORT = (() => {
             value: g.unit,
           },
           {
-            name: "BugetPrice",
+            name: "BudgetPrice",
             value: g.priceInfo.tenderPrice,
           },
           {
@@ -647,7 +713,7 @@ INTERFACE_EXPORT = (() => {
             value: g.unit,
           },
           {
-            name: "BugetPrice",
+            name: "BudgetPrice",
             value: g.priceInfo.tenderPrice,
           },
           {
@@ -725,7 +791,7 @@ INTERFACE_EXPORT = (() => {
         function FixedCostItem(item) { 
           const attrs = [{
             name: "FixedCostNo",
-            value: item.code,
+            value: ratioCodeMap[item.code],
           },{
             name: "Sum",
             value: item.consumption,
@@ -740,13 +806,13 @@ INTERFACE_EXPORT = (() => {
       let Mechs = new emptyElement("Mechs");
       let gljKeyMap = {};
       let temMechs = [];
-      if (isBidSubmission) { //导出到招标、招标控制价文件中,不输出这一部分。
+      if (isBidSubmission || isControl) { //导出到招标文件中,不输出这一部分。
         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));
+            Mps.children.push(new Mp(g));
           } else if (type == "2" || type == 5) {
             Materials.children.push(new Material(g));
           } else if (type == "3") {
@@ -768,9 +834,11 @@ INTERFACE_EXPORT = (() => {
       let totalItem = null;
       let proItem = null; //暂列金额项
       let safeItem = null;
+      let oneToSevenItem = null;
       for (let b of bills) {
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.TOTAL_COST) totalItem = b;
         if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.PROVISIONAL) proItem = b;
+        if (b.flagsIndex && b.flagsIndex.fixed && b.flagsIndex.fixed.flag == fixedFlag.ONE_SEVEN_BILLS) oneToSevenItem = b;
         if(b.code == "102-3" && b.name=="安全生产费") safeItem = b;
       }
 
@@ -787,7 +855,7 @@ INTERFACE_EXPORT = (() => {
       //输出招标文件时,取0
       if (isBidInvitation) attrs[1].value = 0;
       Element.call(this, "EprjInfo", attrs);
-      this.children.push(new SummaryOfCost(totalItem, proItem,safeItem,feature));
+      this.children.push(new SummaryOfCost(totalItem, proItem,safeItem,oneToSevenItem,feature));
       this.children.push(new MakeInfo(tenderProject));
       this.children.push(new Params(tenderProject));
       this.children.push(new getBillsItems(tenderProject));
@@ -827,11 +895,13 @@ INTERFACE_EXPORT = (() => {
           },
           {
             name: "Price",
-            value: b.tenderPrice
+            value: b.tenderPrice,
+            type: TYPE.DECIMAL
           },
           {
             name: "LimitedPrice",
-            value: b.tenderPrice
+            value: b.tenderPrice,
+            type: TYPE.DECIMAL
           },
           {
             name: "Quantity",
@@ -846,7 +916,7 @@ INTERFACE_EXPORT = (() => {
             value: b.remark
           }
         ];
-        if (isBidSubmission) { 
+        if (isBidSubmission || isControl) { 
           attrs[7].value = b.quantity;
           attrs[8].value = b.totalPrice;
         }
@@ -897,6 +967,7 @@ INTERFACE_EXPORT = (() => {
       let items = new emptyElement("Items");
       let rootNodes = tenderProject.mainTree.roots;
       for (let r of rootNodes) {
+        
         setItem(r, -1, items.children);
       }
       return items;
@@ -928,11 +999,33 @@ INTERFACE_EXPORT = (() => {
           }
         }
 
+        function getItemType(node) {
+          let Bills = projectObj.project.Bills;
+          //是100~900章部分、或是计日工部分,叶子清单输出1,父项输出0;
+          if (Bills.isBelongOneToSeven(node)||Bills.isBelongDayWork(node)) {
+            if (node.children && node.children.length > 0) {
+              return node.children[0].sourceType == ModuleNames.ration ? 1 : 0
+            }
+            return 1 //叶子清单输出1
+          } else {
+            return 0;
+            /* //非100~900章部分,
+            //  是暂列金额,判断暂列金额的金额等于0,则输出为0;暂列金额的金额不等于0,则输出为1;
+            if (node.data.name && node.data.name.indexOf("暂列金额") != -1) {
+              let sum = node.data.feesIndex && node.data.feesIndex.common ? node.data.feesIndex.common.tenderTotalFee : "";
+              return gljUtil.isNotEmpty(sum) ? 1 : 0
+            } else { //非暂列金额,则判断清单的工程量是否等于0,等于0,则输出0;不等于0,则输出1
+              return gljUtil.isNotEmpty(node.data.quantity) ? 1 : 0
+            } */
+          }
+
+        }
+
         function bill(bNode, level) {
           let data = bNode.data;
           let CostKind = 3;
-          if (data.name.indexOf("安全生产费") != -1) CostKind = 1;
-          if (data.name.indexOf("暂列金额") != -1) CostKind = 2;
+          if (data.name && data.name.indexOf("安全生产费") != -1) CostKind = 1;
+          if (data.name && data.name.indexOf("暂列金额") != -1) CostKind = 2;
           //1 = 工程量×综合单价;2 = 计算基数×费率;3 = 工程量×单价。
           let CalcType = getCalcType(bNode);
           //取暂估价类型。读取造价书界面的专项暂定列。0=材料暂估价,1=工程设备暂估价,2=专业工程暂估价,没有选的输出为空。
@@ -950,7 +1043,7 @@ INTERFACE_EXPORT = (() => {
             if (data.quantityCoe["material"]) MaterialRatio = data.quantityCoe["material"];
             if (data.quantityCoe["machine"]) MechRatio = data.quantityCoe["machine"];
           }
-
+          let fail = billNameChecking(bNode,tenderProject.projectInfo.name,fixedFlag)
           //fail: { hint: '错误提示', type: '提示所属(基本就是单位工程名称)' }
           const attrs = [{
               name: "ListCode",
@@ -959,6 +1052,7 @@ INTERFACE_EXPORT = (() => {
             {
               name: "ListName",
               value: data.name,
+              fail:fail
             },
             {
               name: "Unit",
@@ -967,6 +1061,8 @@ INTERFACE_EXPORT = (() => {
             {
               name: "Num",
               value: data.quantity,
+              type: TYPE.DECIMAL,
+              toFix:3
             },
             {
               name: "QtyFormula",
@@ -974,7 +1070,9 @@ INTERFACE_EXPORT = (() => {
             },
             {
               name: "Price",
-              value: 0//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
+              value: 0,//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "",
+              type: TYPE.DECIMAL,
+              toFix:2
             },
             {
               name: "Rate",
@@ -982,7 +1080,9 @@ INTERFACE_EXPORT = (() => {
             },
             {
               name: "Sum",
-              value: 0//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
+              value: 0,//data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
+              type: TYPE.DECIMAL,
+              toFix:2
             },
             {
               name: "ChapterKind",
@@ -999,6 +1099,7 @@ INTERFACE_EXPORT = (() => {
             {
               name: "ProvisionalType",
               value: ProvisionalType,
+              mustHasValue:true
             },
             {
               name: "MeterRules",
@@ -1012,7 +1113,7 @@ INTERFACE_EXPORT = (() => {
               name: "Remarks",
               value: data.remark,
             },
-            {
+           /*  {
               name: "MpRatio",
               value: MpRatio,
             },
@@ -1031,20 +1132,23 @@ INTERFACE_EXPORT = (() => {
             {
               name: "AdjustedSums",
               value: data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "",
-            },
+            }, */
             {
               name: "ItemType",
-              value: 1,
+              value: getItemType(bNode),
             },
-            {
+            /* {
               name: "FomulaCode",
               value: ""
-            },
+            }, */
           ];
-
-          if (isBidSubmission) { 
+          //投标、招标控制价时。取单价。
+          //招标时,如果是“安全生产费”或“暂列金额”,取单价,否则取0。
+          if (isBidSubmission || isControl || CostKind==1 ||CostKind==2) { 
             attrs[5].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderUnitFee : "";
             attrs[7].value = data.feesIndex && data.feesIndex.common ? data.feesIndex.common.tenderTotalFee : "";
+            //暂列金额 数量为0的时候,单价输出0
+            if( CostKind==2 && !gljUtil.isNotEmpty(data.quantity)) attrs[5].value  = 0
           }
 
           Element.call(this, "Item", attrs);
@@ -1053,7 +1157,7 @@ INTERFACE_EXPORT = (() => {
           this.children.push(CostStructure(data))
 
           function CostComposition(bNode) {
-            if (isControl || isBidInvitation) return null;
+            if (isBidInvitation) return null;
             let CostComposition = new emptyElement('CostComposition');
             let Norms = [];
             let Costs = [];
@@ -1088,6 +1192,7 @@ INTERFACE_EXPORT = (() => {
                 {
                   name: "Sum",
                   value: bills.feesIndex && bills.feesIndex.common ? bills.feesIndex.common.tenderTotalFee : "",
+                  type:TYPE.DECIMAL
                 },
                 {
                   name: "Remarks",
@@ -1256,7 +1361,7 @@ INTERFACE_EXPORT = (() => {
                 name: 'Sum',
                 value: 0 //fee.tenderTotalFee
               }]
-              if (isBidSubmission && item.feesIndex && item.feesIndex[type]) attrs[1].value = item.feesIndex[type].tenderTotalFee;
+              if ((isBidSubmission || isControl) && item.feesIndex && item.feesIndex[type]) attrs[1].value = item.feesIndex[type].tenderTotalFee;
               Element.call(this, "CostItem", attrs);
             }
             return CostStructure;
@@ -1300,15 +1405,17 @@ INTERFACE_EXPORT = (() => {
 
       const attrs = [{
           name: "PrjArea",
-          value: baseMap["location"] ? baseMap["location"].value : "",
+          value: baseMap["location"] ? baseMap["location"].value : ""
         },
         {
           name: "StartPileNo",
           value: baseMap["startChainages"] ? baseMap["startChainages"].value : "",
+          mustHasValue: true
         },
         {
           name: "EndPileNo",
           value: baseMap["endChainages"] ? baseMap["endChainages"].value : "",
+          mustHasValue: true
         },
         {
           name: "BuildType",
@@ -1317,59 +1424,72 @@ INTERFACE_EXPORT = (() => {
         {
           name: "Terrain",
           value: Terrain,
+          mustHasValue: true
         },
         {
           name: "RoadGrade",
           value: RoadGrade,
+          mustHasValue: true
         },
         {
           name: "DesignSpeed",
           value: DesignSpeed,
+          mustHasValue: true
         },
         {
           name: "Structure",
           value: Structure,
+          mustHasValue: true
         },
         {
           name: "SubgradeWidth",
           value: featrueMap["subgradeWidth"] ? featrueMap["subgradeWidth"].value : "",
+          mustHasValue: true
         },
         {
           name: "RoadLength",
           value: featrueMap["roadLength"] ? featrueMap["roadLength"].value : "",
+          mustHasValue: true
         },
         {
           name: "BridgeLength",
           value: featrueMap["bridgeLength"] ? featrueMap["bridgeLength"].value : "",
+          mustHasValue: true
         },
         {
           name: "TunnelLength",
           value: featrueMap["tunnelLength"] ? featrueMap["tunnelLength"].value : "",
+          mustHasValue: true
         },
         {
           name: "BriTunRate",
           value: featrueMap["briTunRate"] ? featrueMap["briTunRate"].value : "",
+          mustHasValue: true
         },
         {
           name: "InterchangeNum",
           value: featrueMap["interchangeNum"] ? featrueMap["interchangeNum"].value : "",
+          mustHasValue: true
         },
         {
           name: "StubLengths",
           value: featrueMap["stubLengths"] ? featrueMap["stubLengths"].value : "",
+          mustHasValue: true
         },
         {
           name: "LaneLength",
           value: featrueMap["laneLength"] ? featrueMap["laneLength"].value : "",
+          mustHasValue: true
         },
       ];
       Element.call(this, "Params", attrs);
     }
 
-    function SummaryOfCost(totalItem, proItem,safeItem,feature) {
+    function SummaryOfCost(totalItem, proItem,safeItem,oneToSevenItem,feature) {
       let attrs = [{
           name: "TenderSumLimit",
           value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
+          type: TYPE.DECIMAL
         },
         {
           name: "BidTotal",
@@ -1377,11 +1497,11 @@ INTERFACE_EXPORT = (() => {
         },
         {
           name: "BillTotal",
-          value: totalItem.feesIndex && totalItem.feesIndex.common && totalItem.feesIndex.common.tenderTotalFee ? totalItem.feesIndex.common.tenderTotalFee : 0,
+          value: oneToSevenItem.feesIndex && oneToSevenItem.feesIndex.common && oneToSevenItem.feesIndex.common.tenderTotalFee ? oneToSevenItem.feesIndex.common.tenderTotalFee : 0,
         },
         {
           name: "CostForHSE",
-          value: safeItem&&safeItem.feesIndex && safeItem.feesIndex.common && safeItem.feesIndex.common.tenderTotalFee ? safeItem.feesIndex.common.tenderTotalFee : 0,
+          value: safeItem && safeItem.feesIndex && safeItem.feesIndex.common && safeItem.feesIndex.common.tenderTotalFee ? safeItem.feesIndex.common.tenderTotalFee : 0,
         },
         {
           name: "ProvisionalSums",
@@ -1392,8 +1512,10 @@ INTERFACE_EXPORT = (() => {
           value: totalItem.feesIndex && totalItem.feesIndex.estimate && totalItem.feesIndex.estimate.tenderTotalFee ? totalItem.feesIndex.estimate.tenderTotalFee : 0,
         },
       ];
-      if(isBidInvitation) attrs = [] //招标
-      if (isControl) attrs.splice(1, 5); //控制价
+      if (isBidInvitation) { 
+        attrs.splice(0, 3) //招标
+      } 
+      //if (isControl) attrs.splice(1, 5); //控制价
       if (isBidSubmission) { //投标文件时,读工程特征中的 招标控制价 值
         let tenderSumLimit = _.find(feature, { "key": "tenderSumLimit" }); 
         if(tenderSumLimit) attrs[0].value = tenderSumLimit.value
@@ -1412,7 +1534,7 @@ INTERFACE_EXPORT = (() => {
         //if (i.dispName == "编制日期") key = "编制时间";
         baseMap[key] = i;
       }
-
+      //mustHasValue  
       const attrs = [{
           name: "ValuationModel",
           value: property.taxType,
@@ -1424,6 +1546,7 @@ INTERFACE_EXPORT = (() => {
         {
           name: "Designer",
           value: baseMap["designUnit"] ? baseMap["designUnit"].value : "",
+          mustHasValue:true
         },
         {
           name: "Compile",
@@ -1436,57 +1559,70 @@ INTERFACE_EXPORT = (() => {
         {
           name: "CompileCertNo",
           value: baseMap["compileCertNo"] ? baseMap["compileCertNo"].value : "",
+          mustHasValue:true
         },
         {
           name: "CompileDate",
-          value: baseMap["compileDate"] ? baseMap["compileDate"].value : "",
+          value: baseMap["compileDate"] && baseMap["compileDate"].value != "" ? baseMap["compileDate"].value + "T00:00:00" : "",
+          mustHasValue:true
         },
         {
           name: "Review",
           value: baseMap["reviewUnit"] ? baseMap["reviewUnit"].value : "",
+          mustHasValue:true
         },
         {
           name: "ReviewApprover",
           value: baseMap["reviewApprover"] ? baseMap["reviewApprover"].value : "",
+          mustHasValue:true
         },
         {
           name: "ReviewCertNo",
           value: baseMap["reviewCertNo"] ? baseMap["reviewCertNo"].value : "",
+          mustHasValue:true
         },
         {
           name: "ReviewDate",
-          value: baseMap["reviewDate"] ? baseMap["reviewDate"].value : "",
+          value: baseMap["reviewDate"] && baseMap["reviewDate"].value != "" ? baseMap["reviewDate"].value + "T00:00:00" : "",
+          mustHasValue:true
         },
         {
           name: "Examine",
           value: baseMap["examineUnit"] ? baseMap["examineUnit"].value : "",
+          mustHasValue:true
         },
         {
           name: "ExamineApprover",
           value: baseMap["examineApprover"] ? baseMap["examineApprover"].value : "",
+          mustHasValue:true
         },
         {
           name: "ExamineCertNo",
           value: baseMap["examineCertNo"] ? baseMap["examineCertNo"].value : "",
+          mustHasValue:true
         },
         {
           name: "ExamineDate",
-          value: baseMap["examineDate"] ? baseMap["examineDate"].value : "",
+          value: baseMap["examineDate"] && baseMap["examineDate"].value != "" ? baseMap["examineDate"].value + "T00:00:00" : "",
+          mustHasValue:true
         },
         {
           name: "CompileExplain",
           value: baseMap["compileExplain"] ? baseMap["compileExplain"].value : "",
+          mustHasValue:true
         },
         {
           name: "ExamineExplain",
           value: baseMap["examineExplain"] ? baseMap["examineExplain"].value : "",
+          mustHasValue:true
         },
         {
           name: "ProjectExplain",
           value: baseMap["projectExplain"] ? baseMap["projectExplain"].value : "",
+          mustHasValue:true
         },
       ];
-      if (isControl || isBidInvitation) { //招标、招标控制价文件,则以下的8、12~18则不输出
+      if (isBidInvitation) { //招标文件,则以下的8、12~18则不输出
         attrs.splice(11, 7);
         attrs.splice(7, 1);
       }
@@ -1494,7 +1630,7 @@ INTERFACE_EXPORT = (() => {
     }
 
     let data = new CprjInfo(projectData.name); 
-    data.children.push(new SystemInfo());
+    data.children.push(new SystemInfo(projectData));
     data.children.push(new CostBasis());
     let seriNo = 1;
     let Rates = [];

+ 142 - 0
web/building_saas/standard_interface/import/anhui_chizhou.js

@@ -0,0 +1,142 @@
+/*
+ * @Descripttion: 安徽池州导入接口
+ * @Author: vian
+ * @Date: 2020-09-21 17:40:45
+ */
+
+// INTERFACE_EXPORT =,必须这么写,这样才能在导入时动态加载脚本后,覆盖前端代码
+INTERFACE_IMPORT = (() => {
+  'use strict';
+  /**
+   * 
+   * @param {String} areaKey - 地区标识,如:'安徽@马鞍山',有些地区的接口只是取值上有不同,共有一个接口脚本, 需要通过地区标识确定一些特殊处理
+   * @param {Object} xmlObj - xml经过x2js转换后的xml对象
+   * @return {Object} - 返回的格式需要统一,具体参考函数内返回的内容。返回的内容会经过一系列的统一处理形成可入库的数据。
+   */
+  async function entry(areaKey, xmlObj) {
+    const {
+      UTIL: {
+        getValue,
+        arrayValue,
+        extractItemsRecur,
+      }
+    } = INTERFACE_EXPORT_BASE;
+
+    const subArea = areaKey.split('@')[1];
+
+    // 提取基本信息,xml中提取出来的基本信息,最终会与模板基本信息进行合并处理。(接口内不需要处理合并)
+    function setupInformation(projectSrc) {
+      const gcxx = getValue(projectSrc, ['工程信息']);
+      const zbxx = getValue(projectSrc, ['招投标信息', '招标信息']);
+      // key:基本信息模板中的key,作为合并时的匹配字段
+      const info = [
+        { key: 'projNum', value: getValue(gcxx, ['_项目编号']) },
+        { key: 'constructingUnits', value: getValue(gcxx, ['_建设单位']) },
+        { key: 'startChainages', value: getValue(gcxx, ['_起始桩号']) },
+        { key: 'endChainages', value: getValue(gcxx, ['_终点桩号']) },
+        { key: 'constructionAddress', value: getValue(gcxx, ['_建设地址']) },
+        { key: 'projOverview', value: getValue(gcxx, ['_项目概况']) },
+        { key: 'natureConstruction', value: getValue(gcxx, ['_建设性质']) },
+        { key: 'roadGrade', value: getValue(gcxx, ['_专业划分']) },
+        { key: 'roadDistance', value: getValue(gcxx, ['_道路里程']) },
+        { key: 'designUnit', value: getValue(gcxx, ['_设计单位']) },
+        { key: 'taxMode', value: getValue(gcxx, ['_计税方式']) },
+        { key: 'projType', value: getValue(gcxx, ['_文件类型']) },
+        { key: 'tendereeName', value: getValue(zbxx, ['_招标人']) },
+        { key: 'tendereeTaxpayerIdentificationNo', value: getValue(zbxx, ['_招标人纳税识别号']) },
+        { key: 'tenderAuthorizer', value: getValue(zbxx, ['_招标法定代表人或其授权人']) },
+        { key: 'tenderAuthorizerIDNo', value: getValue(zbxx, ['_招标法人或其授权人身份证号']) },
+        { key: 'costConsultant', value: getValue(zbxx, ['_造价咨询人']) },
+        { key: 'costConsultantTaxpayerIdentificationNo', value: getValue(zbxx, ['_造价咨询人纳税识别号']) },
+        { key: 'consultantAuthorizer', value: getValue(zbxx, ['_造价咨询人法定代表人或其授权人']) },
+        { key: 'consultantAuthorizerTaxpayerIdentificationNo', value: getValue(zbxx, ['_造价咨询法人或其授权人身份证号']) },
+        { key: 'compileApprover', value: getValue(zbxx, ['_编制人']) },
+        { key: 'compileCertNo', value: getValue(zbxx, ['_编制人资格证号']) },
+        { key: 'compileDate', value: getValue(zbxx, ['_编制日期']) },
+        { key: 'reviewApprover', value: getValue(zbxx, ['_复核人']) },
+        { key: 'reviewCertNo', value: getValue(zbxx, ['_复核人资格证号']) },
+        { key: 'reviewDate', value: getValue(zbxx, ['_复核日期']) },
+      ];
+      return info;
+    }
+
+    // 提取清单数据
+    function setupBills(rootSrc, oneSevenSrc, dayWorkSrc) {
+      // 章次为空的造价汇总表数据,为大项费用数据
+      const roots = arrayValue(rootSrc, ['造价汇总明细'])
+        .filter(item => !getValue(item, ['_章次']))
+        .map(item => ({
+          name: getValue(item, ['_名称']),
+          remark: getValue(item, ['_备注'])
+        }));
+      let oneSevenBills;
+      let dayWorkBills;
+      roots.forEach(item => {
+        const simpleName = item.name ? item.name.replace(/\s/g, '') : '';
+        if (/100章至第700章|100章至700章/.test(simpleName)) {
+          oneSevenBills = item;
+        } else if (/计日工合计/.test(simpleName)) {
+          dayWorkBills = item;
+        }
+      });
+      // 第100-700章的数据
+      if (oneSevenBills) {
+        oneSevenBills.children = extractItemsRecur(oneSevenSrc, [['工程量清单明细']], (src) => ({
+          code: getValue(src, ['_子目号']),
+          name: getValue(src, ['_子目名称']),
+          unit: getValue(src, ['_单位']),
+          quantity: getValue(src, ['_数量']),
+          remark: getValue(src, ['_备注']),
+        }));
+      }
+      // 计日工数据
+      if (dayWorkBills) {
+        const title = '计日工信息标题';
+        const detail = '计日工信息明细';
+        dayWorkBills.children = extractItemsRecur(dayWorkSrc, [[title], [detail]], (src, curField) => {
+          const name = getValue(src, ['_名称']);
+          const simpleName = name ? name.replace(/\s/g, '') : ''
+          if (curField === title && /计日工合计/.test(simpleName)) { // 计日工标题在根节点中已经提取了,不重复提取
+            return null;
+          }
+          const item = { name };
+          if (curField === detail) {
+            item.code = getValue(src, ['_编号']);
+            item.unit = getValue(src, ['_单位']);
+            item.quantity = getValue(src, ['_暂定数量']);
+          }
+          return item;
+        });
+      }
+      return roots;
+    }
+
+    // 提取单位工程数据
+    function setupTender(tenderSrc) {
+      const oneSevenSrc = getValue(tenderSrc, ['工程量清单表']);
+      const dayWorkSrc = getValue(tenderSrc, ['计日工信息表']);
+      const rootSrc = getValue(tenderSrc, ['造价汇总表']);
+      return {
+        name: getValue(tenderSrc, ['_标段名称']),
+        bills: setupBills(rootSrc, oneSevenSrc, dayWorkSrc)
+      };
+    }
+
+    // 从xml对象提取需要的数据
+    function setupProject(projectSrc) {
+      const tenders = arrayValue(projectSrc, ['公路工程数据', '公路标段工程'])
+        .map(tenderSrc => setupTender(tenderSrc));
+      return {
+        name: getValue(projectSrc, ['工程信息', '_项目名称']),
+        info: setupInformation(projectSrc),
+        tenders,
+      };
+    }
+    return setupProject(getValue(xmlObj, ['池州公路工程']));
+  }
+
+  return {
+    entry
+  };
+
+})();

+ 11 - 8
web/building_saas/standard_interface/import/anhui_maanshan.js

@@ -43,6 +43,16 @@ INTERFACE_IMPORT = (() => {
         { key: 'compilationTime', value: getValue(projectSrc, ['ZhaoBiaoXx', '_BzTime']) },
         { key: 'reviewTime', value: getValue(projectSrc, ['ZhaoBiaoXx', '_FhTime']) },
       ];
+      // 工程所在地,以第一个单位工程为准,在费率项中
+      const firstEng = arrayValue(projectSrc, ['Dxgcxx'])[0];
+      const firstTender = firstEng ? arrayValue(firstEng, ['Dwgcxx'])[0] : null;
+      if (firstTender) {
+        const feeRateItems = arrayValue(firstTender, ['Qfxx', 'JjFlx', 'JjFlxMx']);
+        const locationItem = feeRateItems.find(item => getValue(item, ['_Mc']) === '工程所在地');
+        if (locationItem) {
+          info.push({ key: 'location', value: getValue(locationItem, ['_ShuZhi']) });
+        }
+      }
       if (['淮北', '铜陵'].includes(subArea)) {
         const extraInfo = [
           { key: 'tendereeTaxpayerIdentificationNo', value: getValue(projectSrc, ['ZhaoBiaoXx', '_ZbrNssbh']) },
@@ -57,18 +67,11 @@ INTERFACE_IMPORT = (() => {
 
     // 提取工程特征信息,xml中提取出来的工程特征,最终会与模板工程特征进行合并处理。(接口内不需要处理合并)
     function setupFeature(midSrc, tenderSrc) {
-      const feature = [
+      return [
         { key: 'singleProjNo', value: getValue(midSrc, ['_Dxgcbh']) }, // 单项工程编号
         { key: 'singleProjName', value: getValue(midSrc, ['_Dxgcmc']) }, // 单项工程名称
         { key: 'unitProjNo', value: getValue(tenderSrc, ['_Dwgcbh']) },
       ];
-      // 工程所在地在费率项中
-      const feeRateItems = arrayValue(tenderSrc, ['Qfxx', 'JjFlx', 'JjFlxMx']);
-      const locationItem = feeRateItems.find(item => getValue(item, ['_Mc']) === '工程所在地');
-      if (locationItem) {
-        feature.push({ key: 'location', value: getValue(locationItem, ['_ShuZhi']) });
-      }
-      return feature;
     }
 
     // 费率值映射表,“接口中可有效识别的费率值类型值,此接口是Bm”与“软件中对应费率标准的名称”映射。

+ 17 - 5
web/building_saas/standard_interface/import/base.js

@@ -165,11 +165,19 @@ const INTERFACE_EXPORT_BASE = (() => {
     for (const field of fields) {
       const itemsSrc = arrayValue(src, field);
       if (itemsSrc.length) {
-        const items = itemsSrc.map(itemSrc => {
+        /* const items = itemsSrc.map(itemSrc => {
           const obj = extractFuc(itemSrc, field[0]);
           obj.children = extractItemsRecur(itemSrc, fields, extractFuc);
           return obj;
-        });
+        }); */
+        const items = [];
+        itemsSrc.forEach(itemSrc => {
+          const obj = extractFuc(itemSrc, field[0]);
+          if (obj) {
+            obj.children = extractItemsRecur(itemSrc, fields, extractFuc);
+            items.push(obj);
+          }
+        })
         rst.push(...items);
       }
     }
@@ -338,7 +346,7 @@ const INTERFACE_EXPORT_BASE = (() => {
       }
       const taxData = engineeringLib.lib.tax_group[0];
       const featureSource = [
-        ...tender.feature,
+        ...(tender.feature || []),
         { key: 'valuationType', value: '工程量清单' }, // 导入的时候以下项不一定有数据,但是需要自动生成
         { key: 'feeStandard', value: engineeringLib.lib.feeName },
       ];
@@ -371,8 +379,12 @@ const INTERFACE_EXPORT_BASE = (() => {
         glj.ID = uuid.v1();
         glj.projectID = tender.ID;
       }
-      tender.evaluationList.forEach(setGLJRefFunc);
-      tender.bidEvaluationList.forEach(setGLJRefFunc);
+      if (tender.evaluationList && tender.evaluationList.length) {
+        tender.evaluationList.forEach(setGLJRefFunc);
+      }
+      if (tender.bidEvaluationList && tender.bidEvaluationList.length) {
+        tender.bidEvaluationList.forEach(setGLJRefFunc);
+      }
     });
   }
 

+ 11 - 2
web/building_saas/standard_interface/import/guangdong_zhongshan.js

@@ -24,6 +24,12 @@ INTERFACE_IMPORT = (() => {
     "7":"独立隧道"
   }
   
+  function formateDataString(dstring) { 
+    if (!dstring || dstring == "") return "";
+    const strArr = dstring.split("T");
+    return strArr[0]
+  }
+
   async function entry(areaKey, xmlObj) {
     const {
       UTIL: {
@@ -53,23 +59,26 @@ INTERFACE_IMPORT = (() => {
       let roadGrade = "";
       if (RoadGradeMap[RoadGrade]) roadGrade = RoadGradeMap[RoadGrade];
 
+
+
       info = [
         { key: 'constructingUnit', value: getValue(MakeInfo, ['_Manage']) },
         { key: 'designUnit', value: getValue(MakeInfo, ['_Designer']) },
         { key: 'compileUnit', value: getValue(MakeInfo, ['_Compile']) },
         { key: 'compileApprover', value: getValue(MakeInfo, ['_CompileApprover']) },
         { key: 'compileCertNo', value: getValue(MakeInfo, ['_CompileCertNo']) },
-        { key: 'compileDate', value: getValue(MakeInfo, ['_CompileDate']) },
+        { key: 'compileDate', value: formateDataString(getValue(MakeInfo, ['_CompileDate'])) },
         { key: 'reviewUnit', value: getValue(MakeInfo, ['_Review']) },
         { key: 'reviewApprover', value: getValue(MakeInfo, ['_ReviewApprover']) },
         { key: 'reviewCertNo', value: getValue(MakeInfo, ['_ReviewCertNo']) },
-        { key: 'reviewDate', value: getValue(MakeInfo, ['_ReviewDate']) },
+        { key: 'reviewDate', value: formateDataString(getValue(MakeInfo, ['_ReviewDate'])) },
         { key: 'startChainages', value: getValue(Params, ['_StartPileNo'])},
         { key: 'endChainages', value: getValue(Params, ['_EndPileNo']) },  
         { key: 'location', value: getValue(Params, ['_PrjArea']) },  
         { key: 'natureConstruction', value: natureConstruction },  
         { key: 'terrainCategory', value: terrainCategory },  
         { key: 'roadGrade', value: roadGrade },  
+        { key: 'makeDate', value: getValue(CprjInfo, ['SystemInfo','_MakeDate']) },  
 
       ]
       for (let t of EprjInfos) { 

+ 11 - 3
web/building_saas/standard_interface/import/view.js

@@ -5,8 +5,12 @@
  */
 const IMPORT_VIEW = (() => {
 
+  const {
+    EXPORT_KIND: { BID_INVITATION }
+  } = window.commonConstants;
+
   /**
-   * 根据接口配置文件,设置可被接受的导入文件类型
+   * 根据接口配置文件,设置可被接受的导入文件类型,只导入招标文件
    * @param {Object} $file - 文件选择Jquery dom
    * @return {Void}
    */
@@ -16,8 +20,12 @@ const IMPORT_VIEW = (() => {
       .values(INTERFACE_CONFIG)
       .forEach(config => {
         Object
-          .values(config.fileSuffix)
-          .forEach(suffix => set.add(suffix));
+          .entries(config.fileSuffix)
+          .forEach(([type, suffix]) => {
+            if (+type === BID_INVITATION) {
+              set.add(suffix);
+            }
+          });
       });
     const accept = [...set].join(',');
     $file.prop('accept', accept);

+ 1 - 1
web/building_saas/unit_price_file/index.js

@@ -365,7 +365,7 @@ let unitPriceObj = {
   },
   showSubDatas: function () {
     let parentData = this.getSelectedUnitPrice();
-    this.mixRatioList = mixRatioMap[gljUtil.getIndex(parentData)];
+    this.mixRatioList = parentData?mixRatioMap[gljUtil.getIndex(parentData)]:[];
     this.mixRatioList = this.mixRatioList ? this.mixRatioList : [];
     this.setMixRatioData(this.mixRatioList);
     let sel = this.subSheet.getSelections()[0];

+ 1 - 1
web/common/html/header.html

@@ -68,7 +68,7 @@
                     <!--<a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=userGuide" target="_blank">用户手册</a>
                     <a class="dropdown-item" href="/web/common/html/pdfViewer.html?type=upgradeGuide" target="_blank">升级说明</a>-->
                     <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yh_yhsc/yh_yhsc-1bup3dm7iacsg" target="_blank">用户手册</a>
-                    <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yanghuUpdate/yanghuUpdate-1c67pn4g0dlkq" target="_blank">升级说明</a>
+                    <a class="dropdown-item" href="http://doc.zhzdwd.com/docs/yanghuUpdate" target="_blank">升级说明</a>
                     <a class="dropdown-item" href="https://smartcost.com.cn/" target="_blank">纵横官网</a>
                     <!--  <a class="dropdown-item" href="#">动画教程</a>-->
                     <a id="customerService" class="dropdown-item" href="javascript:void(0);">联系客服</a>

+ 3 - 0
web/over_write/js/shandong_2016.js

@@ -293,6 +293,9 @@ if (typeof gljUtil !== "undefined") {
   gljUtil.getAssUsedPrice = function(g){//山东辅助生产人工费取市场价
     return g.marketPrice;
   }
+  gljUtil.getElecCode = function () {
+    return "865";
+  }
 }
 
 //山东工地转移费率值修改特殊处理

+ 3 - 0
web/over_write/js/sichuan_2013.js

@@ -2,6 +2,9 @@ if (typeof gljUtil !== "undefined") {
   gljUtil.getAssUsedPrice = function(g){//四川辅助生产人工费取市场价
     return g.marketPrice;
   }
+  gljUtil.getElecCode = function () {
+    return "865";
+  }
 }
 
 

+ 88 - 88
web/users/js/login.js

@@ -46,102 +46,102 @@ $(document).ready(function () {
     //         // captchaObj.getValidate();
     //     });
 
-        $("#login").click(function () {
-            if (!valid()) {
-                return false;
-            }
-            if ($('#changeLogin').attr('data-status') === 'user') {
-                let account = $("#inputEmail").val();
-                if(/^1[3456789]\d{9}$/.test(account) || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(account)) {
+    $("#login").click(function () {
+        if (!valid()) {
+            return false;
+        }
+        if ($('#changeLogin').attr('data-status') === 'user') {
+            let account = $("#inputEmail").val();
+            if(/^1[3456789]\d{9}$/.test(account) || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(account)) {
                     login();
-                } else {
-                    $('#emailHelp').text('您输入的 邮箱/手机 格式不对');
-                }
             } else {
-                let account = $("#mobileLogin").val();
-                if(/^1[3456789]\d{9}$/.test(account)) {
+                $('#emailHelp').text('您输入的 邮箱/手机 格式不对');
+            }
+        } else {
+            let account = $("#mobileLogin").val();
+            if(/^1[3456789]\d{9}$/.test(account)) {
                     login();
-                } else {
-                    $('#phoneHelp').text('您输入的 手机 格式不对');
-                }
+            } else {
+                $('#phoneHelp').text('您输入的 手机 格式不对');
             }
-            // let account = $("#inputEmail").val();
-            // let pw = $("#inputPassword").val();
-
-            // 判断输入的邮箱/手机是否格式正确
-            // if(/^1[3456789]\d{9}$/.test(account) || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(account)) {
-            // // 先判断是否是专业版用户,是的话弹出短信验证
-            // $.ajax({
-            //     url: '/accountIsPro',
-            //     type: 'post',
-            //     async: true,
-            //     data: {"account": account, "pw": pw},
-            //     success: function (response) {
-            //         if (response.error === 0) {
-            //             const ispro = response.result;
-            //             if (!ispro) {
-            //                 login(captchaObj);
-            //             } else {
-            //                 $('#phonepass').modal('show');
-            //                 $('#proMobile').val(response.data);
-            //                 $('#pro_mobile').text(response.data.substr(0, 3) + '****' + response.data.substr(7, 11));
-            //             }
-            //         } else if(response.error === 2) {
-            //             $('#check_ssoId').val(response.ssoId);
-            //             $('#phone').modal('show');
-            //         } else {
-            //             let msg = response.msg !== undefined ? response.msg : '未知错误';
-            //             showError(msg, $("input"));
-            //         }
-            //     }
-            //     // });
-            // } else {
-            //     $('#emailHelp').text('您输入的 邮箱/手机 格式不对');
-            // }
-        });
+        }
+        // let account = $("#inputEmail").val();
+        // let pw = $("#inputPassword").val();
 
-        // $('#loginPro').click(function () {
-        //     if ($('#smsCode').val() === '') {
-        //         showValidError('请输入验证码',$('#smsCode'));
-        //     } else {
-        //         login(captchaObj);
+        // 判断输入的邮箱/手机是否格式正确
+        // if(/^1[3456789]\d{9}$/.test(account) || /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(account)) {
+        // // 先判断是否是专业版用户,是的话弹出短信验证
+        // $.ajax({
+        //     url: '/accountIsPro',
+        //     type: 'post',
+        //     async: true,
+        //     data: {"account": account, "pw": pw},
+        //     success: function (response) {
+        //         if (response.error === 0) {
+        //             const ispro = response.result;
+        //             if (!ispro) {
+        //                 login(captchaObj);
+        //             } else {
+        //                 $('#phonepass').modal('show');
+        //                 $('#proMobile').val(response.data);
+        //                 $('#pro_mobile').text(response.data.substr(0, 3) + '****' + response.data.substr(7, 11));
+        //             }
+        //         } else if(response.error === 2) {
+        //             $('#check_ssoId').val(response.ssoId);
+        //             $('#phone').modal('show');
+        //         } else {
+        //             let msg = response.msg !== undefined ? response.msg : '未知错误';
+        //             showError(msg, $("input"));
+        //         }
         //     }
-        // });
+        //     // });
+        // } else {
+        //     $('#emailHelp').text('您输入的 邮箱/手机 格式不对');
+        // }
+    });
 
-        $('#check-code').click(function () {
-            const mobile = $("#mobile").val();
-            const ssoId = $("#check_ssoId").val();
-            const code = $("#code").val();
-            if(!validMobile(mobile)) {
-                return false;
-            }
-            if(ssoId === undefined || ssoId === '') {
-                showValidError('账号有误!', $('#code'));
-                return false;
-            }
-            if($.trim(code) === '') {
-                showValidError('验证码不能为空!', $('#code'));
-                return false;
-            }
-            $.ajax({
-                url: '/sms/mobile',
-                type: 'post',
-                data: {ssoId: ssoId, mobile: mobile, code: code},
-                error: function() {
-                    showValidError('接口出错!',$('#code'));
-                },
-                beforeSend: function() {
-                },
-                success: function(response) {
-                    if (response.err === 0) {
-                        $("#login").click();
-                        $('#phone').modal('hide');
-                    } else {
-                        showValidError(response.msg,$('#code'));
-                    }
+    // $('#loginPro').click(function () {
+    //     if ($('#smsCode').val() === '') {
+    //         showValidError('请输入验证码',$('#smsCode'));
+    //     } else {
+    //         login(captchaObj);
+    //     }
+    // });
+
+    $('#check-code').click(function () {
+        const mobile = $("#mobile").val();
+        const ssoId = $("#check_ssoId").val();
+        const code = $("#code").val();
+        if(!validMobile(mobile)) {
+            return false;
+        }
+        if(ssoId === undefined || ssoId === '') {
+            showValidError('账号有误!', $('#code'));
+            return false;
+        }
+        if($.trim(code) === '') {
+            showValidError('验证码不能为空!', $('#code'));
+            return false;
+        }
+        $.ajax({
+            url: '/sms/mobile',
+            type: 'post',
+            data: {ssoId: ssoId, mobile: mobile, code: code},
+            error: function() {
+                showValidError('接口出错!',$('#code'));
+            },
+            beforeSend: function() {
+            },
+            success: function(response) {
+                if (response.err === 0) {
+                    $("#login").click();
+                    $('#phone').modal('hide');
+                } else {
+                    showValidError(response.msg,$('#code'));
                 }
-            })
-        });
+            }
+        })
+    });
     // };
 
     $("input").blur(function () {