Преглед изворни кода

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

Tony Kang пре 1 година
родитељ
комит
cc26220565

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

@@ -340,6 +340,7 @@ module.exports = {
         if (isFree && config[process.env.NODE_ENV].title !== '纵横公路云造价') {
             let renderData = {
                 userAccount: request.session.userAccount,
+                userMobile: request.session.sessionUser.mobile,
                 userID: request.session.sessionUser.id,
                 compilationName: sessionCompilation.name,
                 versionName: request.session.compilationVersion,
@@ -405,6 +406,7 @@ module.exports = {
                 context: context,
                 showTime: showTime,
                 userAccount: request.session.userAccount,
+                userMobile: request.session.sessionUser.mobile,
                 userID: request.session.sessionUser.id,
                 isFree,
                 compilationData: JSON.stringify(sessionCompilation),

+ 5 - 7
web/building_saas/pm/html/project-management.html

@@ -19,6 +19,7 @@
     <script>
         // 这里的变量供页面调用
         var userAccount = '<%- userAccount %>';
+        var userMobile = '<%- userMobile %>';
         var userID = '<%- userID %>';
         let isFirst = JSON.parse('<%- isFirst %>');
         let isShow = JSON.parse('<%- isShow %>');
@@ -487,18 +488,15 @@
             </div>
             <div class="modal-body">
                 <p style="margin-bottom: 0;">尊敬的用户:</p>
-                <p style="margin-bottom: 0; text-indent: 28px;">感谢您一直以来对纵横的信任和支持,为了更好坚守初心,持续为您提供高质量的产品与服务,纵横公路养护云造价已升级为<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>。</p>
+                <p style="margin-bottom: 0; text-indent: 28px;">感谢您一直以来对纵横的信任和支持,为了更好坚守初心,持续为您提供高质量的产品与服务,纵横公路养护云造价已升级为<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>。</p>
                 <div style="text-indent: 28px;" style="margin-bottom: 0;">
-                    <p style="margin-bottom: 0;">请使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目,现版本已停止新建项目。</p>
-                    <p style="margin-bottom: 0;">请联系当地客服免费升级账号</p>
+                    <!-- <p style="margin-bottom: 0;">请使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目,现版本已停止新建项目。</p> -->
+                    <p style="margin-bottom: 0;">请联系当地客服免费升级账号,使用<a href="https://dsk.smartcost.com.cn/">大司空云计价</a>编制新项目。</p>
                     <p style="margin-bottom: 0;">当地服务热线:<a id="stop-create-contact" href="javascript:void(0);">联系</a>当地客服</p>
                     <p style="margin-bottom: 0;">全国服务热线:0756-3850888,企业QQ:800003850</p>
+                    <p style="margin-bottom: 20px; color: red !important;">请点链接进入大司空云计价:<a style="color: red !important" href="https://dsk.smartcost.com.cn">https://dsk.smartcost.com.cn</a></p>
                 </div>
             </div>
-            <div class="modal-footer">
-                <a href="javascript:void(0);" class="btn btn-primary" data-dismiss="modal" id="stop-create-confirm">确定</a>
-                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
-            </div>
         </div>
     </div>
 </div>

+ 30 - 6
web/building_saas/pm/js/pm_newMain.js

@@ -50,6 +50,14 @@ const {
 } = window.commonConstants;
 const { similarEqual, isDef } = window.commonUtil;
 
+function isStopCreate() {
+  if (userMobile === '15919278500') {
+    return false;
+  }
+  const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
+  return !!(compilationData && names.includes(compilationData.name));
+}
+
 //操作状态
 const STATE = {
   addingTender: false,
@@ -321,9 +329,7 @@ const projTreeObj = {
         return projTreeObj.getAddBtnDisabled(projectType.project);
       },
       callback: function (key, opt) {
-        const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
-        const stopCreate = compilationData && names.includes(compilationData.name);
-        if (stopCreate) {
+        if (isStopCreate()) {
           $('#stop-create-dialog').modal('show');
         } else {
           $('#add-project-dialog').modal('show');
@@ -337,6 +343,10 @@ const projTreeObj = {
         return projTreeObj.getAddBtnDisabled(projectType.tender);
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         //弹出新建单位工程之前,判断当前使用版本,且当前使用单位工程数是否已到最大值
         let selectedItem = projTreeObj.tree.selected;
         $("#add-tender-dialog").modal("show");
@@ -385,6 +395,10 @@ const projTreeObj = {
         return !(node && node.data.projType === projectType.tender);
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         let selectedItem = projTreeObj.tree.selected;
         try {
           let selectedType =
@@ -410,6 +424,10 @@ const projTreeObj = {
         return !(node && node.data.projType === projectType.tender);
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         $("#save-as-dialog").modal("show");
       },
     },
@@ -545,6 +563,10 @@ const projTreeObj = {
         return true;
       },
       callback: function (key, opt) {
+        if (isStopCreate()) {
+          $('#stop-create-dialog').modal('show');
+          return;
+        }
         $("#confirm-import").hide();
         $("#import").modal("show");
         projTreeObj.getUploadToken();
@@ -2582,6 +2604,10 @@ $(document).ready(function () {
 
   // 新建子菜单有效性刷新
   $("#addMenuBtn").click(function () {
+    if (isStopCreate()) {
+      $('#stop-create-dialog').modal('show');
+      return false;
+    }
     const menuDisplay = !$("#addMenu").is(":visible");
     if (!menuDisplay) {
       return;
@@ -4242,9 +4268,7 @@ function AddTender() {
     //let newTab = window.open('about:blank');
     let tempProj = getNodeByName(projName, tempProjs);
     if (!tempProj) {
-      const names = ['重庆养护(2018)', '内蒙古养护(2019)', '甘肃养护(2021)', '内蒙古高速公路养护(2022)', '内蒙古高速公路养护(2022)'];
-      const stopCreate = compilationData && names.includes(compilationData.name);
-      if (stopCreate) {
+      if (isStopCreate()) {
         $('#stop-create-dialog').modal('show');
         return;
       }

+ 1 - 0
web/src/html/pm/project-management.html

@@ -17,6 +17,7 @@
     <script>
         // 这里的变量供页面调用
         var userAccount = '<%- userAccount %>';
+        var userMobile = '<%- userMobile %>';
         var userID = '<%- userID %>';
     </script>
     <style type="text/css">