فهرست منبع

Merge branch '1.0.0_online' of http://192.168.1.12:3000/SmartCost/ConstructionCost into 1.0.0_online

TonyKang 6 سال پیش
والد
کامیت
48e29eefeb
49فایلهای تغییر یافته به همراه277 افزوده شده و 111 حذف شده
  1. 2 0
      config/gulpConfig.js
  2. 1 1
      modules/all_models/stdBills_bills.js
  3. 2 1
      modules/complementary_glj_lib/controllers/gljController.js
  4. 8 4
      modules/complementary_ration_lib/controllers/compleViewController.js
  5. 2 1
      modules/main/facade/ration_facade.js
  6. 1 2
      modules/main/models/project.js
  7. 2 1
      modules/main/routes/main_route.js
  8. 2 1
      modules/pm/controllers/pm_controller.js
  9. 1 1
      modules/pm/facade/pm_facade.js
  10. 0 2
      modules/pm/models/project_model.js
  11. 2 1
      modules/users/controllers/boot_controller.js
  12. 8 4
      modules/users/controllers/user_controller.js
  13. 1 1
      public/web/sheet/sheet_common.js
  14. 12 5
      public/web/socket/connection.js
  15. 9 5
      public/web/tree_sheet/tree_sheet_helper.js
  16. 0 1
      socket.js
  17. 2 0
      web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html
  18. 4 2
      web/building_saas/complementary_ration_lib/html/anzhuang.html
  19. 2 0
      web/building_saas/complementary_ration_lib/html/dinge.html
  20. 4 2
      web/building_saas/complementary_ration_lib/html/fuzhu.html
  21. 4 2
      web/building_saas/complementary_ration_lib/html/gongliao.html
  22. BIN
      web/building_saas/css/animated_favicon1.gif
  23. BIN
      web/building_saas/css/favicon.ico
  24. BIN
      web/building_saas/css/logo.png
  25. 30 15
      web/building_saas/css/main.css
  26. 14 11
      web/building_saas/main/html/main.html
  27. 2 2
      web/building_saas/main/js/main.js
  28. 3 0
      web/building_saas/main/js/models/installation_fee.js
  29. 12 2
      web/building_saas/main/js/models/quantity_detail.js
  30. 2 2
      web/building_saas/main/js/views/glj_col.js
  31. 11 7
      web/building_saas/main/js/views/glj_view.js
  32. 1 1
      web/building_saas/main/js/views/main_tree_col.js
  33. 2 2
      web/building_saas/main/js/views/project_glj_view.js
  34. 11 5
      web/building_saas/main/js/views/project_view.js
  35. 2 2
      web/building_saas/main/js/views/quantity_edit_view.js
  36. 3 1
      web/building_saas/main/js/views/side_tools.js
  37. 34 8
      web/building_saas/main/js/views/std_billsGuidance_lib.js
  38. 18 3
      web/building_saas/main/js/views/std_ration_lib.js
  39. 2 2
      web/building_saas/main/js/views/sub_view.js
  40. 14 0
      web/building_saas/main/js/views/zmhs_view.js
  41. 6 1
      web/building_saas/pm/html/project-management.html
  42. 17 1
      web/building_saas/pm/js/pm_newMain.js
  43. 8 5
      web/common/html/header.html
  44. 2 0
      web/users/html/login-infoinput.html
  45. 2 0
      web/users/html/login.html
  46. 6 4
      web/users/html/user-buy.html
  47. 2 0
      web/users/html/user-info.html
  48. 2 0
      web/users/html/user-safe.html
  49. 2 0
      web/users/html/user-set.html

+ 2 - 0
config/gulpConfig.js

