许成详 6 年前
父节点
当前提交
8356d68c84

+ 1
- 2
config/index.js 查看文件

12
     proxyTable: {
12
     proxyTable: {
13
       '/api': {
13
       '/api': {
14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        // target: 'http://192.168.0.62:8080', //wf
16
-        target: 'http://localhost:8080', 
15
+        target: 'http://192.168.0.62:8080', //wf
17
         // target: 'http://192.168.0.11', //ys
16
         // target: 'http://192.168.0.11', //ys
18
         // target: 'http://192.168.0.11', //ys
17
         // target: 'http://192.168.0.11', //ys
19
         // target: 'http://dev.ycjcjy.com/', //frp
18
         // target: 'http://dev.ycjcjy.com/', //frp

+ 50
- 19
src/pages/system/dataStatistics/cardCouponList/index.vue 查看文件

5
         <div class="flex-item flex-h"></div>
5
         <div class="flex-item flex-h"></div>
6
         <ul>
6
         <ul>
7
           <li>
7
           <li>
8
-            <el-select v-model="CaseId" placeholder="请选择案场">
8
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
9
               <el-option
9
               <el-option
10
                 v-for="item in cases"
10
                 v-for="item in cases"
11
                 :key="item.CaseId"
11
                 :key="item.CaseId"
15
             </el-select>
15
             </el-select>
16
           </li>
16
           </li>
17
           <li>
17
           <li>
18
-            <el-select v-model="postData.type" placeholder="请选择卡券类型">
18
+            <el-select v-model="postData.ctype" placeholder="请选择卡券类型">
19
               <el-option
19
               <el-option
20
                 v-for="item in typeList"
20
                 v-for="item in typeList"
21
-                :key="item.CaseId"
22
-                :label="item.CaseName"
23
-                :value="item.CaseId">
21
+                :key="item.id"
22
+                :label="item.value"
23
+                :value="item.id">
24
               </el-option>
24
               </el-option>
25
             </el-select>
25
             </el-select>
26
           </li>
26
           </li>
43
     </div>
43
     </div>
44
     <div class="system-table-box">
44
     <div class="system-table-box">
45
       <el-table
45
       <el-table
46
-        :data="currentList"
46
+        :data="cardCouponList"
47
         stripe
47
         stripe
48
         style="width: 100%">
48
         style="width: 100%">
49
         <el-table-column
49
         <el-table-column
51
           label="所属案场">
51
           label="所属案场">
52
         </el-table-column>
52
         </el-table-column>
53
         <el-table-column
53
         <el-table-column
54
-          prop="name"
54
+          prop="CName"
55
           label="卡券名称">
55
           label="卡券名称">
56
         </el-table-column>
56
         </el-table-column>
57
         <el-table-column
57
         <el-table-column
58
-          prop="type"
58
+          prop="TypeName"
59
           label="卡券类型">
59
           label="卡券类型">
60
         </el-table-column>
60
         </el-table-column>
61
         <el-table-column
61
         <el-table-column
62
-          prop="sendType"
62
+          prop="SendType"
63
           label="发送类型">
63
           label="发送类型">
64
+          <template slot-scope="scope">
65
+            {{scope.row.SendType === 'case' ? '案场' : scope.row.SendType === 'system' ? '系统' : '渠道'}}
66
+          </template>
64
         </el-table-column>
67
         </el-table-column>
65
         <el-table-column
68
         <el-table-column
66
-          prop="price"
69
+          prop="Price"
67
           label="价格">
70
           label="价格">
68
         </el-table-column>
71
         </el-table-column>
69
         <el-table-column
72
         <el-table-column
70
-          prop="getNum"
73
+          prop="SentCount"
71
           label="领取数">
74
           label="领取数">
72
         </el-table-column>
75
         </el-table-column>
73
         <el-table-column
76
         <el-table-column
74
-          prop="usedNum"
77
+          prop="UsedCount"
75
           label="实际使用数">
78
           label="实际使用数">
76
         </el-table-column>
79
         </el-table-column>
77
         <el-table-column
80
         <el-table-column
78
-          prop="totalPrice"
81
+          prop="UsedCount"
79
           label="总费用">
82
           label="总费用">
83
+          <template slot-scope="scope">
84
+            {{(scope.row.Price - 0) * (scope.row.UsedCount - 0)}}
85
+          </template>
80
         </el-table-column>
86
         </el-table-column>
81
       </el-table>
87
       </el-table>
82
     </div>
88
     </div>
91
 </template>
97
 </template>
92
 
98
 
93
 <script>
99
 <script>
94
-import { mapState } from 'vuex'
100
+import { mapState, createNamespacedHelpers } from 'vuex'
95
 import tableSearch from '@/components/tableSearch/index'
101
 import tableSearch from '@/components/tableSearch/index'
102
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
96
 
103
 
97
 export default {
104
 export default {
98
   name: '',
105
   name: '',
101
       total: 0,
108
       total: 0,
102
       postData: { // 表格搜索条件
109
       postData: { // 表格搜索条件
103
         caseid: '', // 案场id
110
         caseid: '', // 案场id
104
-        type: '', // 卡券类型
111
+        ctype: '', // 卡券类型
105
         name: '', // 卡券名称
112
         name: '', // 卡券名称
106
         page: 1, // 当前页码
113
         page: 1, // 当前页码
107
         pagesize: 10, // 请求数据量
114
         pagesize: 10, // 请求数据量
108
       },
115
       },
109
-      currentList: [],
110
-      typeList: [],
116
+      typeList: [{
117
+        value: '课程体验卡',
118
+        id: 'card'
119
+      }, {
120
+        value: '商品优惠券',
121
+        id: 'goodscoupon'
122
+      }, {
123
+        value: '课程优惠券',
124
+        id: 'coursecoupon'
125
+      }],
111
     }
126
     }
112
   },
127
   },
113
   computed: {
128
   computed: {
115
       cases: x => x.app.cases.list,
130
       cases: x => x.app.cases.list,
116
       defaultCaseId: x => x.app.cases.default
131
       defaultCaseId: x => x.app.cases.default
117
     }),
132
     }),
133
+    ...mapStaState({
134
+      cardCouponList: x => x.cardCoupon.list || [],
135
+    }),
118
     CaseId: {
136
     CaseId: {
119
       get () {
137
       get () {
120
         return this.postData.caseid || this.defaultCaseId
138
         return this.postData.caseid || this.defaultCaseId
129
   },
147
   },
130
   mounted () {
148
   mounted () {
131
     this.$nextTick(function () {
149
     this.$nextTick(function () {
150
+      this.getList()
132
     })
151
     })
133
   },
152
   },
134
   methods: {
153
   methods: {
154
+    ...mapStaActions([
155
+      'getCardCouponList',
156
+    ]),
135
     search () { // 搜索
157
     search () { // 搜索
136
-      // 1
158
+      this.page = 1
159
+      this.getList()
137
     },
160
     },
138
     handleCurrentChange (val) { // 跳转到分页
161
     handleCurrentChange (val) { // 跳转到分页
139
-      // this.getList()
162
+      this.page = val
163
+      this.getList()
164
+    },
165
+    getList () {
166
+      this.getCardCouponList(this.postData).then((res) => {
167
+        // console.log(JSON.stringify(res))
168
+        this.postData.page = res.page
169
+        this.total = res.total
170
+      })
140
     },
171
     },
141
   }
172
   }
142
 }
173
 }

+ 96
- 34
src/pages/system/dataStatistics/cardCouponUsedList/index.vue 查看文件

