许成详 6 years ago
parent
commit
0749028572

+ 1
- 0
src/pages/system/cardAndCouponManager/couponManager/edit.vue View File

@@ -492,6 +492,7 @@ export default {
492 492
     },
493 493
     sureAddItem () { // 确定添加指定商品
494 494
       var bool = true
495
+      this.couponInfo.Targets = this.couponInfo.Targets || []
495 496
       if (this.couponInfo.CouponType === 'goods') {
496 497
         for (var n = 0; n < this.currentSelectArr.length; n++) {
497 498
           if (this.couponInfo.Targets.length) {

+ 14
- 8
src/pages/system/dashboard/index.vue View File

@@ -94,25 +94,31 @@ export default {
94 94
     }),
95 95
     CaseId: {
96 96
       get () {
97
-        return this.postData.caseid || this.defaultCaseId
97
+        return this.postData.caseid || this.defaultCaseId || this.cases[0].CaseId
98 98
       },
99 99
       set (val) {
100 100
         this.postData.caseid = val
101 101
       }
102 102
     }
103 103
   },
104
-  mounted () {
105
-    this.$nextTick(function () {
106
-      this.getDashboardData({
107
-        caseid: this.postData.caseid
108
-      }).then((res) => {
109
-        console.log(JSON.stringify(res))
110
-      })
104
+  created () {
105
+    this.postData.caseid = this.postData.caseid || this.cases[0].CaseId
106
+    this.getDashboardData({
107
+      caseid: this.postData.caseid
108
+    }).then((res) => {
109
+      console.log(JSON.stringify(res))
110
+    })
111
+    this.getDashboardBottomData({
112
+      caseid: this.postData.caseid,
113
+      statype: 'week'
114
+    }).then((res) => {
115
+      console.log(JSON.stringify(res))
111 116
     })
112 117
   },
113 118
   methods: {
114 119
     ...mapStaActions([
115 120
       'getDashboardData',
121
+      'getDashboardBottomData',
116 122
     ]),
117 123
   }
118 124
 }

+ 2
- 2
src/pages/system/dataStatistics/cardCouponUsedList/index.vue View File

@@ -176,7 +176,7 @@ export default {
176 176
       },
177 177
       currentList: [],
178 178
       typeList: [{
179
-        value: '不限',
179
+        value: '',
180 180
         id: ''
181 181
       }, {
182 182
         value: '案场',
@@ -192,7 +192,7 @@ export default {
192 192
         id: 'give'
193 193
       }],
194 194
       statusList: [{
195
-        value: '不限',
195
+        value: '',
196 196
         id: ''
197 197
       }, {
198 198
         value: '未使用',

+ 1
- 1
src/pages/system/dataStatistics/courseVerifyList/index.vue View File

@@ -139,7 +139,7 @@ export default {
139 139
         pagesize: 10, // 请求数据量
140 140
       },
141 141
       statusList: [{
142
-        value: '不限',
142
+        value: '',
143 143
         id: ''
144 144
       }, {
145 145
         value: '未使用',

+ 2
- 2
src/pages/system/dataStatistics/goodsOrderList/index.vue View File

@@ -148,7 +148,7 @@ export default {
148 148
         pagesize: 10, // 请求数据量
149 149
       },
150 150
       typeList: [{
151
-        value: '不限',
151
+        value: '',
152 152
         id: ''
153 153
       }, {
154 154
         value: '销售',
@@ -161,7 +161,7 @@ export default {
161 161
         id: 'customer'
162 162
       }],
163 163
       statusList: [{
164
-        value: '不限',
164
+        value: '',
165 165
         id: ''
166 166
       }, {
167 167
         value: '已下单',

+ 5
- 0
src/pages/system/verificationManager/drawVerification/index.vue View File

@@ -79,6 +79,11 @@ export default {
79 79
           this.centerDialogVisible = false
80 80
           this.verificationCode = ''
81 81
         })
82
+      } else {
83
+        this.$message({
84
+          message: '核销码为空!',
85
+          type: 'error'
86
+        })
82 87
       }
83 88
     },
84 89
     toVerificationList () { // 定向到核销列表

+ 8
- 1
src/pages/system/verificationManager/phoneVerification/index.vue View File

@@ -31,7 +31,14 @@ export default {
31 31
   },
32 32
   methods: {
33 33
     toVerificationList () { // 前往核销列表
34
-      this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
34
+      if (this.phone !== '') {
35
+        this.$router.push({name: 'phoneVerificationList', query: {tel: this.phone}})
36
+      } else {
37
+        this.$message({
38
+          message: '手机号为空!',
39
+          type: 'error'
40
+        })
41
+      }
35 42
     },
36 43
   }
37 44
 }

+ 14
- 6
src/pages/system/verificationManager/phoneVerification/verificationList/index.vue View File

@@ -6,9 +6,9 @@
6 6
           <div class="flex-item">
7 7
             <div class="userInfo">
8 8
               <span>用户名:</span>
9
-              <b>{{(courses.customerInfo || {}).Name || (courses.customerInfo || {}).CustomerName }}</b>
9
+              <b>{{customerName}}</b>
10 10
               <span>手机号:</span>
11
-              <b>{{(courses.customerInfo || {}).Phone}}</b>
11
+              <b>{{phone}}</b>
12 12
             </div>
13 13
           </div>
14 14
           <el-button
@@ -86,6 +86,8 @@ export default {
86 86
   name: '',
87 87
   data () {
88 88
     return {
89
+      customerName: '',
90
+      phone: this.$route.query.tel,
89 91
       code: '',
90 92
       tel: '',
91 93
       page: 1,
@@ -93,11 +95,16 @@ export default {
93 95
     }
94 96
   },
95 97
   mounted () {
96
-    const { code, tel } = this.$route.query
97
-    this.code = code
98
-    this.tel = tel
99 98
     this.$nextTick(function () {
100
-      this.getList()
99
+      this.getCustomerName({
100
+        id: this.phone
101
+      }).then((res) => {
102
+        console.log(res)
103
+        const { code, tel } = this.$route.query
104
+        this.code = code
105
+        this.tel = tel
106
+        this.getList()
107
+      })
101 108
     })
102 109
   },
103 110
   computed: {
@@ -110,6 +117,7 @@ export default {
110 117
       'GetCourseVerList',
111 118
       'CourseVerifs',
112 119
       'GetCourseVerListByTel',
120
+      'getCustomerName'
113 121
     ]),
114 122
     check (item) { // 核销
115 123
       this.$confirm('确认核销此课程?', '提示', {

+ 8
- 1
src/pages/system/verificationManager/qrcodeVerification/index.vue View File

@@ -62,7 +62,14 @@ export default {
62 62
   },
63 63
   methods: {
64 64
     toVerificationList () { // 定向到核销列表
65
-      this.$router.push({name: 'qrcodeVerificationList', query: {code: this.verificationCode}})
65
+      if (this.verificationCode !== '') {
66
+        this.$router.push({ name: 'qrcodeVerificationList', query: { code: this.verificationCode } })
67
+      } else {
68
+        this.$message({
69
+          message: '核销码为空!',
70
+          type: 'error'
71
+        })
72
+      }
66 73
     },
67 74
   }
68 75
 }

+ 1
- 1
src/store/case/index.js View File

@@ -12,7 +12,7 @@ export default {
12 12
       label: '案场3'
13 13
     }, {
14 14
       value: '',
15
-      label: '不限'
15
+      label: ''
16 16
     }],
17 17
   },
18 18
   mutations: {},

+ 14
- 2
src/store/sta/sta.js View File

@@ -158,8 +158,20 @@ export default {
158 158
     },
159 159
     getDashboardData ({ commit }, payload) {
160 160
       return new Promise((resolve, reject) => {
161
-        ajax(api.statistics.dashboardData.url, {
162
-          method: api.statistics.dashboardData.method,
161
+        ajax(api.dashboard.dashboardData.url, {
162
+          method: api.dashboard.dashboardData.method,
163
+          queryData: {
164
+            ...payload,
165
+          }
166
+        }).then(res => {
167
+          resolve(res)
168
+        }).catch(reject)
169
+      })
170
+    },
171
+    getDashboardBottomData ({ commit }, payload) {
172
+      return new Promise((resolve, reject) => {
173
+        ajax(api.dashboard.dashboardBottomData.url, {
174
+          method: api.dashboard.dashboardBottomData.method,
163 175
           queryData: {
164 176
             ...payload,
165 177
           }

+ 12
- 0
src/store/verification/verification.js View File

@@ -74,5 +74,17 @@ export default {
74 74
         }).catch(reject)
75 75
       })
76 76
     },
77
+    getCustomerName ({ commit }, { id }) {
78
+      return new Promise((resolve, reject) => {
79
+        ajax(api.verification.getCustomerName.url, {
80
+          method: api.verification.getCustomerName.method,
81
+          urlData: {
82
+            id,
83
+          }
84
+        }).then(res => {
85
+          resolve(res)
86
+        }).catch(reject)
87
+      })
88
+    },
77 89
   },
78 90
 }

+ 4
- 0
src/style/main.css View File

@@ -395,6 +395,10 @@ select:focus {
395 395
   height: 100%;
396 396
 }
397 397
 
398
+.el-table th>.cell,
399
+.el-table .cell{
400
+  text-overflow: initial !important;
401
+}
398 402
 
399 403
 
400 404
 

+ 13
- 3
src/util/api.js View File

@@ -553,6 +553,10 @@ const $api = {
553 553
       method: 'get',
554 554
       url: `${baseUrl}${common}/luckdrawlist/verify/:id`
555 555
     },
556
+    getCustomerName: {
557
+      method: 'get',
558
+      url: `${baseUrl}${common}/customer/tel/:id`
559
+    },
556 560
   },
557 561
   goodsOrder: {
558 562
     getOnlineOrder: {
@@ -760,9 +764,15 @@ const $api = {
760 764
       url: `${baseUrl}${common}/statistics/cardcouponverify/excel`
761 765
     },
762 766
   },
763
-  dashboardData: {
764
-    method: 'get',
765
-    url: `${baseUrl}${common}/dashboard`
767
+  dashboard: {
768
+    dashboardData: {
769
+      method: 'get',
770
+      url: `${baseUrl}${common}/dashboard`
771
+    },
772
+    dashboardBottomData: {
773
+      method: 'get',
774
+      url: `${baseUrl}${common}/dashboard/charts`
775
+    },
766 776
   },
767 777
   health: {
768 778
     healthList: {