yuhao пре 2 година
родитељ
комит
70d56eb6d6

+ 3 - 1
src/components/common/layout/layout.vue

@@ -313,7 +313,9 @@ export default {
313
     }, 20000)
313
     }, 20000)
314
   },
314
   },
315
   mounted () {
315
   mounted () {
316
-    
316
+    if(this.$route.path=='/customerMan/details'){
317
+      this.isback=true
318
+    }
317
   },
319
   },
318
   beforeDestroy () {
320
   beforeDestroy () {
319
     // 关闭WebSocket连接并清除定时器
321
     // 关闭WebSocket连接并清除定时器

+ 6 - 1
src/pages/customerMan/details/index.vue

@@ -384,7 +384,11 @@ export default {
384
     },
384
     },
385
   },
385
   },
386
   watch: {},
386
   watch: {},
387
-
387
+  // 返回页面缓存客户管理页面
388
+    beforeRouteLeave(to,from,next){
389
+    to.meta.keepAlive=true
390
+    next()
391
+  },
388
   methods: {
392
   methods: {
389
     // 获取客户管理详情
393
     // 获取客户管理详情
390
     getUserDetail() {
394
     getUserDetail() {
@@ -420,6 +424,7 @@ export default {
420
         path: "/testSkin",
424
         path: "/testSkin",
421
         query: {
425
         query: {
422
           isback: true,
426
           isback: true,
427
+          id:this.id
423
         },
428
         },
424
       });
429
       });
425
     },
430
     },

+ 31 - 4
src/pages/customerMan/index.vue

@@ -35,6 +35,8 @@
35
       <select-pop
35
       <select-pop
36
         :visible.sync="dialogVisible"
36
         :visible.sync="dialogVisible"
37
         @saveSelectList="saveSelectList"
37
         @saveSelectList="saveSelectList"
38
+        :resetPop='resetPop'
39
+        :key='key'
38
       ></select-pop>
40
       ></select-pop>
39
     </div>
41
     </div>
40
 
42
 
@@ -65,6 +67,12 @@
65
           show-overflow-tooltip
67
           show-overflow-tooltip
66
         >
68
         >
67
         </el-table-column>
69
         </el-table-column>
70
+        <el-table-column
71
+          prop="last_login_time"
72
+          label="最后登录时间"
73
+          show-overflow-tooltip
74
+        >
75
+        </el-table-column>
68
       </el-table>
76
       </el-table>
69
 
77
 
70
       <div class="pagin">
78
       <div class="pagin">
@@ -117,11 +125,13 @@ export default {
117
       superpositionNum: 0,
125
       superpositionNum: 0,
118
       StoredPrice: 0,
126
       StoredPrice: 0,
119
       transitionNum: 0,
127
       transitionNum: 0,
128
+      consumeprice:0,
129
+      resetPop:false, //设置筛选弹窗开关
130
+      key:1 //筛选弹框组件刷新加载
120
     };
131
     };
121
   },
132
   },
122
   computed: {},
133
   computed: {},
123
   watch: {},
134
   watch: {},