4
       <div class="flex-h">
4
       <div class="flex-h">
5
         <ul class="searchFilterLine" style="white-space: normal;">
5
         <ul class="searchFilterLine" style="white-space: normal;">
6
           <li>
6
           <li>
7
-            <el-select v-model="CaseId" placeholder="请选择案场">
7
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
8
               <el-option
8
               <el-option
9
                 v-for="item in cases"
9
                 v-for="item in cases"
10
                 :key="item.CaseId"
10
                 :key="item.CaseId"
14
             </el-select>
14
             </el-select>
15
           </li>
15
           </li>
16
           <li>
16
           <li>
17
-            <el-select v-model="postData.type" placeholder="请选择获取方式">
17
+            <el-select v-model="postData.receivetype" placeholder="请选择获取方式">
18
               <el-option
18
               <el-option
19
                 v-for="item in typeList"
19
                 v-for="item in typeList"
20
-                :key="item.CaseId"
21
-                :label="item.CaseName"
22
-                :value="item.CaseId">
20
+                :key="item.id"
21
+                :label="item.value"
22
+                :value="item.id">
23
               </el-option>
23
               </el-option>
24
             </el-select>
24
             </el-select>
25
           </li>
25
           </li>
27
             <el-select v-model="postData.status" placeholder="请选择状态">
27
             <el-select v-model="postData.status" placeholder="请选择状态">
28
               <el-option
28
               <el-option
29
                 v-for="item in statusList"
29
                 v-for="item in statusList"
30
-                :key="item.CaseId"
31
-                :label="item.CaseName"
32
-                :value="item.CaseId">
30
+                :key="item.id"
31
+                :label="item.value"
32
+                :value="item.id">
33
               </el-option>
33
               </el-option>
34
             </el-select>
34
             </el-select>
35
           </li>
35
           </li>
43
           <li>
43
           <li>
44
             <el-input
44
             <el-input
45
               placeholder="请输入手机号"
45
               placeholder="请输入手机号"
46
-              v-model="postData.phone"
46
+              v-model="postData.tel"
47
               clearable>
47
               clearable>
48
             </el-input>
48
             </el-input>
49
           </li>
49
           </li>
50
           <li style="white-space: nowrap;">
50
           <li style="white-space: nowrap;">
51
             <span>有效期:</span>
51
             <span>有效期:</span>
52
             <el-date-picker
52
             <el-date-picker
53
-              v-model="postData.startDate"
53
+              v-model="postData.begindate"
54
               type="date"
54
               type="date"
55
               placeholder="选择起始日期">
55
               placeholder="选择起始日期">
56
             </el-date-picker>
56
             </el-date-picker>
57
             <span>至</span>
57
             <span>至</span>
58
             <el-date-picker
58
             <el-date-picker
59
-              v-model="postData.endDate"
59
+              v-model="postData.enddate"
60
               type="date"
60
               type="date"
61
               placeholder="选择截止日期">
61
               placeholder="选择截止日期">
62
             </el-date-picker>
62
             </el-date-picker>
76
     </div>
76
     </div>
77
     <div class="system-table-box">
77
     <div class="system-table-box">
78
       <el-table
78
       <el-table
79
-        :data="currentList"
79
+        :data="cardCouponUsedList"
80
         stripe
80
         stripe
81
         style="width: 100%">
81
         style="width: 100%">
82
         <el-table-column
82
         <el-table-column
84
           label="所属案场">
84
           label="所属案场">
85
         </el-table-column>
85
         </el-table-column>
86
         <el-table-column
86
         <el-table-column
87
-          prop="Name"
87
+          prop="CardCouponName"
88
           label="卡券名称">
88
           label="卡券名称">
89
         </el-table-column>
89
         </el-table-column>
90
         <el-table-column
90
         <el-table-column
91
-          prop="GoodsList"
91
+          prop="TargetName"
92
           label="使用商品">
92
           label="使用商品">
93
         </el-table-column>
93
         </el-table-column>
94
         <el-table-column
94
         <el-table-column
95
-          prop="GetType"
95
+          prop="ReceivingType"
96
           label="获取方式">
96
           label="获取方式">
97
+          <template slot-scope="scope">
98
+            {{scope.row.ReceivingType === 'system' ? '系统' : scope.row.ReceivingType === 'case' ? '案场' : scope.row.ReceivingType === 'channel' ? '渠道' : ''}}
99
+          </template>
97
         </el-table-column>
100
         </el-table-column>
98
         <el-table-column
101
         <el-table-column
99
-          prop="NickName"
102
+          prop="CustomerName"
100
           label="微信昵称">
103
           label="微信昵称">
101
         </el-table-column>
104
         </el-table-column>
102
         <el-table-column
105
         <el-table-column
104
           label="手机号">
107
           label="手机号">
105
         </el-table-column>
108
         </el-table-column>
106
         <el-table-column
109
         <el-table-column
107
-          prop="SalerName"
110
+          prop="SalesName"
108
           label="销售">
111
           label="销售">
109
         </el-table-column>
112
         </el-table-column>
110
         <el-table-column
113
         <el-table-column
111
           prop="EndDate"
114
           prop="EndDate"
112
-          label="有效期">
115
+          label="有效期"
116
+          width="140px">
117
+          <template slot-scope="scope">
118
+            {{toolClass.dateFormat(scope.row.EndDate)}}
119
+          </template>
113
         </el-table-column>
120
         </el-table-column>
114
         <el-table-column
121
         <el-table-column
115
-          prop="GetDate"
116
-          label="获取时间">
122
+          prop="ReceiveDate"
123
+          label="获取时间"
124
+          width="140px">
125
+          <template slot-scope="scope">
126
+            {{toolClass.dateFormat(scope.row.ReceiveDate)}}
127
+          </template>
117
         </el-table-column>
128
         </el-table-column>
118
         <el-table-column
129
         <el-table-column
119
-          prop="CheckDate"
120
-          label="核销时间">
130
+          prop="VerifyDate"
131
+          label="使用时间"
132
+          width="140px">
133
+          <template slot-scope="scope">
134
+            {{toolClass.dateFormat(scope.row.UsedDate)}}
135
+          </template>
121
         </el-table-column>
136
         </el-table-column>
122
         <el-table-column
137
         <el-table-column
123
-          prop="Status"
138
+          prop="VerifyStatus"
124
           label="状态">
139
           label="状态">
140
+          <template slot-scope="scope">
141
+            {{scope.row.VerifyStatus === 'useable' ? '未使用' : scope.row.VerifyStatus === 'used' ? '已使用' : scope.row.VerifyStatus === 'late' ? '逾期核销' : scope.row.VerifyStatus === 'expire' ? '已失效' : ''}}
142
+          </template>
125
         </el-table-column>
143
         </el-table-column>
126
       </el-table>
144
       </el-table>
127
     </div>
145
     </div>
136
 </template>
154
 </template>
137
 
155
 
138
 <script>
156
 <script>
139
-import { mapState } from 'vuex'
157
+import { mapState, createNamespacedHelpers } from 'vuex'
140
 import tableSearch from '@/components/tableSearch/index'
158
 import tableSearch from '@/components/tableSearch/index'
159
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
141
 
160
 
