许成详 6 years ago
parent
commit
513daa4ddd

+ 1
- 1
dist/index.html View File

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>
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.997396bafac1fcf11c0eff9e4b1e775e.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.b52aa2b0fa79bb077f8f.js></script></body></html>

+ 31
- 5
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue View File

378
             <div class="flex-item">
378
             <div class="flex-item">
379
               <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'card'" @change="cardChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
379
               <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'card'" @change="cardChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
380
                 <el-option
380
                 <el-option
381
+                  :disabled="!item.select"
381
                   v-for="item in cardList"
382
                   v-for="item in cardList"
382
                   :key="item.CardId"
383
                   :key="item.CardId"
383
                   :label="item.CardName"
384
                   :label="item.CardName"
386
               </el-select>
387
               </el-select>
387
               <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'coupon'" @change="couponChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
388
               <el-select :disabled="!editAll || isread" v-if="addPrizeInfo.CouponCardType === 'coupon'" @change="couponChange" v-model="addPrizeInfo.CouponCardId" placeholder="请选择">
388
                 <el-option
389
                 <el-option
390
+                  :disabled="!item.select"
389
                   v-for="item in couponList"
391
                   v-for="item in couponList"
390
                   :key="item.CouponId"
392
                   :key="item.CouponId"
391
                   :label="item.CouponName"
393
                   :label="item.CouponName"
718
             if (this.postData.Prizes[a].ValidDays === 0) {
720
             if (this.postData.Prizes[a].ValidDays === 0) {
719
               this.postData.Prizes[a].ValidDays = ''
721
               this.postData.Prizes[a].ValidDays = ''
720
             }
722
             }
723
+            this.postData.Prizes[a].Defaults = this.postData.Prizes[a].Defaults || []
721
           }
724
           }
722
         })
725
         })
723
       }
726
       }
745
         usedid: this.$route.query.id || '',
748
         usedid: this.$route.query.id || '',
746
         caseid: this.CaseId,
749
         caseid: this.CaseId,
747
       }).then((res) => {
750
       }).then((res) => {
751
+        res.list = res.list || []
752
+        for (var n = 0; n < res.list.length; n++) {
753
+          res.list[n].select = true
754
+        }
748
         this.cardList = res.list
755
         this.cardList = res.list
749
       })
756
       })
750
       this.GetCouponList({ // 获取券列表
757
       this.GetCouponList({ // 获取券列表
755
         usedid: this.$route.query.id || '',
762
         usedid: this.$route.query.id || '',
756
         caseid: this.CaseId,
763
         caseid: this.CaseId,
757
       }).then((res) => {
764
       }).then((res) => {
765
+        res.list = res.list || []
766
+        for (var n = 0; n < res.list.length; n++) {
767
+          res.list[n].select = true
768
+        }
758
         this.couponList = res.list
769
         this.couponList = res.list
759
       })
770
       })
760
     },
771
     },
787
       }
798
       }
788
     },
799
     },
