wangfei před 6 roky
rodič
revize
39e74bdea8

+ 2
- 2
config/index.js Zobrazit soubor

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
15
         // target: 'http://192.168.0.62:8080', //wf
16
-        // target: 'http://localhost:8080', 
17
-        target: 'http://192.168.0.11', //ys
16
+        target: 'http://localhost:8080', 
17
+        // target: 'http://192.168.0.11', //ys
18
         // target: 'http://192.168.0.11', //ys
18
         // target: 'http://192.168.0.11', //ys
19
         // target: 'http://dev.ycjcjy.com/', //frp
19
         // target: 'http://dev.ycjcjy.com/', //frp
20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置

+ 3
- 1
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue Zobrazit soubor

271
   methods: {
271
   methods: {
272
     ...mapGymCardActions([
272
     ...mapGymCardActions([
273
       'getGymCardList',
273
       'getGymCardList',
274
+      'giveCard',
274
     ]),
275
     ]),
275
     ...mapCustomerActions([
276
     ...mapCustomerActions([
276
       'GetCustomerList',
277
       'GetCustomerList',
292
     },
293
     },
293
     toSendCard () { // 赠送卡
294
     toSendCard () { // 赠送卡
294
       if (this.selectCustomer.length) {
295
       if (this.selectCustomer.length) {
296
+        console.log(this.selectCustomer)
295
         this.selectCustomer = this.selectCustomer.map(x => x.CustomerId).join(',')
297
         this.selectCustomer = this.selectCustomer.map(x => x.CustomerId).join(',')
296
         this.giveCard({
298
         this.giveCard({
297
           id: this.currentCardId,
299
           id: this.currentCardId,
322
       }
324
       }
323
     },
325
     },
324
     sendCard (index, row) { // 赠送卡弹窗
326
     sendCard (index, row) { // 赠送卡弹窗
325
-      this.currentCardId = row.CardId
327
+      this.currentCardId = row.GymCardId
326
       this.centerDialogVisible = true
328
       this.centerDialogVisible = true
327
     },
329
     },
328
     search () { // 搜索
330
     search () { // 搜索

+ 3
- 13
src/pages/system/cardAndCouponManager/cardManager/edit.vue Zobrazit soubor

236
         TotalCount: '',
236
         TotalCount: '',
237
         CaseId: '',
237
         CaseId: '',
238
         OrgId: '',
238
         OrgId: '',
239
-        Share: {
240
-          CardShareInfo: '',
241
-          CardUseRule: '',
242
-          CardUseInstruction: ''
243
-        },
244
-        Images: [{
245
-          CardImageUrl: ''
246
-        }],
247
-        Targets: [{
248
-          TargetType: '',
249
-          TargetId: '',
250
-          TargetName: ''
251
-        }],
239
+        Share: {},
240
+        Images: null,
241
+        Targets: [{}],
252
         ChannelId: ''
242
         ChannelId: ''
253
       },
243
       },
254
       postData: {
244
       postData: {

+ 14
- 0
src/pages/system/cardAndCouponManager/cardManager/index.vue Zobrazit soubor

54
         <el-table-column
54
         <el-table-column
55
           prop="SendType"
55
           prop="SendType"
56
           label="发放类型">
56
           label="发放类型">
57
+          <template slot-scope="scope">
58
+            <span>{{SendType(scope.row.SendType)}}</span>
59
+          </template>
57
         </el-table-column>
60
         </el-table-column>
58
         <el-table-column
61
         <el-table-column
59
           prop="TotalCount"
62
           prop="TotalCount"
279
       'GetCustomerList',
282
       'GetCustomerList',
280
       'SetCustomerListNull',
283
       'SetCustomerListNull',
281
     ]),
284
     ]),
285
+    SendType (type) {
286
+      if (type === 'channel') {
287
+        return '渠道'
288
+      }
289
+      if (type === 'case') {
290
+        return '案场'
291
+      }
292
+      if (type === 'system') {
293
+        return '系统'
294
+      }
295
+    },
282
     toSendHistory () { // 查看赠送记录
296
     toSendHistory () { // 查看赠送记录
283
       this.$router.push({ name: 'givingRecords' })
297
       this.$router.push({ name: 'givingRecords' })
284
     },
298
     },

+ 2
- 2
src/pages/system/cardAndCouponManager/couponManager/edit.vue Zobrazit soubor

90
           <div class="flex-item">
90
           <div class="flex-item">
91
             <div>
91
             <div>
92
               <el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
92
               <el-radio v-model="couponInfo.SendType" label="channel">渠道</el-radio>
93
-              <el-radio v-if="couponInfo.CouponType === 'case'" v-model="couponInfo.SendType" label="case">案场</el-radio>
93
+              <el-radio v-if="couponInfo.CouponType === 'course'" v-model="couponInfo.SendType" label="case">案场</el-radio>
94
               <el-radio v-model="couponInfo.SendType" label="system">系统</el-radio>
94
               <el-radio v-model="couponInfo.SendType" label="system">系统</el-radio>
95
             </div>
95
             </div>
96
           </div>
96
           </div>
184
             </div>
184
             </div>
185
           </div>
185
           </div>
186
         </li>
186
         </li>
187
-        <li class="flex-h" v-if="type === 'course'">
187
+        <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
188
           <span>券有效时间:</span>
188
           <span>券有效时间:</span>
189
           <div class="flex-item">
189
           <div class="flex-item">
190
             <div>
190
             <div>

+ 9
- 1
src/pages/system/courseManager/scheduleManager/edit.vue Zobrazit soubor

2
   <div class="subPage">
2
   <div class="subPage">
3
     <div class="system-table-search">
3
     <div class="system-table-search">
4
       <div class="flex-h">
4
       <div class="flex-h">
5
-        <div class="flex-item flex-h"></div>
5
+        <div class="flex-item flex-h">
6
+          <el-button
7
+          size="mini"
8
+          type="primary" @click="goLast">继续排课</el-button>
9
+        </div>
6
         <ul>
10
         <ul>
7
           <li>
11
           <li>
8
             <el-input
12
             <el-input
251
       this.search()
255
       this.search()
252
       this.centerDialogVisible = false
256
       this.centerDialogVisible = false
253
     },
257
     },
258
+    goLast () {
259
+      const { courseid } = this.$route.query
260
+      this.$router.push({name: 'scheduleManager', query: {id: courseid}})
261
+    }
254
   }
262
   }
255
 }
263
 }
