Explorar o código

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

TonyKang %!s(int64=7) %!d(string=hai) anos
pai
achega
d867d29b71
Modificáronse 42 ficheiros con 397 adicións e 138 borrados
  1. 1 1
      config/config.js
  2. 5 5
      config/menu.js
  3. 2 1
      modules/all_models/compilation.js
  4. 4 0
      modules/all_models/user.js
  5. 14 17
      modules/bills_lib/models/bills_lib_interfaces.js
  6. 1 1
      modules/common/helper/mongoose_helper.js
  7. 5 0
      modules/common/std/schemas/std_fee_rate_libs.js
  8. 2 2
      modules/common/std/std_fee_rate_libs_model.js
  9. 9 1
      modules/ration_repository/models/repository_map.js
  10. 0 11
      modules/std_billsGuidance_lib/controllers/libController.js
  11. 2 0
      modules/std_billsGuidance_lib/facade/facades.js
  12. 9 1
      modules/std_glj_lib/models/gljMapModel.js
  13. 1 1
      modules/users/controllers/compilation_controller.js
  14. 2 2
      modules/users/controllers/user_controller.js
  15. 8 6
      modules/users/models/compilation_model.js
  16. 3 3
      modules/users/models/engineering_lib_model.js
  17. 1 1
      modules/users/routes/user_route.js
  18. 2 1
      package.json
  19. 3 0
      public/web/common_ajax.js
  20. 51 15
      public/web/id_tree.js
  21. 16 0
      public/web/tree_sheet/tree_sheet_controller.js
  22. 2 2
      web/maintain/billsGuidance_lib/html/main.html
  23. 37 3
      web/maintain/bills_lib/html/main.html
  24. 8 0
      web/maintain/bills_lib/html/qingdan.html
  25. 0 27
      web/maintain/bills_lib/scripts/bills_lib_ajax.js
  26. 7 0
      web/maintain/bills_lib/scripts/db_controller.js
  27. 15 0
      web/maintain/ration_repository/js/main.js
  28. 4 4
      web/maintain/ration_repository/main.html
  29. 1 1
      web/maintain/std_glj_lib/html/gongliao.html
  30. 2 2
      web/maintain/std_glj_lib/html/main.html
  31. 12 0
      web/maintain/std_glj_lib/js/gljComponent.js
  32. 18 0
      web/maintain/std_glj_lib/js/main.js
  33. 5 5
      web/users/js/compilation.js
  34. 49 11
      web/users/js/template.js
  35. 1 1
      web/users/views/compilation/add.html
  36. 1 1
      web/users/views/compilation/common.html
  37. 1 1
      web/users/views/compilation/modal.html
  38. 1 1
      web/users/views/compilation/template.html
  39. 1 1
      web/users/views/layout/layout.html
  40. 37 3
      web/users/views/layout/page.html
  41. 45 5
      web/users/views/tool/index.html
  42. 9 1
      web/users/views/user/index.html

+ 1 - 1
config/config.js

@@ -29,5 +29,5 @@ module.exports = {
             return  'mongodb://' + me[env].server + ':' + me[env].port + '/usersManagesOpr';//'mongodb://' + config.current.server + ':' + config.current.port + '/usersManagesOpr'
         }
     },
-    pageSize: 30
+    pageSize: 2
 };

+ 5 - 5
config/menu.js

@@ -19,14 +19,14 @@ let menuData = {
         iconClass: 'glyphicon glyphicon-user',
         children: {
             'index' : {
-                title: '最近注册',
+                title: '普通用户',
                 url: '/user',
                 name: 'index',
             },
             'last-login' : {
-                title: '最近登录',
-                url: '/user/last-login',
-                name: 'last-login',
+                title: '测试用户',
+                url: '/user/test-user',
+                name: 'test-user',
             }
         }
     },
@@ -37,7 +37,7 @@ let menuData = {
         iconClass: 'glyphicon glyphicon-bell',
     },
     'version': {
-        title: '编办管理',
+        title: '费用定额',
         url: '/compilation',
         name: 'compilation',
         iconClass: 'glyphicon glyphicon-tag'

+ 2 - 1
modules/all_models/compilation.js

@@ -20,6 +20,7 @@ let engineeringListSchema = new Schema({
     }
 }, {_id: false});
 let childrenSchema = new Schema({
+    id:String,
     // 计价名称
     name: String,
     // 工程专业列表
@@ -36,7 +37,7 @@ let childrenSchema = new Schema({
     type: {
         type: Number
     }
-});
+},{_id: false});
 let modelSchema = {
     // 是否发布
     is_release: {

+ 4 - 0
modules/all_models/user.js

@@ -43,6 +43,10 @@ let modelSchema = {
         type: Number,
         default: 0
     },
+    user_type:{
+        type:String,
+        default:'normal'//  normal : 普通用户,test:测试用户
+    }
 };
 mongoose.model(collectionName, new Schema(modelSchema, {versionKey: false, collection: collectionName}));
 

+ 14 - 17
modules/bills_lib/models/bills_lib_interfaces.js

@@ -9,6 +9,8 @@ let Bills = mongoose.model('std_bills_lib_bills');
 let JobContent = mongoose.model('std_bills_lib_jobContent');
 let ItemCharacter = mongoose.model('std_bills_lib_itemCharacter');
 let moment = require("moment");
+let billsGuidanceLib = mongoose.model('std_billsGuidance_lib');
+const engLibModel = mongoose.model('engineering_lib');
 let billsLibDao = function(){};
 
 
@@ -176,29 +178,24 @@ billsLibDao.prototype.deleteStdBillsLib = function(data, callback){
     });
 };
 
