瀏覽代碼

采购单位搜索修改

tsz 3 年之前
父節點
當前提交
b174e68c6b

+ 17 - 2
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/client_portrayal.js

@@ -125,6 +125,7 @@ var vNode = {
               viper: false,
               entniche: false
             },
+            newEntNiche: false,
             usageInfo: {
               total: 0,
               usage: 0,
@@ -175,8 +176,8 @@ var vNode = {
             })
         },
         getStatus: function () {
-          var entniche = this.userInfo.entniche
-          return !entniche || !(this.getDataObj && this.contactsObj && this.getNewMsgObj)
+          return !this.newEntNiche
+          // return !entniche || !(this.getDataObj && this.contactsObj && this.getNewMsgObj)
         },
         // 展示免费用户体验
         getfreeBuyerPort:function(){
@@ -227,6 +228,7 @@ var vNode = {
     },
     created () {
       this.getPowerInfo()
+      this.getNewEntNiche()
       this.getActionState(utils.getParam('entName'), 'g')
       this.getActionState(utils.getParam('entName'), 'r')
     },
@@ -267,6 +269,19 @@ var vNode = {
             })
           }
         },
+        // 查询是否是新版商机管理
+        getNewEntNiche () {
+          let _this = this
+          $.ajax({
+            type:'post',
+            url: '/entnicheNew/buy/whetherbuy',
+            success: function(res) {
+              if(res.error_code === 0) {
+                _this.newEntNiche = res.data.isNew
+              }
+            }
+          })
+        },
         noMoreData (data) {
           this.contactsObj = data
         },

+ 24 - 2
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mine.js

@@ -1,5 +1,6 @@
 var mine = {
     pageUserInfo: pageUserInfo,
+    entUserInfo: entUserInfo,
     init: function () {
         this.iosBackInvoke()
 
@@ -21,6 +22,8 @@ var mine = {
         this.showUserMerge()
         // 获取小红点状态
         this.getRedDotState()
+        // 商机管理权限
+        this.getEntNicheRoot()
         // 清除超级订阅购买、续费、升级相关的缓存
         sessionStorage.removeItem('vip-cur-select-coupon')
         sessionStorage.removeItem('$select-coupon')
@@ -39,6 +42,21 @@ var mine = {
             isPageHide = true;
         });
     },
+    getEntNicheRoot: function() {
+      $.ajax({
+        type: "post",
+        url: '/entnicheNew/buy/whetherbuy',
+        success: function(res) {
+          console.log(res)
+          if(res.error_code == 0) {
+            entUserInfo = res.data
+            if(res.data.isNew) {
+              $('.customer-follow').show()
+            }
+          }
+        }
+      })
+    },
     // 查询用户信息(p19.1账号合并新增接口)
     getUserInfo: function () {
         $.ajax({
@@ -100,8 +118,12 @@ var mine = {
         // 项目关注跳转
         $('.project-follow').on('click', function (e) {
             setLiActive(e.currentTarget)
-            var url = $(this).attr('data-href')
-            autoLogin(url)
+            if(entUserInfo.isNew) {
+              location.href = '/jyapp/big/page/client_follow_list'
+            } else {
+              var url = $(this).attr('data-href')
+              autoLogin(url) 
+            }
         })
         
         // 客户关注跳转

+ 1 - 1
src/jfw/modules/app/src/web/templates/me/mine.html

@@ -147,7 +147,7 @@
                             <span class="j-icon base-icon icon-arrow-right"></span>
                         </div>
                     </div>
-                    <div data-need-bind-phone class="menu_list customer-follow" data-href='/jyapp/big/page/client_list'>
+                    <div data-need-bind-phone style="display: none;" class="menu_list customer-follow" data-href='/jyapp/big/page/client_list'>
                       <div class="menu_list_left">
                           <span class="j-icon base-icon icon-case"></span>
                           <span class="label">客户关注</span>

+ 2 - 2
src/jfw/modules/app/src/web/templates/weixin/search/tabSearch.html

@@ -2034,10 +2034,10 @@
                 $(".search-header-box").addClass('m-r')
                 if (nowIndex !== 1) {
                   $(".search-header-box").removeAttr("action")
-                  if(powerRoot.entniche) {
+                  if(SuperSearch.isEntNicheNew) {
                     $(".search-header-box").next().show()
                   } else {
-                    $(".search-header-box").next().show()
+                    $(".search-header-box").next().hide()
                   }
                 } else {
                   $(".search-header-box").attr("action", "javascript:return true")

+ 15 - 5
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -1092,11 +1092,6 @@
                 $('.commonUser').show()
                 if(res.data.memberStatus > 0) {
                   isFollow()
-                } else if (res.data.entniche) {
-                  $('.commonUser').hide()
-                  $('.entnicheUser').show()
-                  getActionState ({{.T.obj.buyer}}, 'g')
-                  getActionState ({{.T.obj.buyer}}, 'r')
                 }
                 if (window.isFree){
                   checkShowDialog()
@@ -1166,6 +1161,21 @@
                 console.log(err)
             }
         })
+        $.ajax({
+          type: "post",
+          url: '/entnicheNew/buy/whetherbuy',
+          success: function(res) {
+            console.log(res)
+            if(res.error_code == 0) {
+              if(res.data.isNew) {
+                $('.commonUser').hide()
+                $('.entnicheUser').show()
+                getActionState ({{.T.obj.buyer}}, 'g')
+                getActionState ({{.T.obj.buyer}}, 'r')
+              }
+            }
+          }
+        })
     }
     //isOpening()
     // 大会员引流文案

+ 1 - 0
src/web/staticres/common-module/buyer-search/buyer-search-template.prefixer.css

@@ -661,6 +661,7 @@
 
 .v-buyer-search-group .ent-search-list {
     overflow-y: auto;
+    overflow-x: hidden;
     position: relative;
 }
 

+ 5 - 2
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -1274,7 +1274,7 @@ window.vBuyerSearchComponent = new Vue({
       if(setScopeList) {
         setScopeList = JSON.parse(setScopeList)
         _this.conditionStrMap.business_scope = setScopeList
-        _this.keyContent = this.formatterContent(setScopeList)
+        _this.keyContent = '已选:' + this.formatterContent(setScopeList)
       } else {
         $.ajax({
           type: 'POST',
@@ -1296,7 +1296,7 @@ window.vBuyerSearchComponent = new Vue({
                 })
               })
               _this.conditionStrMap.business_scope = getArr
-              _this.keyContent = '已选' + _this.formatterContent(getArr)
+              _this.keyContent = '已选' + _this.formatterContent(getArr)
             } else {
               _this.keyContent = '请选择业务范围'
             }
@@ -1462,6 +1462,7 @@ window.vBuyerSearchComponent = new Vue({
     },
     // 关注企业
     changeFollowState (data, str) {
+      let _this = this
       let params = {
         "userId": 123,
         "name": data.Buyer, //采购单位名称
@@ -1494,6 +1495,8 @@ window.vBuyerSearchComponent = new Vue({
               } else {
                 data.claim = !data.claim
               }
+            } else {
+              _this.$toast(res.error_msg)
             }
           }
         }