许成详 6 年前
父节点
当前提交
5abbc1e67f

+ 1
- 1
dist/index.html 查看文件

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.164c89e926d99f06f64231aa2ed79f36.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.992319e39e0ff64940a3.js></script><script type=text/javascript src=./static/js/app.d4b2eb05a59a97a75f2a.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.2f92d49dd04e52e9954aa9178671f876.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.3c9a16350e1e47228e4f.js></script><script type=text/javascript src=./static/js/app.c7d397d31402864ce930.js></script></body></html>

+ 59
- 17
src/pages/system/marketingActivities/addActivities/index.vue 查看文件

@@ -6,7 +6,7 @@
6 6
           <span>案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width: 50%;">
9
-              <el-select v-model="CaseId" placeholder="请选择">
9
+              <el-select v-model="CaseId" @change="caseChange" placeholder="请选择">
10 10
                 <el-option
11 11
                   v-for="item in cases"
12 12
                   :key="item.CaseId"
@@ -55,16 +55,24 @@
55 55
             </div>
56 56
           </div>
57 57
         </li>
58
-        <li class="flex-h" v-if="activeType === 'giveCoupon'">
58
+        <li class="flex-h">
59 59
           <span>赠券卡券:<em>*</em></span>
60 60
           <div class="flex-item">
61 61
             <div>
62
-              <el-select v-model="giftValue" placeholder="请选择">
62
+              <el-select v-if="activeType === 'giveCard'" v-model="giftValue" placeholder="请选择">
63 63
                 <el-option
64
-                  v-for="item in giftOptions"
65
-                  :key="item.giftValue"
66
-                  :label="item.label"
67
-                  :value="item.giftValue">
64
+                  v-for="item in cardList"
65
+                  :key="item.CardId"
66
+                  :label="item.CardName"
67
+                  :value="item.CardId">
68
+                </el-option>
69
+              </el-select>
70
+              <el-select v-if="activeType === 'giveCoupon'" v-model="giftValue" placeholder="请选择">
71
+                <el-option
72
+                  v-for="item in couponList"
73
+                  :key="item.CouponId"
74
+                  :label="item.CouponName"
75
+                  :value="item.CouponId">
68 76
                 </el-option>
69 77
               </el-select>
70 78
             </div>
@@ -100,7 +108,8 @@
100 108
   </div>
101 109
 </template>
102 110
 <script>
103
-import { mapState } from 'vuex'
111
+import { mapState, createNamespacedHelpers } from 'vuex'
112
+const { mapActions: mapActivityFlashbuyActions } = createNamespacedHelpers('activityFlashbuy')
104 113
 
