许成详 il y a 6 ans
Parent
révision
922edb0ed9

BIN
dist.zip Voir le fichier


+ 1
- 1
dist/index.html Voir le fichier

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.8fc51a49b7ed146b2f686bba25437f3d.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.71fd787520fc12b02935.js></script><script type=text/javascript src=./static/js/app.c65c61dbc6d215198c13.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.fa267c0c7a9c4b5049eb6ccf145c71cb.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.71fd787520fc12b02935.js></script><script type=text/javascript src=./static/js/app.957b675694a7f3e970c6.js></script></body></html>

+ 28
- 4
src/pages/system/marketingActivities/addActivities/index.vue Voir le fichier

110
 <script>
110
 <script>
111
 import { mapState, createNamespacedHelpers } from 'vuex'
111
 import { mapState, createNamespacedHelpers } from 'vuex'
112
 const { mapActions: mapActivityFlashbuyActions } = createNamespacedHelpers('activityFlashbuy')
112
 const { mapActions: mapActivityFlashbuyActions } = createNamespacedHelpers('activityFlashbuy')
113
+const { mapActions: mapCardActions } = createNamespacedHelpers('card')
114
+const { mapActions: mapCouponActions } = createNamespacedHelpers('coupon')
113
 
115
 
114
 export default {
116
 export default {
115
   data () {
117
   data () {
184
       'getCardListByCaseId',
186
       'getCardListByCaseId',
185
       'getCouponListByCaseId',
187
       'getCouponListByCaseId',
186
     ]),
188
     ]),
189
+    ...mapCardActions([
190
+      'GetCardList',
191
+    ]),
192
+    ...mapCouponActions([
193
+      'GetCouponList',
194
+    ]),
187
     caseChange () { // 更换案场请求卡券列表
195
     caseChange () { // 更换案场请求卡券列表
188
-      this.getCardListByCaseId(this.CaseId).then((res) => {
196
+      this.GetCardList({
197
+        page: 1,
198
+        pagesize: 100000,
199
+        sendtype: 'system',
200
+        usetype: 'luckdraw',
201
+        usedid: this.$route.query.id || '',
202
+        caseid: this.CaseId,
203
+      }).then((res) => {
189
         // console.log(JSON.stringify(res))
204
         // console.log(JSON.stringify(res))
190
-        this.cardList = res
205
+        this.cardList = res.list || []
206
+        // console.log(JSON.stringify(this.cardList))
191
       })
207
       })
192
-      this.getCouponListByCaseId(this.CaseId).then((res) => {
208
+      this.GetCouponList({
209
+        page: 1,
210
+        pagesize: 100000,
211
+        sendtype: 'system',
212
+        usetype: 'luckdraw',
213
+        usedid: this.$route.query.id || '',
214
+        caseid: this.CaseId,
215
+      }).then((res) => {
193
         // console.log(JSON.stringify(res))
216
         // console.log(JSON.stringify(res))
194
-        this.couponList = res
217
+        this.couponList = res.list || []
218
+        // console.log(JSON.stringify(this.couponList))
195
       })
219
       })
196
     },
220
     },
197
     redirection (pathName) { // 重定向
221
     redirection (pathName) { // 重定向

+ 44
- 4
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue Voir le fichier

28
                 <span>案场:<em>*</em></span>
28
                 <span>案场:<em>*</em></span>
29
                 <div class="flex-item">
29
                 <div class="flex-item">
30
                   <div style="width:50%">
30
                   <div style="width:50%">
31
-                    <el-select :disabled="!editAll || isread" v-model="CaseId" placeholder="请选择案场">
31
+                    <el-select :disabled="!editAll || isread" v-model="CaseId" @change="selectCase" placeholder="请选择案场">
32
                       <el-option
32
                       <el-option
33
                         v-for="item in cases"
33
                         v-for="item in cases"
34
                         :key="item.CaseId"
34
                         :key="item.CaseId"
673
       page: 1,
673
       page: 1,
674
       pagesize: 100000,
674
       pagesize: 100000,
675
       sendtype: 'system',
675
       sendtype: 'system',
676
-      usetype: 'luckdraw'
676
+      usetype: 'luckdraw',
677
+      usedid: this.$route.query.id || '',
678
+      caseid: this.CaseId,
677
     }).then((res) => {
679
     }).then((res) => {
678
       this.cardList = res.list
680
       this.cardList = res.list
679
     })
681
     })
681
       page: 1,
683
       page: 1,
682
       pagesize: 100000,
684
       pagesize: 100000,
683
       sendtype: 'system',
685
       sendtype: 'system',
684
-      usetype: 'luckdraw'
686
+      usetype: 'luckdraw',
687
+      usedid: this.$route.query.id || '',
688
+      caseid: this.CaseId,
685
     }).then((res) => {
689
     }).then((res) => {
686
       this.couponList = res.list
690
       this.couponList = res.list
687
     })
691
     })
732
     ...mapCouponActions([
736
     ...mapCouponActions([
733
       'GetCouponList',
737
       'GetCouponList',
734
     ]),
738
     ]),
