Browse Source

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

zhangweicheng 3 days ago
parent
commit
c76977dcef

+ 2 - 0
modules/all_models/compilation.js

@@ -63,6 +63,8 @@ let modelSchema = {
   edition: String,
   // 序号(用于排序)
   serialNumber: Number,
+  // 编办地区
+  compilationArea: String,
   // 发布时间
   release_time: {
     type: Number,

+ 32 - 30
modules/all_models/engineering_lib.js

@@ -9,14 +9,14 @@ import mongoose from "mongoose";
 
 let Schema = mongoose.Schema;
 let collectionName = 'engineering_lib';
-let taxGroupSchema = new  Schema({
+let taxGroupSchema = new Schema({
     taxType: String,//计税方式
-    program_lib: { type: Schema.Types.Mixed,default:{}},// 计算程序标准库
-    template_lib:{ type: Schema.Types.Mixed,default:{}},//清单模板库
-    col_lib:{ type: Schema.Types.Mixed,default:{}},//列设置
-    fee_lib:{ type: Schema.Types.Mixed,default:{}},//费率标准库
-    norm_lib:String//指标分部
-},{_id: false});
+    program_lib: { type: Schema.Types.Mixed, default: {} },// 计算程序标准库
+    template_lib: { type: Schema.Types.Mixed, default: {} },//清单模板库
+    col_lib: { type: Schema.Types.Mixed, default: {} },//列设置
+    fee_lib: { type: Schema.Types.Mixed, default: {} },//费率标准库
+    norm_lib: String//指标分部
+}, { _id: false });
 
 
 let modelSchema = {
@@ -40,22 +40,22 @@ let modelSchema = {
         type: Schema.Types.Mixed,
         default: []
     },
-    tax_group :{
-      type: [taxGroupSchema],
-      default: []
-    },
-   /* // 费率标准库 2018-08-28 改成放在tax_group 里了
-    fee_lib: {
-        type: Schema.Types.Mixed,
+    tax_group: {
+        type: [taxGroupSchema],
         default: []
-    },*/
+    },
+    /* // 费率标准库 2018-08-28 改成放在tax_group 里了
+     fee_lib: {
+         type: Schema.Types.Mixed,
+         default: []
+     },*/
     // 人工系数标准库
     artificial_lib: {
         type: Schema.Types.Mixed,
         default: []
     },
     //工程特征库
-    feature_lib:{
+    feature_lib: {
         type: Schema.Types.Mixed,
         default: []
     },
@@ -98,29 +98,31 @@ let modelSchema = {
         default: []
     },
     //设置人材机显示列
-    glj_col:{
-        showAdjustPrice:Boolean//是否显示调整价列
+    glj_col: {
+        showAdjustPrice: Boolean//是否显示调整价列
     },
     //清单或定额计价规则ID
-    valuationID:{type:String,index: true},
+    valuationID: { type: String, index: true },
     //工程专业名称
-    name:String,
+    name: String,
     //费用标准
-    feeName:String,
+    feeName: String,
     //前端是否显示
-    visible:{type: Boolean, default: false},
+    visible: { type: Boolean, default: false },
+    // 是否是项目汇总
+    isSummary: { type: Boolean, default: false },
     //取费专业
-    engineering:Number,
+    engineering: Number,
     //单位工程取费专业
-    projectEngineering:Number,
+    projectEngineering: Number,
     //是否计算安装增加费
-    isInstall:{type: Boolean, default: false},
+    isInstall: { type: Boolean, default: false },
     //是否计算子目增加费
-    isItemIncrease:{type: Boolean, default: false},
+    isItemIncrease: { type: Boolean, default: false },
     //是否计算面积增加费
-    isAreaIncrease:{type: Boolean, default: false},
-    indexName:String,//指标专业名称
-    seq:Number//序列号
+    isAreaIncrease: { type: Boolean, default: false },
+    indexName: String,//指标专业名称
+    seq: Number//序列号
 };
-mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
+mongoose.model(collectionName, new Schema(modelSchema, { versionKey: false, collection: collectionName }));
 

+ 24 - 0
modules/common/const/bills_fixed.js

@@ -87,6 +87,22 @@ const fixedFlag = {
   CONSTRUCTION_OTHER_FEE: 85,
   // 预备费
   BUDGET_FEE: 42,
+  // 合同中约定的其他项目
+  CONTRACT_OTHER: 100,
+  // 材料暂估价调整
+  MATERIAL_PROVISIONAL_ADJUST: 101,
+  // 物价变化调差
+  PRICE_CHANGE_ADJUST: 102,
+  // 法律法规及政策性变化
+  LAW_POLICY_CHANGE: 103,
+  // 工程变更
+  ENGINEERING_CHANGE: 104,
+  // 新增工程
+  NEW_ENGINEERING: 105,
+  // 发承包双方约定的其他项目调整
+  OTHER_AGREED_ADJUST: 106,
+  // 大型机械进出场及安拆
+  LARGE_MACHINE_INSTALL_REMOVE: 107,
 };
 const fixedFlagList = [
   { name: "分部分项工程", value: fixedFlag.SUB_ENGINERRING },
@@ -131,6 +147,14 @@ const fixedFlagList = [
   { name: "工程费用", value: fixedFlag.CONSTRUCTION_FEE },
   { name: "工程建设其他费", value: fixedFlag.CONSTRUCTION_OTHER_FEE },
   { name: "预备费", value: fixedFlag.BUDGET_FEE },
+  { name: "合同中约定的其他项目", value: fixedFlag.CONTRACT_OTHER },
+  { name: "材料暂估价调整", value: fixedFlag.MATERIAL_PROVISIONAL_ADJUST },
+  { name: "物价变化调差", value: fixedFlag.PRICE_CHANGE_ADJUST },
+  { name: "法律法规及政策性变化", value: fixedFlag.LAW_POLICY_CHANGE },
+  { name: "工程变更", value: fixedFlag.ENGINEERING_CHANGE },
+  { name: "新增工程", value: fixedFlag.NEW_ENGINEERING },
+  { name: "发承包双方约定的其他项目调整", value: fixedFlag.OTHER_AGREED_ADJUST },
+  { name: "大型机械进出场及安拆", value: fixedFlag.LARGE_MACHINE_INSTALL_REMOVE },
 ];
 
 export { fixedFlag as default, fixedFlagList as List };

+ 20 - 1
modules/users/controllers/compilation_controller.js

@@ -414,7 +414,7 @@ class CompilationController extends BaseController {
       // 先存入工程专业标准库表
       let engineeringLibModel = new EngineeringLibModel();
       let result = await engineeringLibModel.addLib(engineerId, request.body);
-
+      console.log(result);
       if (!result) {
         throw "保存失败";
       }
@@ -1019,6 +1019,25 @@ class CompilationController extends BaseController {
       response.json({ error: 1, message: "更新数据错误", data: null });
     }
   }
+
+  /**
+   * 更改编办地区
+   *
+   * @param request
+   * @param response
+   * @return {Promise.<void>}
+   */
+  async setCompilationArea(request, response) {
+    let compilationId = request.body.id;
+    let compilationArea = request.body.compilationArea;
+    try {
+      let compilationModel = new CompilationModel();
+      await compilationModel.setCompilationArea(compilationId, compilationArea);
+      response.json({ err: 0, msg: "", data: null });
+    } catch (err) {
+      response.json({ err: 1, msg: err, data: null });
+    }
+  }
 }
 
 export default CompilationController;

+ 14 - 0
modules/users/models/compilation_model.js

@@ -53,6 +53,7 @@ class CompilationModel extends BaseModel {
             serialNumber: 1,
             freeUse: 1,
             customMade: 1,
+            compilationArea: 1,
             "ration_valuation.id": 1,
             "ration_valuation.name": 1,
             "ration_valuation.enable": 1,
@@ -611,6 +612,19 @@ class CompilationModel extends BaseModel {
       await engineeringModel.insertMany(newEngineeringList);
     }
   }
+
+  /*
+   * 设置编办地区
+   *
+   * @param {String} compilationId
+   * @param {String} compilationArea
+   * @return {Promise}
+   * */
+  async setCompilationArea(compilationId, compilationArea) {
+    return await this.updateById(compilationId, {
+      compilationArea: compilationArea,
+    });
+  }
 }
 
 export default CompilationModel;

+ 6 - 0
modules/users/routes/compilation_route.js

@@ -182,5 +182,11 @@ module.exports = function (app) {
     compilationController.init,
     compilationController.changeCompilation
   );
+  router.post(
+    "/setCompilationArea",
+    compilationController.auth,
+    compilationController.init,
+    compilationController.setCompilationArea
+  );
   app.use("/compilation", router);
 };

+ 4 - 0
web/maintain/bills_lib/html/qingdan.html

@@ -936,6 +936,10 @@
             let curData;
             info.changedCells.forEach(({ row, col }) => {
                 const node = controller.tree.items[row];
+                // 拖动填充的时候tag也会被覆盖,重新设置
+                if (col === 0 && node) {
+                    sheet.setTag(row, col, node.data.ID);
+                }
                 if (curRow !== row) {
                     curData = { ID: node.data.ID };
                     postData.push(curData);

+ 412 - 395
web/maintain/bills_lib/scripts/bills_lib_setting.js

@@ -2,110 +2,127 @@
  * Created by vian on 2017/4/10.
  */
 var billsLibSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['类型'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'kind',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 50
-        },
-        {
-            head: {
-                titleNames: ['编码'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 160
-        },
-        {
-            head: {
-                titleNames: ['名称'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'name',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 240
-        },
-        {
-            head: {
-                titleNames: ['计量单位'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'unit',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 80
-        },
-        {
-            head: {
-                titleNames: ['工程量计算规则'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'ruleText',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 420
-        },
-        {
-            head: {
-                titleNames: ['单价'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'unitPrice',
-                vAlign: 1,
-                hAlign: 2,
-                font: 'Arial'
-            },
-            width: 80
-        },
-        /*  {
+  cols: [
+    {
+      head: {
+        titleNames: ["类型"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "kind",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 50,
+    },
+    {
+      head: {
+        titleNames: ["编码"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 160,
+    },
+    {
+      head: {
+        titleNames: ["名称"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "name",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 240,
+    },
+    {
+      head: {
+        titleNames: ["计量单位"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unit",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["工程量计算规则"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "ruleText",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 420,
+    },
+    {
+      head: {
+        titleNames: ["备注"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "recharge",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 100,
+    },
+    {
+      head: {
+        titleNames: ["单价"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "unitPrice",
+        vAlign: 1,
+        hAlign: 2,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    /*  {
              head: {
                  titleNames: ['工程专业'],
                  spanCols: [1],
@@ -122,309 +139,309 @@ var billsLibSetting = {
              },
              width: 80
          }, */
-        {
-            head: {
-                titleNames: ['工程经济\n指标类别'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'economicType',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 80
-        },
-        {
-            head: {
-                titleNames: ['工程量指\n标类别'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'quantityIndexType',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 80
-        },
-        {
-            head: {
-                titleNames: ['工程量指\n标单位'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'quantityIndexUnit',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 60
-        },
-        {
-            head: {
-                titleNames: ['单位转\n换系数'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'quantityIndexCoe',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 60
-        },
-        {
-            head: {
-                titleNames: ['固定ID'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: ' Arial'
-            },
-            data: {
-                field: 'fixedFlag',
-                vAlign: 1,
-                hAlign: 1,
-                font: 'Arial'
-            },
-            width: 100
-        }
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 0,
-    treeCol: 1
+    {
+      head: {
+        titleNames: ["工程经济\n指标类别"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "economicType",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["工程量指\n标类别"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "quantityIndexType",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 80,
+    },
+    {
+      head: {
+        titleNames: ["工程量指\n标单位"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "quantityIndexUnit",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 60,
+    },
+    {
+      head: {
+        titleNames: ["单位转\n换系数"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "quantityIndexCoe",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 60,
+    },
+    {
+      head: {
+        titleNames: ["固定ID"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: " Arial",
+      },
+      data: {
+        field: "fixedFlag",
+        vAlign: 1,
+        hAlign: 1,
+        font: "Arial",
+      },
+      width: 100,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 0,
+  treeCol: 1,
 };
 
 var jobsSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['编号'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 100
-        },
-        {
-            head: {
-                titleNames: ['工作内容'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'content',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 200
-        },
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 3,
-    treeCol: 0
+  cols: [
+    {
+      head: {
+        titleNames: ["编号"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 100,
+    },
+    {
+      head: {
+        titleNames: ["工作内容"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "content",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 200,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 3,
+  treeCol: 0,
 };
 
 var itemsSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['编号'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 100
-        },
-        {
-            head: {
-                titleNames: ['项目特征'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'content',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 200
-        },
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 3,
-    treeCol: 0
+  cols: [
+    {
+      head: {
+        titleNames: ["编号"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 100,
+    },
+    {
+      head: {
+        titleNames: ["项目特征"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "content",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 200,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 3,
+  treeCol: 0,
 };
 
 var totalJobsSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['编号'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 200
-        },
-        {
-            head: {
-                titleNames: ['工作内容'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'content',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 850
-        },
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 3,
-    treeCol: 0
+  cols: [
+    {
+      head: {
+        titleNames: ["编号"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 200,
+    },
+    {
+      head: {
+        titleNames: ["工作内容"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "content",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 850,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 3,
+  treeCol: 0,
 };
 
 var totalItemsSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['编号'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 200
-        },
-        {
-            head: {
-                titleNames: ['项目特征'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'content',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 800
-        },
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 3,
-    treeCol: 0
+  cols: [
+    {
+      head: {
+        titleNames: ["编号"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 200,
+    },
+    {
+      head: {
+        titleNames: ["项目特征"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "content",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 800,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 3,
+  treeCol: 0,
 };
 
 var eigenValueSetting = {
-    cols: [
-        {
-            head: {
-                titleNames: ['编号'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'code',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 200
-        },
-        {
-            head: {
-                titleNames: ['特征值'],
-                spanCols: [1],
-                spanRows: [2],
-                vAlign: [1, 1],
-                hAlign: [1, 1],
-                font: 'Arial'
-            },
-            data: {
-                field: 'value',
-                vAlign: 1,
-                hAlign: 0,
-                font: 'Arial'
-            },
-            width: 480
-        },
-    ],
-    headRows: 1,
-    headRowHeight: [47],
-    emptyRows: 3,
-    treeCol: 0
-}
+  cols: [
+    {
+      head: {
+        titleNames: ["编号"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "code",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 200,
+    },
+    {
+      head: {
+        titleNames: ["特征值"],
+        spanCols: [1],
+        spanRows: [2],
+        vAlign: [1, 1],
+        hAlign: [1, 1],
+        font: "Arial",
+      },
+      data: {
+        field: "value",
+        vAlign: 1,
+        hAlign: 0,
+        font: "Arial",
+      },
+      width: 480,
+    },
+  ],
+  headRows: 1,
+  headRowHeight: [47],
+  emptyRows: 3,
+  treeCol: 0,
+};

+ 1 - 0
web/maintain/report/html/rpt_tpl_dtl_info.html

@@ -82,6 +82,7 @@
                         <option value="changeProjectSummary">变更业务对比汇总</option>
                         <option value="changeProjectGljSummary">变更业务工料机对比汇总</option>
                         <option value="compareConstruct">对比建设项目</option>
+                        <option value="compareBusinessUnit">对比业务项目(平台可弹窗)</option>
                     </select>
                 </div>
             </div>

+ 2 - 0
web/maintain/report/js/rpt_tpl_main.js

@@ -1458,6 +1458,8 @@ let zTreeOprObj = {
                   $("#element_sumLv_flags")[0].selectedIndex = 18;
                 else if (sumLvType === "compareConstruct")
                   $("#element_sumLv_flags")[0].selectedIndex = 19;
+                else if (sumLvType === "compareBusinessUnit")
+                  $("#element_sumLv_flags")[0].selectedIndex = 20;
                 else {
                   $("#element_sumLv_flags")[0].selectedIndex = 0;
                 }

+ 22 - 0
web/users/js/compilation.js

@@ -616,6 +616,22 @@ $(document).ready(function () {
     });
   });
 
+  //更改编办地区
+  $("#compilationArea").change(function () {
+    let compilationArea = $(this).val();
+    $.ajax({
+      url: "/compilation/setCompilationArea",
+      type: "post",
+      dataType: "json",
+      data: { id, compilationArea },
+      success: function (response) {
+        if (response.err !== 0) {
+          alert("更改失败");
+        }
+      },
+    });
+  });
+
   //更改序号
   $("#serialNumber").change(function () {
     let serialNumber = Number($(this).val());
@@ -1478,6 +1494,12 @@ function engineerVisibleChange(checkBox, engineerID) {
   }
 }
 
+function engineerSummaryChange(checkBox, engineerID) {
+  if (engineerID) {
+    updateEngineer(engineerID, { isSummary: checkBox.checked });
+  }
+}
+
 function updateEngineer(engineerID, data, callback) {
   CommonAjax.post(
     "/compilation/update-engineer",

+ 2 - 0
web/users/views/compilation/add.html

@@ -43,6 +43,7 @@
                                 <th>标准清单</th>
                                 <th>定额库</th>
                                 <th>人材机库</th>
+                                <th>项目汇总</th>
                                 <th>前台显示</th>
                                 <th>操作</th>
                             </tr>
@@ -113,6 +114,7 @@
                                     <td><%= engineering.bill_lib.length %></td>
                                     <td><%= engineering.ration_lib.length %></td>
                                     <td><%= engineering.glj_lib.length %></td>
+                                    <td><label><input type="checkbox"  <% if (engineering.isSummary) { %>checked<% } %>  onclick='engineerSummaryChange(this,"<%= engineering._id.toString()%>")'> 项目汇总</label></td>
                                     <td><label><input type="checkbox"  <% if (engineering.visible) { %>checked<% } %>  onclick='engineerVisibleChange(this,"<%= engineering._id.toString()%>")'> 显示</label></td>
                                     <td>
                                         <a class="btn-link" href="/compilation/<%= section %>/<%= valuationId %>/<%= engineering._id.toString()%>">编辑</a>/<a onclick="deleteEngineerClick('<%= engineering._id.toString()%>',this)" class='btn btn-link btn-sm' style="padding: 0px">删除</a>/<a onclick="copyEngineerClick('<%= engineering._id.toString()%>')" class='btn btn-link btn-sm' style="padding: 0px">拷贝</a>

+ 9 - 0
web/users/views/compilation/index.html

@@ -140,6 +140,15 @@
                         </p>       
                     </td>
                 </tr>
+                <tr>
+                    <td>
+                        <div style="display: inline-block;">
+                            <p>编办地区</p>
+                            <input class="form-control" type="text" style="width: 200px;" id="compilationArea"
+                                value="<%= selectedCompilation.compilationArea%>" />
+                        </div>
+                    </td>
+                </tr>
                 <tr><td><span>版本号:</span><input class="form-control" type="text" id="edition" value="<%= selectedCompilation.edition%>"></td></tr>  
                 <tr>
                     <td><span>序号:</span><input class="form-control" type="number" id="serialNumber" value="<%= selectedCompilation.serialNumber%>">