Browse Source

Merge branch '1.0.0_online' of http://smartcost.f3322.net:3000/SmartCost/ConstructionCost into 1.0.0_online

chenshilong 6 years ago
parent
commit
ff3b21348e

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

@@ -79,7 +79,7 @@ module.exports = {
     },
     updateProjects: async function (req, res) {
         let data = JSON.parse(req.body.data);
-        await ProjectsData.updateUserProjects(req.session.sessionUser.id, req.session.sessionCompilation._id, data.updateData, function (err, message, data) {
+        await ProjectsData.updateUserProjects(req.session.sessionUser.id, req.session.sessionCompilation._id, req.session.sessionCompilation.name, data.updateData, function (err, message, data) {
             if (err === 0) {
                 callback(req, res, err, message, data);
             } else {

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

@@ -105,7 +105,7 @@ ProjectsDAO.prototype.getUserProject = function (userId, ProjId, callback) {
     });
 };
 
-ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId, datas, callback) {
+ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId, compilationName, datas, callback) {
     let data, project, updateLength = 0, hasError = false, deleteInfo = null, i, newProject;
     let updateAll = function (err) {
         if (!err) {
@@ -169,7 +169,8 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
                     //data.updateData.property.basicInformation = basicInformation;
                     //工程特征
                     if(data.updateData.property.featureLibID){
-                        data.updateData.property.projectFeature = await pmFacade.getProjectFeature(data.updateData.property.featureLibID, data.updateData.property.engineeringName);
+                        //工程专业显示费用定额的名称
+                        data.updateData.property.projectFeature = await pmFacade.getProjectFeature(data.updateData.property.featureLibID, compilationName);
                     }
                     /*projectFeature[0]['value'] = data.updateData.property.engineeringName || '';
                     data.updateData.property.projectFeature = projectFeature;*/

+ 6 - 0
public/web/tool_toast_util.js

@@ -0,0 +1,6 @@
+/**
+ * Created by zhang on 2018/9/26.
+ */
+
+/*
+<div id="toolToastWrap" style="left: 20px; right: 30px; position: fixed; z-index: 10001; top: 100px;"><div id="toolToast" class="toolToast"><span id="tool-toast-content">右键不支持粘贴外部内容,请使用Ctrl+V粘贴。<span id="toolToastBtn">我知道了</span></span></div></div>*/

+ 57 - 0
web/building_saas/css/custom.css

@@ -145,4 +145,61 @@ legend.legend{
     background-image: url("/lib/jquery-ui/images/ui-icons_444444_256x240.png");
     background-repeat: no-repeat;
     background-position: -90px -12px;
+}
+
+.feerateInput {
+    padding: 0;
+}
+
+#toolToastWrap{
+    display:-webkit-box;
+    display:-ms-flexbox;
+    display:flex;
+    -webkit-box-pack:center;
+    -ms-flex-pack:center;
+    justify-content:center;
+    pointer-events:none;
+}
+
+#toolToast{
+    padding:11px 20px;
+    line-height:18px;
+    font-size:14px;
+    position:relative;
+    word-wrap:break-word;
+    color:#fff;
+    text-align:center;
+    background:rgba(0,0,0,.75);
+    background-size:cover;
+    -webkit-user-select:none;
+    -moz-user-select:none;
+    -ms-user-select:none;
+    user-select:none;
+    display:-webkit-box;
+    display:-ms-flexbox;
+    display:flex;
+    -webkit-box-align:center;
+    -ms-flex-align:center;
+    align-items:center;
+    max-width:686px;
+    box-sizing:border-box;
+    box-shadow:0 0 0 0 rgba(0,0,0,.15),0 2px 5px 0 rgba(0,0,0,.25);
+    pointer-events:auto;
+    border-radius:2px
+}
+
+#toolToastBtn{
+    color:#0188fb;
+    margin:0 2px;
+    white-space:nowrap;
+    cursor:pointer;
+    font-weight:700
+}
+
+#toolToastBtn:hover{
+    color:#4060c9
+}
+
+#toolToastBtn:active{
+    color:#354ea1
 }

+ 12 - 3
web/building_saas/css/main.css

@@ -309,6 +309,18 @@ a{
 .bottom-content .tab-content .ovf-hidden{
     overflow: hidden;
 }
+.tn-nav{
+    width:30px;
+    height: 100%;
+    border-left:1px solid #dee2e6 ;
+}
+.tn-nav > span{
+    width:20px;
+}
+.tn-nav:hover{
+    background:#f7f7f9;
+    cursor: pointer;
+}
 .form-signin {
     max-width: 500px;
     margin: 150px auto;
@@ -399,9 +411,6 @@ a{
 .custom-file-input:lang(zh) ~ .custom-file-label::after {
     content: "浏览";
 }
-.custom-file-input{
-    cursor: pointer;
-}
 
 .message-box {
     position:absolute;

+ 1 - 1
web/building_saas/fee_rates/fee_rate.html

@@ -156,7 +156,7 @@
                 </div>
             </div>
             <div class="modal-footer">
-                <button type="button" class="btn btn-primary" data-dismiss="modal" id="renameConfirm" disabled>确定</button>
+                <button type="button" class="btn btn-primary" id="renameConfirm">确定</button>
                 <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
             </div>
         </div>

+ 118 - 157
web/building_saas/main/html/main.html

@@ -35,6 +35,11 @@
 </head>
 
 <body>
+<!--<div id="toolToastWrap" style="left: 20px; right: 30px; position: fixed; z-index: 10001; top: 100px;">
+    <div id="toolToast" class="toolToast">
+        <span id="tool-toast-content">右键不支持粘贴外部内容,请使用Ctrl+V粘贴。<span id="toolToastBtn">我知道了</span></span>
+    </div>
+</div>-->
     <div class="header">
          <div class="top-msg clearfix">
             <div class="alert alert-warning mb-0 py-0" role="alert" id="notify" style="display: none">
@@ -168,174 +173,117 @@
                                       <div class="main-data-bottom ovf-hidden" style="display: none" id="comments">
                                           <textarea class="form-control" rows="8" readonly=""></textarea>
                                       </div>
-                                      <div id="tzjnrCon" class="main-data-bottom" style="background: #F1F1F1">
-                                          <div class="col-4" style="width: 33%; float: left; margin: 0; padding:0;">
-                                              <div class="main-data-bottom ovf-hidden" id="jobSpread">
-                                              </div>
-                                              <!--工具栏-->
-                                              <div class="bottom-tools btn-group position-absolute">
-                                                  <a href="javascript:void(0);" id="jobInsert" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="jobAdd" class="btn btn-sm " data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加"><i class="fa fa-plus" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="jobDel" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="jobDown" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="jobUp" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
-                                              </div>
-                                          </div>
-                                          <div class="col-4" style="width: 33%; float: left; margin: 0; padding:0;">
-                                              <div class="main-data-bottom ovf-hidden"  id="itemSpread">
+                                      <div id="tzjnrCon" class="container-fluid main-data-bottom" style="background: #F1F1F1">
+                                          <div class="row" style="overflow: hidden">
+                                              <div class="col-4 p-0">
+                                                  <div class="main-data-bottom ovf-hidden" id="jobSpread">
+                                                  </div>
+                                                  <!--工具栏-->
+                                                  <div class="bottom-tools btn-group position-absolute">
+                                                      <a href="javascript:void(0);" id="jobInsert" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="jobAdd" class="btn btn-sm " data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加"><i class="fa fa-plus" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="jobDel" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="jobDown" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="jobUp" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
+                                                  </div>
                                               </div>
-                                              <!--工具栏-->
-                                              <div class="bottom-tools btn-group position-absolute">
-                                                  <a href="javascript:void(0);" id="itemInsert" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="itemAdd" class="btn btn-sm " data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加"><i class="fa fa-plus" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="itemDel" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="itemDown" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
-                                                  <a href="javascript:void(0);" id="itemUp" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
+                                              <div class="col-4 p-0">
+                                                  <div class="main-data-bottom ovf-hidden"  id="itemSpread">
+                                                  </div>
+                                                  <!--工具栏-->
+                                                  <div class="bottom-tools btn-group position-absolute">
+                                                      <a href="javascript:void(0);" id="itemInsert" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-sign-in" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="itemAdd" class="btn btn-sm " data-toggle="tooltip" data-placement="bottom" title="" data-original-title="添加"><i class="fa fa-plus" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="itemDel" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="itemDown" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
+                                                      <a href="javascript:void(0);" id="itemUp" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
+                                                  </div>
                                               </div>
-                                          </div>
-                                          <div class="col-4" style="width: 33%; float: left; margin: 0; padding:0;">
-                                              <div class="main-data-bottom" id="add-rule" style="display: none;">
-                                                  <div class="container-fluid my-2">
-                                                      <p style="text-align: center">
-                                                          <% if (projectData.property.lockBills == true) { %>
-                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-current">应用到选中清单</button>
-                                                          <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-all">应用到所有清单</button>
-                                                          <% } else { %>
-                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
-                                                          <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>
-                                                          <% } %>
-                                                      </p>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-5 px-0 col-form-label text-right">添加位置:</label>
-                                                          <div class="col-7">
-                                                              <select id="add-position" class="form-control form-control-sm">
-                                                                  <option value="1" selected="selected">添加到项目特征列</option>
-                                                                  <option value="2">添加到清单名称列</option>
-                                                                  <option value="3">添加到工作内容列</option>
-                                                                  <option value="4">分别添加到对应列</option>
-                                                              </select>
+                                              <!-- <div class="col-auto p-0">
+                                                   <div class="tn-nav d-flex align-items-start flex-column" data-toggle="tooltip" data-placement="left" title="" data-original-title="打开排版规则">
+                                                       <span class="mt-3 ml-2 text-primary">排版规则</span>
+                                                       <i class="fa fa-arrow-left mt-auto mb-3 text-primary ml-2"></i>
+                                                   </div>
+                                               </div>-->
+                                              <div class="col-4 p-0">
+                                                  <div class="main-data-bottom" id="add-rule" style="display: none;">
+                                                      <div class="container-fluid my-2">
+                                                          <p style="text-align: center">
+                                                              <% if (projectData.property.lockBills == true) { %>
+                                                              <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-current">应用到选中清单</button>
+                                                              <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-all">应用到所有清单</button>
+                                                              <% } else { %>
+                                                              <button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
+                                                              <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>
+                                                              <% } %>
+                                                          </p>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-5 px-0 col-form-label text-right">添加位置:</label>
+                                                              <div class="col-7">
+                                                                  <select id="add-position" class="form-control form-control-sm">
+                                                                      <option value="1" selected="selected">添加到项目特征列</option>
+                                                                      <option value="2">添加到清单名称列</option>
+                                                                      <option value="3">添加到工作内容列</option>
+                                                                      <option value="4">分别添加到对应列</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
-                                                      </div>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-sm-5 px-0 col-form-label text-right">添加内容:</label>
-                                                          <div class="col-sm-7">
-                                                              <select id="add-content" class="form-control form-control-sm">
-                                                                  <option value="">无</option>
-                                                                  <option value="1" selected="selected">项目特征+工作内容</option>
-                                                                  <option value="2">工作内容+项目特征</option>
-                                                                  <option value="3">项目特征</option>
-                                                                  <option value="4">工作内容</option>
-                                                                  <option value="5">定额子目</option>
-                                                              </select>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-sm-5 px-0 col-form-label text-right">添加内容:</label>
+                                                              <div class="col-sm-7">
+                                                                  <select id="add-content" class="form-control form-control-sm">
+                                                                      <option value="">无</option>
+                                                                      <option value="1" selected="selected">项目特征+工作内容</option>
+                                                                      <option value="2">工作内容+项目特征</option>
+                                                                      <option value="3">项目特征</option>
+                                                                      <option value="4">工作内容</option>
+                                                                      <option value="5">定额子目</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
-                                                      </div>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-5 px-0 col-form-label text-right">显示格式:</label>
-                                                          <div class="col-7">
-                                                              <select id="display-format" class="form-control form-control-sm">
-                                                                  <option value="1" selected="selected">换行分隔</option>
-                                                                  <option value="2">逗号分隔</option>
-                                                                  <option value="3">括号分隔</option>
-                                                              </select>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-5 px-0 col-form-label text-right">显示格式:</label>
+                                                              <div class="col-7">
+                                                                  <select id="display-format" class="form-control form-control-sm">
+                                                                      <option value="1" selected="selected">换行分隔</option>
+                                                                      <option value="2">逗号分隔</option>
+                                                                      <option value="3">括号分隔</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
-                                                      </div>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-5 px-0 col-form-label text-right">特征生成方式:</label>
-                                                          <div class="col-7">
-                                                              <select id="character-format" class="form-control form-control-sm">
-                                                                  <option value="1">特征值</option>
-                                                                  <option value="2" selected="selected">特征:特征值</option>
-                                                              </select>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-5 px-0 col-form-label text-right">特征生成方式:</label>
+                                                              <div class="col-7">
+                                                                  <select id="character-format" class="form-control form-control-sm">
+                                                                      <option value="1">特征值</option>
+                                                                      <option value="2" selected="selected">特征:特征值</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
-                                                      </div>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-5 px-0 col-form-label text-right">子目生成方式:</label>
-                                                          <div class="col-7">
-                                                              <select id="child-display-format" disabled="disabled" class="form-control form-control-sm">
-                                                                  <option value="1" selected="selected">编号+定额名称</option>
-                                                                  <option value="2">序号+定额名称</option>
-                                                              </select>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-5 px-0 col-form-label text-right">子目生成方式:</label>
+                                                              <div class="col-7">
+                                                                  <select id="child-display-format" disabled="disabled" class="form-control form-control-sm">
+                                                                      <option value="1" selected="selected">编号+定额名称</option>
+                                                                      <option value="2">序号+定额名称</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
-                                                      </div>
-                                                      <div class="mb-1 row">
-                                                          <label class="col-5 px-0 col-form-label text-right">序号格式:</label>
-                                                          <div class="col-7">
-                                                              <select id="serial-type" class="form-control form-control-sm">
-                                                                  <option value="">无</option>
-                                                                  <option value="1" selected="selected">1.</option>
-                                                                  <option value="2">a.</option>
-                                                                  <option value="3">A.</option>
-                                                              </select>
+                                                          <div class="mb-1 row">
+                                                              <label class="col-5 px-0 col-form-label text-right">序号格式:</label>
+                                                              <div class="col-7">
+                                                                  <select id="serial-type" class="form-control form-control-sm">
+                                                                      <option value="">无</option>
+                                                                      <option value="1" selected="selected">1.</option>
+                                                                      <option value="2">a.</option>
+                                                                      <option value="3">A.</option>
+                                                                  </select>
+                                                              </div>
                                                           </div>
                                                       </div>
                                                   </div>
                                               </div>
                                           </div>
-                                          <!--<div id="add-rule" style="width: 34%;float: left;background: #EFEFEF; height: 100%;display: none; padding-left: 8px;">
-                                              <p style="text-align: center">添加规则</p>
-                                              <p>
-                                                  <label class="title">添加位置:</label>
-                                                  <select id="add-position">
-                                                      <option value="1" selected="selected">添加到项目特征列</option>
-                                                      <option value="2">添加到清单名称列</option>
-                                                      <option value="3">添加到工作内容列</option>
-                                                      <option value="4">分别添加到对应列</option>
-                                                  </select>
-                                              </p>
-                                              <p>
-                                                  <label class="title">添加内容:</label>
-                                                  <select id="add-content">
-                                                      <option value="">无</option>
-                                                      <option value="1" selected="selected">项目特征+工作内容</option>
-                                                      <option value="2">工作内容+项目特征</option>
-                                                      <option value="3">项目特征</option>
-                                                      <option value="4">工作内容</option>
-                                                      <option value="5">定额子目</option>
-                                                  </select>
-                                              </p>
-                                              <p>
-                                                  <label class="title">显示格式:</label>
-                                                  <select id="display-format">
-                                                      <option value="1" selected="selected">换行分隔</option>
-                                                      <option value="2">逗号分隔</option>
-                                                      <option value="3">括号分隔</option>
-                                                  </select>
-                                              </p>
-                                              <p>
-                                                  <label class="title">特征生成方式:</label>
-                                                  <select id="character-format">
-                                                      <option value="1">特征值</option>
-                                                      <option value="2" selected="selected">特征:特征值</option>
-                                                  </select>
-                                              </p>
-                                              <p>
-                                                  <label class="title">子目生成方式:</label>
-                                                  <select id="child-display-format" disabled="disabled">
-                                                      <option value="1" selected="selected">编号+定额名称</option>
-                                                      <option value="2">序号+定额名称</option>
-                                                  </select>
-                                              </p>
-                                              <p>
-                                                  <label class="title">序号格式:</label>
-                                                  <select id="serial-type">
-                                                      <option value="">无</option>
-                                                      <option value="1" selected="selected">1.</option>
-                                                      <option value="2">a.</option>
-                                                      <option value="3">A.</option>
-                                                  </select>
-                                              </p>
-                                              <p style="text-align: center">
-                                                  <% if (projectData.property.lockBills == true) { %>
-                                                  <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-current">应用到选中清单</button>
-                                                  <button class="btn btn-primary btn-sm disabled" type="button" id="use-to-all">应用到所有清单</button>
-                                                  <% } else { %>
-                                                  <button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
-                                                  <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>
-                                                  <% } %>
-                                                  &lt;!&ndash;<button class="btn btn-primary btn-sm" type="button" id="use-to-current">应用到选中清单</button>
-                                                  <button class="btn btn-primary btn-sm" type="button" id="use-to-all">应用到所有清单</button>&ndash;&gt;
-                                              </p>
-                                          </div>-->
                                       </div>
                                   </div>
                               </div>
@@ -786,7 +734,7 @@
                                                 </label>
                                             </div>
                                         </fieldset>
-                                            <label style="margin-top: 320px">将影响所有建设项目</label>
+                                            <label style="margin-top: 320px">*将影响所有建设项目</label>
                                     </div>
                                 </div>
                             </div>
@@ -1059,6 +1007,19 @@
                         </div>
                         <div class="tab-pane" id="m-fl" role="tabpanel">
                             <input type="hidden" id="edit_from">
+                        <!--    <div class="row" style="margin-bottom:0.5rem!important">
+                                <div class="col-3">
+                                    <div class="form-check form-control feerateInput" style="border:0px;padding-left:1.25rem">
+                                        <label >
+                                            <input class="form-check-input" id="manualFeeRate" type="checkbox">
+                                            手工输入
+                                        </label>
+                                    </div>
+                                </div>
+                                <div class="col-6">
+                                    <input class="form-control feerateInput" id="inputFeeRate" value="">
+                                </div>
+                            </div>-->
                             <div class="modal-fixed-height" style="overflow: hidden" id="fee_rate_sheet">
                             </div>
                         </div>

+ 10 - 1
web/building_saas/main/js/main.js

@@ -43,6 +43,9 @@ $(function () {
             setLocalCache('lastCol:' + projectId, info.col);
         }
     });
+
+
+
 });
 
 function getMainResizeEles() {
@@ -265,4 +268,10 @@ function disableRightMenu(id,spread,rowChangeFunction) {
 function show()
 {
     return "exit"
-};*/
+};*/
+
+//页面失去焦点时触发
+/*
+window.onblur = function () {
+  console.log("test")
+};*/

+ 6 - 6
web/building_saas/main/js/models/fee_rate.js

@@ -591,9 +591,9 @@ var FeeRate = {
             }
         };
         FeeRate.prototype.changeFeeRateFileFromCurrent = function (newFeeRateFile,callback){
-            var me=this;
-            var projectID = projectInfoObj.projectInfo.ID;
-            var data={
+            let me=this;
+            let projectID = projectInfoObj.projectInfo.ID;
+            let data={
                 "projectID": projectID,
                 "newFeeRateFile":newFeeRateFile
             };
@@ -608,9 +608,9 @@ var FeeRate = {
         };
 
         FeeRate.prototype.changeFeeRateFileFromOthers=function (feeRateFileID,name,callback) {
-            var me = this;
-            var projectID = projectInfoObj.projectInfo.ID;
-            var data={
+            let me = this;
+            let projectID = projectInfoObj.projectInfo.ID;
+            let data={
                 "projectID": projectID,
                 "feeRateFileID":feeRateFileID,
                 "name":name,

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

@@ -130,6 +130,7 @@ let calcBaseView = {
                 me.inputExpr.val(insertStr);
             }
         }
+        me.workBook.focus(false);
         me.inputExpr.focus();
     },
     isDef: function (v) {

+ 32 - 6
web/building_saas/main/js/views/fee_rate_view.js

@@ -786,14 +786,29 @@ var feeRateObject={
             alert("请选择一个费率文件!");
             return;
         }
-        var currentOption = _.find(this.changeInfo.currentProject.currentOptions,{name:name})
+        var callback=function (data) {
+            if(data){
+                //$('#renameConfirm').attr("disabled","disabled");
+                $('#renameError').text("本建设项目中已存在同名费率文件。").show();
+                $('#rename-lv').modal('show');
+                $("#newFeeRateID").val(feeRateFileID);
+                $("#newFeeRateName").val(name);
+            }else {
+                //$('#renameConfirm').removeAttr("disabled");
+                $('#renameError').hide();
+                feeRateObject.changeFeeRateFileConfirm(feeRateFileID,name);
+            }
+        };
+        projectObj.project.FeeRate.checkFeeRateName(name,callback);
+
+       /* var currentOption = _.find(this.changeInfo.currentProject.currentOptions,{name:name})
         if(currentOption){
             $("#rename-lv").modal({show:true});
             $("#newFeeRateID").val(feeRateFileID);
             $("#newFeeRateName").val(name);
         }else {
             this.changeFeeRateFileConfirm(feeRateFileID,name);
-        }
+        }*/
     },
     changeFeeRateFileConfirm:function(feeRateFileID,name){
         $.bootstrapLoading.start();
@@ -941,16 +956,16 @@ $(function(){
     $('#newFeeRateName').change(function () {
         var newName = $(this).val();
         if(!newName||newName==""){
-            $('#renameConfirm').attr("disabled","disabled");
+            //$('#renameConfirm').attr("disabled","disabled");
             $('#renameError').text("请输入文件名称。").show();
             return;
         }
         var callback=function (data) {
             if(data){
-                $('#renameConfirm').attr("disabled","disabled");
+                //$('#renameConfirm').attr("disabled","disabled");
                 $('#renameError').text("本建设项目中已存在同名费率文件。").show();
             }else {
-                $('#renameConfirm').removeAttr("disabled");
+                //$('#renameConfirm').removeAttr("disabled");
                 $('#renameError').hide();
             }
         };
@@ -988,7 +1003,18 @@ $(function(){
     $('#renameConfirm').bind('click',function (){
         var feeRateFileID= $("#newFeeRateID").val();
         var name = $("#newFeeRateName").val();
-        feeRateObject.changeFeeRateFileConfirm(feeRateFileID,name);
+        var callback=function (data) {
+            if(data){
+                $('#renameError').text("已存在同名费率文件。").show();
+                $("#newFeeRateID").val(feeRateFileID);
+                $("#newFeeRateName").val(name);
+            }else {
+                $('#renameError').hide();
+                $('#rename-lv').modal('hide');
+                feeRateObject.changeFeeRateFileConfirm(feeRateFileID,name);
+            }
+        };
+        projectObj.project.FeeRate.checkFeeRateName(name,callback);
     })
 
 

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

@@ -4,9 +4,9 @@
 let gljCol = {
     ration_glj_setting: {
         header: [
-            {headerName: "编码", headerWidth: 100, dataCode: "code", dataType: "String", formatter: "@"},
+            {headerName: "编码", headerWidth: 130, dataCode: "code", dataType: "String", formatter: "@"},
             {headerName: "名称", headerWidth: 240, dataCode: "name", dataType: "String",cellType:'tipsCell'},
-            {headerName: "规格型号", headerWidth: 190, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
+            {headerName: "规格型号", headerWidth: 160, dataCode: "specs", dataType: "String", hAlign: "left",cellType:'tipsCell'},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", dataType: "String", hAlign: "center"},
             {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
             {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"1

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

@@ -1286,7 +1286,7 @@ var projectObj = {
                         if(selected.sourceType == ModuleNames.bills){
                             if(selected.data.type == billType.FX||selected.data.type ==billType.BILL){
                                 if(selected.data.calcBase&&selected.data.calcBase!=""){
-                                    alert("当前有基数计算,不能插入子项。");
+                                    alert("当前有基数计算,不能插入定额/量价/人材机。");
                                     return;
                                 }
                             }

+ 43 - 59
web/building_saas/main/js/views/quantity_edit_view.js

@@ -58,6 +58,7 @@ let quantityEditObj = {
         var ns = GC.Spread.Sheets;
         function QuantityEditCellType() {
             var init=false;
+            this.clickTime = 0; //点击事件时间戳
         }
         QuantityEditCellType.prototype = new ns.CellTypes.Text();
         QuantityEditCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
@@ -96,20 +97,33 @@ let quantityEditObj = {
                 sheetArea: context.sheetArea
             };
         };
+
+        //2018 -09 -26  修改工程量这个输入控件,删除悬浮提示注释,还原时通过git 历史
+
         QuantityEditCellType.prototype.processMouseDown = function (hitinfo) {
-            var me=quantityEditObj;
+            let me=quantityEditObj;
+            if(isDoubleClick(this) == true && !projectReadOnly){//如果是双击,直接显示
+                me.showSelectModal(hitinfo);
+                return ;
+            }
            if(me.editingCell && hitinfo.row==me.editingCell.row){
-                var offset=hitinfo.cellRect.x+hitinfo.cellRect.width-6;
-                var imageMagin=3;
-                var imageHeight = hitinfo.cellRect.height-2*imageMagin;
-                var imageWidth = hitinfo.cellRect.width*2/7;
-                if(hitinfo.x<offset&&hitinfo.x>offset-imageWidth){
-                    if(!projectReadOnly){
-                        me.showSelectModal(hitinfo);
-                    }
-                }else {//点击其它地方,按钮消失
+               if(me.editingCell.isBtn == false){//是第一次点击,刷新显示按钮
+                   me.editingCell.isBtn = true;
+                   hitinfo.sheet.invalidateLayout();
+                   hitinfo.sheet.repaint();
+               }else {
+                   var offset=hitinfo.cellRect.x+hitinfo.cellRect.width-6;
+                   var imageMagin=3;
+                   var imageHeight = hitinfo.cellRect.height-2*imageMagin;
+                   var imageWidth = hitinfo.cellRect.width*2/7;
+                   if(hitinfo.x<offset&&hitinfo.x>offset-imageWidth){
+                       if(!projectReadOnly){
+                           me.showSelectModal(hitinfo);
+                       }
+                   }/*else {//点击其它地方,按钮消失
                     hideButton(hitinfo)
-                }
+                    }*/
+               }
             }
         };
         QuantityEditCellType.prototype.processMouseEnter = function (hitinfo) {
@@ -118,60 +132,17 @@ let quantityEditObj = {
             if(me.editingCell==null){
                 me.editingCell={
                     row:hitinfo.row,
-                    col:hitinfo.col
+                    col:hitinfo.col,
+                    isBtn :false//鼠标刚进入的时候按钮还是没显示的状态
                 }
-                hitinfo.sheet.invalidateLayout();
-                hitinfo.sheet.repaint();
-            }
-                //取消悬浮提示
-            /*  let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
-            let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
-            let dataField = "quantity";
-
-            if(hitinfo.sheet.getCell(hitinfo.row,hitinfo.col).wordWrap()==true){
-                return;
-            }
-            if(dataField=="quantity"){
-                text = tag;
-            }else if(tag !== undefined && tag) {
-                text = tag;
+               // hitinfo.sheet.invalidateLayout();
+                //hitinfo.sheet.repaint();
             }
-            if (text && text !== '') {
-                if (!this._toolTipElement) {
-                    let div = $('#autoTip')[0];
-                    if (!div) {
-                        div = document.createElement("div");
-                        $(div).css("position", "absolute")
-                            .css("border", "1px #C0C0C0 solid")
-                            .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
-                            .css("font", "9pt Arial")
-                            .css("background", "white")
-                            .css("padding", 5)
-                            .attr("id", 'autoTip');
-                        $(div).hide();
-                        document.body.insertBefore(div, null);
-                    }
-                    this._toolTipElement = div;
-                    $(this._toolTipElement).text(text);
-                    let cellRect =  hitinfo.sheet.getCellRect(hitinfo.row,hitinfo.col);
-                    $(this._toolTipElement).css("top", cellRect.y+$('#main').offset().top+cellRect.height).css("left",  hitinfo.x );//
-
-                    $(this._toolTipElement).show("fast");
-                    TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
-                }
-            }*/
         };
         QuantityEditCellType.prototype.processMouseLeave = function (hitinfo) {
             hideButton(hitinfo);
-            //延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
-
-            /*TREE_SHEET_HELPER.tipDiv = 'hide';  取消悬浮提示
-            if (TREE_SHEET_HELPER._toolTipElement) {
-                $(TREE_SHEET_HELPER._toolTipElement).hide();
-                TREE_SHEET_HELPER._toolTipElement = null;
-            };
-            TREE_SHEET_HELPER.tipDivCheck();*/
         };
+
         function hideButton(hitinfo) {
             if(!quantityEditObj.pmLeave){//鼠标进入显示三个点按钮
                 quantityEditObj.editingCell=null;
@@ -180,6 +151,19 @@ let quantityEditObj = {
                 quantityEditObj.pmLeave = true;
             }
         }
+
+        function isDoubleClick(quantityCell) {
+            let nowTime = +new Date();
+            if(quantityCell.clickTime !=0){
+                if(nowTime - quantityCell.clickTime < 280) {//判断为双击
+                    quantityCell.clickTime = 0;
+                    return true;
+                }
+            }
+            quantityCell.clickTime = nowTime;//计录点击时间
+            return false
+        }
+
         return new QuantityEditCellType();
     },
     showSelectModal:function (hitinfo) {

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

@@ -20,7 +20,7 @@
                 </button>
             </div>
             <div class="modal-body">
-                <p><i class="fa fa-cubes"></i> 汽车生产车间 下的单位工程都将恢复都将恢复,恢复后将重命名为</p>
+                <p><i class="fa fa-cubes"></i> 汽车生产车间 下的单位工程都将恢复,恢复后将重命名为</p>
                 <p><b>建筑工程2(10-25 14:33:15恢复)</b>、<b>建筑工程3(10-25 14:33:15恢复)</b></p>
                 <p> 点“确定”按钮,确认从回收站中恢复。</p>
             </div>

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

@@ -73,12 +73,12 @@
                         <li class="nav-item" data-original-title="分享" data-placement="right" data-toggle="tooltip">
                             <a class="nav-link" href="#pm_share" id="tab_pm_share" data-toggle="tab"><i class="fa fa-share-alt"></i></a>
                         </li>
-                        <li class="nav-item" data-original-title="协同工作" data-placement="right" data-toggle="tooltip">
+                        <!--<li class="nav-item" data-original-title="协同工作" data-placement="right" data-toggle="tooltip">
                             <a class="nav-link" href="javascript:void(0);"><i class="fa fa-users"></i></a>
                         </li>
                         <li class="nav-item" data-original-title="归档" data-placement="right" data-toggle="tooltip">
                             <a class="nav-link" href="javascript:void(0);"><i class="fa fa-book"></i></a>
-                        </li>
+                        </li>-->
                         <li class="nav-item" data-original-title="回收站" data-placement="right" data-toggle="tooltip">
                             <a class="nav-link" href="#pm_gc" id="tab_pm_gc" data-toggle="tab"><i class="fa fa-trash"></i></a>
                         </li>

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

@@ -615,10 +615,10 @@ function v_getMoBody(type, oprNode, nodes){
         }
         else {
             if(oprNode.data.projType === projectType.project){
-                html += '<p><i class="fa fa-cubes"></i> ' + oprNode.data.name + '下的单位工程都将恢复都将恢复,恢复后将重命名为</p>';
+                html += '<p><i class="fa fa-cubes"></i> ' + oprNode.data.name + '下的单位工程都将恢复,恢复后将重命名为</p>';
             }
             else if(oprNode.data.projType === projectType.engineering){
-                html += '<p><i class="fa fa-cube"></i> ' + oprNode.data.name + '下的单位工程都将恢复都将恢复,恢复后将重命名为</p>';
+                html += '<p><i class="fa fa-cube"></i> ' + oprNode.data.name + '下的单位工程都将恢复,恢复后将重命名为</p>';
             }
             html += ('<p>');
             for(let i = 0, len = nodes.length; i < len; i++){
@@ -650,7 +650,7 @@ function v_getFiles(type, files, tenders, opr = null){
         return false;
     }
     for(let i = 0, len = files.length; i < len; i ++){
-        let recName = type === fileType.unitPriceFile ?  files[i].name + '单价文件' : files[i].name + '费率文件';
+        let recName = type === fileType.unitPriceFile ?  files[i].name : files[i].name;
         let fileId = type === fileType.unitPriceFile ? files[i].id : files[i].ID;
         let recTimeA = formatDate(new Date(files[i].deleteInfo.deleteDateTime), 'yyyy-MM-dd');
         let recTimeB = formatDate(new Date(files[i].deleteInfo.deleteDateTime), 'HH:mm:ss');

+ 1 - 1
web/users/html/login.html

@@ -14,7 +14,7 @@
 <body>
     <div class="container">
         <form class="form-signin" method="post" onsubmit="return false">
-            <h1 class="d-flex justify-content-center">Smartcost</h1>
+            <h1 class="d-flex justify-content-center">纵横云计价</h1>
             <h4 class="d-flex justify-content-center mb-2">用户登录</h4>
             <div class="form-group">
                 <input id="inputEmail" class="form-control " name="inputEmail" placeholder="通行账号 邮箱/手机" autofocus="" />