142
 export default {
161
 export default {
143
   name: '',
162
   name: '',
145
     return {
164
     return {
146
       total: 0,
165
       total: 0,
147
       postData: { // 表格搜索条件
166
       postData: { // 表格搜索条件
148
-        phone: '', // 手机号
167
+        tel: '', // 手机号
149
         status: '', // 状态
168
         status: '', // 状态
150
         caseid: '', // 案场id
169
         caseid: '', // 案场id
151
-        type: '', // 获取方式
152
-        startDate: '', // 起始日期
153
-        endDate: '', // 截止日期
170
+        receivetype: '', // 获取方式
171
+        begindate: '', // 起始日期
172
+        enddate: '', // 截止日期
154
         name: '', // 卡券名称
173
         name: '', // 卡券名称
155
         page: 1, // 当前页码
174
         page: 1, // 当前页码
156
         pagesize: 10, // 请求数据量
175
         pagesize: 10, // 请求数据量
157
       },
176
       },
158
       currentList: [],
177
       currentList: [],
159
-      typeList: [],
160
-      statusList: [],
178
+      typeList: [{
179
+        value: '不限',
180
+        id: ''
181
+      }, {
182
+        value: '案场',
183
+        id: 'case'
184
+      }, {
185
+        value: '渠道',
186
+        id: 'channel'
187
+      }, {
188
+        value: '系统',
189
+        id: 'system'
190
+      }],
191
+      statusList: [{
192
+        value: '不限',
193
+        id: ''
194
+      }, {
195
+        value: '未使用',
196
+        id: 'useable'
197
+      }, {
198
+        value: '已使用',
199
+        id: 'used'
200
+      }, {
201
+        value: '逾期核销',
202
+        id: 'late'
203
+      }, {
204
+        value: '已失效',
205
+        id: 'expire'
206
+      }],
161
     }
207
     }
162
   },
208
   },
163
   computed: {
209
   computed: {
165
       cases: x => x.app.cases.list,
211
       cases: x => x.app.cases.list,
166
       defaultCaseId: x => x.app.cases.default
212
       defaultCaseId: x => x.app.cases.default
167
     }),
213
     }),
214
+    ...mapStaState({
215
+      cardCouponUsedList: x => x.cardCouponUsedList.list || [],
216
+    }),
168
     CaseId: {
217
     CaseId: {
169
       get () {
218
       get () {
170
         return this.postData.caseid || this.defaultCaseId
219
         return this.postData.caseid || this.defaultCaseId
179
   },
228
   },
180
   mounted () {
229
   mounted () {
181
     this.$nextTick(function () {
230
     this.$nextTick(function () {
231
+      this.getList()
182
     })
232
     })
183
   },
233
   },
184
   methods: {
234
   methods: {
235
+    ...mapStaActions([
236
+      'getCardCouponUsedList',
237
+    ]),
185
     search () { // 搜索
238
     search () { // 搜索
186
-      // 1
239
+      this.page = 1
240
+      this.getList()
187
     },
241
     },
188
     handleCurrentChange (val) { // 跳转到分页
242
     handleCurrentChange (val) { // 跳转到分页
189
-      // this.getList()
243
+      this.page = val
244
+      this.getList()
245
+    },
246
+    getList () {
247
+      this.getCardCouponUsedList(this.postData).then((res) => {
248
+        // console.log(JSON.stringify(res))
249
+        this.postData.page = res.page
250
+        this.total = res.total
251
+      })
190
     },
252
     },
191
   }
253
   }
192
 }
254
 }
195
 <!-- Add "scoped" attribute to limit CSS to this component only -->
257
 <!-- Add "scoped" attribute to limit CSS to this component only -->
196
 <style lang="scss" scoped>
258
 <style lang="scss" scoped>
197
 @import "page.scss";
259
 @import "page.scss";
198
-.searchFilterLine{
199
-  >li{
260
+.searchFilterLine {
261
+  > li {
200
     margin-bottom: 20px;
262
     margin-bottom: 20px;
201
   }
263
   }
202
 }
264
 }

+ 61
- 24
src/pages/system/dataStatistics/courseOrderList/index.vue 查看文件

4
       <div class="flex-h">
4
       <div class="flex-h">
5
         <ul class="searchFilterLine" style="white-space: normal;">
5
         <ul class="searchFilterLine" style="white-space: normal;">
6
           <li>
6
           <li>
7
-            <el-select v-model="CaseId" placeholder="请选择案场">
7
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
8
               <el-option
8
               <el-option
9
                 v-for="item in cases"
9
                 v-for="item in cases"
10
                 :key="item.CaseId"
10
                 :key="item.CaseId"
14
             </el-select>
14
             </el-select>
15
           </li>
15
           </li>
16
           <li>
16
           <li>
17
-            <el-select v-model="postData.type" placeholder="请选择课程类别">
17
+            <el-select v-model="postData.typeid" placeholder="请选择课程类别">
18
               <el-option
18
               <el-option
19
-                v-for="item in typeList"
20
-                :key="item.CaseId"
21
-                :label="item.CaseName"
22
-                :value="item.CaseId">
19
+                v-for="item in courseTypeList"
20
+                :key="item.LocationId"
21
+                :label="item.LocationName"
22
+                :value="item.LocationId">
23
               </el-option>
23
               </el-option>
24
             </el-select>
24
             </el-select>
25
           </li>
25
           </li>
33
           <li style="white-space: nowrap;">
33
           <li style="white-space: nowrap;">
34
             <span>下单时间:</span>
34
             <span>下单时间:</span>
35
             <el-date-picker
35
             <el-date-picker
36
-              v-model="postData.startDate"
36
+              v-model="postData.begindate"
37
               type="date"
37
               type="date"
38
               placeholder="选择起始日期">
38
               placeholder="选择起始日期">
39
             </el-date-picker>
39
             </el-date-picker>
40
             <span>至</span>
40
             <span>至</span>
41
             <el-date-picker
41
             <el-date-picker
42
-              v-model="postData.endDate"
42
+              v-model="postData.enddate"
43
               type="date"
43
               type="date"
44
               placeholder="选择截止日期">
44
               placeholder="选择截止日期">
45
             </el-date-picker>
45
             </el-date-picker>
59
     </div>
59
     </div>
60
     <div class="system-table-box">
60
     <div class="system-table-box">
61
       <el-table
61
       <el-table
62
-        :data="currentList"
62
+        :data="courseOrderList"
63
         stripe
63
         stripe
64
         style="width: 100%">
64
         style="width: 100%">
65
         <el-table-column
65
         <el-table-column
66
-          prop="OrderNo"
66
+          prop="OrdersNo"
67
           label="订单编号">
67
           label="订单编号">
68
         </el-table-column>
68
         </el-table-column>
69
         <el-table-column
69
         <el-table-column
70
-          prop="Name"
70
+          prop="CourseName"
71
           label="课程名称">
71
           label="课程名称">
72
         </el-table-column>
72
         </el-table-column>
73
         <el-table-column
73
         <el-table-column
75
           label="所属案场">
75
           label="所属案场">
76
         </el-table-column>
76
         </el-table-column>
77
         <el-table-column
77
         <el-table-column
78
-          prop="Type"
78
+          prop="LocationName"
79
           label="课程类别">
79
           label="课程类别">
80
         </el-table-column>
80
         </el-table-column>
81
         <el-table-column
81
         <el-table-column
82
-          prop="Date"
83
-          label="课程时间">
82
+          prop="BeginDate"
83
+          label="课程时间"
84
+          width="140px">
85
+          <template slot-scope="scope">
86
+            {{toolClass.dateFormat(scope.row.BeginDate)}}<br>
87
+            -<br>
88
+            {{toolClass.dateFormat(scope.row.EndDate)}}
89
+          </template>
84
         </el-table-column>
90
         </el-table-column>
