wangxiaogang 3 سال پیش
والد
کامیت
a45bd988f0

+ 6 - 1
src/web/staticres/js/pur-busniess-index-pc.js

@@ -290,7 +290,12 @@ var vm = new Vue({
     },
     },
     // 保存设置
     // 保存设置
     saveSetting () {
     saveSetting () {
-      window.localStorage.setItem('bus-key-group-SCOPE', JSON.stringify(this.subData))
+      if (this.subData.length == 0) {
+        location.href = '/jylab/purSearch/index.html'
+      } else {
+        window.localStorage.setItem('bus-key-group-SCOPE', JSON.stringify(this.subData))
+        location.href = '/jylab/purSearch/index.html'
+      }
     }
     }
   }
   }
 })
 })

+ 29 - 33
src/web/staticres/js/pur-search-index-pc.js

@@ -25,7 +25,6 @@ function toastFn (text, duration = 1000) {
       },duration)
       },duration)
 }
 }
 function formatKeywordsList (res) {
 function formatKeywordsList (res) {
-    console.info(res)
     // if (!res || !res.a_items) return
     // if (!res || !res.a_items) return
     // const data = res.a_items
     // const data = res.a_items
     const newArr = []
     const newArr = []
@@ -175,7 +174,7 @@ var vm = new Vue({
     },
     },
     methods: {
     methods: {
         updatescope(data) {
         updatescope(data) {
-            console.log(data)
+            // console.log(data)
         },
         },
         // 采购单位模糊搜索
         // 采购单位模糊搜索
         getPreSearchList: utils.debounce(function () {
         getPreSearchList: utils.debounce(function () {
@@ -404,6 +403,7 @@ var vm = new Vue({
             return tempArr
             return tempArr
         },
         },
         doSearch: function () {
         doSearch: function () {
+            $('.tags-box').slideToggle()
             this.listState.pageNum = 1
             this.listState.pageNum = 1
             this.getList(1, 'search')
             this.getList(1, 'search')
         },
         },
@@ -437,7 +437,6 @@ var vm = new Vue({
                         arrs.forEach(v => {
                         arrs.forEach(v => {
                             arr1.push(v.Buyer)
                             arr1.push(v.Buyer)
                         })
                         })
-                        console.info(arrs)
                         if (arrs.length == 0) {
                         if (arrs.length == 0) {
                             this.listState.list = []
                             this.listState.list = []
                         } else {
                         } else {
@@ -459,6 +458,7 @@ var vm = new Vue({
             })
             })
         },
         },
         onPageChange: function (p) {
         onPageChange: function (p) {
+            $('.tags-box').slideToggle()
             this.listState.pageNum = p
             this.listState.pageNum = p
             this.getList(p)
             this.getList(p)
         },
         },
@@ -496,26 +496,24 @@ var vm = new Vue({
                 $('.check-all').prop('checked', false)
                 $('.check-all').prop('checked', false)
             }
             }
             this.selectName = arr1
             this.selectName = arr1
-            var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
-            var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
-            console.info(tempArray1)
-            console.info(tempArray2)
-            if (tempArray1.length == 0) {
-                this.follow = true
-                if (this.selectName.length == 0) {
-                    this.follow = false
-                }
-            } else {
-                this.follow = false
-            }
-            if (tempArray2.length == 0) {
-                this.claim = true
-                if (this.selectName.length == 0) {
-                    this.claim = false
-                }
-            } else {
-                this.claim = false
-            }
+            // var tempArray1 = this.arrDefault(this.selectName, this.attentionName)
+            // var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
+            // if (tempArray1.length == 0) {
+            //     this.follow = true
+            //     if (this.selectName.length == 0) {
+            //         this.follow = false
+            //     }
+            // } else {
+            //     this.follow = false
+            // }
+            // if (tempArray2.length == 0) {
+            //     this.claim = true
+            //     if (this.selectName.length == 0) {
+            //         this.claim = false
+            //     }
+            // } else {
+            //     this.claim = false
+            // }
         },
         },
         // 是否关注企业
         // 是否关注企业
         attentionCheck(arrs, item) {
         attentionCheck(arrs, item) {
@@ -582,7 +580,6 @@ var vm = new Vue({
                     D: per ? str : item.claim1
                     D: per ? str : item.claim1
                 }
                 }
             }
             }
-            console.info(obj)
             $.ajax({
             $.ajax({
                 url: '/entnicheNew/customer/attention',
                 url: '/entnicheNew/customer/attention',
                 method: 'POST',
                 method: 'POST',
@@ -632,24 +629,23 @@ var vm = new Vue({
                 var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
                 var tempArray2 = this.arrDefault(this.selectName, this.claimcheckName)
                 if (type == 0) {
                 if (type == 0) {
                     if (tempArray1.length == 0) {// 批量取关
                     if (tempArray1.length == 0) {// 批量取关
-                        this.follow = true
+                        // this.follow = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray1.length == this.selectName.length) {// 批量关注
                     } else if (tempArray1.length == this.selectName.length) {// 批量关注
-                        this.follow = false
+                        // this.follow = false
                         this.attention(String(this.selectName), type, false, 'pi')
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
                     } else {
-                        toastFn('关注和取消关注不能同时进行!', 2000)
+                        toastFn('关注和取消不能同时进行!', 2000)
                     }
                     }
                 } else {
                 } else {
-                    console.info(this.selectName)
                     if (tempArray2.length == 0) {// 批量取认领
                     if (tempArray2.length == 0) {// 批量取认领
-                        this.claim = true
+                        // this.claim = true
                         this.attention(String(this.selectName), type, true, 'pi') 
                         this.attention(String(this.selectName), type, true, 'pi') 
                     } else if (tempArray2.length == this.selectName.length) {// 批量认领
                     } else if (tempArray2.length == this.selectName.length) {// 批量认领
-                        this.claim = false
+                        // this.claim = false
                         this.attention(String(this.selectName), type, false, 'pi')
                         this.attention(String(this.selectName), type, false, 'pi')
                     } else {
                     } else {
-                        toastFn('认领和取消认领不能同时进行!', 2000)
+                        toastFn('认领和取消不能同时进行!', 2000)
                     }
                     }
                 }
                 }
             }
             }
@@ -900,7 +896,6 @@ var vm = new Vue({
                   D: false,
                   D: false,
                   label: lids
                   label: lids
                 }
                 }
-                console.log(params)
                 // 执行保存绑定标签操作
                 // 执行保存绑定标签操作
                 // if (params.label !== '') {
                 // if (params.label !== '') {
                   saveChooseTags(params, function () {
                   saveChooseTags(params, function () {
@@ -977,7 +972,6 @@ var vm = new Vue({
                       return item.lid != id
                       return item.lid != id
                     })
                     })
                     activeTags = newArr
                     activeTags = newArr
-                    console.log(activeTags, newArr, 'quxiao')
                     inputTagList()
                     inputTagList()
                   }
                   }
                 })
                 })
@@ -1009,6 +1003,8 @@ var vm = new Vue({
                 dataType: 'json',
                 dataType: 'json',
                 success: function (r) {
                 success: function (r) {
                   if (r.error_code == 0 && r.data) {
                   if (r.error_code == 0 && r.data) {
+                    $('.tags-box').slideToggle()
+                    _this.getList(_this.listState.pageNum)
                     _this.$toast('认领成功!')
                     _this.$toast('认领成功!')
                     _this.$emit('updatelist', true)
                     _this.$emit('updatelist', true)
                     callback && callback()
                     callback && callback()

+ 1 - 1
src/web/templates/pc/purScopebusniess.html

@@ -114,7 +114,7 @@
                 </div>
                 </div>
                 <div>
                 <div>
                   <div class="reset-tips">新增的关键词设置,将在登出时还原</div>
                   <div class="reset-tips">新增的关键词设置,将在登出时还原</div>
-                  <button type="button" class="save-btn" @click="saveSetting"><a href="/jylab/purSearch/index.html">保存设置</a></button>
+                  <button type="button" class="save-btn" @click="saveSetting">保存设置</button>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>