소스 검색

Merge branch 'master' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost

zhangweicheng 7 년 전
부모
커밋
fcc532b058

+ 1 - 0
config/gulpConfig.js

@@ -112,6 +112,7 @@ module.exports = {
         'web/building_saas/main/js/controllers/project_controller.js',
         'web/building_saas/main/js/controllers/block_controller.js',
         'web/building_saas/main/js/views/side_tools.js',
+        'web/building_saas/main/js/views/std_billsGuidance_lib.js',
         'web/building_saas/main/js/views/std_bills_lib.js',
         'web/building_saas/main/js/views/std_ration_lib.js',
         'web/building_saas/main/js/models/quantity_detail.js',

+ 26 - 0
modules/all_models/std_billsGuidance_items.js

@@ -0,0 +1,26 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/5/29
+ * @version
+ */
+//清单指引条目
+const mongoose = require('mongoose');
+const Schema = mongoose.Schema;
+
+const stdBillsGuidanceItems = new Schema({
+    libID: String,
+    ID: String, //uuid
+    ParentID: String,
+    NextSiblingID: String,
+    billsID: String, //关联清单的ID
+    name: String,
+    type: Number, //0:工作内容 1:定额
+    rationID: {type: Number, default: null}, //定额类型时
+    deleted: {type: Boolean, default: false}
+}, {versionKey: false});
+
+mongoose.model('std_billsGuidance_items', stdBillsGuidanceItems, 'std_billsGuidance_items');

+ 27 - 0
modules/all_models/std_billsGuidance_lib.js

@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/5/29
+ * @version
+ */
+//清单指引库
+const mongoose = require('mongoose');
+const Schema = mongoose.Schema;
+
+const stdBillsGuidanceLib = new Schema({
+    ID: String, //uuid
+    compilationId: String,
+    compilationName: String,
+    billsLibId: Number,
+    billsLibName: String,
+    name: String,
+    creator: String,
+    createDate: String,
+    deleted: {type: Boolean, default: false},
+}, {versionKey: false});
+
+mongoose.model('std_billsGuidance_lib', stdBillsGuidanceLib, 'std_billsGuidance_lib');
+

+ 9 - 3
modules/reports/rpt_component/jpc_flow_tab.js

@@ -107,10 +107,16 @@ JpcFlowTabSrv.prototype.createNew = function(){
                     if (couldBreak) break;
                 } else {
                     //备注: 在有group的情况下,如果grpPageInfo[JV.PROP_SEG_GRP_IDX] 范围大于 grpSequenceInfo.length,则表示已经到最后了,不要再加空白数据了
+                    //      !!!但这是在有ex数据的情况下!!!
                     if (grpPageInfo[JV.PROP_SEG_GRP_IDX] < grpSequenceInfo.length) {
                         if (private_normal_add_rec(vi)) break;
                     } else {
-                        break;
+                        //还得判断是否是普通的流水数据情况,这里可以用isFollow来进行判断,暂时不需要特意加新参数(以后如isFollow的意义有变化则需要调整)
+                        if (!isFollow) {
+                            if (private_normal_add_rec(vi)) break;
+                        } else {
+                            break;
+                        }
                     }
                 }
             } else {
@@ -197,7 +203,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
                 }
                 let sumV = 0;
                 for (let si = preGrpIdx; si <= nexGrpIdx; si++) {
-                    sumV += JpcFieldHelper.getValue(data_field, segDataIdx[si]);
+                    sumV += parseFloat(JpcFieldHelper.getValue(data_field, segDataIdx[si]));
                 }
                 // me.group_sum_values[segIdx][j].push(sumV);
                 me.group_sum_values[segIdx][me.group_sum_fields[j][JV.PROP_SUM_KEY]].push(sumV);
@@ -587,7 +593,7 @@ JpcFlowTabSrv.prototype.createNew = function(){
                             }
                             //add page info
                             pageStatus[JV.STATUS_SEGMENT_END] = true;
-                            pageStatus[JV.STATUS_REPORT_END] = true;
+                            pageStatus[JV.STATUS_REPORT_END] = (segIdx === me.segments.length - 1);
                             private_addPage(segIdx, grpSeqInfo, false, false, -1);
                         } else {
                             private_addPage(segIdx, grpSeqInfo, false, false, -1);

+ 16 - 1
modules/reports/util/rpt_construct_data_util.js

@@ -559,6 +559,9 @@ function filterData(sourceData, handleCfg, prjData) {
                 }
             }
             startIdx++;
+            if (!compRst) {
+                break; //由不符合条件的数据则退出(这里的判断条件是and关系)
+            }
         }
         return compRst;
     };