85
         <el-table-column
91
         <el-table-column
86
-          prop="UserName"
92
+          prop="CustomerName"
87
           label="用户姓名">
93
           label="用户姓名">
88
         </el-table-column>
94
         </el-table-column>
89
         <el-table-column
95
         <el-table-column
90
-          prop="NickName"
96
+          prop="Name"
91
           label="微信昵称">
97
           label="微信昵称">
92
         </el-table-column>
98
         </el-table-column>
93
         <el-table-column
99
         <el-table-column
95
           label="手机号">
101
           label="手机号">
96
         </el-table-column>
102
         </el-table-column>
97
         <el-table-column
103
         <el-table-column
98
-          prop="CreatDate"
99
-          label="下单时间">
104
+          prop="CreateDate"
105
+          label="下单时间"
106
+          width="140px">
107
+          <template slot-scope="scope">
108
+            {{toolClass.dateFormat(scope.row.CreateDate)}}
109
+          </template>
100
         </el-table-column>
110
         </el-table-column>
101
       </el-table>
111
       </el-table>
102
     </div>
112
     </div>
111
 </template>
121
 </template>
112
 
122
 
113
 <script>
123
 <script>
114
-import { mapState } from 'vuex'
124
+import { mapState, createNamespacedHelpers } from 'vuex'
115
 import tableSearch from '@/components/tableSearch/index'
125
 import tableSearch from '@/components/tableSearch/index'
126
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
127
+const { mapState: mapCmsState, mapActions: mapCmsActions } = createNamespacedHelpers('cms')
116
 
128
 
117
 export default {
129
 export default {
118
   name: '',
130
   name: '',
121
       total: 0,
133
       total: 0,
122
       postData: { // 表格搜索条件
134
       postData: { // 表格搜索条件
123
         caseid: '', // 案场id
135
         caseid: '', // 案场id
124
-        type: '', // 获取方式
125
-        startDate: '', // 起始日期
126
-        endDate: '', // 截止日期
136
+        typeid: '', // 获取方式
137
+        begindate: '', // 起始日期
138
+        enddate: '', // 截止日期
127
         name: '', // 卡券名称
139
         name: '', // 卡券名称
128
         page: 1, // 当前页码
140
         page: 1, // 当前页码
129
         pagesize: 10, // 请求数据量
141
         pagesize: 10, // 请求数据量
138
       cases: x => x.app.cases.list,
150
       cases: x => x.app.cases.list,
139
       defaultCaseId: x => x.app.cases.default
151
       defaultCaseId: x => x.app.cases.default
140
     }),
152
     }),
153
+    ...mapStaState({
154
+      courseOrderList: x => x.courseOrder.list || [],
155
+    }),
156
+    ...mapCmsState({
157
+      courseTypeList: x => x.location || [],
158
+    }),
141
     CaseId: {
159
     CaseId: {
142
       get () {
160
       get () {
143
         return this.postData.caseid || this.defaultCaseId
161
         return this.postData.caseid || this.defaultCaseId
152
   },
170
   },
153
   mounted () {
171
   mounted () {
154
     this.$nextTick(function () {
172
     this.$nextTick(function () {
173
+      this.updateLocationInfo().then((res) => {
174
+        // console.log(JSON.stringify(res))
175
+      })
176
+      this.getList()
155
     })
177
     })
156
   },
178
   },
157
   methods: {
179
   methods: {
180
+    ...mapCmsActions([
181
+      'updateLocationInfo',
182
+    ]),
183
+    ...mapStaActions([
184
+      'getCourseOrderList',
185
+    ]),
158
     search () { // 搜索
186
     search () { // 搜索
159
-      // 1
187
+      this.page = 1
188
+      this.getList()
160
     },
189
     },
161
     handleCurrentChange (val) { // 跳转到分页
190
     handleCurrentChange (val) { // 跳转到分页
162
-      // this.getList()
191
+      this.page = val
192
+      this.getList()
193
+    },
194
+    getList () {
195
+      this.getCourseOrderList(this.postData).then((res) => {
196
+        // console.log(JSON.stringify(res))
197
+        this.postData.page = res.page
198
+        this.total = res.total
199
+      })
163
     },
200
     },
164
   }
201
   }
165
 }
202
 }

+ 52
- 18
src/pages/system/dataStatistics/courseStatisticsList/index.vue 查看文件

5
         <div class="flex-item flex-h"></div>
5
         <div class="flex-item flex-h"></div>
6
         <ul>
6
         <ul>
7
           <li>
7
           <li>
8
-            <el-select v-model="CaseId" placeholder="请选择案场">
8
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
9
               <el-option
9
               <el-option
10
                 v-for="item in cases"
10
                 v-for="item in cases"
11
                 :key="item.CaseId"
11
                 :key="item.CaseId"
15
             </el-select>
15
             </el-select>
16
           </li>
16
           </li>
17
           <li>
17
           <li>
18
-            <el-select v-model="postData.type" placeholder="请选择课程类别">
18
+            <el-select v-model="postData.typeid" placeholder="请选择课程类别">
19
               <el-option
19
               <el-option
20
-                v-for="item in typeList"
21
-                :key="item.CaseId"
22
-                :label="item.CaseName"
23
-                :value="item.CaseId">
20
+                v-for="item in courseTypeList"
21
+                :key="item.LocationId"
22
+                :label="item.LocationName"
23
+                :value="item.LocationId">
24
               </el-option>
24
               </el-option>
25
             </el-select>
25
             </el-select>
26
           </li>
26
           </li>
43
     </div>
43
     </div>
44
     <div class="system-table-box">
44
     <div class="system-table-box">
45
       <el-table
45
       <el-table
46
-        :data="currentList"
46
+        :data="courseList"
47
         stripe
47
         stripe
48
         style="width: 100%">
48
         style="width: 100%">
49
         <el-table-column
49
         <el-table-column
51
           label="所属案场">
51
           label="所属案场">
52
         </el-table-column>
52
         </el-table-column>
53
         <el-table-column
53
         <el-table-column
54
-          prop="Name"
54
+          prop="CourseName"
55
           label="课程名称">
55
           label="课程名称">
56
         </el-table-column>
56
         </el-table-column>
57
         <el-table-column
57
         <el-table-column
58
-          prop="Type"
58
+          prop="LocationName"
59
           label="课程类别">
59
           label="课程类别">
60
         </el-table-column>
60
         </el-table-column>
61
         <el-table-column
61
         <el-table-column
62
-          prop="Date"
63
-          label="课程时间">
62
+          prop="BeginDate"
63
+          label="课程时间"
64
+          width="140px">
65
+          <template slot-scope="scope">
66
+            {{toolClass.dateFormat(scope.row.BeginDate)}}<br>
67
+            -<br>
68
+            {{toolClass.dateFormat(scope.row.EndDate)}}
69
+          </template>
64
         </el-table-column>
70
         </el-table-column>
65
         <el-table-column
71
         <el-table-column
66
           prop="Price"
72
           prop="Price"
67
           label="课程价格">
73
           label="课程价格">
68
         </el-table-column>
74
         </el-table-column>
69
         <el-table-column
75
         <el-table-column
70
-          prop="ApplyNum"
76
+          prop="Total"
71
           label="报名人数">
77
           label="报名人数">
72
         </el-table-column>
78
         </el-table-column>
73
         <el-table-column
79
         <el-table-column
74
-          prop="CheckedNum"
80
+          prop="JoinTotal"
75
           label="核销人数">
81
           label="核销人数">
76
         </el-table-column>
