wangfei 6 年之前
父節點
當前提交
39e74bdea8

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

@@ -13,8 +13,8 @@ module.exports = {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15 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 18
         // target: 'http://192.168.0.11', //ys
19 19
         // target: 'http://dev.ycjcjy.com/', //frp
20 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置

+ 3
- 1
src/pages/system/cardAndCouponManager/bodyBuildingCardManager/index.vue 查看文件

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

+ 3
- 13
src/pages/system/cardAndCouponManager/cardManager/edit.vue 查看文件

@@ -236,19 +236,9 @@ export default {
236 236
         TotalCount: '',
237 237
         CaseId: '',
238 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 242
         ChannelId: ''
253 243
       },
254 244
       postData: {

+ 14
- 0
src/pages/system/cardAndCouponManager/cardManager/index.vue 查看文件

@@ -54,6 +54,9 @@
54 54
         <el-table-column
55 55
           prop="SendType"
56 56
           label="发放类型">
57
+          <template slot-scope="scope">
58
+            <span>{{SendType(scope.row.SendType)}}</span>
59
+          </template>
57 60
         </el-table-column>
58 61
         <el-table-column
59 62
           prop="TotalCount"
@@ -279,6 +282,17 @@ export default {
279 282
       'GetCustomerList',
280 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 296
     toSendHistory () { // 查看赠送记录
283 297
       this.$router.push({ name: 'givingRecords' })
284 298
     },

+ 2
- 2
src/pages/system/cardAndCouponManager/couponManager/edit.vue 查看文件

@@ -90,7 +90,7 @@
90 90
           <div class="flex-item">
91 91
             <div>
92 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 94
               <el-radio v-model="couponInfo.SendType" label="system">系统</el-radio>
95 95
             </div>
96 96
           </div>
@@ -184,7 +184,7 @@
184 184
             </div>
185 185
           </div>
186 186
         </li>
187
-        <li class="flex-h" v-if="type === 'course'">
187
+        <li class="flex-h" v-if="couponInfo.CouponType === 'course'">
188 188
           <span>券有效时间:</span>
189 189
           <div class="flex-item">
190 190
             <div>

+ 9
- 1
src/pages/system/courseManager/scheduleManager/edit.vue 查看文件

@@ -2,7 +2,11 @@
2 2
   <div class="subPage">
3 3
     <div class="system-table-search">
4 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 10
         <ul>
7 11
           <li>
8 12
             <el-input
@@ -251,6 +255,10 @@ export default {
251 255
       this.search()
252 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 264
 </script>

+ 9
- 1
src/pages/system/dataStatistics/goodsStatisticsList/index.vue 查看文件

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

+ 13
- 13
src/store/card/gymCard.js 查看文件

@@ -61,18 +61,18 @@ export default {
61 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 查看文件

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

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

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

+ 29
- 0
src/store/sta/sta.js 查看文件

@@ -0,0 +1,29 @@
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 查看文件

@@ -648,6 +648,10 @@ const $api = {
648 648
     getGymCardById: {
649 649
       method: 'get',
650 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 657
   customerManager: {
@@ -685,6 +689,12 @@ const $api = {
685 689
       method: 'get',
686 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 700
 export default $api

+ 1
- 1
src/util/util.js 查看文件

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