256
 </script>
264
 </script>

+ 9
- 1
src/pages/system/dataStatistics/goodsStatisticsList/index.vue Zobrazit soubor

87
 </template>
87
 </template>
88
 
88
 
89
 <script>
89
 <script>
90
-import { mapState } 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')
94
+
93
 export default {
95
 export default {
94
   name: '',
96
   name: '',
95
   data () {
97
   data () {
111
       cases: x => x.app.cases.list,
113
       cases: x => x.app.cases.list,
112
       defaultCaseId: x => x.app.cases.default
114
       defaultCaseId: x => x.app.cases.default
113
     }),
115
     }),
116
+    ...mapStaState({
117
+      goods: x => x.goods,
118
+    }),
114
     CaseId: {
119
     CaseId: {
115
       get () {
120
       get () {
116
         return this.postData.caseid || this.defaultCaseId
121
         return this.postData.caseid || this.defaultCaseId
128
     })
133
     })
129
   },
134
   },
130
   methods: {
135
   methods: {
136
+    ...mapStaActions([
137
+      'GetGoods',
138
+    ]),
131
     search () { // 搜索
139
     search () { // 搜索
132
       // 1
140
       // 1
133
     },
141
     },

+ 13
- 13
src/store/card/gymCard.js Zobrazit soubor

61
         }).catch(reject)
61
         }).catch(reject)
62
       })
62
       })
63
     },
63
     },
64
-    // giveCard ({ commit }, { id, users }) {
65
-    //   return new Promise((resolve, reject) => {
66
-    //     ajax(api.cardManager.giveCard.url, {
67
-    //       method: api.cardManager.giveCard.method,
68
-    //       urlData: {
69
-    //         id,
70
-    //         users
71
-    //       },
72
-    //     }).then(res => {
73
-    //       resolve(res)
74
-    //     }).catch(reject)
75
-    //   })
76
-    // }
64
+    giveCard ({ commit }, { id, users }) {
65
+      return new Promise((resolve, reject) => {
66
+        ajax(api.gymCardManager.giveCard.url, {
67
+          method: api.gymCardManager.giveCard.method,
68
+          urlData: {
69
+            id,
70
+            users
71
+          },
72
+        }).then(res => {
73
+          resolve(res)
74
+        }).catch(reject)
75
+      })
76
+    }
77
   }
77
   }
78
 }
78
 }

+ 1
- 1
src/store/course/schedule.js Zobrazit soubor

90
       })
90
       })
91
     },
91
     },
92
     SetListNull ({ commit }) {
92
     SetListNull ({ commit }) {
93
-      commit('updatesSheduleList', [])
93
+      commit('updateList', [])
94
     }
94
     }
95
   }
95
   }
96
 }
96
 }

+ 1
- 0
src/store/index.js Zobrazit soubor

32
   channel: () => require('./channel/channel').default,
32
   channel: () => require('./channel/channel').default,
33
   customer: () => require('./customer/customer').default,
33
   customer: () => require('./customer/customer').default,
34
   user: () => require('./system/user').default,
34
   user: () => require('./system/user').default,
35
+  sta: () => require('./sta/sta').default,
35
 }
36
 }
36
 
37
 
37
 Object.keys(modules).forEach((modKey) => {
38
 Object.keys(modules).forEach((modKey) => {

+ 29
- 0
src/store/sta/sta.js Zobrazit soubor

1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    goods: [],
8
+  },
9
+  mutations: {
10
+    updateGoods (state, payload) {
11
+      state.goods = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetGoods ({ commit }, payload) {
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.statistics.goods.url, {
18
+          method: api.statistics.goods.method,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateGoods', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+  }
29
+}

+ 10
- 0
src/util/api.js Zobrazit soubor

648
     getGymCardById: {
648
     getGymCardById: {
649
       method: 'get',
649
       method: 'get',
650
       url: `${baseUrl}${common}/gymcard/:id`
650
       url: `${baseUrl}${common}/gymcard/:id`
651
+    },
652
+    giveCard: {
653
+      method: 'post',
654
+      url: `${baseUrl}${common}/gymcard/:id/to/:users`
651
     }
655
     }
652
   },
656
   },
653
   customerManager: {
657
   customerManager: {
685
       method: 'get',
689
       method: 'get',
686
       url: `${baseUrl}${common}/coupon`
690
       url: `${baseUrl}${common}/coupon`
687
     }
691
     }
692
+  },
693
+  statistics: {
694
+    goods: {
695
+      method: 'get',
696
+      url: `${baseUrl}${common}/statistics/goods`
697
+    },
688
   }
698
   }
689
 }
699
 }
690
 export default $api
700
 export default $api

+ 1
- 1
src/util/util.js Zobrazit soubor

36
         data: { file: item.file },
36
         data: { file: item.file },
37
       }).then((res) => {
37
       }).then((res) => {
38
         let result = {
38
         let result = {
39
-          result : res
39
+          result: res
40
         }
40
         }
41
         item.onSuccess(result, item.file)
41
         item.onSuccess(result, item.file)
42
         console.log(result)
42
         console.log(result)