82
         </el-table-column>
77
         <el-table-column
83
         <el-table-column
78
-          prop="totalPrice"
84
+          prop="JoinTotal"
79
           label="总费用">
85
           label="总费用">
86
+          <template slot-scope="scope">
87
+            {{(scope.row.JoinTotal - 0) * (scope.row.Price - 0)}}
88
+          </template>
80
         </el-table-column>
89
         </el-table-column>
81
       </el-table>
90
       </el-table>
82
     </div>
91
     </div>
91
 </template>
100
 </template>
92
 
101
 
93
 <script>
102
 <script>
94
-import { mapState } from 'vuex'
103
+import { mapState, createNamespacedHelpers } from 'vuex'
95
 import tableSearch from '@/components/tableSearch/index'
104
 import tableSearch from '@/components/tableSearch/index'
105
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
106
+const { mapState: mapCmsState, mapActions: mapCmsActions } = createNamespacedHelpers('cms')
96
 
107
 
97
 export default {
108
 export default {
98
   name: '',
109
   name: '',
101
       total: 0,
112
       total: 0,
102
       postData: { // 表格搜索条件
113
       postData: { // 表格搜索条件
103
         caseid: '', // 案场id
114
         caseid: '', // 案场id
104
-        type: '', // 卡券类型
115
+        typeid: '', // 卡券类型
105
         name: '', // 卡券名称
116
         name: '', // 卡券名称
106
         page: 1, // 当前页码
117
         page: 1, // 当前页码
107
         pagesize: 10, // 请求数据量
118
         pagesize: 10, // 请求数据量
115
       cases: x => x.app.cases.list,
126
       cases: x => x.app.cases.list,
116
       defaultCaseId: x => x.app.cases.default
127
       defaultCaseId: x => x.app.cases.default
117
     }),
128
     }),
129
+    ...mapStaState({
130
+      courseList: x => x.course.list || [],
131
+    }),
132
+    ...mapCmsState({
133
+      courseTypeList: x => x.location || [],
134
+    }),
118
     CaseId: {
135
     CaseId: {
119
       get () {
136
       get () {
120
         return this.postData.caseid || this.defaultCaseId
137
         return this.postData.caseid || this.defaultCaseId
129
   },
146
   },
130
   mounted () {
147
   mounted () {
131
     this.$nextTick(function () {
148
     this.$nextTick(function () {
149
+      this.updateLocationInfo()
150
+      this.getList()
132
     })
151
     })
133
   },
152
   },
134
   methods: {
153
   methods: {
154
+    ...mapCmsActions([
155
+      'updateLocationInfo',
156
+    ]),
157
+    ...mapStaActions([
158
+      'getCourseList',
159
+    ]),
135
     search () { // 搜索
160
     search () { // 搜索
136
-      // 1
161
+      this.page = 1
162
+      this.getList()
137
     },
163
     },
138
     handleCurrentChange (val) { // 跳转到分页
164
     handleCurrentChange (val) { // 跳转到分页
139
-      // this.getList()
165
+      this.page = val
166
+      this.getList()
167
+    },
168
+    getList () {
169
+      this.getCourseList(this.postData).then((res) => {
170
+        console.log(JSON.stringify(res))
171
+        this.postData.page = res.page
172
+        this.total = res.total
173
+      })
140
     },
174
     },
141
   }
175
   }
142
 }
176
 }

+ 83
- 114
src/pages/system/dataStatistics/goodsOrderList/index.vue 查看文件

4
       <div class="flex-h">
4
       <div class="flex-h">
5
         <ul class="searchFilterLine" style="white-space: normal;">
5
         <ul class="searchFilterLine" style="white-space: normal;">
6
           <li>
6
           <li>
7
-            <el-select v-model="CaseId" placeholder="请选择案场">
7
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
8
               <el-option
8
               <el-option
9
                 v-for="item in cases"
9
                 v-for="item in cases"
10
                 :key="item.CaseId"
10
                 :key="item.CaseId"
14
             </el-select>
14
             </el-select>
15
           </li>
15
           </li>
16
           <li>
16
           <li>
17
-            <el-select v-model="postData.type" placeholder="请选择下单用户类型">
17
+            <el-select v-model="postData.usertype" placeholder="请选择下单用户类型">
18
               <el-option
18
               <el-option
19
                 v-for="item in typeList"
19
                 v-for="item in typeList"
20
-                :key="item.CaseId"
21
-                :label="item.CaseName"
22
-                :value="item.CaseId">
20
+                :key="item.id"
21
+                :label="item.value"
22
+                :value="item.id">
23
               </el-option>
23
               </el-option>
24
             </el-select>
24
             </el-select>
25
           </li>
25
           </li>
27
             <el-select v-model="postData.status" placeholder="请选择订单状态">
27
             <el-select v-model="postData.status" placeholder="请选择订单状态">
28
               <el-option
28
               <el-option
29
                 v-for="item in statusList"
29
                 v-for="item in statusList"
30
-                :key="item.CaseId"
31
-                :label="item.CaseName"
32
-                :value="item.CaseId">
30
+                :key="item.id"
31
+                :label="item.value"
32
+                :value="item.id">
33
               </el-option>
33
               </el-option>
34
             </el-select>
34
             </el-select>
35
           </li>
35
           </li>
36
           <li style="white-space: nowrap;">
36
           <li style="white-space: nowrap;">
37
-            <span>下单时间:</span>
37
+            <span>下单时间:</span>
38
             <el-date-picker
38
             <el-date-picker
39
-              v-model="postData.startDate"
39
+              v-model="postData.begindate"
40
               type="date"
40
               type="date"
41
               placeholder="选择起始日期">
41
               placeholder="选择起始日期">
42
             </el-date-picker>
42
             </el-date-picker>
43
             <span>至</span>
43
             <span>至</span>
44
             <el-date-picker
44
             <el-date-picker
45
-              v-model="postData.endDate"
45
+              v-model="postData.enddate"
46
               type="date"
46
               type="date"
47
               placeholder="选择截止日期">
47
               placeholder="选择截止日期">
48
             </el-date-picker>
48
             </el-date-picker>
61
       <div class="moreFilter"></div>
61
       <div class="moreFilter"></div>
62
     </div>
62
     </div>
63
     <table>
63
     <table>
64
-      <tr v-for="(item,index) in currentList.length*2" :key="index">
64
+      <tr v-for="(item,index) in goodsOrderList.length*2" :key="index">
65
         <td v-if="index%2 === 0" colspan="16" class="title">
65
         <td v-if="index%2 === 0" colspan="16" class="title">
66
           <div class="flex-h">
66
           <div class="flex-h">
67
             <div class="flex-item" style="text-align:left;">
67
             <div class="flex-item" style="text-align:left;">
68
-              <span>订单编号:{{returnListItem(currentList, index).OrderNo}}</span>
69
-              <span>案场:{{returnListItem(currentList, index).CaseName}}</span>
70
-              <span>用户类型:{{returnListItem(currentList, index).UserType}}</span>
71
-              <span>下单时间:{{returnListItem(currentList, index).CreatDate}}</span>
68
+              <span>订单编号:{{returnListItem(goodsOrderList, index).OrdersNo}}</span>
69
+              <span>案场:{{returnListItem(goodsOrderList, index).CaseName}}</span>
70
+              <span>用户类型:{{returnListItem(goodsOrderList, index).UserType === 'sales' ? '销售' : returnListItem(goodsOrderList, index).UserType === 'manager' ? '主管' : '用户'}}</span>
71
+              <span>下单时间:{{toolClass.dateFormat(returnListItem(goodsOrderList, index).CreateDate)}}</span>
72
             </div>