@@ -1026,6 +1029,7 @@ function ext_getPropety(propKey) {
         for (let dItem of getActDataArr(dtObj)) {
             let doc = (dItem._doc === null || dItem._doc === undefined)?dItem:dItem._doc;
             if (propKey instanceof Array) {
+                //备注:这里的key数组表示取value的优先级
                 for (let pi = 0; pi < propKey.length; pi++) {
                     if (doc.hasOwnProperty("property")) {
                         if (doc["property"].hasOwnProperty(propKey[pi])) {
@@ -1035,6 +1039,16 @@ function ext_getPropety(propKey) {
                     } else if (doc.hasOwnProperty(propKey[pi])) {
                         rst.push(doc[propKey[pi]]);
                         break;
+                    } else {
+                        let lenBefore = rst.length;
+                        getDeepProperty(propKey[pi], doc, rst);
+                        if (rst.length === (lenBefore + 1)) {
+                            if (rst[lenBefore] !== null && rst[lenBefore] !== undefined && rst[lenBefore] !== "") {
+                                break;
+                            } else {
+                                rst.splice(-1, 1); //删除末尾一条数据,给后面留空间
+                            }
+                        }
                     }
                     if (pi === propKey.length - 1) rst.push('');
                 }
@@ -1044,7 +1058,8 @@ function ext_getPropety(propKey) {
                 } else if (doc.hasOwnProperty(propKey)) {
                     rst.push(doc[propKey]);
                 } else {
-                    rst.push('');
+                    // rst.push('');
+                    getDeepProperty(propKey, doc, rst);
                 }
             }
         }

+ 54 - 0
modules/std_billsGuidance_lib/controllers/libController.js

@@ -0,0 +1,54 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/5/29
+ * @version
+ */
+import BaseController from '../../common/base/base_controller';
+const _ = require('lodash');
+const billsGuidanceFacade = require('../facade/facades');
+let callback = function (req, res, err, msg, data) {
+    res.json({error: err, message: msg, data: data});
+};
+
+class BillsGuideLibController extends BaseController{
+    //获取清单指引库和该库引用的清单
+    async getLibWithBills(req, res){
+        try{
+            let data = JSON.parse(req.body.data);
+            let rst = await billsGuidanceFacade.getLibWithBills(data.libID);
+            callback(req, res, 0, '', rst);
+        }
+        catch(err){
+            callback(req, res, 1, err, null);
+        }
+    }
+
+    async getItemsByBills(req, res){
+        try{
+            let data = JSON.parse(req.body.data);
+            let items = await billsGuidanceFacade.getItemsBybills(data.guidanceLibID, data.billsID);
+            callback(req, res, 0, '', items);
+        }
+        catch(err){
+            callback(req, res, 1, err, null);
+        }
+    }
+
+    async updateItems(req, res){
+        try{
+            let data = JSON.parse(req.body.data);
+            let updateDatas = data.updateDatas;
+            await billsGuidanceFacade.updateItems(updateDatas);
+            callback(req, res, 0, '', null);
+        }
+        catch(err){
+            callback(req, res, 1, err, null);
+        }
+    }
+}
+
+export default BillsGuideLibController;

+ 27 - 0
modules/std_billsGuidance_lib/controllers/viewController.js

@@ -0,0 +1,27 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/5/29
+ * @version
+ */
+import BaseController from "../../common/base/base_controller";
+
+class ViewsController extends BaseController{
+    redirectMain(req, res){
+        res.render('maintain/billsGuidance_lib/html/main.html',
+            {
+                userAccount: req.session.managerData.username
+            });
+    }
+    redirectGuidance(req, res){
+        res.render('maintain/billsGuidance_lib/html/zhiyin.html',
+            {
+                userAccount: req.session.managerData.username
+            });
+    }
+}
+
+export default ViewsController;

+ 136 - 0
modules/std_billsGuidance_lib/facade/facades.js

@@ -0,0 +1,136 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/6/1
+ * @version
+ */
+import mongoose from 'mongoose';
+import CompilationModel from "../../users/models/compilation_model";
+import moment from 'moment';
+const uuidV1 = require('uuid/v1');
+const billsLibModel = mongoose.model('std_bills_lib_list');
+const billsGuideLibModel = mongoose.model('std_billsGuidance_lib');
+const billsGuideItemsModel = mongoose.model('std_billsGuidance_items');
+const stdBillsLibModel = mongoose.model('std_bills_lib_list');
+const stdBillsModel = mongoose.model('std_bills_lib_bills');
+const stdBillsJobsModel = mongoose.model('std_bills_lib_jobContent');
+const stdRationModel = mongoose.model('std_ration_lib_ration_items');
+const _ = require('lodash');
+
+module.exports = {
+    getLibWithBills,
+    getItemsBybills,
+};
+
+async function getBillsGuideLibs(findData) {
+    return await billsGuideLibModel.find(findData);
+}
+
+
+async function getLibWithBills(libID){
+    let guidanceLib = await getBillsGuideLibs({ID: libID, deleted: false});
+    if(guidanceLib.length === 0){
+        throw '不存在此指引库!';
+    }
+    let billsLib = await stdBillsLibModel.findOne({billsLibId: guidanceLib[0].billsLibId, deleted: false});
+    if(!billsLib){
+        throw '引用的清单规则库不存在!';
+    }
+    let bills = await stdBillsModel.find({billsLibId: billsLib.billsLibId, deleted: false}, '-_id code name ID NextSiblingID ParentID');
+    return {guidanceLib: guidanceLib[0], bills};
+}
+
+function getAttrs(field, datas){
+    let rst = [];
+    for(let data of datas){
+        if(data[field]){
+            rst.push(data[field]);
+        }
+    }
+    return rst;
+}
+
+//定额项目指所引用定额是否被删除
+function rationAllExist(rationItems, stdRationIdx) {
+    for(let item of rationItems){
+        if(!stdRationIdx[item.rationID]){
+            return false;
+        }
+    }
+    return true;
+}
+
+//将同层树结构转为顺序数组
+function chainToArr(nodes){
+    let rst = [];
+    let tempIdx = {};
+    let nodeIdx = {};
+    //建索引
+    for(let node of nodes){
+        tempIdx[node.ID] = {ID: node.ID, NextSiblingID: node.NextSiblingID, preSibling: null, nextSibling: null};
+        nodeIdx[node.ID] = node;
+    }
+    //建链
+    for(let i in tempIdx){
+        let temp = tempIdx[i];
+        if(temp.NextSiblingID != -1){
+            let next = tempIdx[temp.NextSiblingID];
+            temp.nextSibling = next;
+            next.preSibling = temp;
+        }
+    }
+    let firstNode = null;
+    for(let i in tempIdx){
+        if(!tempIdx[i].preSibling){
+            firstNode = tempIdx[i];
+            break;
+        }
+    }
+    //获得顺序队列
+    while(firstNode){
+        rst.push(nodeIdx[firstNode.ID]);
+        firstNode = firstNode.nextSibling;
+    }
+    return rst;
+}
+
+async function getItemsBybills(guidanceLibID, billsID){
+    const type = {job: 0, ration: 1};
+    let items = await billsGuideItemsModel.find({libID: guidanceLibID, billsID: billsID, deleted: false});
+    let rationItems = _.filter(items, {type: type.ration});
+    let rationIds = getAttrs('rationID', rationItems);
+    let stdRations = await stdRationModel.find({ID: {$in: rationIds}, $or: [{isDeleted: null}, {isDeleted: false}]});
+    let stdRationIndex = {};
+    for(let stdRation of stdRations){
+        stdRationIndex[stdRation.ID] = stdRation;
+    }
+    //判断定额完整性
+    if(!rationAllExist(rationItems, stdRationIndex)){
+        //建定额链, 排序后再清除不存在的定额,保证顺序正确性
+        rationItems = chainToArr(rationItems);
+        //清除已被删除的定额
+        let removeIds = [];
+        _.remove(rationItems, function (item) {
+            if(!stdRationIndex[item.rationID]){
+                removeIds.push(item.ID);
+                return true;
+            }
+            return false;
+        });
+        _.remove(items, function (item) {
+           return removeIds.includes(item.ID);
+        });
+        await billsGuideItemsModel.remove({ID: {$in: removeIds}});
+        //重组树结构
+        let bulkArr = [];
+        for(let i = 0, len = rationItems.length; i < len; i++){
+            rationItems[i].NextSiblingID = rationItems[i + 1] ? rationItems[i + 1].ID : -1;
+            bulkArr.push({updateOne: {filter: {ID: rationItems[i].ID}, update: {$set: {NextSiblingID: rationItems[i].NextSiblingID}}}});
+        }
+        await billsGuideItemsModel.bulkWrite(bulkArr);
+    }
+    return items;
+}

+ 20 - 0
modules/std_billsGuidance_lib/routes/routes.js

@@ -0,0 +1,20 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Zhong
+ * @date 2018/5/29
+ * @version
+ */
+import express from 'express';
+import BillsGuideLibController from '../controllers/libController';
+const router = express.Router();
+const billsGuideLibController = new BillsGuideLibController();
+
+module.exports = function (app) {
+  router.post('/getLibWithBills', billsGuideLibController.getLibWithBills);
+  router.post('/getItemsByBills', billsGuideLibController.getItemsByBills);
+
+  app.use('/billsGuidance/api', router);
+};

+ 2 - 2
test/unit/reports/test_rpt_11_2.js

@@ -62,8 +62,8 @@ test('测试 - 测试模板啦: ', function (t) {
                 try {
                     // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject_建筑11-2表.jsp");
                     let tplData = rptDataUtil.assembleData(rawDataObj);
-                    fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_建筑11-2表.jsp");
-                    // fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_建筑11-2表.jsp");
+                    // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_建筑11-2表.jsp");
+                    fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_建筑11-2表.jsp");
                     //it's time to build the report!!!
                     let printCom = JpcEx.createNew();
                     rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pagesize;

+ 107 - 0
test/unit/reports/test_rpt_test_template.js

@@ -0,0 +1,107 @@
+/**
+ * Created by Tony on 2018/6/12.
+ */
+
+let test = require('tape');
+import JpcEx from "../../../modules/reports/rpt_component/jpc_ex";
+import JV from "../../../modules/reports/rpt_component/jpc_value_define";
+let config = require("../../../config/config.js");
+config.setupDb(process.env.NODE_ENV);
+let mongoose = require("mongoose");
+let fileUtils = require("../../../modules/common/fileUtils");
+let path = require('path');
+let dbm = require("../../../config/db/db_manager");
+let rpt_cfg = require('./rpt_cfg');
+dbm.connect(process.env.NODE_ENV);
+
+//统一引用models
+fileUtils.getGlobbedFiles('../../../modules/all_models/*.js').forEach(function(modelPath) {
+    require(path.resolve(modelPath));
+});
+
+//config.setupCache();
+let cfgCacheUtil = require("../../../config/cacheCfg");
+cfgCacheUtil.setupDftCache();
+
+let fsUtil = require("../../../public/fsUtil");
+
+let demoPrjId = - 1;
+let demoRptId = 275, pagesize = "A4"; //11-2表(新)
+
+// let userId_Leng = "59cdf14a0034a1000ba52b97"; //小冷User Id 换成_id了 QQ号
+let userId_Leng = "5acac1e885bf55000bd055ba"; //小冷User Id2
+// demoPrjId = 720; //QA: DW3
+//demoPrjId = 1626; //QA:
+demoPrjId = 2260; //QA:
+//*/
+let userId_Dft = userId_Leng;
+/*/
+ let userId_Dft = "595328da1934dc327cad08eb";
+ //*/
+
+let rptTplFacade = require("../../../modules/reports/facade/rpt_template_facade");
+let rptTplDataFacade = require("../../../modules/reports/facade/rpt_tpl_data_facade");
+
+import rptDataExtractor from "../../../modules/reports/util/rpt_construct_data_util";
+
+let fs = require('fs');
+//设置Date Format函数
+fs.readFile(__dirname.slice(0, __dirname.length - 18) + '/public/web/date_util.js', 'utf8', 'r', function (err, data) {
+    eval(data);
+});
+
+test('测试 - 测试模板啦: ', function (t) {
+    rptTplFacade.getRptTemplate(demoRptId).then(function(rptTpl) {
+        let rptDataUtil = new rptDataExtractor();
+        rptDataUtil.initialize(rptTpl._doc);
+        let filter = rptDataUtil.getDataRequestFilter();
+        console.log(filter);
+        //正常应该根据报表模板定义的数据类型来请求数据
+        rptTplDataFacade.prepareProjectData(userId_Dft, demoPrjId, filter, function (err, msg, rawDataObj) {
+            if (!err) {
+                try {
+                    // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataObject_测试模板.jsp");
+                    let tplData = rptDataUtil.assembleData(rawDataObj);
+                    // fsUtil.writeObjToFile(rawDataObj, "D:/GitHome/ConstructionCost/tmp/rptTplRawDataAfterCacl_测试模板.jsp");
+                    // fsUtil.writeObjToFile(tplData, "D:/GitHome/ConstructionCost/tmp/rptTplAssembledData_测试模板.jsp");
+                    //it's time to build the report!!!
+                    let printCom = JpcEx.createNew();
+                    rptTpl[JV.NODE_MAIN_INFO][JV.NODE_PAGE_INFO][JV.PROP_PAGE_SIZE] = pagesize;
+                    let defProperties = rpt_cfg;
+                    let dftOption = JV.PAGING_OPTION_NORMAL;
+                    printCom.initialize(rptTpl);
+                    printCom.analyzeData(rptTpl, tplData, defProperties, dftOption);
+                    let maxPages = printCom.totalPages;
+                    let pageRst = printCom.outputAsSimpleJSONPageArray(rptTpl, tplData, 1, maxPages, defProperties);
+                    if (pageRst) {
+                        // fsUtil.writeObjToFile(pageRst, "D:/GitHome/ConstructionCost/tmp/testBuiltPageResult_测试模板.jsp");
+                    } else {
+                        console.log("oh! no pages were created!");
+                    }
+                } catch (ex) {
+                    console.log(ex);
+                    t.pass('pass with exception!');
+                    t.end();
+                }
+
+                t.pass('pass succeeded!');
+                t.end();
+            } else {
+                console.log(msg);
+                t.pass('pass with error!');
+                t.end();
+            }
+        })
+    });
+});
+
+test('close the connection', function (t) {
+    setTimeout(function () {
+        mongoose.disconnect();
+        t.pass('closing db connection');
+        t.end();
+    }, 1000);
+    // mongoose.disconnect();
+    // t.pass('closing db connection');
+    // t.end();
+});

+ 8 - 5
web/building_saas/complementary_ration_lib/js/main.js

@@ -16,11 +16,14 @@ let compleRationMain = {
                     );
                     var newHref = "/complementaryRation/ration?repository="+id;
                     $("#tempId td:first a").click(function () {
-                        let newHref = "/complementaryRation/ration?repository="+id;
-                        let newTab = window.open('about:blank');
-                        CommonAjax.get(newHref, [], function () {
-                            newTab.location.href = newHref;
-                        });
+                        $('#comple-ration').modal('hide');
+                        setTimeout(function () {
+                            let newHref = "/complementaryRation/ration?repository="+id;
+                            let newTab = window.open('about:blank');
+                            CommonAjax.get(newHref, [], function () {
+                                newTab.location.href = newHref;
+                            });
+                        }, 200);
                     });
                     $("#tempId").attr("id", id);
                 }

+ 3 - 0
web/building_saas/js/global.js

@@ -7,10 +7,13 @@ function autoFlashHeight(){
     // var feeRateToolsbarHeight = $(".toolsbar_feeRate").height();
     let toolsBarHeightQ = $(".tools-bar-height-q").height();
     let toolsBarHeightD = $(".tools-bar-height-d").height();
+    let toolsBarHeightZ = $(".tools-bar-height-z").height();
     //$(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-302);
     $(".main-data-side-q").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightQ-$('#qd').find('.bottom-content').find('.p-0').height()-5);
     //$(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-302);
     $(".main-data-side-d").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightD-$('#stdSectionRations').height()-5);
+    $(".main-data-side-zb").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightZ);
+    $(".main-data-side-zi").height($(window).height()-headerHeight-toolsbarHeight-toolsBarHeightZ);
     $('.main-content').width($(window).width()-$('.main-nav').width()-$('.main-side').width()-5);
     $('#glj_tree_div .modal-content').width($(window).width() < 1020 + 20 ? $(window).width() - 20 : 1020);
     //$("#main .main-data-top").height($(window).height()-headerHeight-toolsbarHeight-bottomContentHeight-1);

+ 14 - 14
web/building_saas/main/html/main.html

@@ -86,9 +86,6 @@
                       <a href="javascript:void(0)" class="btn btn-sm" name="lockBills"  title="锁定清单"> <i class="fa fa-lock" aria-hidden="true"></i> 锁定清单</a>
                       <% } %>
                   </div>
-                  <div class="tools-btn">
-                      <a href="javacript:void(0);" data-toggle="modal" data-target="#column" class="btn btn-sm"><i class="fa fa-table" aria-hidden="true"></i> 列设置</a>
-                  </div>
                   <div class="side-tabs">
                       <ul class="nav nav-tabs" role="tablist">
                           <li class="nav-item">
@@ -263,17 +260,15 @@
                                                   <button class="btn btn-secondary btn-sm" type="button"><i class="fa fa-search" aria-hidden="true"></i></button>
                                               </span>
                                           </div>
-                                          <button class="btn btn-primary btn-sm mx-3" type="button">插入定额</button>
-                                          <button class="btn btn-primary btn-sm mx-3" type="button">插入清单</button>
+                                          <button id="guidanceInsertRation" class="btn btn-primary btn-sm mx-3" type="button">插入定额</button>
+                                          <button id="guidanceInsertBills" class="btn btn-primary btn-sm mx-3" type="button">插入清单</button>
                                       </div>
                                   </div>
-                                  <div class="main-data-side-z">
-                                      <table class="table table-bordered">
-                                          <tr>
-                                              <th></th><th>项目指引</th><th>选择</th>
-                                          </tr>
-                                          </tr>
-                                      </table>
+                                  <div class="row" style="margin-left: 1px;">
+                                      <div id="billsGuidance_bills" class="main-data-side-zb" style="width: 49%; float: left; margin: 0; padding: 0;">
+                                      </div>
+                                      <div id="billsGuidance_items" class="main-data-side-zi" style="width: 50%; float: left; margin: 0; padding: 0;">
+                                      </div>
                                   </div>
                               </div>
                               <!--清单规则-->
@@ -584,6 +579,8 @@
                                                 </label>
                                             </div>
                                         </fieldset>
+                                        <div id="col_setting_spread" style="height:300px;overflow:hidden">
+                                        </div>
                                     </div>
                                 </div>
                             </div>
@@ -662,7 +659,7 @@
         </div>
     </div>    
     <!--弹出列设置-->
-    <div class="modal fade" id="column" data-backdrop="static">
+  <!--  <div class="modal fade" id="column" data-backdrop="static">
         <div class="modal-dialog modal-lg" role="document" style="width: 350px;">
             <div class="modal-content">
                 <div class="modal-header">
@@ -678,7 +675,7 @@
                 </div>
             </div>
         </div>
-    </div>
+    </div>-->
     <!--工料机选择窗口-->
     <div class="modal fade" id="glj_tree_div" data-backdrop="static">
         <div class="modal-dialog modal-lg" role="document" id="modalCon">
@@ -1260,6 +1257,7 @@
         <script type="text/javascript" src="/web/building_saas/main/js/controllers/project_controller.js"></script>
         <script type="text/javascript" src="/web/building_saas/main/js/controllers/block_controller.js"></script>
         <script type="text/javascript" src="/web/building_saas/main/js/views/side_tools.js"></script>
+        <script type="text/javascript" src="/web/building_saas/main/js/views/std_billsGuidance_lib.js"></script>
         <script type="text/javascript" src="/web/building_saas/main/js/views/std_bills_lib.js"></script>
         <script type="text/javascript" src="/web/building_saas/main/js/views/std_ration_lib.js"></script>
         <script type="text/javascript" src="/web/building_saas/main/js/models/quantity_detail.js"></script>
@@ -1348,6 +1346,8 @@
 
 
             $(document).ready(function(){
+                console.log(1 - 1);
+                console.log(1 - 1);
                 //createTree();
               /*  document.onkeydown=keydown;
                 function keydown(e){

+ 6 - 3
web/building_saas/main/js/views/calc_base_view.js

@@ -255,10 +255,13 @@ let calcBaseView = {
     //输入窗口控制
     inputControl: function () {
         let me = calcBaseView;
-        me.inputExpr.keydown(function (e) {
-            if(!me.arithmeticLegal(me.inputExpr.val() + e.key)){
-                return false;
+        me.inputExpr.on('input',function () {
+            if(!me.arithmeticLegal(me.inputExpr.val())){
+                if(me.preInputExpr){
+                    me.inputExpr.val(me.preInputExpr);
+                }
             }
+            me.preInputExpr = me.inputExpr.val();
         });
     },
 

+ 53 - 15
web/building_saas/main/js/views/main_tree_col.js

@@ -399,29 +399,67 @@ let colSettingObj = {
     initSettingSpread: function () {
         this.settingSpread = SheetDataHelper.createNewSpread($('#col_setting_spread')[0], {sheetCount: 1});
         this.settingSpread.options.showScrollTip = GC.Spread.Sheets.ShowScrollTip.vertical;
+        this.settingSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, function (sender, args) {
+            if(args.sheet.isEditing()){
+                args.sheet.endEdit(true);
+            }
+        });
         this.loadSetting(this.settingSpread.getActiveSheet(), projectObj.project.projSetting.main_tree_col);
+    },
+    dataChanged: function () {
+        let sheet = this.settingSpread.getActiveSheet();
+        for(let row = 0; row < sheet.getRowCount(); row++){
+            let orgData = projectObj.project.projSetting.main_tree_col.cols[row].visible;
+            let newData = sheet.getValue(row, 0);
+            if(orgData != newData){
+                return true;
+            }
+        }
+        return false;
+    },
+    updateColSetting: function () {
+        let sheet = this.settingSpread.getActiveSheet();
+         let mainSheet = projectObj.mainSpread.getActiveSheet();
+         for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
+         projectObj.project.projSetting.main_tree_col.cols[iRow].visible = sheet.getValue(iRow, 0);
+         projectObj.project.projSetting.mainGridSetting.cols[iRow].visible = sheet.getValue(iRow, 0);
+         }
+         SheetDataHelper.massOperationSheet(mainSheet, function () {
+         SheetDataHelper.refreshColumnVisible(projectObj.project.projSetting.mainGridSetting, mainSheet);
+         //左右滚动条到最左边
+         mainSheet.showColumn(projectObj.project.projSetting.mainGridSetting.frozenCols, GC.Spread.Sheets.HorizontalPosition.left);
+         });
+         //refresh nodes to autoFitRow
+         projectObj.mainController.refreshTreeNode(projectObj.project.mainTree.roots, true);
+         projectObj.project.pushNow('editColSetting', projectObj.project.projSetting.moduleName, {
+         projectID: projectObj.project.ID(),
+         main_tree_col: projectObj.project.projSetting.main_tree_col
+         });
     }
 };
 
-$('#column').on('shown.bs.modal', function () {
+$('#poj-set').on('shown.bs.modal', function (e) {
     if (!colSettingObj.settingSpread) {
         colSettingObj.initSettingSpread();
     }
 });
 
-$('#column').on('hide.bs.modal', function () {
-    let sheet = colSettingObj.settingSpread.getActiveSheet();
-    for (let iRow = 0; iRow < sheet.getRowCount(); iRow++) {
-        projectObj.project.projSetting.main_tree_col.cols[iRow].visible = sheet.getValue(iRow, 0);
-        projectObj.project.projSetting.mainGridSetting.cols[iRow].visible = sheet.getValue(iRow, 0);
+$('#poj-set').on('hidden.bs.modal', function (e) {
+    if (colSettingObj.settingSpread) {
+        //恢复
+        let sheet = colSettingObj.settingSpread.getActiveSheet();
+        SheetDataHelper.massOperationSheet(sheet, function () {
+            for(let row = 0; row < sheet.getRowCount(); row++){
+                let orgData = projectObj.project.projSetting.main_tree_col.cols[row].visible;
+                sheet.setValue(row, 0, orgData);
+            }
+        });
+    }
+});
+
+
+$('#tab_display_setting').on('shown.bs.tab', function () {
+    if(colSettingObj.settingSpread){
+        colSettingObj.settingSpread.refresh();
     }
-    SheetDataHelper.massOperationSheet(projectObj.mainSpread.getActiveSheet(), function () {
-        SheetDataHelper.refreshColumnVisible(projectObj.project.projSetting.mainGridSetting, projectObj.mainSpread.getActiveSheet());
-    });
-    //refresh nodes to autoFitRow
-    projectObj.mainController.refreshTreeNode(projectObj.project.mainTree.roots, true);
-    projectObj.project.pushNow('editColSetting', projectObj.project.projSetting.moduleName, {
-        projectID: projectObj.project.ID(),
-        main_tree_col: projectObj.project.projSetting.main_tree_col
-    });
 });

+ 1 - 0
web/building_saas/main/js/views/project_info.js

@@ -31,6 +31,7 @@ var projectInfoObj = {
         CommonAjax.post('/pm/api/getProject', {"user_id": userID, "proj_id": scUrlUtil.GetQueryString('project')}, function (data) {
             if (data) {
                 that.projectInfo = data;
+                console.log(that.projectInfo);
                 //init decimal
                 setDecimal(decimalObj, data.property.decimal);
                 billsQuanDecimal.datas = data.property.billsQuantityDecimal || [billsDecimalView.angleDecimal];

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

@@ -1526,6 +1526,10 @@ $('#property_ok').click(function () {
     }
     // 呈现选项
     projDisplayView.updateChecking(properties);
+    //列设置(独立逻辑,只是通过项目属性确定按钮触发)
+    if(colSettingObj.dataChanged()){
+        colSettingObj.updateColSetting();
+    }
 
     if(calcOptions.updateChecking(properties)){
         reCalcRations = true;

+ 6 - 1
web/building_saas/main/js/views/side_tools.js

@@ -14,7 +14,11 @@ sideResizeEles.nav = null;
 slideResize(sideResizeEles, {min: 250, max: $('#zaojiashu').width()-260}, 'width', function(){
     projectObj.refreshMainSpread();
     refreshSubSpread();
-    if(sideResizeEles.id === 'stdRationTab'){
+    console.log(sideResizeEles.id);
+    if(sideResizeEles.id === 'stdBillsGuidanceTab'){
+        billsGuidance.refreshWorkBook();
+    }
+    else if(sideResizeEles.id === 'stdRationTab'){
         rationLibObj.refreshSpread();
     }
     else{
@@ -75,6 +79,7 @@ var sideToolsObj = {
             tabPanel.hide();
         }
         autoFlashHeight();
+        billsGuidance.refreshWorkBook();
         billsLibObj.refreshBillsSpread();
         refreshSubSpread();
         billsLibObj.refreshBillsRelaSpread();

+ 369 - 0
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -7,3 +7,372 @@
  * @date 2018/6/11
  * @version
  */
+
+const billsGuidance = (function () {
+
+    const libSel = $('#stdBillsGuidanceLibSelect');
+    const bills = {
+        dom: $('#billsGuidance_bills'),
+        workBook: null,
+        cache: [],
+        tree: null,
+        controller: null,
+        treeSetting: {
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [40],
+            defaultRowHeight: 21,
+            cols: [{
+                width: 200,
+                readOnly: true,
+                head: {
+                    titleNames: ["项目编码"],
+                    spanCols: [1],
+                    spanRows: [1],
+                    vAlign: [1],
+                    hAlign: [1],
+                    font: ["Arial"]
+                },
+                data: {
+                    field: "code",
+                    vAlign: 1,
+                    hAlign: 0,
+                    font: "Arial"
+                }
+            }, {
+                width: 200,
+                readOnly: true,
+                head: {
+                    titleNames: ["项目名称"],
+                    spanCols: [1],
+                    spanRows: [1],
+                    vAlign: [1],
+                    hAlign: [1],
+                    font: ["Arial"]
+                },
+                data: {
+                    field: "name",
+                    vAlign: 1,
+                    hAlign: 0,
+                    font: "Arial"
+                }
+            }]
+        },
+        headers: [
+            {name: '项目编码', dataCode: 'code', width: 200, vAlign: 'center', hAlign: 'left', formatter: '@'},
+            {name: '项目名称', dataCode: 'name', width: 200, vAlign: 'center', hAlign: 'left', formatter: '@'}
+        ],
+        events: {
+            SelectionChanging: function (sender, info) {
+                billsInitSel(info.newSelections[0].row);
+            }
+        }
+    };
+    //项目指引类型
+    const itemType = {
+        job: 0,
+        ration: 1
+    };
+    const guideItem = {
+        dom: $('#billsGuidance_items'),
+        workBook: null,
+        tree: null,
+        controller: null,
+        treeSetting: {
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [40],
+            defaultRowHeight: 21,
+            cols: [{
+                width: 300,
+                readOnly: false,
+                head: {
+                    titleNames: ["项目指引"],
+                    spanCols: [1],
+                    spanRows: [1],
+                    vAlign: [1],
+                    hAlign: [1],
+                    font: ["Arial"]
+                },
+                data: {
+                    field: "name",
+                    vAlign: 1,
+                    hAlign: 0,
+                    font: "Arial"
+                }
+            },
+            {
+                width: 50,
+                readOnly: false,
+                head: {
+                    titleNames: ["选择"],
+                    spanCols: [1],
+                    spanRows: [1],
+                    vAlign: [1],
+                    hAlign: [1],
+                    font: ["Arial"]
+                },
+                data: {
+                    field: "select",
+                    vAlign: 1,
+                    hAlign: 1,
+                    font: "Arial"
+                }
+            }
+            ]
+        },
+        headers: [
+            {name: '项目指引', dataCode: 'name', width: 300, vAlign: 'center', hAlign: 'left', formatter: '@'},
+            {name: '选择', dataCode: 'name', width: 50, vAlign: 'center', hAlign: 'center', formatter: '@'},
+        ],
+        events: {
+            EditStarting: function (sender, args) {
+                if(guideItem.headers[args.col]['dataCode'] === 'name'){
+                    args.cancel = true;
+                }
+            },
+            ButtonClicked: function (sender, args) {
+                if(args.sheet.isEditing()){
+                    args.sheet.endEdit(true);
+                }
+            },
+        }
+    };
+    const options = {
+        workBook: {
+            tabStripVisible:  false,
+            allowContextMenu: false,
+            allowCopyPasteExcelStyle : false,
+            allowExtendPasteRange: false,
+            allowUserDragDrop : false,
+            allowUserDragFill: false,
+            scrollbarMaxAlign : true
+        },
+        sheet: {
+            protectionOptions: {allowResizeRows: true, allowResizeColumns: true},
+            clipBoardOptions: GC.Spread.Sheets.ClipboardPasteOptions.values
+        }
+    };
+    //渲染时方法,停止渲染
+    //@param {Object}sheet {Function}func @return {void}
+    function renderSheetFunc(sheet, func){
+        sheet.suspendEvent();
+        sheet.suspendPaint();
+        if(func){
+            func();
+        }
+        sheet.resumeEvent();
+        sheet.resumePaint();
+    }
+    //设置表选项
+    //@param {Object}workBook {Object}opts @return {void}
+    function setOptions (workBook, opts) {
+        for(let opt in opts.workBook){
+            workBook.options[opt] = opts.workBook[opt];
+        }
+        for(let opt in opts.sheet){
+            workBook.getActiveSheet().options[opt] = opts.sheet[opt];
+        }
+    }
+    //建表头
+    //@param {Object}sheet {Array}headers @return {void}
+    function buildHeader(sheet, headers) {
+        let fuc = function () {
+            sheet.setColumnCount(headers.length);
+            sheet.setRowHeight(0, 40, GC.Spread.Sheets.SheetArea.colHeader);
+            for(let i = 0, len = headers.length; i < len; i++){
+                sheet.setValue(0, i, headers[i].name, GC.Spread.Sheets.SheetArea.colHeader);
+                sheet.setColumnWidth(i, headers[i].width, GC.Spread.Sheets.SheetArea.colHeader);
+                if(headers[i].formatter){
+                    sheet.setFormatter(-1, i, headers[i].formatter);
+                }
+                sheet.getRange(-1, i, -1, 1).hAlign(GC.Spread.Sheets.HorizontalAlign[headers[i]['hAlign']]);
+                sheet.getRange(-1, i, -1, 1).vAlign(GC.Spread.Sheets.VerticalAlign[headers[i]['vAlign']]);
+            }
+        };
+        renderSheetFunc(sheet, fuc);
+    }
+    //表监听事件
+    //@param {Object}workBook @return {void}
+    function bindEvent(workBook, events) {
+        if(Object.keys(events).length === 0){
+            return;
+        }
+        const Events = GC.Spread.Sheets.Events;
+        let sheet = workBook.getActiveSheet();
+        for(let event in events){
+            workBook.bind(Events[event], events[event]);
+        }
+    }
+    //建表
+    //@param {Object}module @return {void}
+    function buildSheet(module) {
+        if(!module.workBook){
+            module.workBook = new GC.Spread.Sheets.Workbook(module.dom[0], {sheetCount: 1});
+            let sheet = module.workBook.getActiveSheet();
+            if(module === bills){
+                //默认初始可控制焦点在清单表中
+                module.workBook.focus();
+                sheet.options.isProtected = true;
+            }
+            if(module === guideItem){
+                sheet.options.isProtected = true;
+                sheet.getRange(-1, 1, -1, 1).locked(false);
+                sheet.getRange(-1, 0, -1, 1).locked(true);
+            }
+            setOptions(module.workBook, options);
+            buildHeader(module.workBook.getActiveSheet(), module.headers);
+            bindEvent(module.workBook, module.events);
+        }
+    }
+    //清空表数据
+    //@param {Object}sheet {Array}headers {Number}rowCount @return {void}
+    function cleanData(sheet, headers, rowCount){
+        renderSheetFunc(sheet, function () {
+            sheet.clear(-1, 0, -1, headers.length, GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.StorageType.data);
+            if (rowCount > 0) {
+                sheet.setRowCount(rowCount);
+            }
+        });
+    }
+    //初始化各工作表
+    //@param {Array}modules @return {void}
+    function initWorkBooks(modules){
+        for(let module of modules){
+            buildSheet(module);
+        }
+    }
+    //初始化并输出树
+    //@param {Object}module {Object}sheet {Object}treeSetting {Array}datas
+    function initTree(module, sheet, treeSetting, datas){
+        module.tree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1, autoUpdate: true});
+        module.controller = TREE_SHEET_CONTROLLER.createNew(module.tree, sheet, treeSetting);
+        module.tree.loadDatas(datas);
+        module.controller.showTreeData();
+    }
+    //项目指引表焦点控制
+    //@param {Number}row @return {void}
+    function guideItemInitSel(row){
+        let billsNode = bills.tree.selected;
+        let node = null;
+        if(billsNode && billsNode.guidance.tree){
+            node = billsNode.guidance.tree.items[row];
+            if(node){
+                billsNode.guidance.tree.selected = node;
+            }
+        }
+
+
+    }
+    //根据项目指引的类型设置单元格类型,定额类型的项目指引为复选框
+    //@param {Array}nodes @return {void}
+    function setItemCellType(nodes){
+        //设置单元格类型
+        const base = new GC.Spread.Sheets.CellTypes.Base();
+        const checkBox = new GC.Spread.Sheets.CellTypes.CheckBox();
+        const sheet = guideItem.workBook.getActiveSheet();
+        renderSheetFunc(sheet, function(){
+            for(let node of nodes){
+                sheet.setCellType(node.serialNo(), 1, node.data.type === itemType.ration ?  checkBox : base);
+            }
+        });
+    }
+    //清单表焦点控制
+    //@param {Number}row @return {void}
+    function billsInitSel(row){
+        let guideSheet = guideItem.workBook.getActiveSheet();
+        cleanData(guideSheet, guideItem.headers, -1);
+        let node = bills.tree.items[row];
+        if(!node){
+            return;
+        }
+        bills.tree.selected = node;
+        if(!node.guidance.tree){
+            CommonAjax.post('/billsGuidance/api/getItemsByBills', {guidanceLibID: libSel.val(), billsID: node.getID()}, function (rstData) {
+                initTree(node.guidance, guideSheet, guideItem.treeSetting, rstData);
+                setItemCellType(node.guidance.tree.items);
+                //项目指引初始焦点
+                guideItemInitSel(guideSheet.getActiveRowIndex() ? guideSheet.getActiveRowIndex() : 0);
+            });
+        }
+        else{
+            node.guidance.controller.showTreeData();
+            setItemCellType(node.guidance.tree.items);
+            //项目指引初始焦点
+            guideItemInitSel(guideSheet.getActiveRowIndex() ? guideSheet.getActiveRowIndex() : 0);
+        }
+    }
+    //初始选择清单指引库
+    //@param {Number}libID @return {void}
+    function libInitSel(libID){
+        //获取清单
+        CommonAjax.post('/billsGuidance/api/getLibWithBills', {libID: libID}, function(rstData){
+            initTree(bills, bills.workBook.getActiveSheet(), bills.treeSetting, rstData.bills);
+            //每一棵项目指引树挂在清单节点上
+            for(let node of bills.tree.items){
+                node.guidance = {tree: null, controller: null};
+            }
+            //默认初始节点
+            billsInitSel(0);
+        });
+    }
+    //初始化清单指引库
+    //@param {Array}libDats @return {void}
+    function initLibs(libDatas){
+        libSel.empty();
+        for(let libData of libDatas){
+            let opt = `<option value="${libData.id}">${libData.name}</option>`;
+            libSel.append(opt);
+        }
+        //初始默认选择
+        libInitSel(libSel.select().val());
+    }
+    //初始化视图
+    //@param {void} @return {void}
+    function initViews(){
+        let modules = [bills, guideItem];
+        initWorkBooks(modules);
+
+    }
+    //各按钮监听事件
+    //@return {void}
+    function bindBtn(){
+        //打开清单指引库
+        $('#stdBillsGuidanceTab').click(function () {
+            if(libSel.children().length === 0){
+                initLibs(projectInfoObj.projectInfo.engineeringInfo.billsGuidance_lib);
+            }
+        });
+        //更改清单指引库
+        $('#stdBillsGuidanceLibSelect').change(function () {
+            libInitSel($(this).select().val());
+        });
+        //插入定额
+        $('#guidanceInsertRation').click(function () {
+
+        });
+        //插入清单
+        $('#guidanceInsertBills').click(function () {
+
+        });
+    }
+    //刷新表
+    //@return {void}
+    function refreshWorkBook(){
+        if(bills.workBook){
+            bills.workBook.refresh();
+        }
+        if(guideItem.workBook){
+            guideItem.workBook.refresh();
+        }
+    }
+
+    return {initViews, bindBtn, refreshWorkBook};
+})();
+
+$(document).ready(function(){
+    billsGuidance.initViews();
+    billsGuidance.bindBtn();
+});

+ 27 - 27
web/building_saas/pm/html/project-management.html

@@ -274,9 +274,9 @@
             <div class="modal-body">
                 <form>
                     <div>
-                        <label>建设项目</label>
                         <div class="input-group">
-                            <input type="text" class="form-control" placeholder="输入建设项目名称" id="poj-name" autocomplete="off">
+                            <label style="margin-top: 8px;">建设项目</label>
+                            <input style="margin-left: 5px; border-radius: .25rem;" type="text" class="form-control" placeholder="输入建设项目名称" id="poj-name" autocomplete="off">
                               <span class="input-group-btn">
                                 <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown"></button>
                                 <div class="dropdown-menu dropdown-menu-right" style="width:468px" id="poj-name-list">
@@ -286,12 +286,12 @@
                                 </div>
                               </span>
                         </div>
-                        <span class="form-text text-info" id="poj-name-info" style="display: none;">新建 “汽车生产车间5”</span>
                     </div>
-                    <div>
-                        <label>单项工程</label>
+                    <span class="form-text text-info" id="poj-name-info" style="display: none;">新建 “汽车生产车间5”</span>
+                    <div style="margin-top: 15px;">
                         <div class="input-group">
-                            <input type="text" class="form-control" placeholder="输入单项工程名称" id="eng-name" autocomplete="off">
+                            <label style="margin-top: 8px;">单项工程</label>
+                            <input style="margin-left: 5px; border-radius: .25rem;" type="text" class="form-control" placeholder="输入单项工程名称" id="eng-name" autocomplete="off">
                               <span class="input-group-btn">
                                 <button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown"></button>
                                 <div class="dropdown-menu dropdown-menu-right" style="width:468px" id="eng-name-list">
@@ -299,25 +299,25 @@
                                     <button class="dropdown-item" type="button">左4号生产车间</button>
                                 </div>                              </span>
                         </div>
-                        <span class="form-text text-info" id="eng-name-info" style="display: none;">新建 “左2号生产车间2”</span>
                     </div>
+                    <span class="form-text text-info" id="eng-name-info" style="display: none;">新建 “左2号生产车间2”</span>
 
-                    <div>
-                        <label>单位工程</label>
-                        <input type="text" class="form-control" placeholder="输入单位工程名称" id="tender-name" autocomplete="off">
-                        <span class="form-text text-danger" id="tender-name-info" style="display: none;">已存在 “建筑工程1”</span>
+                    <div style="margin-top: 15px;" class="input-group">
+                        <label style="margin-top: 8px;">单位工程</label>
+                        <input style="margin-left: 5px; border-radius: .25rem;" type="text" class="form-control" placeholder="输入单位工程名称" id="tender-name" autocomplete="off">
                     </div>
-                    <div>
-                        <label>单价文件</label>
-                        <select class="form-control" id="unit-price"><option value="">新建单价文件</option></select>
+                    <span class="form-text text-danger" id="tender-name-info" style="display: none;">已存在 “建筑工程1”</span>
+                    <div style="margin-top: 15px;" class="input-group">
+                        <label style="margin-top: 8px;">单价文件</label>
+                        <select style="margin-left: 5px; border-radius: .25rem;" class="form-control" id="unit-price"><option value="">新建单价文件</option></select>
                     </div>
-                    <div>
-                        <label>费率文件</label>
-                        <select class="form-control" id="tender-fee-rate"><option value="">新建费率文件</option></select>
+                    <div style="margin-top: 15px;" class="input-group">
+                        <label style="margin-top: 8px;">费率文件</label>
+                        <select style="margin-left: 5px; border-radius: .25rem;" class="form-control" id="tender-fee-rate"><option value="">新建费率文件</option></select>
                     </div>
-                    <div>
+                    <div style="margin-top: 15px;" class="input-group">
                         <label>计价方式</label>
-                        <div class="row">
+                        <div style="margin-left: 5px; border-radius: .25rem;"  class="row">
                             <label class="custom-control custom-radio" style="margin-left: 20px;">
                                 <input name="valuation_type" id="radioBill" value="bill" type="radio" class="custom-control-input">
                                 <label class="custom-control-label" for="radioBill">清单计价</label>
@@ -328,16 +328,16 @@
                             </label>-->
                         </div>
                     </div>
-                    <div>
-                        <label>计价规则</label>
-                        <select class="form-control" id="valuation"><option value="">请选择计价规则</option></select>
-                        <span class="form-text text-danger" id="valuation-info" style="display: none;">请选择计价规则</span>
+                    <div style="margin-top: 15px;" class="input-group">
+                        <label style="margin-top: 8px;">计价规则</label>
+                        <select style="margin-left: 5px; border-radius: .25rem;" class="form-control" id="valuation"><option value="">请选择计价规则</option></select>
                     </div>
-                    <div>
-                        <label>工程专业</label>
-                        <select class="form-control" id="tender-engineering"><option value="">请选择对应的工程专业</option></select>
-                        <span class="form-text text-danger" id="engineering-info" style="display: none;">请选择工程专业</span>
+                    <span class="form-text text-danger" id="valuation-info" style="display: none;">请选择计价规则</span>
+                    <div style="margin-top: 15px;" class="input-group">
+                        <label style="margin-top: 8px;">工程专业</label>
+                        <select style="margin-left: 5px; border-radius: .25rem;" class="form-control" id="tender-engineering"><option value="">请选择对应的工程专业</option></select>
                     </div>
+                    <span class="form-text text-danger" id="engineering-info" style="display: none;">请选择工程专业</span>
                 </form>
             </div>
             <div class="modal-footer">

+ 2 - 2
web/building_saas/pm/js/pm_gc.js

@@ -633,10 +633,10 @@ function v_getMoBody(type, oprNode, nodes){
             html += ('</p>');
         }
 
-        html += ('<p>点“确定”按钮,确认从回收站中恢复</p>');
+        html += ('<p>点“确定”按钮,确认从回收站中恢复</p>');
     }
     else{
-        html += ('<p>点“确定”按钮,确认彻底删除数据</p>');
+        html += ('<p>点“确定”按钮,确认彻底删除数据</p>');
     }
     return html;
 }

+ 2 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -1715,6 +1715,7 @@ function setProjOptions(projs, selected){
                 $("#poj-name").val(projs[i].data.name);
                 setFileOptions(projs[i].data.ID);
                 setEngOptions(projs[i].data.ID);
+                $('#poj-name-info').hide();
             });
             $("#poj-name-list").append(proj);
         }
@@ -1757,6 +1758,7 @@ function setEngOptions(projID){
                 eng.attr("type", "button");
                 eng.click(function () {
                     $("#eng-name").val(engineerings[i].data.name);
+                    $('#eng-name-info').hide();
                 });
                 $("#eng-name-list").append(eng);
             }