105 114
 export default {
106 115
   data () {
@@ -121,6 +130,9 @@ export default {
121 130
       activeTypeList: [{
122 131
         value: '送券',
123 132
         id: 'giveCoupon'
133
+      }, {
134
+        value: '送卡',
135
+        id: 'giveCard'
124 136
       }],
125 137
       activeType: '',
126 138
       regValue: '',
@@ -132,7 +144,9 @@ export default {
132 144
       resourceDesc: '', // 存储JSON (赠券类型,赠送数量,活动描述)
133 145
       giftNum: '1', // 赠送数量
134 146
       desc: '', // 活动描述
135
-      giftList: [] // 赠券卡券数据体
147
+      giftList: [], // 赠券卡券数据体
148
+      cardList: [], // 卡列表
149
+      couponList: [], // 券列表
136 150
     }
137 151
   },
138 152
   mounted () {
@@ -166,6 +180,20 @@ export default {
166 180
     }
167 181
   },
168 182
   methods: {
183
+    ...mapActivityFlashbuyActions([
184
+      'getCardListByCaseId',
185
+      'getCouponListByCaseId',
186
+    ]),
187
+    caseChange () { // 更换案场请求卡券列表
188
+      this.getCardListByCaseId(this.CaseId).then((res) => {
189
+        // console.log(JSON.stringify(res))
190
+        this.cardList = res
191
+      })
192
+      this.getCouponListByCaseId(this.CaseId).then((res) => {
193
+        // console.log(JSON.stringify(res))
194
+        this.couponList = res
195
+      })
196
+    },
169 197
     redirection (pathName) { // 重定向
170 198
       this.$router.push({ name: pathName })
171 199
     },
@@ -207,18 +235,32 @@ export default {
207 235
         })
208 236
         return false
209 237
       }
210
-      let tempGiftOptions = this.$data.giftOptions
211
-      let tempGiftValue = this.$data.giftValue
212
-      for (let i = 0; i < tempGiftOptions.length; i++) {
213
-        if (tempGiftOptions[i].giftValue === tempGiftValue) {
214
-          this.$data.giftLabel = tempGiftOptions[i].label
215
-          break
238
+      // let tempGiftOptions = this.$data.giftOptions
239
+      // let tempGiftValue = this.$data.giftValue
240
+      // for (let i = 0; i < tempGiftOptions.length; i++) {
241
+      //   if (tempGiftOptions[i].giftValue === tempGiftValue) {
242
+      //     this.$data.giftLabel = tempGiftOptions[i].label
243
+      //     break
244
+      //   }
245
+      // }
246
+      if (this.activeType === 'giveCard') {
247
+        for (var n = 0; n < this.cardList.length; n++) {
248
+          if (this.cardList[n].CardId === this.giftValue) {
249
+            this.giftLabel = this.cardList[n].CardName
250
+          }
251
+        }
252
+      }
253
+      if (this.activeType === 'giveCoupon') {
254
+        for (var a = 0; a < this.couponList.length; a++) {
255
+          if (this.couponList[a].CouponId === this.giftValue) {
256
+            this.giftLabel = this.couponList[a].CouponName
257
+          }
216 258
         }
217 259
       }
218
-      let jsonString = '{"giftValue":"' + this.$data.giftValue + '","giftLabel":"' + this.$data.giftLabel + '","giftNum":"' + this.$data.giftNum + '","desc":"' + this.$data.desc + '"}'
260
+      let jsonString = '{"giftValue":"' + this.$data.giftValue + '","giftLabel":"' + this.giftLabel + '","giftNum":"' + this.$data.giftNum + '","desc":"' + this.$data.desc + '"}'
219 261
       this.$ajax(this.$api.marketingActivities.addMarketing.url, {
220 262
         method: this.$api.marketingActivities.addMarketing.method,
221
-        queryData: { activityName: this.$data.activityName, activityType: this.$data.regValue, activeType: this.activeType, resourceDesc: jsonString, CaseId: this.defaultCaseId }
263
+        queryData: { activityName: this.$data.activityName, activityType: this.$data.regValue, activeType: this.activeType, resourceDesc: jsonString, CaseId: this.postData.CaseId }
222 264
       }).then(res => {
223 265
         // console.log(res)
224 266
         this.$message({

+ 10
- 1
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue 查看文件

@@ -69,7 +69,7 @@
69 69
                     <div class="drawTemplateItem" v-for="(item,index) in templateList" :key="index">
70 70
                       <a :class="{'active': templateActiveIndex === index}" @click="cutTemplate(index)" @dblclick="dbTemplateClick(index)">
71 71
                         <input type="file" :ref="'templateImg' + index" hidden @change="templateImgChange(item, $event)">
72
-                        <img :src="item.currentImg ? item.currentImg : item.TplImg" style="width:100%;height:100%;object-fit: contain;">
72
+                        <img :src="item.TplImg" style="width:100%;height:100%;object-fit: contain;">
73 73
                       </a>
74 74
                       <el-button
75 75
                         v-if="item.currentImg !== ''"
@@ -81,6 +81,15 @@
81 81
                   </div>
82 82
                 </div>
83 83
               </li>
84
+              <li class="flex-h">
85
+                <span>模板背景图:</span>
86
+                <div class="flex-item">
87
+                  <div style="width:300px;height:300px;">
88
+                    <img v-if="this.postData.Imgs.length" class="contain" :src="this.postData.Imgs[0].ImgUrl" alt="">
89
+                    <span v-else style="line-height:40px;font-size:11px;color:#ccc;">暂未更换背景图</span>
90
+                  </div>
91
+                </div>
92
+              </li>
84 93
               <li class="flex-h">
85 94
                 <span>活动规则说明:<em>*</em></span>
86 95
                 <div class="flex-item">

+ 12
- 0
src/pages/system/page.js 查看文件

@@ -82,6 +82,8 @@ import phoneVerification from './verificationManager/phoneVerification/index' //
82 82
 import phoneVerificationList from './verificationManager/phoneVerification/verificationList/index' // 手机核销列表
83 83
 import drawVerification from './verificationManager/drawVerification/index' // 抽奖核销
84 84
 import drawVerificationList from './verificationManager/drawVerification/verificationList/index' // 抽奖核销列表
85
+import flashbuyVerification from './verificationManager/flashbuyVerification/index' // 抢购核销
86
+import flashbuyVerificationList from './verificationManager/flashbuyVerification/verificationList/index' // 抢购核销列表
85 87
 
86 88
 import dataStatistics from './dataStatistics/index' // 数据统计
87 89
 import frontEndUserList from './dataStatistics/frontEndUserList/index' // 课程管理
@@ -501,6 +503,16 @@ export default {
501 503
             component: drawVerificationList,
502 504
             children: []
503 505
           }]
506
+        }, { // 抢购核销
507
+          path: 'flashbuyVerification',
508
+          name: 'flashbuyVerification',
509
+          component: flashbuyVerification,
510
+          children: [{ // 抢购核销列表
511
+            path: 'flashbuyVerificationList',
512
+            name: 'flashbuyVerificationList',
513
+            component: flashbuyVerificationList,
514
+            children: []
515
+          }]
504 516
         }]
505 517
       }, { // 商品订单系统
506 518
         path: 'newOrder',

+ 107
- 0
src/pages/system/verificationManager/flashbuyVerification/index.vue 查看文件

@@ -0,0 +1,107 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="flex-h top">
4
+      <div class="flex-item">
5
+        <div>
6
+          <i class="iconfont icon-qrcode"></i>
7
+          <span>1</span>
8
+          <span>请用户出示核销的二维码</span>
9
+        </div>
10
+      </div>
11
+      <div class="flex-item">
12
+        <div>
13
+          <i class="iconfont icon-saoma"></i>
14
+          <span>2</span>
15
+          <span>点击“立即核销”按钮<br>使用扫码枪扫描客户二维码</span>
16
+        </div>
17
+      </div>
18
+      <div class="flex-item">
19
+        <div>
20
+          <i class="iconfont icon-hexiao"></i>
21
+          <span>3</span>
22
+          <span>根据提示进行核销操作</span>
23
+        </div>
24
+      </div>
25
+    </div>
26
+    <div style="text-align:center;margin-top:40px;">
27
+      <el-button type="danger" round @click="centerDialogVisible = true">立即核销</el-button>
28
+    </div>
29
+    <el-dialog
30
+      title="核销"
31
+      :visible.sync="centerDialogVisible"
32
+      width="500px"
33
+      @close="verificationCode = ''"
34
+      center>
35
+      <div v-if="centerDialogVisible">
36
+        <el-input
37
+          autofocus
38
+          ref="input"
39
+          placeholder="请输入核销码"
40
+          v-model="verificationCode"
41
+          clearable>
42
+        </el-input>
43
+      </div>
44
+      <span slot="footer" class="dialog-footer">
45
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
46
+        <el-button type="primary" @click="toVerify">确 定</el-button>
47
+      </span>
48
+    </el-dialog>
49
+  </div>
50
+</template>
51
+
52
+<script>
53
+import { mapState, createNamespacedHelpers } from 'vuex'
54
+const { mapActions: mapVerificActions } = createNamespacedHelpers('verification')
55
+export default {
56
+  name: '',
57
+  data () {
58
+    return {
59
+      centerDialogVisible: false, // 显隐核销弹窗
60
+      verificationCode: '', // 核销码
61
+    }
62
+  },
63
+  computed: {
64
+    ...mapState({
65
+      cases: x => x.app.cases.list,
66
+      defaultCaseId: x => x.app.cases.default
67
+    }),
68
+  },
69
+  mounted () {
70
+    this.$nextTick(function () { })
71
+  },
72
+  methods: {
73
+    ...mapVerificActions([
74
+      'flashbuyVerifyList',
75
+    ]),
76
+    toVerify () {
77
+      if (this.verificationCode !== '') {
78
+        this.flashbuyVerifyList({
79
+          code: this.verificationCode,
80
+          caseid: this.defaultCaseId ? this.defaultCaseId : this.cases[0].CaseId
81
+        }).then((res) => {
82
+          // console.log(JSON.stringify(res))
83
+          if (res !== null) {
84
+            this.toVerificationList()
85
+          }
86
+        }).catch((msg) => {
87
+          this.centerDialogVisible = false
88
+          this.verificationCode = ''
89
+        })
90
+      } else {
91
+        this.$message({
92
+          message: '核销码为空!',
93
+          type: 'error'
94
+        })
95
+      }
96
+    },
97
+    toVerificationList () { // 定向到核销列表
98
+      this.$router.push({ name: 'flashbuyVerificationList', query: { code: this.verificationCode, caseid: this.defaultCaseId ? this.defaultCaseId : this.cases[0].CaseId } })
99
+    },
100
+  }
101
+}
102
+</script>
103
+
104
+<!-- Add "scoped" attribute to limit CSS to this component only -->
105
+<style lang="scss" scoped>
106
+@import "page.scss";
107
+</style>

+ 51
- 0
src/pages/system/verificationManager/flashbuyVerification/page.scss 查看文件

@@ -0,0 +1,51 @@
1
+
2
+.subPage{
3
+  .top{
4
+    width: 100%;
5
+    position: relative;
6
+    overflow: hidden;
7
+    margin-top: 40px;
8
+    >div{
9
+      >div{
10
+        width: 100%;
11
+        position: relative;
12
+        overflow: hidden;
13
+        text-align: center;
14
+        >span{
15
+          width: 100%;
16
+          display: block;
17
+          text-align: center;
18
+          line-height: 24px;
19
+          font-size: 15px;
20
+          color: #666;
21
+        }
22
+        >i{
23
+          font-size: 30px;
24
+          color: #409EFF;
25
+          display: inline-block;
26
+        }
27
+      }
28
+    }
29
+  }
30
+}
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+

+ 161
- 0
src/pages/system/verificationManager/flashbuyVerification/verificationList/index.vue 查看文件

@@ -0,0 +1,161 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="list flex-h">
4
+      <div class="flex-item">
5
+        <div style="text-align:right;margin: 20px 0 0;border:none;">
6
+          <el-button
7
+            size="mini"
8
+            type="warning"
9
+            @click="reback">返回</el-button>
10
+        </div>
11
+        <div>
12
+          <el-table
13
+              :data="info"
14
+              stripe
15
+              style="width: 100%">
16
+              <el-table-column
17
+                prop="CaseName"
18
+                label="所在案场">
19
+              </el-table-column>
20
+              <el-table-column
21
+                prop="CustomerName"
22
+                label="姓名">
23
+              </el-table-column>
24
+              <el-table-column
25
+                prop="Phone"
26
+                label="手机号">
27
+              </el-table-column>
28
+              <el-table-column
29
+                prop="FlashBuyName"
30
+                label="活动名称">
31
+              </el-table-column>
32
+              <el-table-column
33
+                prop="CreateDate"
34
+                label="获取时间"
35
+                width="140px">
36
+                <template slot-scope="scope">
37
+                  {{scope.row.CreateDate === '0001-01-01T00:00:00Z' ? '-' : toolClass.dateFormat(scope.row.CreateDate)}}
38
+                </template>
39
+              </el-table-column>
40
+              <el-table-column
41
+                prop="VerifyStatus"
42
+                label="状态">
43
+                <template slot-scope="scope">
44
+                  {{scope.row.VerifyStatus === 'used' ? '已核销' : '未核销'}}
45
+                </template>
46
+              </el-table-column>
47
+              <el-table-column
48
+                label="操作">
49
+                <template slot-scope="scope">
50
+                  <el-button
51
+                    size="mini"
52
+                    type="success"
53
+                    v-if="scope.row.VerifyStatus !== 'used'"
54
+                    @click="check(scope.row)">核销</el-button>
55
+                  <span v-else>-</span>
56
+                </template>
57
+              </el-table-column>
58
+            </el-table>
59
+        </div>
60
+        <span class="noData" v-if="!info.length && ajaxOff">查不到当前信息,请核对二维码或详情</span>
61
+      </div>
62
+    </div>
63
+  </div>
64
+</template>
65
+
66
+<script>
67
+import { mapState, createNamespacedHelpers } from 'vuex'
68
+const { mapActions: mapVerifActions } = createNamespacedHelpers('verification')
69
+
70
+export default {
71
+  name: '',
72
+  data () {
73
+    return {
74
+      ajaxOff: false,
75
+      info: [],
76
+    }
77
+  },
78
+  computed: {
79
+    ...mapState({
80
+      cases: x => x.app.cases.list,
81
+      defaultCaseId: x => x.app.cases.default
82
+    }),
83
+  },
84
+  created () {
85
+    // console.log(this.$route.query.code)
86
+    this.flashbuyVerifyList({
87
+      code: this.$route.query.code,
88
+      caseid: this.$route.query.caseid
89
+    }).then((res) => {
90
+      // console.log(JSON.stringify(res))
91
+      if (res !== null) {
92
+        this.info.push(res)
93
+      }
94
+      this.ajaxOff = true
95
+    })
96
+  },
97
+  methods: {
98
+    ...mapVerifActions([
99
+      'flashbuyVerify',
100
+      'flashbuyVerifyList',
101
+    ]),
102
+    check (item) { // 核销
103
+      this.$confirm('确认核销此卡?', '提示', {
104
+        confirmButtonText: '确定',
105
+        cancelButtonText: '取消',
106
+        type: 'warning'
107
+      }).then(() => {
108
+        this.flashbuyVerify(item.CustomerFlashBuyId).then((res) => {
109
+          this.$message({
110
+            type: 'success',
111
+            message: '操作成功!'
112
+          })
113
+          this.$router.push({ name: 'flashbuyVerification' })
114
+        })
115
+      })
116
+    },
117
+    getList () {
118
+      // 1
119
+    },
120
+    afterCheck () {
121
+      this.$message({
122
+        type: 'success',
123
+        message: '操作成功!'
124
+      })
125
+      this.getList()
126
+    },
127
+    reback () { // 返回
128
+      this.$router.push({ name: 'flashbuyVerification' })
129
+    },
130
+  }
131
+}
132
+</script>
133
+
134
+<!-- Add "scoped" attribute to limit CSS to this component only -->
135
+<style lang="scss" scoped>
136
+.subPage {
137
+  .list {
138
+    > div {
139
+      margin: 0 20px;
140
+      > div {
141
+        width: 100%;
142
+        position: relative;
143
+        overflow: hidden;
144
+        box-sizing: border-box;
145
+        border: 1px solid #eee;
146
+        border-bottom: none;
147
+        margin-top: 20px;
148
+      }
149
+    }
150
+  }
151
+  .noData {
152
+    width: 100%;
153
+    display: block;
154
+    line-height: 40px;
155
+    font-size: 30px;
156
+    color: #ccc;
157
+    text-align: center;
158
+    margin: 40px auto 0;
159
+  }
160
+}
161
+</style>

+ 24
- 0
src/store/activityManager/flashbuy.js 查看文件

@@ -93,5 +93,29 @@ export default {
93 93
         }).catch(reject)
94 94
       })
95 95
     },