124
-
125
   methods: {
135
   methods: {
126
     // 筛选其他条件
136
     // 筛选其他条件
127
     saveSelectList(
137
     saveSelectList(
@@ -131,15 +141,17 @@ export default {
131
       latelyKey,
141
       latelyKey,
132
       superpositionNum,
142
       superpositionNum,
133
       StoredPrice,
143
       StoredPrice,
134
-      transitionNum
144
+      transitionNum,
145
+      consumeprice,
135
     ) {
146
     ) {
136
       (this.customerKey = customerKey),
147
       (this.customerKey = customerKey),
137
         (this.couponKey = couponKey),
148
         (this.couponKey = couponKey),
138
         (this.cardKey = cardKey),
149
         (this.cardKey = cardKey),
139
-        (this.latelyKey = cardKey),
150
+        (this.latelyKey = latelyKey),
140
         (this.superpositionNum = superpositionNum),
151
         (this.superpositionNum = superpositionNum),
141
         (this.StoredPrice = StoredPrice),
152
         (this.StoredPrice = StoredPrice),
142
         (this.transitionNum = transitionNum),
153
         (this.transitionNum = transitionNum),
154
+        this.consumeprice = consumeprice
143
         this.getUserList();
155
         this.getUserList();
144
     },
156
     },
145
     // 筛选沉默用户
157
     // 筛选沉默用户
@@ -169,8 +181,9 @@ export default {
169
         project_add: this.superpositionNum,
181
         project_add: this.superpositionNum,
170
         balance_money: this.StoredPrice,
182
         balance_money: this.StoredPrice,
171
         change_add: this.transitionNum,
183
         change_add: this.transitionNum,
184
+        consume_money:this.consumeprice
172
       };
185
       };
173
-      api.getUserList(params).then((res) => {
186
+      api.getUserPayList(params).then((res) => {
174
         if (res.code == 200) {
187
         if (res.code == 200) {
175
           // 将用户手机号中间四位变成****
188
           // 将用户手机号中间四位变成****
176
           res.data.list.map((item) => {
189
           res.data.list.map((item) => {
@@ -207,6 +220,20 @@ export default {
207
   },
220
   },
208
 
221
 
209
   mounted() {},
222
   mounted() {},
223
+  // 不是客户详情页面返回重置数据
224
+  beforeRouteEnter(to, from, next) {
225
+    if (from.path != "/customerMan/details") {
226
+      next((vm)=>{
227
+        let key = vm.key
228
+        Object.assign(vm.$data, vm.$options.data());
229
+        vm.key=key+1 
230
+        vm.resetPop = true
231
+        vm.getUserList()
232
+      })
233
+    }else{
234
+      next()
235
+    }
236
+  },
210
 };
237
 };
211
 </script>
238
 </script>
212
 
239
 

+ 2 - 2
src/pages/customerMan/myOrder/index.vue

@@ -313,13 +313,13 @@ type: "全额券" -->
313
                   <div>
313
                   <div>
314
                     {{
314
                     {{
315
                       scope.row.type == 1
315
                       scope.row.type == 1
316
-                        ? "重置"
316
+                        ? "充值"
317
                         : scope.row.type == 2
317
                         : scope.row.type == 2
318
                         ? "充值赠送"
318
                         ? "充值赠送"
319
                         : scope.row.type == 3
319
                         : scope.row.type == 3
320
                         ? "订单退款"
320
                         ? "订单退款"
321
                         : scope.row.type == 5
321
                         : scope.row.type == 5
322
-                        ? "现驳回"
322
+                        ? "现驳回"
323
                         : scope.row.type == -1
323
                         : scope.row.type == -1
324
                         ? "消费"
324
                         ? "消费"
325
                         : scope.row.type == -2
325
                         : scope.row.type == -2

+ 35 - 12
src/pages/customerMan/selectPop/index.vue

@@ -94,14 +94,20 @@
94
               @change="transitionChange"
94
               @change="transitionChange"
95
             ></el-input-number>
95
             ></el-input-number>
96
           </div>
96
           </div>
97
-          <!-- <div class="consumePrice">
97
+          <div class="consumePrice">
98
             <div class="consumePrice-title">总消费金额</div>
98
             <div class="consumePrice-title">总消费金额</div>
99
             <div class="consumePrice-content">
99
             <div class="consumePrice-content">
100
-              <el-input v-model="minConsumePrice"></el-input>
100
+              <el-input
101
+                v-model="minConsumePrice"
102
+                @change="minConsume"
103
+              ></el-input>
101
               <div>-</div>
104
               <div>-</div>
102
-              <el-input v-model="maxConsumePrice"></el-input>
105
+              <el-input
106
+                v-model="maxConsumePrice"
107
+                @change="maxConsume"
108
+              ></el-input>
103
             </div>
109
             </div>
104
-          </div> -->
110
+          </div>
105
           <div class="StoredPrice">
111
           <div class="StoredPrice">
106
             <div class="StoredPrice-title">总储值金额</div>
112
             <div class="StoredPrice-title">总储值金额</div>
107
             <div class="StoredPrice-content">
113
             <div class="StoredPrice-content">
@@ -135,7 +141,7 @@
135
 <script>
141
 <script>
136
 import api from "../../../server/home";
142
 import api from "../../../server/home";
137
 export default {
143
 export default {
138
-  props: ["visible"],
144
+  props: ["visible",'resetPop'],
139
   data() {
145
   data() {
140
     return {
146
     return {
141
       total: 0,
147
       total: 0,
@@ -191,6 +197,9 @@ export default {
191
       let StoredPrice = [];
197
       let StoredPrice = [];
192
       StoredPrice.push(this.minStoredPricePrice);
198
       StoredPrice.push(this.minStoredPricePrice);
193
       StoredPrice.push(this.maxStoredPricePrice);
199
       StoredPrice.push(this.maxStoredPricePrice);
200
+      let consumeprice = [];
201
+      consumeprice.push(this.minConsumePrice);
202
+      consumeprice.push(this.maxConsumePrice);
194
       let params = {
203
       let params = {
195
         page: this.currentPage1,
204
         page: this.currentPage1,
196
         limit: this.limit,
205
         limit: this.limit,
@@ -202,15 +211,18 @@ export default {
202
         balance_money:
211
         balance_money:
203
           this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
212
           this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
204
         change_add: this.transitionNum,
213
         change_add: this.transitionNum,
214
+        consume_money:
215
+          this.maxConsumePrice.length == 0 ? 0 : consumeprice.toString(),
205
       };
216
       };
206
-      api.getUserList(params).then((res) => {
217
+      api.getUserPayList(params).then((res) => {
207
         if (
218
         if (
208
           this.customerKey.length == 0 &&
219
           this.customerKey.length == 0 &&
209
           this.couponKey.length == 0 &&
220
           this.couponKey.length == 0 &&
210
           this.cardKey.length == 0 &&
221
           this.cardKey.length == 0 &&
211
           this.latelyKey.length == 0 &&
222
           this.latelyKey.length == 0 &&
212
           this.superpositionNum == 0 &&
223
           this.superpositionNum == 0 &&
213
-          this.maxStoredPricePrice.length == 0
224
+          this.maxStoredPricePrice.length == 0 &&
225
+          this.maxConsumePrice.length == 0
214
         ) {
226
         ) {
215
           this.total = 0;
227
           this.total = 0;
216
           return;
228
           return;
@@ -228,6 +240,9 @@ export default {
228
       let StoredPrice = [];
240
       let StoredPrice = [];
229
       StoredPrice.push(this.minStoredPricePrice);
241
       StoredPrice.push(this.minStoredPricePrice);
230
       StoredPrice.push(this.maxStoredPricePrice);
242
       StoredPrice.push(this.maxStoredPricePrice);
243
+      let consumeprice = [];
244
+      consumeprice.push(this.minConsumePrice);
245
+      consumeprice.push(this.maxConsumePrice);
231
       this.$emit("update:visible", false);
246
       this.$emit("update:visible", false);
232
       this.$emit(
247
       this.$emit(
233
         "saveSelectList",
248
         "saveSelectList",
@@ -237,13 +252,22 @@ export default {
237
         this.latelyKey.length == 0 ? 0 : this.latelyKey,
252
         this.latelyKey.length == 0 ? 0 : this.latelyKey,
238
         this.superpositionNum,
253
         this.superpositionNum,
239
         this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
254
         this.maxStoredPricePrice.length == 0 ? 0 : StoredPrice.toString(),
240
-        this.transitionNum
255
+        this.transitionNum,
256
+        this.maxConsumePrice.length == 0 ? 0 : consumeprice.toString()
241
       );
257
       );
242
     },
258
     },
243
     // 关闭弹窗
259
     // 关闭弹窗
244
     closeFilterPop() {
260
     closeFilterPop() {
245
       this.$emit("update:visible", false);
261
       this.$emit("update:visible", false);
246
     },
262
     },
263
+    // 消费最小值改变
264
+    minConsume() {
265
+      this.getUserList();
266
+    },
267
+    // 消费最大值改变
268
+    maxConsume() {
269
+      this.getUserList();
270
+    },
247
     // 最小值改变
271
     // 最小值改变
248
     minChange() {
272
     minChange() {
249
       this.getUserList();
273
       this.getUserList();
@@ -311,10 +335,9 @@ export default {
311
     },
335
     },
312
   },
336
   },
313
   watch: {
337
   watch: {
314
-    visible(newValue, oldValue) {
315
-      // 关闭打开弹框重置数据
316
-      this.reset();
317
-    },
338
+    resetPop(newValue,oldValue){
339
+      this.reset()
340
+    }
318
   },
341
   },
319
 };
342
 };
320
 </script>
343
 </script>

+ 1 - 1
src/pages/testSkin/index.vue

@@ -86,7 +86,7 @@ export default {
86
       let params = {
86
       let params = {
87
         page: this.currentPage1,
87
         page: this.currentPage1,
88
         limit: this.limit,
88
         limit: this.limit,
89
-        keywords: this.searchText,
89
+        keywords: this.searchText||this.$route.query.id,
90
         start_date: start_date,
90
         start_date: start_date,
91
         end_date: end_date,
91
         end_date: end_date,
92
       };
92
       };

+ 4 - 1
src/router/map/home.js

@@ -54,7 +54,10 @@ export default {
54
   },
54
   },
55
   {
55
   {
56
     path: '/customerMan',
56
     path: '/customerMan',
57
-    component: CustomerMan
57
+    component: CustomerMan,
58
+    meta:{
59
+      keepAlive:true
60
+    }
58
   },
61
   },
59
   {
62
   {
60
     path: '/customerMan/details',
63
     path: '/customerMan/details',

+ 4 - 0
src/server/home.js

@@ -229,4 +229,8 @@ export default class Home {
229
   static getBalanceRecord (params) {
229
   static getBalanceRecord (params) {
230
     return $http.post(url.getBalanceRecord, params)
230
     return $http.post(url.getBalanceRecord, params)
231
   }
231
   }
232
+  // 获取付费用户列表
233
+  static getUserPayList (params) {
234
+    return $http.get(url.getUserPayList, params)
235
+  }
232
 }
236
 }

+ 4 - 1
src/server/urls.js

@@ -140,5 +140,8 @@ export default {
140
   editSign:'/v2/pad/detail/sign',
140
   editSign:'/v2/pad/detail/sign',
141
 
141
 
142
   // 余额变更记录
142
   // 余额变更记录
143
-  getBalanceRecord:'/v2/pad/detail/balance'
143
+  getBalanceRecord:'/v2/pad/detail/balance',
144
+
145
+  // 获取付费用户列表
146
+  getUserPayList:'/v2/pad/user/pay_list',
144
 }
147
 }