72
             </div>
73
-            <span>{{returnListItem(currentList, index).Status}}</span>
73
+            <span>{{returnStatus(returnListItem(goodsOrderList, index).MakeStatus)}}</span>
74
           </div>
74
           </div>
75
         </td>
75
         </td>
76
         <td v-if="index%2 !== 0" colspan="4" class="noborder">
76
         <td v-if="index%2 !== 0" colspan="4" class="noborder">
77
-          <span v-for="(subItem,subIndex) in returnListItem(currentList, index).OrderDetail" :key="subIndex">{{subItem.GoodsName}}({{subItem.SpecName}})</span>
77
+          <span v-for="(subItem,subIndex) in returnListItem(goodsOrderList, index).Details" :key="subIndex">{{subItem.GoodsName}}({{subItem.SpecName}})</span>
78
         </td>
78
         </td>
79
         <td v-if="index%2 !== 0" colspan="1" class="noborder">
79
         <td v-if="index%2 !== 0" colspan="1" class="noborder">
80
-          <span v-for="(subItem,subIndex) in returnListItem(currentList, index).OrderDetail" :key="subIndex">x{{subItem.Num}}</span>
80
+          <span v-for="(subItem,subIndex) in returnListItem(goodsOrderList, index).Details" :key="subIndex">x{{subItem.Number}}</span>
81
         </td>
81
         </td>
82
         <td v-if="index%2 !== 0" colspan="1" class="noborder">
82
         <td v-if="index%2 !== 0" colspan="1" class="noborder">
83
-          <span v-for="(subItem,subIndex) in returnListItem(currentList, index).OrderDetail" :key="subIndex">¥{{subItem.Price}}</span>
83
+          <span v-for="(subItem,subIndex) in returnListItem(goodsOrderList, index).Details" :key="subIndex">¥{{subItem.Price}}</span>
84
         </td>
84
         </td>
85
         <td v-if="index%2 !== 0" colspan="4">
85
         <td v-if="index%2 !== 0" colspan="4">
86
-          <span>{{returnListItem(currentList, index).AreaName}}{{returnListItem(currentList, index).TableNo}}</span>
86
+          <span>{{returnListItem(goodsOrderList, index).AreaName}}{{returnListItem(goodsOrderList, index).TableNo}}</span>
87
         </td>
87
         </td>
88
         <td v-if="index%2 !== 0" colspan="4">
88
         <td v-if="index%2 !== 0" colspan="4">
89
-          <span>{{returnListItem(currentList, index).OrderPlacer}}/{{returnListItem(currentList, index).OrderPlacerPhone}}</span>
89
+          <span>{{returnListItem(goodsOrderList, index).Name}}/{{returnListItem(goodsOrderList, index).Phone}}</span>
90
         </td>
90
         </td>
91
         <td v-if="index%2 !== 0" colspan="2">
91
         <td v-if="index%2 !== 0" colspan="2">
92
           <el-button
92
           <el-button
106
 </template>
106
 </template>
107
 
107
 
108
 <script>
108
 <script>
109
-import { mapState } from 'vuex'
109
+import { mapState, createNamespacedHelpers } from 'vuex'
110
 import tableSearch from '@/components/tableSearch/index'
110
 import tableSearch from '@/components/tableSearch/index'
111
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
111
 
112
 
112
 export default {
113
 export default {
113
   name: '',
114
   name: '',
115
     return {
116
     return {
116
       total: 0,
117
       total: 0,
117
       postData: { // 表格搜索条件
118
       postData: { // 表格搜索条件
118
-        phone: '', // 手机号
119
         status: '', // 状态
119
         status: '', // 状态
120
         caseid: '', // 案场id
120
         caseid: '', // 案场id
121
-        type: '', // 获取方式
122
-        startDate: '', // 起始日期
123
-        endDate: '', // 截止日期
124
-        name: '', // 卡券名称
121
+        usertype: '', // 用户类型
122
+        begindate: '', // 起始日期
123
+        enddate: '', // 截止日期
125
         page: 1, // 当前页码
124
         page: 1, // 当前页码
126
         pagesize: 10, // 请求数据量
125
         pagesize: 10, // 请求数据量
127
       },
126
       },
128
-      currentList: [{
129
-        OrderNo: '1234567890000',
130
-        OrderId: '123456',
131
-        CaseName: '案场名称',
132
-        CaseId: '123456',
133
-        UserType: 'manager',
134
-        CreatDate: '12345678900000',
135
-        Status: '已完成',
136
-        AreaName: '区域名称',
137
-        TableNo: '桌号',
138
-        OrderPlacer: '下单人',
139
-        OrderPlacerPhone: '18266666666',
140
-        OrderDetail: [{
141
-          GoodsName: '商品名称',
142
-          SpecName: '商品规格',
143
-          Num: '1',
144
-          Price: '30',
145
-        }, {
146
-          GoodsName: '商品名称',
147
-          SpecName: '商品规格',
148
-          Num: '1',
149
-          Price: '30',
150
-        }, {
151
-          GoodsName: '商品名称',
152
-          SpecName: '商品规格',
153
-          Num: '1',
154
-          Price: '30',
155
-        }]
127
+      typeList: [{
128
+        value: '不限',
129
+        id: ''
130
+      }, {
131
+        value: '销售',
132
+        id: 'sales'
133
+      }, {
134
+        value: '主管',
135
+        id: 'manager'
156
       }, {
136
       }, {
157
-        OrderNo: '1234567890000',
158
-        OrderId: '123456',
159
-        CaseName: '案场名称',
160
-        CaseId: '123456',
161
-        UserType: 'manager',
162
-        CreatDate: '12345678900000',
163
-        Status: '已完成',
164
-        AreaName: '区域名称',
165
-        TableNo: '桌号',
166
-        OrderPlacer: '下单人',
167
-        OrderPlacerPhone: '18266666666',
168
-        OrderDetail: [{
169
-          GoodsName: '商品名称',
170
-          SpecName: '商品规格',
171
-          Num: '1',
172
-          Price: '30',
173
-        }, {
174
-          GoodsName: '商品名称',
175
-          SpecName: '商品规格',
176
-          Num: '1',
177
-          Price: '30',
178
-        }, {
179
-          GoodsName: '商品名称',
180
-          SpecName: '商品规格',
181
-          Num: '1',
182
-          Price: '30',
183
-        }]
137
+        value: '用户',
138
+        id: 'customer'
139
+      }],
140
+      statusList: [{
141
+        value: '不限',
142
+        id: ''
143
+      }, {
144
+        value: '已下单',
145
+        id: 'not started'
146
+      }, {
147
+        value: '制作中',
148
+        id: 'doing'
149
+      }, {
150
+        value: '已完成',
151
+        id: 'finished'
184
       }, {
152
       }, {
185
-        OrderNo: '1234567890000',
186
-        OrderId: '123456',
187
-        CaseName: '案场名称',
188
-        CaseId: '123456',
189
-        UserType: 'manager',
190
-        CreatDate: '12345678900000',
191
-        Status: '已完成',
192
-        AreaName: '区域名称',
193
-        TableNo: '桌号',
194
-        OrderPlacer: '下单人',
195
-        OrderPlacerPhone: '18266666666',
196
-        OrderDetail: [{
197
-          GoodsName: '商品名称',
198
-          SpecName: '商品规格',
199
-          Num: '1',
200
-          Price: '30',
201
-        }, {
202
-          GoodsName: '商品名称',
203
-          SpecName: '商品规格',
204
-          Num: '1',
205
-          Price: '30',
206
-        }, {
207
-          GoodsName: '商品名称',
208
-          SpecName: '商品规格',
209
-          Num: '1',
210
-          Price: '30',
211
-        }]
153
+        value: '已取消',
154
+        id: 'cancel'
212
       }],
155
       }],
213
-      typeList: [],
214
-      statusList: [],
215
     }
156
     }
216
   },
157
   },