@@ -42,6 +42,8 @@ module.exports = {
         'public/web/sheet/sheet_common.js',
         'public/web/common_ajax.js',
         'lib/JSExpressionEval_src/Date.js',
+        'web/building_saas/glj/js/socket.io.slim.js',
+        'public/web/socket/connection.js',
         'web/building_saas/pm/js/**/*.js',
         'lib/ztree/*.js',
         'lib/jquery-contextmenu/jquery.contextMenu.min.js'

+ 1 - 1
modules/all_models/stdBills_bills.js

@@ -17,7 +17,7 @@ const stdBills_bills = new Schema({
             jobs: [],
             items: [],
             recharge:String,
-            billsLibId: Number,
+            billsLibId: {type:Number, index: true},
             deleted: Boolean
     },
     {versionKey: false}

+ 2 - 1
modules/complementary_glj_lib/controllers/gljController.js

@@ -39,7 +39,8 @@ class GljController extends BaseController{
             userID: req.session.sessionUser.id,
             gljLibId: gljLibId,
             compilationId: sessionCompilation._id,
-            versionName: req.session.sessionCompilation.name + '免费版',
+            compilationName: sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
             overWriteUrl: overWriteUrl,
         });

+ 8 - 4
modules/complementary_ration_lib/controllers/compleViewController.js

@@ -47,7 +47,8 @@ class CompleViewController extends BaseController{
             redirectCoe: redirectCoe,
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
-            versionName: req.session.sessionCompilation.name + '免费版',
+            compilationName: req.session.sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -63,7 +64,8 @@ class CompleViewController extends BaseController{
             redirectCoe: redirectCoe,
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
-            versionName: req.session.sessionCompilation.name + '免费版',
+            compilationName: req.session.sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -79,7 +81,8 @@ class CompleViewController extends BaseController{
             redirectGlj: redirectGlj,
             redirectInstallation: redirectInstallation,
             gljLibId: gljLibId,
-            versionName: req.session.sessionCompilation.name + '免费版',
+            compilationName: req.session.sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }
@@ -94,7 +97,8 @@ class CompleViewController extends BaseController{
             redirectRation: redirectRation,
             redirectGlj: redirectGlj,
             redirectCoe: redirectCoe,
-            versionName: req.session.sessionCompilation.name + '免费版',
+            compilationName: req.session.sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         });
     }

+ 2 - 1
modules/main/facade/ration_facade.js

@@ -188,7 +188,7 @@ async function addRationSubList(stdRation,newRation,needInstall,compilation) {
     let addRationCoeTime = +new Date();
     console.log("添加定额coe时间-----"+(addRationCoeTime - addRationGLJTime));
     let ration_installs = [];
-    if(needInstall){
+    if(needInstall && stdRation.type == 'std'){//只有标准的定额才有安装增加费,补充的定额没有安装增加费
         ration_installs =  await addRationInstallFee(stdRation,newRation);
     }
     let addRationInstallFeeTime = +new Date();
@@ -200,6 +200,7 @@ async function addRationInstallFee(std,newRation) {
     let install_fee_list = [];
     if(std.hasOwnProperty('rationInstList') && std.rationInstList.length > 0){
         let installFee = await installationFeeModel.findOne({'projectID': newRation.projectID});
+        if(!installFee) return;//如果没有找到项目对应的安装增加费,则不添加
         for(let ri of std.rationInstList){
             let feeItem = _.find(installFee.installFeeItem,{'ID':ri.feeItemId});
             let section = _.find(installFee.installSection,{'ID':ri.sectionId});

+ 1 - 2
modules/main/models/project.js

@@ -29,7 +29,6 @@ var moduleMap = {};
 
 moduleMap[projectConsts.BILLS] = billsData;
 moduleMap[projectConsts.RATION] = rationData;
-//moduleMap[projectConsts.GLJ] = GLJData;
 moduleMap[projectConsts.RATION_GLJ] = ration_glj_data;
 moduleMap[projectConsts.RATION_COE] = ration_coe_data;
 moduleMap[projectConsts.RATION_ASS] = ration_ass_data;
@@ -37,13 +36,13 @@ moduleMap[projectConsts.RATION_INSTALLATION] = ration_installation;
 moduleMap[projectConsts.QUANTITY_DETAIL] = quantity_detail_data;
 moduleMap[projCounter.collectionName] = projCounter;
 moduleMap[projSetting.collectionName] = projSetting;
-// moduleMap[volumePriceData.collectionName] = volumePriceData;
 moduleMap[projectConsts.FEERATE] = fee_rate_data;
 moduleMap[projectConsts.LABOUR_COE] = labour_coe_facade;
 moduleMap[projectConsts.CALC_PROGRAM] = calc_program_facade;
 moduleMap[projectConsts.PROJECTGLJ] = new GLJController();
 moduleMap[projectConsts.INSTALLATION_FEE] = installation_facade;
 
+
 var Project = function (){};
 
 Project.prototype.datas = [];

+ 2 - 1
modules/main/routes/main_route.js

@@ -27,7 +27,8 @@ module.exports =function (app) {
                         userAccount: req.session.userAccount,
                         userID: req.session.sessionUser.id,
                         projectData: projectData,
-                        versionName: req.session.sessionCompilation.name + '免费版',
+                        compilationName: req.session.sessionCompilation.name,
+                        versionName: `纵横云计价(${req.session.compilationVersion})`,
                         projectReadOnly: projectReadOnly,
                         LicenseKey:config.getLicenseKey(process.env.NODE_ENV),
                         overWriteUrl:req.session.sessionCompilation.overWriteUrl

+ 2 - 1
modules/pm/controllers/pm_controller.js

@@ -287,7 +287,8 @@ module.exports = {
             billValuation: JSON.stringify(billValuation),
             rationValuation: JSON.stringify(rationValuation),
             engineeringList: JSON.stringify(engineering.List),
-            versionName: sessionCompilation.name + request.session.compilationVersion,
+            compilationName: sessionCompilation.name,
+            versionName: `纵横云计价(${request.session.compilationVersion})`,
             LicenseKey:config.getLicenseKey(process.env.NODE_ENV)
         };
 

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

@@ -612,7 +612,7 @@ async function getSummaryInfo(projectIDs){
     if(tenders.length > 0){
         for(let tender of tenders){
             tenderIDs.push(tender.ID);
-            IDMapping[tender.ID] = {engineeringCost: 0, subEngineering: 0, measure: 0, safetyConstruction: 0, other: 0, charge: 0, tax: 0, rate: 0, buildingArea: '', perCost: ''};
+            IDMapping[tender.ID] = {engineeringCost: 0, subEngineering: 0, measure: 0, safetyConstruction: 0, other: 0, charge: 0, tax: 0, rate: 0, buildingArea: '', perCost: '',changeMark:tender.changeMark,property:tender.property};
             let buildingArea = getBuildingArea(tender.property.projectFeature);
             if(buildingArea){
                 IDMapping[tender.ID]['buildingArea'] = buildingArea;

+ 0 - 2
modules/pm/models/project_model.js

@@ -65,9 +65,7 @@ ProjectsDAO.prototype.getUserProjects = async function (userId, compilation, cal
                 projIDs.push(project.ID);
             }
         }
-        //test
         let summaryInfo = await pmFacade.getSummaryInfo(projIDs);
-        //test
         //设置汇总字段
         for(let proj of projects){
             let summaryProj = summaryInfo[proj.ID];

+ 2 - 1
modules/users/controllers/boot_controller.js

@@ -48,7 +48,8 @@ class BootController extends BaseController {
             companyTypeList: userModel.companyType,
             companyScaleList: userModel.companyScale,
             compilation: request.params.compilation,
-            versionName: request.session.sessionCompilation.name + request.session.compilationVersion
+            compilationName: request.session.sessionCompilation.name,
+            versionName: `纵横云计价(${req.session.compilationVersion})`,
         };
         response.render('users/html/login-infoinput', renderData);
     }

+ 8 - 4
modules/users/controllers/user_controller.js

@@ -38,7 +38,8 @@ class UserController extends BaseController {
             provinceList: userModel.province,
             companyTypeList: userModel.companyType,
             companyScaleList: userModel.companyScale,
-            versionName: request.session.sessionCompilation.name + request.session.compilationVersion
+            compilationName: request.session.sessionCompilation.name,
+            versionName: `纵横云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-info', renderData);
     }
@@ -119,7 +120,8 @@ class UserController extends BaseController {
             userData: userData,
             logList: logList,
             pages: pageData,
-            versionName: request.session.sessionCompilation.name + request.session.compilationVersion
+            compilationName: request.session.sessionCompilation.name,
+            versionName: `纵横云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-safe', renderData);
     }
@@ -161,7 +163,8 @@ class UserController extends BaseController {
         let renderData = {
             userData: userData,
             compilationList: compilationList,
-            versionName: request.session.sessionCompilation.name + request.session.compilationVersion
+            compilationName: request.session.sessionCompilation.name,
+            versionName: `纵横云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-buy', renderData);
     }
@@ -193,7 +196,8 @@ class UserController extends BaseController {
         let renderData = {
             preferenceSetting: preferenceSetting,
             compilationList: compilationList,
-            versionName: request.session.sessionCompilation.name + request.session.compilationVersion
+            compilationName: request.session.sessionCompilation.name,
+            versionName: `纵横云计价(${request.session.compilationVersion})`,
         };
         response.render('users/html/user-set', renderData);
     }

+ 1 - 1
public/web/sheet/sheet_common.js

@@ -775,7 +775,7 @@ var sheetCommonObj = {
     //设置默认样式
     spreadDefaultStyle: function (workBook) {
         let defaultStyle = new GC.Spread.Sheets.Style();
-        defaultStyle.font = '0.9rem Calibri';
+        defaultStyle.font = '14px Calibri';
         let sheetCount = workBook.getSheetCount();
         for(let i = 0; i < sheetCount; i++){
             let sheet = workBook.getSheet(i);

+ 12 - 5
public/web/socket/connection.js

@@ -3,17 +3,24 @@
  */
 socketObject={
   roomInfo : null,
-  connect:function () {
+  connect:function (from) {
       // 连接socket服务器
       var hostName = window.location.hostname;
       let me = this;
       let port = window.location.protocol ==='http:'?3300:3301;
       socket = io(window.location.protocol+'//'+hostName+':'+port);
       socket.on('connect', function () {
-          me.roomInfo={
-              feeRate:me.getFeeRateRoomID(),
-              unitFile:me.getUnitFileRoomID()
-          };
+          if(from == 'pm'){
+              me.roomInfo={
+                  userID:userID
+              };
+          }else {
+              me.roomInfo={
+                  feeRate:me.getFeeRateRoomID(),
+                  unitFile:me.getUnitFileRoomID()
+              };
+          }
+
           socket.emit('join', me.roomInfo);
           console.log('连接成功');
       });

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

@@ -425,8 +425,12 @@ var TREE_SHEET_HELPER = {
             if (isRationNode&& options.row === sheet.getActiveRowIndex() && options.col === sheet.getActiveColumnIndex()) {
                 sheetCommonObj.drowTriangle(ctx,x+w-12,y+h/2+2);
             }
+            if (sheet.name() === 'stdRationLib_chapter') {
+                console.log(rationLibObj.hasExplanationRuleText(options.row));
+            }
             //定额库章节树问号
-            if(sheet.name() === 'stdRationLib_chapter' && this.enterCell && options.row === this.enterCell.row ){
+            if(sheet.name() === 'stdRationLib_chapter' && this.enterCell && options.row === this.enterCell.row
+                && typeof rationLibObj !== 'undefined' && rationLibObj.hasExplanationRuleText(options.row)){
                 let centerX = Math.floor(x) + w - 20;
                 let centerY = Math.floor((y + (y + h)) / 2);
                 ctx.drawImage(questionImg, centerX + 3, centerY - 7, questionImgWidth,questionImgHeight);
@@ -446,7 +450,7 @@ var TREE_SHEET_HELPER = {
         };
         TreeNodeCellType.prototype.processMouseDown = function (hitinfo) {
             //点击问号符,弹出说明、工程量计算规则窗口
-            if(hitinfo.sheet.name() === 'stdRationLib_chapter') {
+            if(hitinfo.sheet.name() === 'stdRationLib_chapter' && typeof rationLibObj !== 'undefined' && rationLibObj.hasExplanationRuleText(hitinfo.row)) {
                 if(hitinfo.x < hitinfo.cellRect.x + hitinfo.cellRect.width && hitinfo.x > hitinfo.cellRect.x + hitinfo.cellRect.width - questionImgWidth) {
                     rationLibObj.initQuestionModal(hitinfo.row);
                 }
@@ -692,7 +696,7 @@ var TREE_SHEET_HELPER = {
             }
         },delayTimes);
     },
-    getQuestionCellType: function (mouseDownCallback = null) {
+    getQuestionCellType: function (mouseDownCallback = null, hasData) {
         let img = document.getElementById('question_pic'),
             imgWidth = 16,
             imgHeight = 16;
@@ -708,7 +712,7 @@ var TREE_SHEET_HELPER = {
                 ctx.clearRect(x, y, w, h);
             }
             GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
-            if(this.editingCell){
+            if(this.editingCell && hasData(options.row)){
                 let centerX = Math.floor(x) + w - 20;
                 let centerY = Math.floor((y + (y + h)) / 2);
                 ctx.drawImage(img, centerX + 3, centerY - 7, imgWidth,imgHeight);
@@ -730,7 +734,7 @@ var TREE_SHEET_HELPER = {
             if(this.editingCell && this.editingCell.row === hitinfo.row){
                 let offSet = hitinfo.cellRect.x + hitinfo.cellRect.width;
                 if(hitinfo.x < offSet && hitinfo.x > offSet - imgWidth){
-                    if(mouseDownCallback) {
+                    if(mouseDownCallback && hasData(hitinfo.row)) {
                         mouseDownCallback(hitinfo.row);
                     }
                     //$('#rationQuestionModal').modal('show');

+ 0 - 1
socket.js

@@ -22,7 +22,6 @@ socketIO.on('connection', function(socket) {
     });
     // 数据更改通知
     socket.on('unitFileChangeNotify', function(data) {
-        console.log(roomInfo);
         socket.broadcast.to(roomInfo['unitFile']).emit('unitFileChange', data);
     });
     socket.on('feeRateChangeNotify', function(data) {

+ 2 - 0
web/building_saas/complementary_glj_lib/html/tools-gongliaoji.html

@@ -15,6 +15,8 @@
   	<link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
     <!--endinject-->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .ztree * {
             font-family: Calibri;

+ 4 - 2
web/building_saas/complementary_ration_lib/html/anzhuang.html

@@ -13,6 +13,8 @@
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css">
     <!--endinject-->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
             border: 2px solid #ff6501;
@@ -38,9 +40,9 @@
                   <li class="nav-item">
                       <a class="nav-link px-3" id="gongliao" href="<%= redirectGlj %>">人材机</a>
                   </li>
-                  <li class="nav-item">
+                  <!--<li class="nav-item">
                       <a class="nav-link px-3" id="fuzhu" href="<%= redirectCoe %>">子目换算</a>
-                  </li>
+                  </li>-->
                   <li class="nav-item">
                       <a class="nav-link active px-3" >安装增加费</a>
                   </li>

+ 2 - 0
web/building_saas/complementary_ration_lib/html/dinge.html

@@ -15,6 +15,8 @@
     <link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
     <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css" type="text/css">
     <!--endinject-->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .ztree * {
             font-family: Calibri;

+ 4 - 2
web/building_saas/complementary_ration_lib/html/fuzhu.html

@@ -12,6 +12,8 @@
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <link rel="stylesheet" href="/lib/spreadjs/sheets/css/gc.spread.sheets.sc.css" type="text/css">
     <!--endinject-->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
             border: 2px solid #ff6501;
@@ -40,9 +42,9 @@
                   <li class="nav-item">
                       <a class="nav-link px-3" id="gongliao" href="<%= redirectGlj %>">人材机</a>
                   </li>
-                  <li class="nav-item">
+                  <!--<li class="nav-item">
                       <a class="nav-link active px-3">子目换算</a>
-                  </li>
+                  </li>-->
                   <li class="nav-item">
                       <a class="nav-link px-3" id="anzhuang" href="<%= redirectInstallation %>">安装增加费</a>
                   </li>

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

@@ -14,6 +14,8 @@
     <!--zTree-->
   	<link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
     <!--endinject-->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .ztree li span.button.add{margin-right:2px;background-position:-144px 0;vertical-align:top;*vertical-align:middle}
         .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active{
@@ -43,9 +45,9 @@
                   <li class="nav-item">
                       <a class="nav-link active px-3">人材机</a>
                   </li>
-                  <li class="nav-item">
+                <!--  <li class="nav-item">
                       <a class="nav-link px-3" id="fuzhu" href="<%= redirectCoe %>">子目换算</a>
-                  </li>
+                  </li>-->
                   <li class="nav-item">
                       <a class="nav-link px-3" id="anzhuang" href="<%= redirectInstallation %>">安装增加费</a>
                   </li>

BIN
web/building_saas/css/animated_favicon1.gif


BIN
web/building_saas/css/favicon.ico


BIN
web/building_saas/css/logo.png


+ 30 - 15
web/building_saas/css/main.css

@@ -22,6 +22,9 @@ a{
 .dropdown-item:focus, .dropdown-item:hover{
     background-color: #f7f7f9
 }
+.text-indent {
+    text-indent:26px;
+}
 /*自定义css*/
 .header {
     border-bottom: 1px solid #ccc
@@ -36,13 +39,13 @@ a{
     padding-left:40px;
 }
 .header-logo div.v-title{
-    font-size:12px;
+    font-size:11px;
     color:#aeaeae;
     line-height: 12px;
     margin-top:3px;
 }
 .header-logo div.p-title{
-    font-size:14px;
+    font-size:16px;
     color:#ff6501;
 }
 .top-msg{
@@ -53,7 +56,6 @@ a{
     left:50%;
     margin-left:-450px;
 }
-
 .main {
     position: relative;
     background: #f7f7f9;
@@ -99,6 +101,14 @@ a{
     font-size: 24px;
     color: #007bff
 }
+.poj-cate .nav-item{
+    position: relative;
+}
+.poj-cate .nav-pills .badge{
+    position: absolute;
+    right:5px;
+    top:5px;
+}
 .poj-cate .nav-pills .nav-link:hover{
     color:#0056b3
 }
@@ -175,14 +185,6 @@ a{
     border-radius: 0;
     padding: 0.2em 0.5em
 }
-.bottom-tools {
-    height: 30px;
-    line-height: 30px;
-    background:#fff;
-    bottom:20px;
-    left:22px;
-    z-index: 999
-}
 .side-tabs .nav-tabs .nav-item {
     z-index: 999
 }
@@ -411,9 +413,6 @@ a{
     padding: 0;
     height:26px;
 }
-.custom-file-input {
-    cursor: pointer;
-}
 .custom-file-input:lang(zh) ~ .custom-file-label::after {
     content: "浏览";
 }
@@ -424,7 +423,6 @@ a{
     padding:8px 10px;
     line-height: 18px;
     border-radius:4px;
-    text-align:center;
     box-shadow:2px 2px 6px #ccc;
     color:#fff;
 }
@@ -445,6 +443,23 @@ a{
     bottom:-11px;
     border-color:#000 transparent transparent transparent;
 }
+.box-text-style {
+    font-size: 12px;
+}
+.box-text-style p{
+    margin:0 0 2px 0;
+}
+.box-text-style table{
+    width: 100%;
+    text-align: center;
+}
+.box-text-style table th,.box-text-style table td{
+    border:1px solid #fff;
+}
+
+.box-text-style table p{
+    text-align: left;
+}
 /*快捷切换单位工程*/
 .navbar-crumb{
     position: relative;

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

@@ -25,6 +25,8 @@
     <!-- jquery.contextmenu -->
    <!-- <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css" type="text/css">-->
     <!-- endinject -->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <style type="text/css">
         .ztree * {
             font-family: Calibri;
@@ -174,8 +176,9 @@
                                       <div class="main-data-bottom ovf-hidden" id="subSpread" style="display: none" tabindex="0"></div>
                                       <div class="main-data-bottom ovf-hidden item_spread" id="replaceM" style="display: none" ></div>
                                       <div class="main-data-bottom ovf-hidden" id="tabZMHS" style="display: none">
-                                          <div class=" main-data-bottom ovf-hidden" style="width: 50%; float: left; margin: 0; padding:0;" id="coeSpread"></div>
-                                          <div class=" main-data-bottom ovf-hidden" style="width: 50%; float: left; margin: 0; padding:0;" id="assSpread"></div>
+                                          <div class=" main-data-bottom ovf-hidden" style="width: 60%; float: left; margin: 0; padding:0;" id="coeSpread"></div>
+                                          <div  id="zmhsResize" style="width: 0.2%; height: 100%; resize:horizontal; cursor: w-resize; float: left; background: #F1F1F1"></div>
+                                          <div class=" main-data-bottom ovf-hidden" style="width: 39.8%; float: left; margin: 0; padding:0;" id="assSpread"></div>
                                       </div>
                                       <div class="main-data-bottom ovf-hidden" style="display: none" id="comments">
                                           <textarea style="font-size: 0.9rem" class="form-control" rows="8" readonly=""></textarea>
@@ -337,11 +340,11 @@
                                       </div>
                                   </div>
                                   <div class="resize" id="zyResize" style="background: #F1F1F1"></div>
-                                  <div class="p-1 row" id="zyTools" style="background: #F1F1F1">
+                                  <div class="p-0 row" id="zyTools" style="background: #F1F1F1">
                                       <div class="col">
-                                          <button id="guidanceInsertBills" class="btn btn-primary btn-sm" type="button">插入清单</button>
-                                          <button id="guidanceInsertRation" class="btn btn-primary btn-sm" type="button">插入定额</button>
-                                          <button id="guidanceInsertBillsAndRation" class="btn btn-primary btn-sm" type="button">插入清单和定额</button>
+                                          <button id="guidanceInsertBills" class="btn btn-primary btn-sm" style="height: 25px; line-height: 1px;" type="button">插入清单</button>
+                                          <button id="guidanceInsertRation" class="btn btn-primary btn-sm" style="height: 25px; line-height: 1px;" type="button">插入定额</button>
+                                          <button id="guidanceInsertBillsAndRation" class="btn btn-primary btn-sm" style="height: 25px; line-height: 1px;" type="button">插入清单和定额</button>
                                       </div>
                                   </div>
                                   <div class="bottom-content">
@@ -1504,7 +1507,7 @@
     </div>
 </div>
 <!--定额弹出 说明 和 工程量计算规则-->
-<div class="modal fade" id="rationQuestionModal" data-backdrop="static">
+<div class="modal fade" id="questionModal" data-backdrop="static">
     <div class="modal-dialog modal-lg" role="document">
         <div class="modal-content">
             <div class="modal-body">
@@ -1513,15 +1516,15 @@
                 </button>
                 <ul class="nav nav-tabs mb-3" role="tablist">
                     <li class="nav-item">
-                        <a class="nav-link active px-3" data-toggle="tab" href="#m-explanation" role="tab">说明</a>
+                        <a class="nav-link active px-3" data-toggle="tab" href="#m-explanation" id="questionTab1" role="tab">说明</a>
                     </li>
                     <li class="nav-item">
-                        <a class="nav-link px-3" data-toggle="tab" href="#m-ruleText" role="tab">工程量计算规则</a>
+                        <a class="nav-link px-3" data-toggle="tab" href="#m-ruleText" id="questionTab2" role="tab">工程量计算规则</a>
                     </li>
                 </ul>
                 <div class="tab-content">
                     <div class="tab-pane active" id="m-explanation" role="tabpanel">
-                        <div class="modal-auto-height" id="explanationContent">
+                        <div class="modal-auto-height" id="questionContent1">
                             <h3>标题1</h3>
                             <h4>标题2</h4>
                             <h5>标题3</h5>
@@ -1536,7 +1539,7 @@
                         </div>
                     </div>
                     <div class="tab-pane" id="m-ruleText" role="tabpanel">
-                        <div class="modal-auto-height" id="ruleTextContent">
+                        <div class="modal-auto-height" id="questionContent2">
                             <h3>标题x1</h3>
                             <h4>标题2</h4>
                             <h5>标题3</h5>

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

@@ -32,7 +32,7 @@ $(function () {
     slideResize(getMainResizeEles(), {min: 170, max: 700}, 'height', function() {
         projectObj.mainSpread.refresh();
         refreshSubSpread();
-        zmhs_obj.refresh();
+        //zmhs_obj.refresh();
         $('#comments').find('textarea').height($('#comments').height() - 25);
     });
 
@@ -123,13 +123,13 @@ function slideResize(eles, limit, type, callback) {
             nEleChangeSize = nEleSize + moveSize;
             nEleChangeSize = nEleChangeSize < limit.min ? limit.min : nEleChangeSize;
             nEleChangeSize = nEleChangeSize > limit.max ? limit.max + 9 : nEleChangeSize;
-
             fEleChangeSize = fEleSize - moveSize;
             fEleChangeSize = fEleChangeSize < limit.min ? limit.min : fEleChangeSize;
             fEleChangeSize = fEleChangeSize > limit.max ? limit.max + 9 : fEleChangeSize;
 
             if(type === 'width'){
                 let rePercent = getResizeWidthPercent(nEleChangeSize, fEleChangeSize);
+                console.log(rePercent);
                 eles.nearElement.css(type, rePercent.nearPercent);
                 eles.farElement.css(type, rePercent.farPercent);
             }

+ 3 - 0
web/building_saas/main/js/models/installation_fee.js

@@ -669,6 +669,7 @@ var installation_fee = {
                         unit:'元',
                         type:gljType.LABOUR,
                         basePrice:1,
+                        marketPrice:1,
                         adjCoe:null,
                         from:'std',
                         repositoryId:-1,
@@ -688,6 +689,7 @@ var installation_fee = {
                         unit:'元',
                         type:gljType.GENERAL_MATERIAL,
                         basePrice:1,
+                        marketPrice:1,
                         adjCoe:null,
                         from:'std',
                         repositoryId:-1,
@@ -707,6 +709,7 @@ var installation_fee = {
                         unit:'元',
                         type:gljType.GENERAL_MACHINE,
                         basePrice:1,
+                        marketPrice:1,
                         adjCoe:null,
                         from:'std',
                         repositoryId:-1,

+ 12 - 2
web/building_saas/main/js/models/quantity_detail.js

@@ -724,10 +724,15 @@ var quantity_detail = {
 
 
         quantity_detail.prototype.updateBillQuantity=function (value,node,quantityEXP,editingText) {
+            let oldQuantityEXP =  node.data.quantityEXP;
             node.data.quantityEXP = quantityEXP?quantityEXP:editingText;
             value = scMathUtil.roundForObj(value,getDecimal("quantity",node));
-            node.data.quantity = value+"";
-            console.log(value);
+            let newQuantity =  value+"";
+            if(oldQuantityEXP == node.data.quantityEXP && node.data.quantity == newQuantity){ //相当于什么都没改,不用做提交操作
+                projectObj.mainController.refreshTreeNode([node]);//这里要再刷新一下,因为工程量要把手工输入的值刷新为转换后的值再显示
+                return;
+            }
+            node.data.quantity = newQuantity;
             let needUpdateChildren = [];//需更新的子定额
             let gljNodes=[];//当定额工程量改变时需刷新的子工料机
             if(node.children.length>0){//如果有子项
@@ -791,10 +796,15 @@ var quantity_detail = {
             gljOprObj.refreshView();
         };
         quantity_detail.prototype.updateRationQuantity=function(value,node,quantityEXP,editingText){
+            let oldQuantityEXP =  node.data.quantityEXP;
             node.data.quantityEXP = quantityEXP?quantityEXP:editingText;
             //value = scMathUtil.roundForObj(value,getDecimal("ration.quantity"));
             value = project.quantity_detail.autoTransformQuantity(value,node);//先转换再4舍5入
             value = scMathUtil.roundForObj(value,decimalObj.decimal("quantity",node));
+            if(oldQuantityEXP == node.data.quantityEXP && node.data.quantity == value){ //相当于什么都没改,不用做提交操作
+                projectObj.mainController.refreshTreeNode([node]);//这里要再刷新一下,因为工程量要把手工输入的值刷新为转换后的值再显示
+                return;
+            }
             node.data.quantity=value;
             if(node.parent.data.quantity&&node.parent.data.quantity!=0&&node.parent.data.quantity!=""){
                 var billQuantity = scMathUtil.roundForObj(node.parent.data.quantity,getDecimal("quantity",node.parent));

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

@@ -34,8 +34,8 @@ let gljCol = {
     project_glj_setting:{
         header: [
             {headerName: "编码", headerWidth: 80, dataCode: "code", dataType: "String"},
-            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String",cellType:'tipsCell'},
-            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", hAlign: "left", dataType: "String",cellType:'tipsCell'},
+            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 160, dataCode: "specs", hAlign: "left", dataType: "String",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "类型", headerWidth: 45, dataCode: "short_name", hAlign: "center", dataType: "String"},
             {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"

+ 11 - 7
web/building_saas/main/js/views/glj_view.js

@@ -718,13 +718,13 @@ var gljOprObj = {
         this.sheetData = newList;
     },
     combineWithProjectGlj: function (ration_gljs,needRatio=true) {
-        var projectGLJData = projectObj.project.projectGLJ.datas;
-        var projectGljs = projectGLJData.gljList;
-        var mixRatioMap = projectGLJData.mixRatioMap;
+        let projectGLJData = projectObj.project.projectGLJ.datas;
+        let projectGljs = projectGLJData.gljList;
+        let mixRatioMap = projectGLJData.mixRatioMap;
         if (ration_gljs && ration_gljs.length > 0 && projectGljs && projectGljs.length > 0) {
 
-            for (var i = 0; i < ration_gljs.length; i++) {
-                var glj = _.find(projectGljs, {'id': ration_gljs[i].projectGLJID});
+            for (let i = 0; i < ration_gljs.length; i++) {
+                let glj = _.find(projectGljs, {'id': ration_gljs[i].projectGLJID});
                 if (glj) {
                     if(projectObj.project.projectGLJ.isEstimateType(ration_gljs[i].type )){
                         ration_gljs[i].isEstimate = glj.is_evaluate;
@@ -732,9 +732,9 @@ var gljOprObj = {
                     ration_gljs[i].shortName =projectObj.project.projectGLJ.getShortNameByID(ration_gljs[i].type);
                     ration_gljs[i].isAdd = glj.unit_price.is_add;
                     ration_gljs[i]=this.setGLJPrice(ration_gljs[i],glj);//设置工料机价格
-                    var connect_index = this.getIndex(glj, gljKeyArray);
+                    let connect_index = this.getIndex(glj, gljKeyArray);
                     if (needRatio==true&&mixRatioMap.hasOwnProperty(connect_index)) {
-                        var mixRatios = this.getMixRationShowDatas(mixRatioMap[connect_index], projectGljs);
+                        let mixRatios = this.getMixRationShowDatas(mixRatioMap[connect_index], projectGljs);
                         ration_gljs[i].subList = mixRatios;
                     }
                 }
@@ -864,6 +864,10 @@ var gljOprObj = {
             recode? me.sheet.getCell(args.row, args.col).value(recode[updateField]): me.sheet.getCell(args.row, args.col).value(null);
             return;
         }
+        if(args.editingText){
+            args.editingText = args.editingText.replace(/[\r\n]/g, "");//去掉回车换行等字符;
+            me.sheet.getCell(args.row, args.col).value(args.editingText);
+        }
         if (updateField == 'marketPrice' || updateField == 'customQuantity' || updateField == 'basePrice') {
             if (args.editingText == null) {
                 updateField == 'marketPrice' ? newval = 0 : newval = "";

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

@@ -60,7 +60,7 @@ let MainTreeCol = {
         },
         marketPrice:function (node) {
             if((node.sourceType === projectObj.project.Ration.getSourceType()&&node.data.type!=rationType.ration)||node.sourceType==projectObj.project.ration_glj.getSourceType()){
-                return calcTools.uiGLJPrice(node.data.marketUnitFee);
+                if(node.data.marketUnitFee)  return calcTools.uiGLJPrice(node.data.marketUnitFee);
             }
         },
         feeRate:function (node) {

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

@@ -24,8 +24,8 @@ projectGljObject={
     materialSetting:{
         header:[
             {headerName: "编码", headerWidth: 200, dataCode: "code", dataType: "String"},
-            {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String"},
-            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", hAlign: "left", dataType: "String"},
+            {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String"},
+            {headerName: "规格型号", headerWidth: 160, dataCode: "specs", hAlign: "left", dataType: "String"},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
             {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"

+ 11 - 5
web/building_saas/main/js/views/project_view.js

@@ -1184,6 +1184,7 @@ var projectObj = {
                     },
                     callback: function (key, opt) {
                         ProjectController.addFB(project, controller);
+                        projectObj.selectColAndFocus(project.mainTree.selected);
                     },
                     visible: function(key, opt){
                         if(project.mainTree.selected){
@@ -1221,6 +1222,7 @@ var projectObj = {
                     },
                     callback: function (key, opt) {
                         ProjectController.addFX(project, controller);
+                        projectObj.selectColAndFocus(project.mainTree.selected);
                     },
                     visible: function(key, opt){
                         if(project.mainTree.selected){
@@ -1248,6 +1250,7 @@ var projectObj = {
                             }
                         }
                         ProjectController.addBills(project, controller);
+                        projectObj.selectColAndFocus(project.mainTree.selected);
                     },
                      visible: function(key, opt){
                          if(project.mainTree.selected){
@@ -1285,7 +1288,10 @@ var projectObj = {
                         return !project.Ration.canAdd(project.mainTree.selected);
                     },
                     callback: function (key, opt) {
-                        project.Ration.addNewRation(null,rationType.volumePrice,null,true);
+                        project.Ration.addNewRation(null,rationType.volumePrice,function (newNode) {//插入量价不需要自动定位到编号列
+                            projectObj.selectColAndFocus(newNode,null);
+                        },true);
+
                        // ProjectController.addRation(project, controller, rationType.volumePrice);
                     },
                   /*  items:{
@@ -1911,7 +1917,7 @@ var projectObj = {
     },
     selectColAndFocus :function (newNode,field = 'code') {//选中单元格并设置焦点
         if(newNode){
-            projectObj.mainController.sheet.setSelection(newNode.serialNo(), colSettingObj.getColByField(field), 1, 1);  //
+            if(field != null) projectObj.mainController.sheet.setSelection(newNode.serialNo(), colSettingObj.getColByField(field), 1, 1);  //自动定位到编号单元格
             projectObj.mainSpread.focus();
         }
     }
@@ -2673,7 +2679,7 @@ function doAfterImportPosition(positionData){
     let ration_datas = projectObj.project.Ration.datas;
     let quantity_detail_datas = projectObj.project.quantity_detail.datas;
     let ration_glj_datas = projectObj.project.ration_glj.datas;
-    let ration_coe_daRtas = projectObj.project.ration_coe.datas;
+    let ration_coe_datas = projectObj.project.ration_coe.datas;
     let ration_install_datas = projectObj.project.ration_installation.datas;
     let delNodes = [];
     for(let billID of positionData.remove.bill){
@@ -2743,9 +2749,9 @@ function doAfterImport(resData){
             doAfterImportPosition(positionData);
         }
         //如果清单未锁定,导入后锁定清单
-        if(!projectInfoObj.projectInfo.property.lockBills){
+        /*if(!projectInfoObj.projectInfo.property.lockBills){
             $("a[name='lockBills']").click();
-        }
+        }*/
         $.bootstrapLoading.end();
         //重算
         projectObj.project.calcProgram.calcAllNodesAndSave(calcAllType.catAll, function () {

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

@@ -187,10 +187,10 @@ let quantityEditObj = {
     },
     checkingAndUpdate(quantityEXP,node){
         let me = this;
-        if(quantityEXP === node.data.quantityEXP){ //没有变化,不做任何操作
+       /* if(quantityEXP === node.data.quantityEXP){ //没有变化,不做任何操作
             projectObj.mainController.refreshTreeNode([node]);
             return true;
-        }
+        }*/
         quantityEXP = quantityEXP?quantityEXP.toUpperCase():'';//非空判断
         quantityEXP =replaceAll('(','(',quantityEXP);//转换中文左右符号
         quantityEXP =replaceAll(')',')',quantityEXP);

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

@@ -3,6 +3,8 @@
  */
 $(window).resize(function() {
     sheetCommonObj.setColumnWidthByRate($('#stdRationChapter').width() - 40, rationLibObj.rationChapterSpread, rationLibObj.rationChapterTreeSetting.cols);
+    billsGuidance.setColumnWidthByRate(billsGuidance.elfItem.workBook, $('#zy').width(), billsGuidance.elfItem.headers);
+    billsGuidance.refreshWorkBook();
     rationLibObj.refreshSpread();
 });
 //造价书与清单定额库左右拖动
@@ -21,7 +23,7 @@ slideResize(sideResizeEles, {min: 250, max: $('#zaojiashu').width()-260}, 'width
     projectObj.refreshMainSpread();
     refreshSubSpread();
     if(sideResizeEles.id === 'stdBillsGuidanceTab'){
-        billsGuidance.setColumnWidthByRate(billsGuidance.elfItem.workBook, $('#zy').width(), billsGuidance.elfItem.headers)
+        billsGuidance.setColumnWidthByRate(billsGuidance.elfItem.workBook, $('#zy').width(), billsGuidance.elfItem.headers);
         billsGuidance.refreshWorkBook();
     }
     else if(sideResizeEles.id === 'stdRationTab'){

+ 34 - 8
web/building_saas/main/js/views/std_billsGuidance_lib.js

@@ -343,7 +343,7 @@ const billsGuidance = (function () {
             sheet.setRowHeight(0, 30, GC.Spread.Sheets.SheetArea.colHeader);
             sheet.setColumnWidth(0, sheet.getParent() === bills.workBook ? 15 : 25, GC.Spread.Sheets.SheetArea.rowHeader);
             if(sheet.getParent() === elfItem.workBook || sheet.getParent() === guideItem.workBook){
-                sheet.setRowHeight(0, 25, GC.Spread.Sheets.SheetArea.colHeader);
+                sheet.setRowHeight(0, 20, 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);
@@ -372,6 +372,7 @@ const billsGuidance = (function () {
     //@param {Object}workBook {Number}workBookWidth {Array}headers @return {void}
     function setColumnWidthByRate(workBook, workBookWidth, headers) {
         if(workBook){
+            workBookWidth -= 48;
             const sheet = workBook.getActiveSheet();
             sheet.suspendEvent();
             sheet.suspendPaint();
@@ -379,7 +380,7 @@ const billsGuidance = (function () {
                 if(headers[col]['rateWidth'] !== undefined && headers[col]['rateWidth'] !== null && headers[col]['rateWidth'] !== ''){
                     let width = workBookWidth * headers[col]['rateWidth'];
                     if(headers[col]['dataCode'] === 'options'){
-                        width = width - 70;
+                        width = width;
                     }
                     sheet.setColumnWidth(col, width, GC.Spread.Sheets.SheetArea.colHeader)
                 }
@@ -452,8 +453,32 @@ const billsGuidance = (function () {
             node = node.parent;
         }
         let recharge = node && node.data.recharge ? node.data.recharge : '无内容';
-        $('#billsQuestionContent').html(recharge);
-        $('#billsQuestionModal').modal('show');
+        node = bills.tree.items[row];
+        while (node && !node.data.ruleText){
+            node = node.parent;
+        }
+        let ruleText = node && node.data.ruleText ? node.data.ruleText : '无内容';
+
+        $('#questionTab1').text('补注');
+        $('#questionTab2').text('工程量计算规则');
+        $('#questionContent1').html(recharge);
+        $('#questionContent2').html(ruleText);
+        $('#questionModal').modal('show');
+    }
+    //节点链上含有补注或工程量计算规则数据
+    //@param {Number}row(行当前行) @return {Boolean}
+    function hasRechargeRuleText(row) {
+        let node = bills.tree.items[row];
+        if (!node) {
+            return false;
+        }
+        while (node) {
+            if (node.data.recharge || node.data.ruleText) {
+                return true;
+            }
+            node = node.parent;
+        }
+        return false;
     }
     //初始化并输出树
     //@param {Object}module {Object}sheet {Object}treeSetting {Array}datas
@@ -469,7 +494,7 @@ const billsGuidance = (function () {
             setBillsHint(bills.tree.items, stdBillsJobData, stdBillsFeatureData);
             renderSheetFunc(sheet, function () {
                 for(let i = 0; i < bills.tree.items.length; i++){
-                    sheet.setCellType(i, 1, TREE_SHEET_HELPER.getQuestionCellType(initRechargeModal));
+                    sheet.setCellType(i, 1, TREE_SHEET_HELPER.getQuestionCellType(initRechargeModal, hasRechargeRuleText));
         }
             });
         }
@@ -754,8 +779,9 @@ const billsGuidance = (function () {
             let height = cellRect.height;
             top = top.replace('px', '');
             let options = getOptions(node.data, bills.tree.selected.elf.datas);
+            top = options.length - 2 > 4 ? top - 4 * height : top - (options.length - 2) * height - 5;
             let $editInput = $(`<div style="height: ${height}px; background: ${cellStyle.backColor};overflow: hidden; white-space: nowrap; text-overflow: ellipsis">${node.data.options}</div>`),
-                $optDiv = $(`<div style="position: fixed; width: ${cellRect.width}px; top: ${top - (options.length - 2) * height - 5}px;background: ${cellStyle.backColor};border: 1px solid; overflow: auto; height: ${options.length > 6 ? height*6 : height*options.length+5}px; font-size: 0.9rem;"></div>`);
+                $optDiv = $(`<div style="position: fixed; width: ${cellRect.width}px; top: ${top}px;background: ${cellStyle.backColor};border: 1px solid; overflow: auto; height: ${options.length > 6 ? height*6 : height*options.length+5}px; font-size: 0.9rem;"></div>`);
             for(let opt of options){
                 let $opt = $(`<div title="${opt.name ? opt.name : ''}" class="elf-options" style="height: ${height}px;overflow: hidden; white-space: nowrap; text-overflow: ellipsis"></div>`),
                     $optInput = $(`<input rank="${opt.rank}" value="${opt.ID}" style="margin-left: 5px; vertical-align: middle" type="checkbox" 
@@ -764,14 +790,14 @@ const billsGuidance = (function () {
                 $opt.prepend($optInput);
                 $optDiv.append($opt);
                 //选项复选框点击监听
-                $optInput.click(function () {
+                $opt.click(function () {
                     //单选
                     if(billsGuidanceSelMode === 0){
                         let $allInput = $optDiv.find('input');
                         for(let input of $allInput){
                             $(input).prop('checked', false);
                         }
-                        $(this).prop('checked', 'checked');
+                        $($optInput).prop('checked', 'checked');
                         elfItem.workBook.getSheet(0).endEdit();
                     } else {//多选
 

+ 18 - 3
web/building_saas/main/js/views/std_ration_lib.js

@@ -76,14 +76,29 @@ var rationLibObj = {
             node = node.parent;
         }
         let explanation = node && node.data.explanation ? node.data.explanation : '无内容';
-        $('#explanationContent').html(explanation);
         node = rationLibObj.tree.items[row];
+        $('#questionContent1').html(explanation);
         while (node && !node.data.ruleText){
             node = node.parent;
         }
         let ruleText = node && node.data.ruleText ? node.data.ruleText : '无内容';
-        $('#ruleTextContent').html(ruleText);
-        $('#rationQuestionModal').modal('show');
+        $('#questionTab1').text('说明');
+        $('#questionTab2').text('工程量计算规则');
+        $('#questionContent2').html(ruleText);
+        $('#questionModal').modal('show');
+    },
+    hasExplanationRuleText: function(row) {
+        let node = rationLibObj.tree.items[row];
+        if (!node) {
+            return false;
+        }
+        while (node) {
+            if (node.data.explanation || node.data.ruleText) {
+                return true;
+            }
+            node = node.parent;
+        }
+        return false;
     },
     loadStdRation: function (rationLibID) {
         $.bootstrapLoading.start();

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

@@ -469,11 +469,11 @@ function refreshSubSpread(){
     if(pageCCOprObj.active){
         contentOprObj.workBook.refresh();
         characterOprObj.workBook.refresh();
-    }
-    else{
+    } else{
         if(subSpread) subSpread.refresh();
         if(MaterialController.spread) MaterialController.spread.refresh();
     }
+    if($('#linkZMHS').hasClass('active')) zmhs_obj.refresh();
 }
 
 let subViewObj = {

+ 14 - 0
web/building_saas/main/js/views/zmhs_view.js

@@ -316,3 +316,17 @@ let zmhs_obj = {
         return true;
     }
 };
+
+let zmhs_sideResizeEles = {};
+zmhs_sideResizeEles.id = 'tabZMHS';
+zmhs_sideResizeEles.resize = $('#zmhsResize');
+zmhs_sideResizeEles.evFixedSize = `$(window).width()-$('.main-nav').width()-5`;
+zmhs_sideResizeEles.nearElement = $('#coeSpread');
+zmhs_sideResizeEles.nearSpread = $('#coeSpread');
+zmhs_sideResizeEles.farElement = $('#assSpread');
+zmhs_sideResizeEles.farSpread = $('#assSpread');
+zmhs_sideResizeEles.nav = null;
+slideResize(zmhs_sideResizeEles, {min: 100, max: $('#tabCon').width()-100}, 'width', function(){
+    zmhs_obj.refresh();
+});
+

+ 6 - 1
web/building_saas/pm/html/project-management.html

@@ -16,11 +16,13 @@
     <link rel="stylesheet" href="/lib/ztree/css/zTreeStyle.css" type="text/css">
     <link rel="stylesheet" href="/lib/jquery-contextmenu/jquery.contextMenu.css">
     <!-- endinject -->
-
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <script>
         // 这里的变量供页面调用
         var userAccount = '<%- userAccount %>';
         var userID = '<%- userID %>';
+        console.log(userID);
     </script>
     <style type="text/css">
         .hidden-area{
@@ -38,6 +40,7 @@
 <img src="/web/dest/css/img/project.png" id="proj_pic" style="display: none">
 <img src="/web/dest/css/img/engineering.png" id="eng_pic" style="display: none">
 <img src="/web/dest/css/img/tender.png" id="tender_pic" style="display: none">
+<img src="/web/dest/css/img/refresh.png" id="refresh_pic" style="display: none">
 <div class="header">
     <div class="top-msg clearfix">
         <div class="alert alert-warning mb-0 py-0" role="alert" style="display: none;">
@@ -682,6 +685,8 @@
 <script src="/public/web/sheet/sheet_common.js"></script>
 <script type="text/javascript" src="/public/web/common_ajax.js"></script>
 <script src="/lib/JSExpressionEval_src/Date.js"></script>
+<script src="/web/building_saas/glj/js/socket.io.slim.js"></script>
+<script src="/public/web/socket/connection.js"></script>
 <script src="/web/building_saas/pm/js/pm_ajax.js"></script>
 <script src="/web/building_saas/pm/js/pm_newMain.js"></script>
 <script src="/web/building_saas/pm/js/pm_gc.js"></script>

+ 17 - 1
web/building_saas/pm/js/pm_newMain.js

@@ -66,6 +66,7 @@ const projTreeObj = {
             {name: '占造价比例(%)', dataCode: 'rate', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
             {name: '建筑面积', dataCode: 'buildingArea', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
             {name: '单方造价', dataCode: 'perCost', width: 100, vAlign: 'center', hAlign: 'right', formatter: '0.00'},
+            {name: '工程专业', dataCode: 'feeStandardName', width: 100, vAlign: 'center', hAlign: 'left'},
             {name: '单价文件', dataCode: 'unitPriceFile', width: 140, vAlign: 'center', hAlign: 'left'},
             {name: '费率文件', dataCode: 'feeRateFile', width: 140, vAlign: 'center', hAlign: 'left'},
             {name: '创建日期', dataCode: 'createDateTime', width: 100, vAlign: 'center', hAlign: 'center'}
@@ -725,9 +726,11 @@ const projTreeObj = {
                         imgWidth = 14;
                     }
                     else if(node.data.projType === projectType.tender){
-                        img = document.getElementById('tender_pic');
+                        //如果单位工程不是实时计算结果,则显示刷新标记
+                        img = node.data.changeMark && node.data.changeMark!=""? document.getElementById('refresh_pic'):document.getElementById('tender_pic');
                         imgWidth = 14;
                     }
+
                     ctx.drawImage(img, centerX+indent/2+3, centerY - 7, imgWidth,imgHeight);
                 }
                 // Draw Vertical Line
@@ -1659,8 +1662,16 @@ function init() {
     billValuation = billValuation.replace(/\n/g, '\\n');
     rationValuation = rationValuation.replace(/\n/g, '\\n');
     //init spread and pmTree
+    socketObject.connect('pm');//socket 连接;
     $.bootstrapLoading.start();
     GetAllProjectData(function (datas) {
+        //设置工程专业
+        for (let data of datas) {
+            if (data.projType === projectType.tender) {
+                data.feeStandardName = data.property.feeStandardName || '';
+            }
+        }
+        console.log(datas);
         CommonAjax.post('/options/getOptions', [], function (rstData) {
             projTreeObj.setting.style.selectedColor = rstData.COLOROPTS.SELECTED.backColor;
             projTreeObj.tree = pmTree.createNew(projTreeObj.setting, datas);
@@ -1865,6 +1876,7 @@ function AddTenderItems(selected, projName, engName, tenderName, property, callb
                         }
                         else if(data.updateData.projType === projectType.tender){
                             tenderData = data.updateData;
+                            tenderData.feeStandardName = tenderData.property.feeStandardName || '';
                         }
                     }
                 });
@@ -1903,6 +1915,7 @@ function AddTenderItems(selected, projName, engName, tenderName, property, callb
                         }
                         else if(data.updateData.projType === projectType.tender){
                             tenderData = data.updateData;
+                            tenderData.feeStandardName = tenderData.property.feeStandardName || '';
                         }
                     }
                 });
@@ -1926,6 +1939,7 @@ function AddTenderItems(selected, projName, engName, tenderName, property, callb
                 datas.forEach(function (data) {
                     if(data.updateType === 'new') {
                         setInitSummaryData(data.updateData);
+                        data.updateData.feeStandardName = data.updateData.property.feeStandardName || '';
                         projTreeObj.insert(data.updateData, tempEng, null);
                     }
                 });
@@ -3377,6 +3391,8 @@ function refreshProjSummary(project, summaryInfo) {
             node.data.rate = nodeInfo.rate;
             node.data.buildingArea = nodeInfo.buildingArea;
             node.data.perCost = nodeInfo.perCost;
+            node.data.changeMark = nodeInfo.changeMark;
+            if(nodeInfo.property) node.data.property = nodeInfo.property;
         }
     }
     projTreeObj.refreshNodeData(refreshNodes);

+ 8 - 5
web/common/html/header.html

@@ -1,12 +1,15 @@
 <nav class="navbar navbar-expand-lg p-0 d-flex">
-    <% if(controller === 'boot'){ %>
-    <a style="text-decoration: none" href="javascript:void(0);" class="header-logo">
+    <% if(controller === 'boot' || controller === 'pm'){ %>
+    <!--<a style="text-decoration: none" href="javascript:void(0);" class="header-logo">-->
     <% }else { %>
-        <a style="text-decoration: none" href="/pm" class="header-logo">
+    <div class="mx-2"><a href="/pm" class="btn btn-sm" data-toggle="tooltip" title="返回"><i class="fa fa-angle-left" style="font-size:24px"></i></a></div>
+        <!--<a style="text-decoration: none" href="/pm" class="header-logo">-->
     <% } %>
-        <div class="v-title">纵横云计价</div>
+    <div class="header-logo">
+        <div class="v-title"><%= compilationName %></div>
         <div class="p-title"><%= versionName %></div>
-    </a>
+    </div>
+    <!--</a>-->
     <div  class="navbar-text navbar-crumb px-1" id="fullpath">
 
     </div>

+ 2 - 0
web/users/html/login-infoinput.html

@@ -9,6 +9,8 @@
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
 </head>
 
 <body>

+ 2 - 0
web/users/html/login.html

@@ -10,6 +10,8 @@
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
     <!-- endinject -->
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
 </head>
 <body>
     <div class="container">

+ 6 - 4
web/users/html/user-buy.html

@@ -9,6 +9,8 @@
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
 </head>
 
 <body>
@@ -51,10 +53,10 @@
                                   <div class=" card-body">
                                     <h3 class="card-title">免费版 </h3>
                                       <p class="card-text">
-                                      <ul class="pl-3">
+                                    <!--  <ul class="pl-3">
                                           <li>只可创建 50 个单位工程</li>
                                           <li>报表带水印</li>
-                                      </ul>
+                                      </ul>-->
                                       </p>
                                   </div>
                                     <ul class="list-group list-group-flush">
@@ -76,10 +78,10 @@
                                   <div class=" card-body">
                                     <h3 class="card-title">专业版</h3>
                                       <p class="card-text">
-                                      <ul class="pl-3">
+                                      <!--<ul class="pl-3">
                                           <li>创建单位工程无限制</li>
                                           <li>报表无水印</li>
-                                      </ul>
+                                      </ul>-->
                                       </p>
                                   </div>
                                     <ul class="list-group list-group-flush">

+ 2 - 0
web/users/html/user-info.html

@@ -9,6 +9,8 @@
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
 </head>
 
 <body>

+ 2 - 0
web/users/html/user-safe.html

@@ -9,6 +9,8 @@
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
     <!-- JS. -->
     <!--<script type="text/javascript" src="/lib/bootstrap/bootstrap-paginator.js"></script>-->
     <!--<script src="/web/building_saas/js/global.js"></script>-->

+ 2 - 0
web/users/html/user-set.html

@@ -9,6 +9,8 @@
     <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
     <link rel="stylesheet" href="/web/building_saas/css/main.css">
     <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
+    <link rel="shortcut icon" href="/web/building_saas/css/favicon.ico">
+    <link rel="icon" type="image/gif" href="/web/building_saas/css/animated_favicon1.gif">
 </head>
 
 <body>