789
     checkData () { // 校验活动信息
800
     checkData () { // 校验活动信息
790
-      // this.postData.CaseId === '' ? this.postData.CaseId = this.defaultCaseId : this.postData.CaseId = ''
791
       if (this.postData.CaseId === '') {
801
       if (this.postData.CaseId === '') {
792
         this.$message({
802
         this.$message({
793
           type: 'error',
803
           type: 'error',
885
       this.$router.push({ name: 'listOfLotteryActivities' })
895
       this.$router.push({ name: 'listOfLotteryActivities' })
886
     },
896
     },
887
     submitLuckdrawData () { // 提交活动信息
897
     submitLuckdrawData () { // 提交活动信息
888
-      // document.getElementById('hiddenRule').innerHTML = this.postData.LuckdrawRule
889
-      // var imgArr = document.getElementById('hiddenRule').getElementsByTagName('img')
890
-      // console.log(imgArr)
891
-      // console.log(this.postData.CaseId, this.defaultCaseId)
892
       if (this.postData.CaseId === '' && this.defaultCaseId !== '') {
898
       if (this.postData.CaseId === '' && this.defaultCaseId !== '') {
893
         this.postData.CaseId = this.defaultCaseId
899
         this.postData.CaseId = this.defaultCaseId
894
       }
900
       }
972
           Tel: this.addPhoneNum,
978
           Tel: this.addPhoneNum,
973
         })
979
         })
974
         this.addPhoneNum = ''
980
         this.addPhoneNum = ''
981
+      } else if (!this.findSamePhone(this.addPhoneNum)) {
982
+        this.$message({
983
+          type: 'error',
984
+          message: '请勿填写重复手机号'
985
+        })
975
       } else {
986
       } else {
976
         this.$message({
987
         this.$message({
977
           type: 'error',
988
           type: 'error',
996
         cancelButtonText: '取消',
1007
         cancelButtonText: '取消',
997
         type: 'warning'
1008
         type: 'warning'
998
       }).then(() => {
1009
       }).then(() => {
1010
+        if (this.postData.Prizes[index].CouponCardType === 'card') {
1011
+          for (var n = 0; n < this.cardList.length; n++) {
1012
+            if (this.cardList[n].CardId === this.postData.Prizes[index].CouponCardId) {
1013
+              this.cardList[n].select = true
1014
+            }
1015
+          }
1016
+        } else {
1017
+          for (var a = 0; a < this.couponList.length; a++) {
1018
+            if (this.couponList[a].CouponId === this.postData.Prizes[index].CouponCardId) {
1019
+              this.couponList[a].select = true
1020
+            }
1021
+          }
1022
+        }
999
         this.postData.Prizes.splice(index, 1)
1023
         this.postData.Prizes.splice(index, 1)
1000
         this.$message({
1024
         this.$message({
1001
           type: 'success',
1025
           type: 'success',
1057
           for (var n = 0; n < this.cardList.length; n++) {
1081
           for (var n = 0; n < this.cardList.length; n++) {
1058
             if (this.cardList[n].CardId === this.addPrizeInfo.CouponCardId) {
1082
             if (this.cardList[n].CardId === this.addPrizeInfo.CouponCardId) {
1059
               this.addPrizeInfo.PrizeName = this.cardList[n].CardName
1083
               this.addPrizeInfo.PrizeName = this.cardList[n].CardName
1084
+              this.cardList[n].select = false
1060
             }
1085
             }
1061
           }
1086
           }
1062
         } else {
1087
         } else {
1063
           for (var a = 0; a < this.couponList.length; a++) {
1088
           for (var a = 0; a < this.couponList.length; a++) {
1064
             if (this.couponList[a].CouponId === this.addPrizeInfo.CouponCardId) {
1089
             if (this.couponList[a].CouponId === this.addPrizeInfo.CouponCardId) {
1065
               this.addPrizeInfo.PrizeName = this.couponList[a].CouponName
1090
               this.addPrizeInfo.PrizeName = this.couponList[a].CouponName
1091
+              this.couponList[a].select = false
1066
             }
1092
             }
1067
           }
1093
           }
1068
         }
1094
         }

+ 23
- 1
src/pages/system/marketingActivities/snapUpList/edit.vue View File

284
       }
284
       }
285
     },
285
     },
286
     checkData () { // 校验数据格式
286
     checkData () { // 校验数据格式
287
+      // console.log(this.postData.FlashBuyName)
287
       if (this.postData.CaseId === '') {
288
       if (this.postData.CaseId === '') {
288
         this.$message({
289
         this.$message({
289
           type: 'error',
290
           type: 'error',
294
       if (this.postData.FlashBuyName === '') {
295
       if (this.postData.FlashBuyName === '') {
295
         this.$message({
296
         this.$message({
296
           type: 'error',
297
           type: 'error',
297
-          message: '活动说明不能为空'
298
+          message: '活动名称不能为空'
298
         })
299
         })
299
         return false
300
         return false
300
       }
301
       }
319
         })
320
         })
320
         return false
321
         return false
321
       }
322
       }
323
+      if (new Date(this.postData.StartDate).getTime() > new Date(this.postData.EndDate).getTime()) {
324
+        this.$message({
325
+          type: 'error',
326
+          message: '活动开始时间不能大于截止时间'
327
+        })
328
+        return false
329
+      }
330
+      if (this.postData.FlashBuyInfo === '') {
331
+        this.$message({
332
+          type: 'error',
333
+          message: '活动说明不能为空'
334
+        })
335
+        return false
336
+      }
322
       if (this.postData.ValidateType === 'days') {
337
       if (this.postData.ValidateType === 'days') {
323
         if (this.postData.ValidateDays - 0 <= 0 || (this.postData.ValidateDays - 0) % 1 !== 0) {
338
         if (this.postData.ValidateDays - 0 <= 0 || (this.postData.ValidateDays - 0) % 1 !== 0) {
324
           this.$message({
339
           this.$message({
345
           })
360
           })
346
           return false
361
           return false
347
         }
362
         }
363
+        if (new Date(this.postData.ValidateStart).getTime() > new Date(this.postData.ValidateEnd).getTime()) {
364
+          this.$message({
365
+            type: 'error',
366
+            message: '有效期开始时间不能大于截止时间'
367
+          })
368
+          return false
369
+        }
348
         delete this.postData.ValidateDays
370
         delete this.postData.ValidateDays
349
       }
371
       }
350
       return true
372
       return true

+ 11
- 1
src/pages/system/verificationManager/drawVerification/verificationList/index.vue View File

117
             type: 'success',
117
             type: 'success',
118
             message: '操作成功!'
118
             message: '操作成功!'
119
           })
119
           })
120
-          this.$router.push({ name: 'drawVerification' })
120
+          this.drawVerifyList({
121
+            id: this.$route.query.code
122
+          }).then((res) => {
123
+            // console.log(JSON.stringify(res))
124
+            if (res !== null) {
125
+              this.info = []
126
+              this.info.push(res)
127
+            }
128
+            this.ajaxOff = true
129
+          })
130
+          // this.$router.push({ name: 'drawVerification' })
121
         })
131
         })
122
       })
132
       })
123
     },
133
     },

+ 12
- 1
src/pages/system/verificationManager/flashbuyVerification/verificationList/index.vue View File

110
             type: 'success',
110
             type: 'success',
111
             message: '操作成功!'
111
             message: '操作成功!'
112
           })
112
           })
113
-          this.$router.push({ name: 'flashbuyVerification' })
113
+          this.flashbuyVerifyList({
114
+            code: this.$route.query.code,
115
+            caseid: this.$route.query.caseid
116
+          }).then((res) => {
117
+            // console.log(JSON.stringify(res))
118
+            if (res !== null) {
119
+              this.info = []
120
+              this.info.push(res)
121
+            }
122
+            this.ajaxOff = true
123
+          })
124
+          // this.$router.push({ name: 'flashbuyVerification' })
114
         })
125
         })
115
       })
126
       })
116
     },
127
     },

+ 1
- 1
src/style/main.css View File

414
   color: red;
414
   color: red;
415
 }
415
 }
416
 
416
 
417
-.ql-editor p{
417
+.ql-editor{
418
   min-height: 200px;
418
   min-height: 200px;
419
 }
419
 }
420
 
420