217
   computed: {
158
   computed: {
219
       cases: x => x.app.cases.list,
160
       cases: x => x.app.cases.list,
220
       defaultCaseId: x => x.app.cases.default
161
       defaultCaseId: x => x.app.cases.default
221
     }),
162
     }),
163
+    ...mapStaState({
164
+      goodsOrderList: x => x.goodsOrder.list || [],
165
+    }),
222
     CaseId: {
166
     CaseId: {
223
       get () {
167
       get () {
224
         return this.postData.caseid || this.defaultCaseId
168
         return this.postData.caseid || this.defaultCaseId
233
   },
177
   },
234
   mounted () {
178
   mounted () {
235
     this.$nextTick(function () {
179
     this.$nextTick(function () {
180
+      this.getList()
236
     })
181
     })
237
   },
182
   },
238
   methods: {
183
   methods: {
184
+    ...mapStaActions([
185
+      'getGoodsOrderList',
186
+    ]),
187
+    returnStatus (val) {
188
+      switch (val) {
189
+        case 'not started':
190
+          return '已下单'
191
+        case 'doing':
192
+          return '制作中'
193
+        case 'finished':
194
+          return '已完成'
195
+        case 'cancel':
196
+          return '已取消'
197
+      }
198
+    },
239
     returnListItem (target, index) {
199
     returnListItem (target, index) {
240
       return target[Math.ceil((index + 1) / 2) - 1]
200
       return target[Math.ceil((index + 1) / 2) - 1]
241
     },
201
     },
242
     search () { // 搜索
202
     search () { // 搜索
243
-      // 1
203
+      this.page = 1
204
+      this.getList()
244
     },
205
     },
245
     handleCurrentChange (val) { // 跳转到分页
206
     handleCurrentChange (val) { // 跳转到分页
246
-      // this.getList()
207
+      this.page = val
208
+      this.getList()
209
+    },
210
+    getList () {
211
+      this.getGoodsOrderList(this.postData).then((res) => {
212
+        // console.log(JSON.stringify(res))
213
+        this.postData.page = res.page
214
+        this.total = res.total
215
+      })
247
     },
216
     },
248
   }
217
   }
249
 }
218
 }

+ 2
- 2
src/pages/system/dataStatistics/goodsOrderList/page.scss 查看文件

11
       border: none;
11
       border: none;
12
     }
12
     }
13
     &.title{
13
     &.title{
14
-      background: #409EFF;
14
+      background: #ccc;
15
       div{
15
       div{
16
         font-size: 0;
16
         font-size: 0;
17
         white-space: nowrap;
17
         white-space: nowrap;
18
         span{
18
         span{
19
-          color: #fff;
19
+          color: #333;
20
           line-height: 40px;
20
           line-height: 40px;
21
           margin-left: 20px;
21
           margin-left: 20px;
22
         }
22
         }

+ 35
- 17
src/pages/system/dataStatistics/goodsStatisticsList/index.vue 查看文件

5
         <div class="flex-item flex-h"></div>
5
         <div class="flex-item flex-h"></div>
6
         <ul>
6
         <ul>
7
           <li>
7
           <li>
8
-            <el-select v-model="CaseId" placeholder="请选择案场">
8
+            <el-select v-model="postData.caseid" placeholder="请选择案场">
9
               <el-option
9
               <el-option
10
                 v-for="item in cases"
10
                 v-for="item in cases"
11
                 :key="item.CaseId"
11
                 :key="item.CaseId"
15
             </el-select>
15
             </el-select>
16
           </li>
16
           </li>
17
           <li>
17
           <li>
18
-            <el-select v-model="postData.type" placeholder="请选择商品分类">
18
+            <el-select v-model="postData.typeid" placeholder="请选择商品分类">
19
               <el-option
19
               <el-option
20
-                v-for="item in typeList"
21
-                :key="item.CaseId"
22
-                :label="item.CaseName"
23
-                :value="item.CaseId">
20
+                v-for="item in goodsTypeList"
21
+                :key="item.TypeId"
22
+                :label="item.TypeName"
23
+                :value="item.TypeId">
24
               </el-option>
24
               </el-option>
25
             </el-select>
25
             </el-select>
26
           </li>
26
           </li>
43
     </div>
43
     </div>
44
     <div class="system-table-box">
44
     <div class="system-table-box">
45
       <el-table
45
       <el-table
46
-        :data="currentList"
46
+        :data="goodsList"
47
         stripe
47
         stripe
48
         style="width: 100%">
48
         style="width: 100%">
49
         <el-table-column
49
         <el-table-column
51
           label="所属案场">
51
           label="所属案场">
52
         </el-table-column>
52
         </el-table-column>
53
         <el-table-column
53
         <el-table-column
54
-          prop="Name"
54
+          prop="GoodsName"
55
           label="商品名称">
55
           label="商品名称">
56
         </el-table-column>
56
         </el-table-column>
57
         <el-table-column
57
         <el-table-column
58
-          prop="Type"
58
+          prop="TypeName"
59
           label="商品分类">
59
           label="商品分类">
60
         </el-table-column>
60
         </el-table-column>
61
         <el-table-column
61
         <el-table-column
63
           label="价格">
63
           label="价格">
64
         </el-table-column>
64
         </el-table-column>
65
         <el-table-column
65
         <el-table-column
66
-          prop="OrderNum"
66
+          prop="Total"
67
           label="下单数">
67
           label="下单数">
68
         </el-table-column>
68
         </el-table-column>
69
         <el-table-column
69
         <el-table-column
70
-          prop="OverNum"
70
+          prop="FinishTotal"
71
           label="完成数">
71
           label="完成数">
72
         </el-table-column>
72
         </el-table-column>
73
         <el-table-column
73
         <el-table-column
74
-          prop="totalPrice"
74
+          prop="Amount"
75
           label="总费用">
75
           label="总费用">
76
         </el-table-column>
76
         </el-table-column>
77
       </el-table>
77
       </el-table>
90
 import { mapState, createNamespacedHelpers } from 'vuex'
90
 import { mapState, createNamespacedHelpers } from 'vuex'
91
 import tableSearch from '@/components/tableSearch/index'
91
 import tableSearch from '@/components/tableSearch/index'
92
 
92
 
93
-const {mapState: mapStaState, mapActions: mapStaActions} = createNamespacedHelpers('sta')
93
+const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
94
 
94
 
95
 export default {
95
 export default {
96
   name: '',
96
   name: '',
99
       total: 0,
99
       total: 0,
100
       postData: { // 表格搜索条件
100
       postData: { // 表格搜索条件
101
         caseid: '', // 案场id
101
         caseid: '', // 案场id
102
-        type: '', // 卡券类型
102
+        typeid: '', // 卡券类型
103
         name: '', // 卡券名称
103
         name: '', // 卡券名称
104
         page: 1, // 当前页码
104
         page: 1, // 当前页码
105
         pagesize: 10, // 请求数据量
105
         pagesize: 10, // 请求数据量
114
       defaultCaseId: x => x.app.cases.default
114
       defaultCaseId: x => x.app.cases.default
115
     }),
115
     }),
116
     ...mapStaState({
116
     ...mapStaState({
117
-      goods: x => x.goods,
117
+      goodsList: x => x.goods.list,
118
+      goodsTypeList: x => x.goodsType.list,
118
     }),
119
     }),
119
     CaseId: {
120
     CaseId: {
120
       get () {
121
       get () {
130
   },
131
   },
131
   mounted () {
132
   mounted () {
132
     this.$nextTick(function () {
133
     this.$nextTick(function () {
134
+      this.getGoodsTypeList({
135
+        page: 1,
136
+        pagesize: 10000,
137
+        caseid: ''
138
+      }).then((res) => {
139
+        // console.log(JSON.stringify(res))
140
+        this.getList()
141
+      })
133
     })
142
     })
134
   },
143
   },
135
   methods: {
144
   methods: {
136
     ...mapStaActions([
145
     ...mapStaActions([
137
       'GetGoods',
146
       'GetGoods',
147
+      'getGoodsTypeList',
138
     ]),
148
     ]),
139
     search () { // 搜索
149
     search () { // 搜索
140
-      // 1
150
+      this.postData.page = 1
151
+      this.getList()
141
     },
152
     },
142
     handleCurrentChange (val) { // 跳转到分页
153
     handleCurrentChange (val) { // 跳转到分页
143
-      // this.getList()
154
+      this.postData.page = val
155
+      this.getList()
156
+    },
157
+    getList () { // 获取列表
158
+      this.GetGoods(this.postData).then((res) => {
159
+        this.postData.page = res.page
160
+        this.total = res.total
161
+      })
144
     },
162
     },
145
   }
163
   }
146
 }
164
 }

+ 1
- 1
src/store/cms/index.js 查看文件

19
           }
19
           }
20
         }).then(res => {
20
         }).then(res => {
21
           context.commit('init', res)
21
           context.commit('init', res)
22
-          resolve()
22
+          resolve(res)
23
         })
