Browse Source

feat:商机管理订阅和采购单位搜索修改

tsz 3 năm trước cách đây
mục cha
commit
cae14a5145

+ 25 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/historypush.js

@@ -463,6 +463,7 @@ var vm = new Vue({
               $(".switch .switch_icon").addClass('icon_ent')
               _this.protype = 'entniche'
               _this.selectPro = 3
+              _this.getEntInfo()
             }
             if(switchProduct == 'bigmember' && _this.rootInfo.isSubCount) {
             	$('#sub_manager').hide();
@@ -478,6 +479,30 @@ var vm = new Vue({
         }
       })
     },
+    // 获取商机管理权限
+    getEntInfo: function () {
+      let _this = this
+      $.ajax({
+        type: 'post',
+        url: '/entbase/ent/entinfo',
+        success: function(res) {
+          console.log(res)
+          if(res.error_code === 0) {
+            let address = ''
+            if(res.data.admin_department || res.data.admin_system) {
+              address = '/page_entniche/page/sub_management/sub_management_system.html'
+            } else {
+              address = '/page_entniche/page/subsetting/sub_entrance.html'
+            }
+            $("#sub_manager").click(function() {
+              setSessionStorage();
+              sessionStorage.setItem(_this.sessStorageKey, JSON.stringify(_this.$data))
+              location.href = address
+            })
+          }
+        }
+      })
+    },
     // 判断是否是有筛选条件
     getUserRoot: function() {
       var _this = this

+ 1 - 0
src/jfw/modules/app/src/web/staticres/jyapp/js/searchindex.js

@@ -477,6 +477,7 @@ var SuperSearch = {
             success: function(res) {
               console.log(res)
               if(res.error_code == 0) {
+                sessionStorage.setItem('entniche-root', res.data)
                 SuperSearch.isEntNicheNew = res.data.isNew
               }
             },

+ 2 - 1
src/jfw/modules/app/src/web/templates/big-member/page_client_follow_list.html

@@ -296,7 +296,7 @@
             },
             onCancelArea (data) {
               this.list = this.newList
-              this.filterList(this.carePro,this.value1, [])
+              this.filterList(this.carePro,this.value1, {})
               this.$refs.areaDown.toggle()
             },
             // 筛选列表
@@ -398,6 +398,7 @@
                 newlist = this.newList
               }
               this.list = newlist
+              console.log(this.list)
             },
             deweight(arr) {
               var obj = {}

+ 13 - 8
src/jfw/modules/app/src/web/templates/big-member/page_client_list.html

@@ -53,7 +53,7 @@
             <div class="j-main havefomain" ref="jList">
               <div class="claim-main" style="width:100%;background: #fff;">
                 <div class="claim-scree">
-                  <van-tabs @change="getProjectList" v-model="active" color="#2ABED1">
+                  <van-tabs v-model="active" color="#2ABED1">
                     <van-tab title="全部">
                       <van-list
                         v-model="loading"
@@ -353,10 +353,10 @@
                       if(res.data.names.length !== listcopy.length) {
                         _this.noClaimList = newarr
                       } else {
-                        _this.noClaimList = []
+                        _this.noClaimList = _this.list
                       }
                     } else {
-                      _this.noClaimList = []
+                      _this.noClaimList = _this.list
                     }
                   }
                 }
@@ -373,6 +373,7 @@
             },
             // 关注、认领
             changeFollowState (data, str, taglid, tag) {
+              this.loading = true
               let params = {
                 "name": data.name, //采购单位名称
                 "province": data.province || data.wProvince, //省份
@@ -398,11 +399,11 @@
                   if(data.claim) {
                     this.ajaxClaim(params)
                   } else {
-                    this.ajaxClaim(params)
-                    // if (vKeepComponent) {
-                    //   vKeepComponent.changeBid(data.name, !data.claim)
-                    //   // vKeepComponent.changeKeepStatus(!data.claim, this)
-                    // }
+                    // this.ajaxClaim(params)
+                    if (vKeepComponent) {
+                      vKeepComponent.changeBid(data.name, !data.claim)
+                      // vKeepComponent.changeKeepStatus(!data.claim, this)
+                    }
                   }
                 }
               }
@@ -415,12 +416,16 @@
                 contentType: 'application/json',
                 data: JSON.stringify(params),
                 success: (res) => {
+                  _this.loading = false
                   console.log(res)
                   if(res.data) {
                     _this.getProjectList()
                   } else {
                     _this.$toast('取消认领失败')
                   }
+                },
+                error: function(err) {
+                  _this.loading = false
                 }
               })
             },

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/historypush.html

@@ -815,7 +815,7 @@
             setSessionStorage();
             sessionStorage.setItem(vm.sessStorageKey, JSON.stringify(vm.$data))
             if(historyVt == 's') {
-              location.href = '/page_entniche/page/subsetting/sub_entrance.html'
+              location.href = '/page_entniche/page/sub_management/sub_management_system.html'
               return
             }
             let thisType = sessionStorage.getItem('userIsNew')

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/search/mainSearch.html

@@ -1182,7 +1182,7 @@
                 }else{
                     //window.location.href='/jyloanweb/index.html?v='+(new Date()).valueOf();
                     //查询是否是否开通商机管理 --isPower:未购买员工是否有权限进入商机管理页面
-                    $.post("/entniche/buy/whetherbuy",{},function(res){
+                    $.post("/entnicheNew/buy/whetherbuy",{},function(res){
                         if (res.error_code === 0) {
                             if (res.data.status === 2||res.data.isPower) {
                                 //清除之前选中商机管理推送列表的缓存

+ 7 - 1
src/web/staticres/common-module/ent-search/ent-search-template.js

@@ -1264,6 +1264,7 @@ window.vBuyerSearchComponent = new Vue({
       this.togglePopForArea(false)
     },
     resetEnt () {
+      this.selectEntList = '请选择企业历史客户'
       this.conditionStrMap.entcustomer= []
       this.togglePopForArea(false)
     },
@@ -1393,10 +1394,15 @@ window.vBuyerSearchComponent = new Vue({
           cateArr.push(sum.Buyer)
         })
         if (r.data.list) {
+          r.data.list = r.data.list.splice(0, 499)
           if(r.data.count<=10) {
             this.buyerList = r.data.list
           } else {
-            this.buyerList = this.buyerList.concat(r.data.list)
+            if(this.listInfo.pageNum <= 1) {
+              this.buyerList = r.data.list
+            } else {
+              this.buyerList = this.buyerList.concat(r.data.list)
+            }
           }
         }