-billsLibDao.prototype.renameStdBillsLib = function(renameData, callback){
+billsLibDao.prototype.renameStdBillsLib = async function(renameData, callback){
     let billsLibId = renameData.id;
     let renameVal = renameData.value;
     let lastOperator = renameData.lastOperator;
     let lastOperateDate = moment(Date.now()).format('YYYY-MM-DD HH:mm:ss');
-    StdBillsLib.find({billsLibId: billsLibId}, function (err, result) {
-        if(err){
+    try{
+        let billsLib = await StdBillsLib.findOne({billsLibId: billsLibId});
+        if(billsLib){
+            let newRecentOpr = getNewOprArr(billsLib.recentOpr, lastOperator, lastOperateDate);
+            await StdBillsLib.update({billsLibId: billsLibId}, {$set:{billsLibName: renameVal, recentOpr: newRecentOpr}});
+            await billsGuidanceLib.update({billsLibId: billsLibId}, {$set: {billsLibName: renameVal}}, {multi: true});
+            await engLibModel.update({'bill_lib.id': billsLibId}, {$set: {'bill_lib.$.name': renameVal}}, {multi: true});
             callback(0, '');
         }
-        else{
-            if(result.length > 0){
-                let newRecentOpr = getNewOprArr(result[0].recentOpr, lastOperator, lastOperateDate);
-                StdBillsLib.update({billsLibId: billsLibId}, {$set:{billsLibName: renameVal, recentOpr: newRecentOpr}}, function(err){
-                    if(err){
-                        callback(1, "Error");
-                    }
-                    else{
-                        callback(0, "");
-                    }
-                });
-            }
-        }
-    })
+    }
+    catch (err){
+        callback(1, err);
+    }
 };
 
 billsLibDao.prototype.getStdBillsLibName = function(billsLibId, callback){

+ 1 - 1
modules/common/helper/mongoose_helper.js

@@ -55,7 +55,7 @@ class MongooseHelper {
         let self = this;
         let limit = 0;
         let skip = 0;
-        let sort = {};
+        let sort = {_id:1};
         if (option !== null && Object.keys(option).length > 0) {
             limit = option.pageSize !== undefined ? option.pageSize : limit;
             skip = option.offset !== undefined ? option.offset : skip;

+ 5 - 0
modules/common/std/schemas/std_fee_rate_libs.js

@@ -48,6 +48,11 @@ let modelSchema = {
     region: String,
     // 标准名称
     libName: String,
+    //编办ID
+    compilationId: {
+        type: String,
+        index: true
+    },
     // 费率数据
     rates: [ratesSchema]
 };

+ 2 - 2
modules/common/std/std_fee_rate_libs_model.js

@@ -26,10 +26,10 @@ class STDFeeRateLibsModel extends BaseModel {
      *
      * @return {Promise}
      */
-    async getFeeRateList() {
+    async getFeeRateList(compilationId) {
         let result = [];
         let field = {ID: 1, libName: 1};
-        let feeRateList = await this.findDataByCondition({ID: {$ne: ''}}, field, false);
+        let feeRateList = await this.findDataByCondition({compilationId:compilationId,ID: {$ne: ''}}, field, false);
 
         if (feeRateList === null) {
             return result;

+ 9 - 1
modules/ration_repository/models/repository_map.js

@@ -13,6 +13,7 @@ const rationItemModel = mongoose.model('std_ration_lib_ration_items');
 const rationCoeModel = mongoose.model('std_ration_lib_coe_list');
 const rationInstallFeeItem = mongoose.model('std_ration_lib_installation');
 const rationInstallSection = mongoose.model('std_ration_lib_installationSection');
+const engLibModel = mongoose.model('engineering_lib');
 
 function createNewLibModel(rationLibObj){
     var rst = {};
@@ -192,7 +193,14 @@ rationRepositoryDao.prototype.updateName = function(oprtor, renameObj, callback)
                     callback(err, '更新最近操作者失败!');
                 }
                 else{
-                    callback(null, '成功!');
+                    engLibModel.update({'ration_lib.id': renameObj.ID}, {$set: {'ration_lib.$.name': renameObj.newName}}, {multi: true}, function (err) {
+                        if(err){
+                            callback(err, '更新工程专业引用失败!');
+                        }
+                        else {
+                            callback(null, '成功!');
+                        }
+                    });
                 }
             });
         }

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

@@ -8,18 +8,7 @@
  * @version
  */
 import BaseController from '../../common/base/base_controller';
-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');
 const billsGuidanceFacade = require('../facade/facades');
 let callback = function (req, res, err, msg, data) {
     res.json({error: err, message: msg, data: data});

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

@@ -18,6 +18,7 @@ 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 engLibModel = mongoose.model('engineering_lib');
 const _ = require('lodash');
 
 module.exports = {
@@ -112,6 +113,7 @@ async function updateBillsGuideLib(data) {
     }
     else {
         await billsGuideLibModel.update(data.findData, {$set: data.updateData});
+        await engLibModel.update({'billsGuidance_lib.id': data.findData.ID}, {$set: {'billsGuidance_lib.$.name': data.updateData.name}}, {multi: true});
     }
 }
 

+ 9 - 1
modules/std_glj_lib/models/gljMapModel.js

@@ -7,6 +7,7 @@ const gljModel = mongoose.model('std_glj_lib_gljList');
 const gljClassModel = mongoose.model('std_glj_lib_gljClass');
 const gljClassTemplateModel = mongoose.model('std_glj_lib_gljClassTemplate');
 const rationRepository = mongoose.model('std_ration_lib_map');
+const engLibModel = mongoose.model('engineering_lib');
 import moment from "moment";
 import counter from "../../../public/counter/counter";
 import async from "async";
@@ -164,7 +165,14 @@ class GljMapDao extends OprDao{
                         callback(err, '更新最近操作者失败!');
                     }
                     else{
-                        callback(null, '成功!');
+                        engLibModel.update({'glj_lib.id': renameObj.ID}, {$set: {'glj_lib.$.name': renameObj.newName}}, {multi: true}, function (err) {
+                            if(err){
+                                callback(err, '更新工程专业引用失败!');
+                            }
+                            else {
+                                callback(null, '成功!');
+                            }
+                        });
                     }
                 });
             }

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

@@ -208,7 +208,7 @@ class CompilationController extends BaseController {
 
             // 获取费率标准库
             let stdFeeRateLibsModel = new STDFeeRateLibsModel();
-            feeRateList = await stdFeeRateLibsModel.getFeeRateList();
+            feeRateList = await stdFeeRateLibsModel.getFeeRateList(selectedCompilation._id);
 
             // 获取人工系数标准库
             let stdLabourCoesModel = new STDLabourCoesModel();

+ 2 - 2
modules/users/controllers/user_controller.js

@@ -18,7 +18,7 @@ class UserController extends BaseController {
      * @param {object} response
      * @return {void}
      */
-    async lastRegister(request, response) {
+    async normalUsers(request, response) {//取普通用户
         let userModel = new UserModel();
         let total = 0;
         let pageData = {};
@@ -40,7 +40,7 @@ class UserController extends BaseController {
             let page = request.query.page === undefined ? 1 : request.query.page;
             pageData = {
                 current: page,
-                total: parseInt(total / Config.pageSize),
+                total: Math.ceil(total / Config.pageSize),
                 queryData: response.locals.urlQuery
             };
 

+ 8 - 6
modules/users/models/compilation_model.js

@@ -35,8 +35,8 @@ class CompilationModel extends BaseModel {
      */
     async getCompilationList() {
         // 筛选字段
-        let field = {_id: 1, name: 1, is_release: 1, description: 1, "ration_valuation._id": 1, "ration_valuation.name": 1, "ration_valuation.enable": 1,
-            "bill_valuation._id": 1, "bill_valuation.name": 1, "bill_valuation.enable": 1};
+        let field = {_id: 1, name: 1, is_release: 1, description: 1, "ration_valuation.id": 1, "ration_valuation.name": 1, "ration_valuation.enable": 1,
+            "bill_valuation.id": 1, "bill_valuation.name": 1, "bill_valuation.enable": 1};
         let compilationData = await this.findDataByCondition({name: {$ne: ''}}, field, false);
 
         return compilationData === null ? [] : compilationData;
@@ -113,8 +113,10 @@ class CompilationModel extends BaseModel {
         }
 
         let insertData = {};
+        data.id = "12580";
         insertData[section + '_valuation'] = data;
         let result = await this.db.addToSet(condition, insertData);
+        console.log(result);
 
         return result.ok === undefined ? false : result.ok;
     }
@@ -205,7 +207,7 @@ class CompilationModel extends BaseModel {
         let sectionString = section + '_valuation';
 
         for(let valuation of compilationData[sectionString]) {
-            if (valuation._id.toString() === id) {
+            if (valuation.id.toString() === id) {
                 result = valuation;
                 break;
             }
@@ -292,7 +294,7 @@ class CompilationModel extends BaseModel {
     async getEngineeringLib(valuationId, section, engineering) {
         let sectionString = section + "_valuation";
         let condition = {};
-        condition[sectionString + "._id"] = valuationId;
+        condition[sectionString + ".id"] = valuationId;
 
         let compilationData = await this.findDataByCondition(condition);
         if (compilationData === null) {
@@ -300,7 +302,7 @@ class CompilationModel extends BaseModel {
         }
         let valuationData = null;
         for(let valuation of compilationData[sectionString]) {
-            if(valuation._id.toString() === valuationId) {
+            if(valuation.id === valuationId) {
                 valuationData = valuation;
             }
         }
@@ -333,7 +335,7 @@ class CompilationModel extends BaseModel {
     async addEngineeringLib(valuationId, section, data) {
         let sectionString = section + "_valuation";
         let condition = {};
-        condition[sectionString + "._id"] = valuationId;
+        condition[sectionString + ".id"] = valuationId;
 
         let insertData = {};
         insertData[sectionString + ".$.engineering_list"] = data;

+ 3 - 3
modules/users/models/engineering_lib_model.js

@@ -77,10 +77,10 @@ class EngineeringLibModel extends BaseModel {
             // 查找计价规则表中是否有对应工程专业标准库的数据
             let compilationModel = new CompilationModel();
             let engineeringLib = await compilationModel.getEngineeringLib(valuationId, data.section, data.engineering);
-
             if (engineeringLib === null) {
                 // 不存在则插入
                 result = await this.db.create(data);
+                console.log(data);
             } else {
                 delete data.id;
                 delete data.section;
@@ -174,8 +174,8 @@ class EngineeringLibModel extends BaseModel {
     _validLib(libData) {
         let result = [];
         // 判断标准库
-        if (libData === undefined || libData === '') {
-            throw '标准库不能为空';
+        if (libData === undefined || libData ===null ||libData === '') {
+            return result;//throw '标准库不能为空'; 按新需求,标准库等不做非空判断
         }
         libData = libData instanceof Array ? libData : [libData];
         for(let tmp in libData) {

+ 1 - 1
modules/users/routes/user_route.js

@@ -13,7 +13,7 @@ const userController = new UserController();
 
 module.exports =function (app) {
     // action定义区域
-    router.get('/', userController.auth, userController.init, userController.lastRegister);
+    router.get('/', userController.auth, userController.init, userController.normalUsers);
     router.get('/search', userController.auth, userController.init, userController.search);
 
     app.use("/user", router);

+ 2 - 1
package.json

@@ -19,7 +19,8 @@
     "moment": "^2.18.1",
     "mongoose": "~4.13.12",
     "request": "^2.79.0",
-    "tape": "^4.6.3"
+    "tape": "^4.6.3",
+    "uuid": "^3.1.0"
   },
   "dependencies": {
     "babel-core": "^6.26.0",

+ 3 - 0
public/web/common_ajax.js

@@ -29,6 +29,9 @@ function getTopWindow() {
 }
 
 var CommonAjax = {
+    get:function (url,data,cb,dataType) {
+        $.get(url,data,cb,dataType)
+    },
     post: function (url, data, successCallback, errorCallback) {
         $.ajax({
             type:"POST",

+ 51 - 15
public/web/id_tree.js

@@ -579,30 +579,35 @@ var idTree = {
 
         Tree.prototype.delete = function (node) {
             var success = false, that = this;
-            var deleteIdIndex = function (nodes) {
+            if(node) success = that.m_delete([node]);
+            return success;
+        };
+        Tree.prototype.m_delete = function (nodes) {
+            let success = false, that = this;
+            let deleteIdIndex = function (nodes) {
                 nodes.forEach(function (node) {
                     delete that.nodes[that.prefix + node.getID()];
                     deleteIdIndex(node.children);
                 })
-            }
-            if (node) {
-                deleteIdIndex([node]);
-                //delete this.nodes[this.prefix + node.getID()];
-                if (node.preSibling) {
-                    node.preSibling.setNextSibling(node.nextSibling);
-                } else if (node.nextSibling) {
-                    node.nextSibling.preSibling = null;
-                }
-                if (node.parent) {
-                    node.parent.children.splice(node.siblingIndex(), 1);
+            };
+            for(let n of nodes){
+                deleteIdIndex([n]);
+                if (n.preSibling) {
+                    n.preSibling.setNextSibling(n.nextSibling);
+                } else if (n.nextSibling) {
+                    n.nextSibling.preSibling = null;
+                }
+                if (n.parent) {
+                    n.parent.children.splice(n.siblingIndex(), 1);
                 } else {
-                    this.roots.splice(node.siblingIndex(), 1);
+                    this.roots.splice(n.siblingIndex(), 1);
                 }
-                tools.sortTreeItems(this);
-                success = true;
             }
+            tools.sortTreeItems(this);
+            success = true;
             return success;
         };
+
         Tree.prototype.getDeleteData = function (node) {
             var data = [];
             var addUpdateDataForDelete = function (datas, nodes) {
@@ -621,6 +626,37 @@ var idTree = {
             }
             return data;
         };
+        Tree.prototype.getDeleteDatas = function (deleteMap,deleteNodes){//批量删除
+            let datas = [];
+            addDeleteDatas(datas,deleteNodes);
+            for(let d of deleteNodes){
+                addPreUpdateData(datas,deleteMap,d.preSibling,d.nextSibling);
+            }
+           function addPreUpdateData(updateDatas,map,preSibling,nextSibling) {
+               if(preSibling && (map[preSibling.getID()] == undefined || map[preSibling.getID()] == null)){
+                   if(nextSibling){
+                      if(map[nextSibling.getID()]){//如果下一个节点也是要删除的,则再往下顺延
+                          addPreUpdateData(updateDatas,map,preSibling,nextSibling.nextSibling);
+                      }else {
+                          updateDatas.push({type: 'update', data: preSibling.tree.getDataTemplate(preSibling.getID(), preSibling.getParentID(),nextSibling.getID())});
+                      }
+                   }else {
+                       updateDatas.push({type: 'update', data: preSibling.tree.getDataTemplate(preSibling.getID(), preSibling.getParentID(),-1)});
+                   }
+               }
+           }
+
+            function addDeleteDatas(dataArray,nodes) {
+                for(let n of nodes){
+                    let delData = {};
+                    delData[n.tree.setting.id] = n.getID();
+                    dataArray.push({type: 'delete', data: delData});
+                    addDeleteDatas(dataArray,n.children);
+                }
+            }
+            return datas;
+        };
+
 
         /*Tree.prototype.editedData = function (field, id, newText) {
          var node = this.findNode(id), result = {allow: false, nodes: []};

+ 16 - 0
public/web/tree_sheet/tree_sheet_controller.js

@@ -113,6 +113,22 @@ var TREE_SHEET_CONTROLLER = {
                 }
             }
         };
+        controller.prototype.m_delete = function (nodes) {
+            var that = this, sels = this.sheet.getSelections();
+            if(nodes.length > 0){
+                if(this.tree.m_delete(nodes)){
+                    TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () {
+                        let rowCount = 0;
+                        for(let node of nodes){
+                            rowCount = rowCount+node.posterityCount() + 1;
+                        }
+                        that.sheet.deleteRows(sels[0].row, rowCount);
+                        that.setTreeSelected(that.tree.items[sels[0].row]);
+                        that.sheet.setSelection(sels[0].row,sels[0].col,1,sels[0].colCount);
+                    });
+                }
+            }
+        };
         controller.prototype.upLevel = function () {
             var that = this;
             if (this.tree.selected) {

+ 2 - 2
web/maintain/billsGuidance_lib/html/main.html

@@ -68,8 +68,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a href="javascript:void(0);" id="addY" class="btn btn-primary">新建</a>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -101,8 +101,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a href="javascript:void(0);" id="editY" class="btn btn-primary">确定</a>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>

+ 37 - 3
web/maintain/bills_lib/html/main.html

@@ -68,8 +68,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a id="createA"  href="javascript:void(0);" class="btn btn-primary">新建</a>
+                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -93,8 +93,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a id="renameA" href="javascript: void(0);" class="btn btn-primary" data-dismiss="modal" renameId="">确定</a>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -124,6 +124,7 @@
     <script src="/lib/jquery/jquery.min.js"></script>
     <script src="/lib/tether/tether.min.js"></script>
     <script src="/lib/bootstrap/bootstrap.min.js"></script>
+    <script src="/public/web/common_ajax.js"></script>
     <script src="/web/maintain/bills_lib/scripts/global.js"></script>
     <script src="/web/maintain/bills_lib/scripts/bills_lib_ajax.js"></script>
     <script src="/web/maintain/bills_lib/scripts/tools.js"></script>
@@ -168,7 +169,23 @@
             preDeleteId = deleteId;
             deleteCount++;
             if(deleteCount === 3){
-                mainAjax.deleteStdBillsLib(userAccount, deleteId);
+                //被清单指引引用则不可删除
+                CommonAjax.post('/billsGuidance/api/getBillsGuideLibs', {}, function (rstData) {
+                    let canDel = true;
+                    for(let lib of rstData){
+                        if(lib.billsLibId == deleteId){
+                            canDel = false;
+                            break;
+                        }
+                    }
+                    if(canDel){
+                        mainAjax.deleteStdBillsLib(userAccount, deleteId);
+                    }
+                    else {
+                        alert('当前清单规则已被清单指引库引用,请先删除对应的清单指引库。');
+                        $('#del').modal('hide');
+                    }
+                });
                 deleteCount = 0;
             }
         });
@@ -178,10 +195,27 @@
 
        $("#showArea").on("click", "[data-target = '#edit']", function(){
            let renameId = $(this).parent().parent().attr("id");
+           $('#renameText').val($(this).parent().parent().find('td:first-child').text());
            $("#renameA").attr("renameId", renameId);
 
        });
 
+       $('#edit').on('shown.bs.modal', function () {
+           setTimeout(function () {
+                $('#renameText').focus();
+           }, 100);
+       });
+
+       $('#add').on('shown.bs.modal', function () {
+           setTimeout(function () {
+                $('#createText').focus();
+           }, 100);
+       });
+
+       $('#add').on('hidden.bs.modal', function () {
+           $('#createText').val('');
+       });
+
         $("#renameA").click(function(){
             let newName = $("#renameText").val();
             let renameId = $(this).attr("renameId");

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

@@ -661,6 +661,7 @@
             let validDatas = tools.getValidDatas(sheet, setting, args);
             sheet.suspendPaint();
             for(let i =orgRow, j=0; i<= maxRow; i++, j++){
+                //let id = controller.tree.items[i] ? controller.tree.items[i].getID() : null;
                 let id = sheet.getTag(i, 0);
                 if(id && j< validDatas.length){
                     validDatas[j].ID = id;
@@ -692,7 +693,14 @@
                 }
             }
             sheet.resumePaint();
+            console.log(controller.tree.selected);
             billsAjax.pasteBills(userAccount, billsLibId, validDatas);
+            for(let vData of validDatas){
+                let node  = controller.tree.nodes['id_' + vData.ID];
+                if(node){
+                    Object.assign(node.data, vData);
+                }
+            }
             sheet.setRowCount(sheetBillsDatas.datas.length);
         });
     }

+ 0 - 27
web/maintain/bills_lib/scripts/bills_lib_ajax.js

@@ -1,33 +1,6 @@
 /**
  * Created by vian on 2017/3/27.
  */
-
-/**
- * 设置全局的AJAX请求默认选项
- * 主要设置了AJAX请求遇到Session过期的情况
- */
-$.ajaxSetup({
-    complete: function (data) {
-        console.log(data);
-        if (data.responseJSON&&data.responseJSON.ret_code && data.responseJSON.ret_code == 99) {
-            alert(data.responseJSON.ret_msg);
-            var top = getTopWindow();
-            setTimeout('top.location.href = "/login";', 300);
-        }
-    }
-});
-
-/**
- * 在页面中任何嵌套层次的窗口中获取顶层窗口
- * @return 当前页面的顶层窗口对象
- */
-function getTopWindow() {
-    var p = window;
-    while (p != p.parent) {
-        p = p.parent;
-    }
-    return p;
-}
 var mainAjax = {
     //获取编办
     getCompilationList: function () {

+ 7 - 0
web/maintain/bills_lib/scripts/db_controller.js

@@ -299,7 +299,11 @@ var dbController = {
                     tools.btnAction(btn);
                     btn.attr('doing', 'false');
                     controller.upMove();
+                    //udpate tag
+                    controller.sheet.setTag(controller.tree.selected.serialNo(), 0, controller.tree.selected.getID());
+                    controller.sheet.setTag(controller.tree.selected.nextSibling.serialNo(), 0, controller.tree.selected.nextSibling.getID());
                     sheetBillsDatas = tools.getsheetDatas(controller.sheet, 'bills', controller);
+
                     controller.sheet.getParent().focus(true);
                 });
             }
@@ -337,6 +341,9 @@ var dbController = {
                 tools.btnAction(btn);
                 btn.attr('doing', 'false');
                 controller.downMove();
+                //udpate tag
+                controller.sheet.setTag(controller.tree.selected.serialNo(), 0, controller.tree.selected.getID());
+                controller.sheet.setTag(controller.tree.selected.preSibling.serialNo(), 0, controller.tree.selected.preSibling.getID());
                 sheetBillsDatas = tools.getsheetDatas(controller.sheet, 'bills', controller);
                 controller.sheet.getParent().focus(true);
             }

+ 15 - 0
web/maintain/ration_repository/js/main.js

@@ -47,6 +47,7 @@ $(function () {
         //重命名
         $("#showArea").on("click", "[data-target = '#edit']", function(){
             let renameId = $(this).parent().parent().attr("id");
+            $('#renameText').val($(this).parent().parent().find('td:first-child').text());
             $("#renameA").attr("renameId", renameId);
         });
         $("#renameA").click(function(){
@@ -66,6 +67,20 @@ $(function () {
                 renameRationLib({ID: libId, newName: newName, orgName: orgName}, dispNameArr);
             }
         });
+        $('#edit').on('shown.bs.modal', function () {
+            setTimeout(function () {
+                $('#renameText').focus();
+            }, 100);
+        });
+
+        $('#add').on('shown.bs.modal', function () {
+            setTimeout(function () {
+                $('#libNameTxt').focus();
+            }, 100);
+        });
+        $('#add').on('hidden.bs.modal', function () {
+            $('#libNameTxt').val('');
+        });
         //删除
         $("#showArea").on("click", "[data-target = '#del']", function(){
             let deleteId = $(this).parent().parent().attr("id");

+ 4 - 4
web/maintain/ration_repository/main.html

@@ -96,8 +96,8 @@
                     </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a id="addBtn" href="javascript: void(0);" class="btn btn-primary">新建</a>
+                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -123,8 +123,8 @@
                 <div class="modal-footer">
                     <!--<button type="button" id="edtCancel" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <button type="button"  id="edtOK" class="btn btn-secondary" data-dismiss="modal">确定</button>-->
-                    <button id="editCancelBtn" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a href="javascript: void(0);"  id="renameA" class="btn btn-primary">确定</a>
+                    <button id="editCancelBtn" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
 
                 </div>
             </div>
@@ -173,8 +173,8 @@
                     </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <button type="button" class="btn btn-primary" id="source-import">确定导入</button>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -202,8 +202,8 @@
                     </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <button type="button" class="btn btn-primary" id="data-import">确定导入</button>
+                    <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>

+ 1 - 1
web/maintain/std_glj_lib/html/gongliao.html

@@ -35,7 +35,7 @@
         </nav>
     </div>
     <div class="main">
-        <div class="content" style="z-index: 700">
+        <div class="content" style="z-index: 700; overflow: hidden">
             <div class="container-fluid">
                 <div class="row">
                     <!--org 3:7:2-->

+ 2 - 2
web/maintain/std_glj_lib/html/main.html

@@ -69,8 +69,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a id="addBtn" href="javascript:void(0)" class="btn btn-primary">新建</a>
+                    <button type="button" id="cancelBtn" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>
@@ -98,8 +98,8 @@
                   </form>
                 </div>
                 <div class="modal-footer">
-                    <button id="editCancelBtn" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                     <a href="javascript: void(0);"  id="renameA" class="btn btn-primary">确定</a>
+                    <button id="editCancelBtn" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                 </div>
             </div>
         </div>

+ 12 - 0
web/maintain/std_glj_lib/js/gljComponent.js

@@ -348,6 +348,12 @@ let gljComponentOprObj = {
                 that.updateRationBasePrcRq(updateBasePrc)
             }
         }
+        let focusInter = setInterval(function () {
+            if(!$('#loadingPage').is(':visible')){
+                me.workBook.focus(true);
+                clearInterval(focusInter);
+            }
+        }, 100);
     },
     onClipboardPasting: function (sender, info) {
         let me = gljComponentOprObj;
@@ -481,6 +487,12 @@ let gljComponentOprObj = {
             sheetCommonObj.cleanData(me.workBook.getSheet(0), me.setting, -1);
             sheetsOprObj.showData(me.workBook.getSheet(0), me.setting, that.currentComponent);
         }
+        let focusInter = setInterval(function () {
+            if(!$('#loadingPage').is(':visible')){
+                me.workBook.focus(true);
+                clearInterval(focusInter);
+            }
+        }, 100);
     },
     updateComponent: function (updateArr) {
         let me = gljComponentOprObj, that = repositoryGljObj;

+ 18 - 0
web/maintain/std_glj_lib/js/main.js

@@ -46,11 +46,29 @@ $(function () {
                     createGljLib(newGljLib, dispNameArr, usedCom);
                 }
             });
+
+            $('#edit').on('shown.bs.modal', function () {
+                setTimeout(function () {
+                    $('#renameText').focus();
+                }, 100);
+            });
+
+            $('#add').on('shown.bs.modal', function () {
+                setTimeout(function () {
+                    $('#libNameTxt').focus();
+                }, 100);
+            });
+
+            $('#add').on('hidden.bs.modal', function () {
+                $('#libNameTxt').val('');
+            });
+
             //重命名
             $("#showArea").on("click", "[data-target = '#edit']", function(){
                 let renameId = $(this).parent().parent().attr("id");
                 let compilationName = $(this).parent().parent().children()[1].textContent;
                 $('#compilationEdit option').text(compilationName);
+                $('#renameText').val($(this).parent().parent().find('td:first-child').text());
                 $("#renameA").attr("renameId", renameId);
             });
             $("#renameA").click(function(){

+ 5 - 5
web/users/js/compilation.js

@@ -117,7 +117,7 @@ $(document).ready(function() {
         switch (model) {
             case 'all':
                 $("#name-area").show();
-                $("#add-compilation-title").text('添加新编办');
+                $("#add-compilation-title").text('添加新费用定额');
                 break;
             case 'bill':
                 $("#bill-area").show();
@@ -281,7 +281,7 @@ function initCompilation() {
     let billsTemplateTree = idTree.createNew({id: 'ID', pid: 'ParentID', nid: 'NextSiblingID', rootId: -1});
 
     billsTemplateTree.loadDatas(JSON.parse(billsTemplateData));
-    if (mainTreeCol !== '') {
+    if (mainTreeCol !== '' && mainTreeColObj.cols.length > 0) {
         TREE_SHEET_HELPER.loadSheetHeader(mainTreeColObj, colSpread.getActiveSheet());
         TREE_SHEET_HELPER.showTreeData(mainTreeColObj, colSpread.getActiveSheet(), billsTemplateTree);
     }
@@ -455,8 +455,8 @@ function validLib() {
         if (engineering === '' || engineering <= 0) {
             throw '请选择工程专业';
         }
-
-        if ($("input:hidden[name='bill_lib']").length <= 0) {
+        //按新需求,清单库、定额库等不做非空验证
+      /*  if ($("input:hidden[name='bill_lib']").length <= 0) {
             throw '请添加标准清单';
         }
 
@@ -482,7 +482,7 @@ function validLib() {
 
         if ($("input:hidden[name='billsGuidance_lib']").length <= 0) {
             throw '请添加清单指引库';
-        }
+        }*/
 
         result = true;
     } catch (error) {

+ 49 - 11
web/users/js/template.js

@@ -184,18 +184,25 @@ let TEMPLATE_BILLS_SETTING = {
 
 $(document).ready(function () {
     let RefreshBaseActn = function (tree) {
-        let showButton = function (show, btn) {
+      /*  let showButton = function (show, btn) { 隐藏改成灰显
             if (show) {
                 btn.show();
             } else {
                 btn.hide();
             }
+        };*/
+        let setButtonValid = function (valid, btn) {
+            if (valid) {
+                btn.removeClass('disabled');
+            } else {
+                btn.addClass('disabled');
+            }
         };
-        showButton(tree.selected && tree.selected.canUpLevel(), $('#upLevel'));
-        showButton(tree.selected && tree.selected.canDownLevel(), $('#downLevel'));
-        showButton(tree.selected && tree.selected.canUpMove(), $('#upMove'));
-        showButton(tree.selected && tree.selected.canDownMove(), $('#downMove'));
-        showButton(tree.selected ? true : false, $('#delete'));
+        setButtonValid(tree.selected && tree.selected.canUpLevel(), $('#upLevel'));
+        setButtonValid(tree.selected && tree.selected.canDownLevel(), $('#downLevel'));
+        setButtonValid(tree.selected && tree.selected.canUpMove(), $('#upMove'));
+        setButtonValid(tree.selected && tree.selected.canDownMove(), $('#downMove'));
+        setButtonValid(tree.selected ? true : false, $('#delete'));
     };
     let RefreshBillsData = function (datas) {
         datas.forEach(function (data) {
@@ -251,7 +258,7 @@ $(document).ready(function () {
         }
     };
     let getRealValue = function (value,map) {//中文到实际值的转换
-        value = value.replace(/[\s\r\n]/g, "");//去掉空格,回车等无用字符
+        if(value) value = value.replace(/[\s\r\n]/g, "");//去掉空格,回车等无用字符
         if(map[value]!==undefined && map[value]!==null) value = map[value];
         return value;
     };
@@ -379,6 +386,8 @@ $(document).ready(function () {
     });
     tree.loadDatas(templateData);
     controller.showTreeData();
+    let sel = billsSpread.getActiveSheet().getSelections()[0];
+    controller.setTreeSelected(tree.items[sel.row == -1?0:sel.row]);//初始化选中项
     RefreshBaseActn(tree);
 
     $('#insert').click(function () {
@@ -404,15 +413,44 @@ $(document).ready(function () {
     $('#delete').click(function () {
         let me = this;
         $(me).addClass('disabled');
-        var selected = controller.tree.selected, updateData;
-        if (selected) {
-            updateData = controller.tree.getDeleteData(selected);
+        let selection = controller.sheet.getSelections()[0], updateData,deleteMap={},deleteNodes=[];
+        for(let i=0;i < selection.rowCount;i++){
+            let tem_node = controller.tree.items[selection.row+i];
+            if(i == 0){//第一个直接添加;
+                deleteMap[tem_node.getID()] = tem_node;
+                deleteNodes.push(tem_node); 
+            }else {
+                setNodeToMapAndArray(tem_node,deleteMap,deleteNodes);
+            }
+        }
+
+        if (deleteNodes.length > 0) {
+            updateData = controller.tree.getDeleteDatas(deleteMap,deleteNodes);
             CommonAjax.post(updateUrl, updateData, function (data) {
-                controller.delete();
+                controller.m_delete(deleteNodes);
                 controller.showTreeData();
                 $(me).removeClass('disabled');
             });
         }
+        function setNodeToMapAndArray(node,map,array) {
+            let nodeID = node.getID();
+            if(map[nodeID]==undefined||map[nodeID]==null){
+                newMap(node,node.parent,map,array)
+            }
+            function newMap(node,parent,map,array) {
+                let nodeID =node.getID();
+                if(parent==null){//说明已经是最顶层了
+                    map[nodeID]=node;
+                    array.push(node);
+                }else {
+                    let parentID = parent.getID();
+                    if(map[parentID]==undefined||map[parentID]==null){
+                        newMap(node,parent.parent,map,array);
+                    }
+                }
+            }
+        }
+        
     });
     $('#upLevel').click(function () {
         let me = this;

+ 1 - 1
web/users/views/compilation/add.html

@@ -12,7 +12,7 @@
         <div class="c-header" style="padding:0">
             <ul class="nav nav-tabs">
                 <% valuationList.forEach(function(valuation) { %>
-                <li role="presentation" <% if (valuation._id.toString() === valuationId) { %>class="active"<% } %>><a href="/compilation/valuation/<%= section %>/<%= valuation._id %>"><%= valuation.name %></a></li>
+                <li role="presentation" <% if (valuation.id.toString() === valuationId) { %>class="active"<% } %>><a href="/compilation/valuation/<%= section %>/<%= valuation.id %>"><%= valuation.name %></a></li>
                 <% }) %>
             </ul>
         </div>

+ 1 - 1
web/users/views/compilation/common.html

@@ -1,7 +1,7 @@
 <div class="panel-sidebar">
     <div class="panel-title">
         <div class="title-bar">
-            <h2><a class="pull-right add-compilation" title="添加新编办" href="javascript:void(0)" data-model="all"><span class="glyphicon glyphicon-plus"></span></a>编办管理</h2>
+            <h2><a class="pull-right add-compilation" title="添加新费用定额" href="javascript:void(0)" data-model="all"><span class="glyphicon glyphicon-plus"></span></a>费用定额</h2>
         </div>
     </div>
     <div class="scrollbar-auto">

+ 1 - 1
web/users/views/compilation/modal.html

@@ -4,7 +4,7 @@
         <div class="modal-content">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
-                <h4 class="modal-title" id="add-compilation-title">添加新编办</h4>
+                <h4 class="modal-title" id="add-compilation-title">添加新费用定额</h4>
             </div>
             <div class="modal-body">
                 <div class="form-group" id="name-area">

+ 1 - 1
web/users/views/compilation/template.html

@@ -18,7 +18,7 @@
         <div class="c-header" style="padding:0">
             <ul class="nav nav-tabs">
                 <% valuationList.forEach(function(valuation) { %>
-                <li role="presentation" <% if (valuation._id.toString() === valuationId) { %>class="active"<% } %>><a href="/compilation/valuation/<%= section %>/<%= valuation._id %>"><%= valuation.name %></a></li>
+                <li role="presentation" <% if (valuation.id.toString() === valuationId) { %>class="active"<% } %>><a href="/compilation/valuation/<%= section %>/<%= valuation.id %>"><%= valuation.name %></a></li>
                 <% }) %>
             </ul>
         </div>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
web/users/views/layout/layout.html


+ 37 - 3
web/users/views/layout/page.html

@@ -1,9 +1,14 @@
 <ul aria-label="Page navigation" id="pages"></ul>
 <script type="text/javascript">
+
+    let totalPage = "<%= pages.total %>";
+    let current ="<%= pages.current %>";
+    let pageArray = getPageArray(parseInt(totalPage),2,parseInt(current));
     let options = {
         bootstrapMajorVersion: 3,
         currentPage: "<%= pages.current %>",
         totalPages: "<%= pages.total %>",
+        numberOfPages:"<%= pages.total %>",
         size: "normal",
         itemContainerClass: function(type, page, current) {
             let className = 'page-item';
@@ -36,7 +41,7 @@
                 case "next":
                     return "下一页";
                 case "last":
-                    return "最后一页";
+                    return "&raquo;";
                 case "page":
                     return page;
             }
@@ -48,14 +53,16 @@
                     result = (current !== 1);
                     break;
                 case "prev":
+                    result = false;
                     break;
                 case "next":
+                    result = false;
                     break;
                 case "last":
-                    result = false;
+                    result = (current != this.totalPages);
                     break;
                 case "page":
-                    result = true;
+                    result = pageArray.indexOf(page)!=-1;
                     break;
             }
             return result;
@@ -84,4 +91,31 @@
     if (options.totalPages > 0) {
         $("#pages").bootstrapPaginator(options);
     }
+
+    function getPageArray(totalPage,offset,current) {
+        let showPageArray = [current];
+        let pre_fix = current - offset;
+        let tai_fix = current + offset;
+        if(pre_fix<=0){
+            for(let p =1;p <= Math.abs(pre_fix)+1;p++){
+                showPageArray.push(current + offset +p)
+            }
+        }
+        if(tai_fix > totalPage){
+            for(let t=1;t < (tai_fix - totalPage)+1;t++){
+                showPageArray.push(current - offset - t)
+            }
+        }
+        for(let i=1;i<= offset;i++){
+            let pre = current - i;
+            let next = current + i;
+            if(pre > 0){
+                showPageArray.push(pre);
+            }
+            if(next <= totalPage){
+                showPageArray.push(next);
+            }
+        }
+        return showPageArray;
+    }
 </script>

+ 45 - 5
web/users/views/tool/index.html

@@ -9,31 +9,31 @@
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>清单规则编辑器
-                        <a href="/stdBillsmain" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="billsLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>定额编辑器
-                        <a href="/rationRepository/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="rationLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>报表模板
-                        <a href="/rpt_tpl" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="rptTemplate" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>人材机库
-                        <a href="/stdGljRepository/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="gljLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>清单指引编辑器
-                        <a href="/billsGuidance/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="billsGuidanceLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
@@ -74,6 +74,46 @@
 <script type="text/javascript" src="/public/web/PerfectLoad.js"></script>
 <script type="text/javascript">
     $(document).ready(function () {
+        $('#billsLib').click(function () {
+            let href = '/stdBillsmain';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#rationLib').click(function () {
+            let href = '/rationRepository/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#rptTemplate').click(function () {
+            let href = '/rpt_tpl';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#gljLib').click(function () {
+            let href = '/stdGljRepository/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#billsGuidanceLib').click(function () {
+            let href = '/billsGuidance/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
         $('#clearJunkBtn').click(function () {
             $('#clearJunkModal').modal('show');
         });

+ 9 - 1
web/users/views/user/index.html

@@ -59,8 +59,12 @@
                     <th width="350">注册手机/邮箱</th>
                     <th>姓名</th>
                     <th>企业名称</th>
-                    <th>地区</th>
+                    <th>企业地区</th>
+                    <th>最近使用版本</th>
+                    <th width="180">最近登录</th>
                     <th width="180">注册时间</th>
+                    <th>详细</th>
+                    <th>升级</th>
                 </tr>
                 </thead>
                 <tbody>
@@ -72,7 +76,11 @@
                            data-content="企业类型:<%= model.companyType[user.company_type] %>,企业规模:<%= model.companyScale[user.company_scale] %>"><%= user.company %></a>
                     </td>
                     <td><%= model.province[user.province] %></td>
+                    <td>重庆01版</td>
+                    <td>登录时间</td>
                     <td><%= moment(user.create_time).format('YYYY-MM-DD HH:mm:ss') %></td>
+                    <td>详细</td>
+                    <td>升级</td>
                 </tr>
                 <% }) %>
                 </tbody>