23
         })
24
       })
24
       })
25
     }
25
     }

+ 104
- 2
src/store/sta/sta.js 查看文件

4
 export default {
4
 export default {
5
   namespaced: true,
5
   namespaced: true,
6
   state: {
6
   state: {
7
-    goods: [],
7
+    goods: {},
8
+    goodsType: {},
9
+    goodsOrder: {},
10
+    courseOrder: {},
11
+    course: {},
12
+    cardCoupon: {},
13
+    cardCouponUsedList: {},
8
   },
14
   },
9
   mutations: {
15
   mutations: {
10
     updateGoods (state, payload) {
16
     updateGoods (state, payload) {
11
-      state.goods = payload || []
17
+      state.goods = payload || {}
18
+    },
19
+    updateGoodsType (state, payload) {
20
+      state.goodsType = payload || {}
21
+    },
22
+    updateGoodsOrder (state, payload) {
23
+      state.goodsOrder = payload || {}
24
+    },
25
+    updateCourseOrder (state, payload) {
26
+      state.courseOrder = payload || {}
27
+    },
28
+    updateCourseList (state, payload) {
29
+      state.course = payload || {}
30
+    },
31
+    updateCardCouponList (state, payload) {
32
+      state.cardCoupon = payload || {}
33
+    },
34
+    updateCardCouponUsedList (state, payload) {
35
+      state.cardCouponUsedList = payload || {}
12
     },
36
     },
13
   },
37
   },
14
   actions: {
38
   actions: {
25
         }).catch(reject)
49
         }).catch(reject)
26
       })
50
       })
27
     },
51
     },
52
+    getGoodsTypeList ({ commit }, payload) {
53
+      return new Promise((resolve, reject) => {
54
+        ajax(api.goodsManager.getGoodsTypeList.url, {
55
+          method: api.goodsManager.getGoodsTypeList.method,
56
+          queryData: {
57
+            ...payload,
58
+          }
59
+        }).then(res => {
60
+          commit('updateGoodsType', res)
61
+          resolve(res)
62
+        }).catch(reject)
63
+      })
64
+    },
65
+    getGoodsOrderList ({ commit }, payload) {
66
+      return new Promise((resolve, reject) => {
67
+        ajax(api.statistics.goodsOrder.url, {
68
+          method: api.statistics.goodsOrder.method,
69
+          queryData: {
70
+            ...payload,
71
+          }
72
+        }).then(res => {
73
+          commit('updateGoodsOrder', res)
74
+          resolve(res)
75
+        }).catch(reject)
76
+      })
77
+    },
78
+    getCourseOrderList ({ commit }, payload) {
79
+      return new Promise((resolve, reject) => {
80
+        ajax(api.statistics.courseOrder.url, {
81
+          method: api.statistics.courseOrder.method,
82
+          queryData: {
83
+            ...payload,
84
+          }
85
+        }).then(res => {
86
+          commit('updateCourseOrder', res)
87
+          resolve(res)
88
+        }).catch(reject)
89
+      })
90
+    },
91
+    getCourseList ({ commit }, payload) {
92
+      return new Promise((resolve, reject) => {
93
+        ajax(api.statistics.courseList.url, {
94
+          method: api.statistics.courseList.method,
95
+          queryData: {
96
+            ...payload,
97
+          }
98
+        }).then(res => {
99
+          commit('updateCourseList', res)
100
+          resolve(res)
101
+        }).catch(reject)
102
+      })
103
+    },
104
+    getCardCouponList ({ commit }, payload) {
105
+      return new Promise((resolve, reject) => {
106
+        ajax(api.statistics.cardCouponList.url, {
107
+          method: api.statistics.cardCouponList.method,
108
+          queryData: {
109
+            ...payload,
110
+          }
111
+        }).then(res => {
112
+          commit('updateCardCouponList', res)
113
+          resolve(res)
114
+        }).catch(reject)
115
+      })
116
+    },
117
+    getCardCouponUsedList ({ commit }, payload) {
118
+      return new Promise((resolve, reject) => {
119
+        ajax(api.statistics.cardCouponUsedList.url, {
120
+          method: api.statistics.cardCouponUsedList.method,
121
+          queryData: {
122
+            ...payload,
123
+          }
124
+        }).then(res => {
125
+          commit('updateCardCouponUsedList', res)
126
+          resolve(res)
127
+        }).catch(reject)
128
+      })
129
+    },
28
   }
130
   }
29
 }
131
 }

+ 20
- 0
src/util/api.js 查看文件

695
       method: 'get',
695
       method: 'get',
696
       url: `${baseUrl}${common}/statistics/goods`
696
       url: `${baseUrl}${common}/statistics/goods`
697
     },
697
     },
698
+    goodsOrder: {
699
+      method: 'get',
700
+      url: `${baseUrl}${common}/statistics/goodsorders`
701
+    },
702
+    courseOrder: {
703
+      method: 'get',
704
+      url: `${baseUrl}${common}/statistics/courseorders`
705
+    },
706
+    courseList: {
707
+      method: 'get',
708
+      url: `${baseUrl}${common}/statistics/courses`
709
+    },
710
+    cardCouponList: {
711
+      method: 'get',
712
+      url: `${baseUrl}${common}/statistics/cardcoupon`
713
+    },
714
+    cardCouponUsedList: {
715
+      method: 'get',
716
+      url: `${baseUrl}${common}/statistics/cardcouponused`
717
+    },
698
   }
718
   }
699
 }
719
 }
700
 export default $api
720
 export default $api