96
+    getCardListByCaseId ({ commit }, id) { // 获取案场下卡列表
97
+      return new Promise((resolve, reject) => {
98
+        ajax(api.activityManager.getCardListByCaseId.url, {
99
+          method: api.activityManager.getCardListByCaseId.method,
100
+          urlData: {
101
+            id,
102
+          },
103
+        }).then(res => {
104
+          resolve(res)
105
+        }).catch(reject)
106
+      })
107
+    },
108
+    getCouponListByCaseId ({ commit }, id) { // 获取案场下券列表
109
+      return new Promise((resolve, reject) => {
110
+        ajax(api.activityManager.getCouponListByCaseId.url, {
111
+          method: api.activityManager.getCouponListByCaseId.method,
112
+          urlData: {
113
+            id,
114
+          },
115
+        }).then(res => {
116
+          resolve(res)
117
+        }).catch(reject)
118
+      })
119
+    },
96 120
   }
97 121
 }

+ 26
- 1
src/store/verification/verification.js 查看文件

@@ -12,7 +12,7 @@ export default {
12 12
     },
13 13
   },
14 14
   actions: {
15
-    GetCourseVerList ({ commit }, {id, payload}) {
15
+    GetCourseVerList ({ commit }, { id, payload }) {
16 16
       return new Promise((resolve, reject) => {
17 17
         ajax(api.verification.coursebycode.url, {
18 18
           method: api.verification.coursebycode.method,
@@ -92,5 +92,30 @@ export default {
92 92
         }).catch(reject)
93 93
       })
94 94
     },
95
+    flashbuyVerifyList ({ commit }, payload) {
96
+      return new Promise((resolve, reject) => {
97
+        ajax(api.verification.flashbuyVerifyList.url, {
98
+          method: api.verification.flashbuyVerifyList.method,
99
+          urlData: {
100
+            id: payload.code,
101
+            caseid: payload.caseid
102
+          }
103
+        }).then(res => {
104
+          resolve(res)
105
+        }).catch(reject)
106
+      })
107
+    },
108
+    flashbuyVerify ({ commit }, id) {
109
+      return new Promise((resolve, reject) => {
110
+        ajax(api.verification.flashbuyVerify.url, {
111
+          method: api.verification.flashbuyVerify.method,
112
+          urlData: {
113
+            id,
114
+          }
115
+        }).then(res => {
116
+          resolve(res)
117
+        }).catch(reject)
118
+      })
119
+    },
95 120
   },
96 121
 }

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

@@ -587,6 +587,14 @@ const $api = {
587 587
       method: 'get',
588 588
       url: `${baseUrl}${common}/customer/tel/:id`
589 589
     },
590
+    flashbuyVerifyList: {
591
+      method: 'get',
592
+      url: `${baseUrl}${common}/flashbuy/verify/:id/:caseid`
593
+    },
594
+    flashbuyVerify: {
595
+      method: 'put',
596
+      url: `${baseUrl}${common}/flashbuy/verify/:id`
597
+    },
590 598
   },
591 599
   goodsOrder: {
592 600
     putPrintGoodsOrder: {
@@ -901,6 +909,14 @@ const $api = {
901 909
       method: 'put',
902 910
       url: `${baseUrl}${common}/flashbuy/:id/:status`
903 911
     },
912
+    getCardListByCaseId: { // 获取案场下卡列表
913
+      method: 'get',
914
+      url: `${baseUrl}${common}/card/sys/:id`
915
+    },
916
+    getCouponListByCaseId: { // 获取案场下券列表
917
+      method: 'get',
918
+      url: `${baseUrl}${common}/coupon/sys/:id`
919
+    },
904 920
   },
905 921
   record: {
906 922
     getRecordList: {