739
+    selectCase () {
740
+      this.GetCardList({ // 获取卡列表
741
+        page: 1,
742
+        pagesize: 100000,
743
+        sendtype: 'system',
744
+        usetype: 'luckdraw',
745
+        usedid: this.$route.query.id || '',
746
+        caseid: this.CaseId,
747
+      }).then((res) => {
748
+        this.cardList = res.list
749
+      })
750
+      this.GetCouponList({ // 获取券列表
751
+        page: 1,
752
+        pagesize: 100000,
753
+        sendtype: 'system',
754
+        usetype: 'luckdraw',
755
+        usedid: this.$route.query.id || '',
756
+        caseid: this.CaseId,
757
+      }).then((res) => {
758
+        this.couponList = res.list
759
+      })
760
+    },
735
     checkPhone (val) {
761
     checkPhone (val) {
736
-      return !!(/^1[34578]\d{9}$/.test(val))
762
+      return !!(/^1[345789]\d{9}$/.test(val))
737
     },
763
     },
738
     cardChange () {
764
     cardChange () {
739
       for (var n = 0; n < this.cardList.length; n++) {
765
       for (var n = 0; n < this.cardList.length; n++) {
761
       }
787
       }
762
     },
788
     },
763
     checkData () { // 校验活动信息
789
     checkData () { // 校验活动信息
790
+      // this.postData.CaseId === '' ? this.postData.CaseId = this.defaultCaseId : this.postData.CaseId = ''
764
       if (this.postData.CaseId === '') {
791
       if (this.postData.CaseId === '') {
765
         this.$message({
792
         this.$message({
766
           type: 'error',
793
           type: 'error',
861
       // document.getElementById('hiddenRule').innerHTML = this.postData.LuckdrawRule
888
       // document.getElementById('hiddenRule').innerHTML = this.postData.LuckdrawRule
862
       // var imgArr = document.getElementById('hiddenRule').getElementsByTagName('img')
889
       // var imgArr = document.getElementById('hiddenRule').getElementsByTagName('img')
863
       // console.log(imgArr)
890
       // console.log(imgArr)
891
+      // console.log(this.postData.CaseId, this.defaultCaseId)
892
+      if (this.postData.CaseId === '' && this.defaultCaseId !== '') {
893
+        this.postData.CaseId = this.defaultCaseId
894
+      }
864
       if (!this.checkData()) {
895
       if (!this.checkData()) {
865
         return false
896
         return false
866
       }
897
       }
874
           }
905
           }
875
         }
906
         }
876
         for (var a = 0; a < this.postData.Prizes.length; a++) {
907
         for (var a = 0; a < this.postData.Prizes.length; a++) {
908
+          this.postData.Prizes[a].Remainder = 0
909
+          this.postData.Prizes[a].Status = 1
877
           if (this.postData.Prizes[a].IsReality) {
910
           if (this.postData.Prizes[a].IsReality) {
878
             if (this.postData.Prizes[a].ValidDays === '') {
911
             if (this.postData.Prizes[a].ValidDays === '') {
879
               delete this.postData.Prizes[a].ValidDays
912
               delete this.postData.Prizes[a].ValidDays
1080
             })
1113
             })
1081
             return false
1114
             return false
1082
           }
1115
           }
1116
+          if (new Date(this.addPrizeInfo.VerificationStart).getTime() > new Date(this.addPrizeInfo.VerificationEnd).getTime()) {
1117
+            this.$message({
1118
+              type: 'error',
1119
+              message: '有效期开始时间不能大于截止时间'
1120
+            })
1121
+            return false
1122
+          }
1083
           this.addPrizeInfo.ValidDays = ''
1123
           this.addPrizeInfo.ValidDays = ''
1084
         }
1124
         }
1085
         if (this.addPrizeInfo.PrizeImg === '') {
1125
         if (this.addPrizeInfo.PrizeImg === '') {

+ 1
- 0
src/pages/system/marketingActivities/snapUpList/edit.vue Voir le fichier

281
       }
281
       }
282
     },
282
     },
283
     checkData () { // 校验数据格式
283
     checkData () { // 校验数据格式
284
+      this.postData.CaseId === '' ? this.postData.CaseId = this.CaseId : this.postData.CaseId = ''
284
       if (this.postData.CaseId === '') {
285
       if (this.postData.CaseId === '') {
285
         this.$message({
286
         this.$message({
286
           type: 'error',
287
           type: 'error',

+ 1
- 1
src/pages/system/systemSet/userManager/add.vue Voir le fichier

233
         })
233
         })
234
         return false
234
         return false
235
       }
235
       }
236
-      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
236
+      var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
237
       if (!myreg.test(this.postData.Phone)) {
237
       if (!myreg.test(this.postData.Phone)) {
238
         this.$message({
238
         this.$message({
239
           type: 'error',
239
           type: 'error',

+ 1
- 1
src/pages/system/systemSet/userManager/edit.vue Voir le fichier

258
         })
258
         })
259
         return false
259
         return false
260
       }
260
       }
261
-      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
261
+      var myreg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
262
       if (!myreg.test(this.postData.Phone)) {
262
       if (!myreg.test(this.postData.Phone)) {
263
         this.$message({
263
         this.$message({
264
           type: 'error',
264
           type: 'error',