From f738732de140953d003303cae574f02c2952e094 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 May 2020 21:02:03 +0800 Subject: [PATCH] up --- src/pages/activity/ActivityManager.vue | 4 +- src/pages/activity/ActivityPlan.vue | 5 + src/pages/activity/useActivityStepOne.vue | 127 ++++++++++---------- src/pages/activity/useActivityStepThree.vue | 1 + src/pages/activity/useActivityStepTwo.vue | 1 + src/pages/activity/useTable.vue | 28 ++++- src/store/modules/activity.js | 4 +- 7 files changed, 104 insertions(+), 66 deletions(-) diff --git a/src/pages/activity/ActivityManager.vue b/src/pages/activity/ActivityManager.vue index 39e41a6..beec632 100644 --- a/src/pages/activity/ActivityManager.vue +++ b/src/pages/activity/ActivityManager.vue @@ -5,7 +5,7 @@
- +
{{item.name}} {{item.description}} @@ -33,7 +33,6 @@ - \ No newline at end of file diff --git a/src/pages/activity/useActivityStepThree.vue b/src/pages/activity/useActivityStepThree.vue index e29c3d7..fc15933 100644 --- a/src/pages/activity/useActivityStepThree.vue +++ b/src/pages/activity/useActivityStepThree.vue @@ -118,6 +118,7 @@ export default { color: #657180!important; background: #fff; padding: 0 12px; + cursor: pointer; } .tagColorClass { background: #6ac1d1; diff --git a/src/pages/activity/useActivityStepTwo.vue b/src/pages/activity/useActivityStepTwo.vue index 6c1488c..820132a 100644 --- a/src/pages/activity/useActivityStepTwo.vue +++ b/src/pages/activity/useActivityStepTwo.vue @@ -118,6 +118,7 @@ export default { color: #657180!important; background: #fff; padding: 0 12px; + cursor: pointer; } .tagColorClass { background: #6ac1d1; diff --git a/src/pages/activity/useTable.vue b/src/pages/activity/useTable.vue index 5026017..9e7ca0c 100644 --- a/src/pages/activity/useTable.vue +++ b/src/pages/activity/useTable.vue @@ -46,7 +46,6 @@ export default { watch: { useModal(val) { this.displayUseModal = val - this.id = this.id } }, mounted() { @@ -58,6 +57,33 @@ export default { this.currentStep = 0 }, next() { + const data = store.getters.useData; + if (this.currentStep === 0) { + if (!data.activityStartDate) { + this.$Message.error('请填写活动开始时间'); + return; + } + if (!data.activityEndDate) { + this.$Message.error('请填写活动结束时间'); + return; + } + if (data.activityStartDate > data.activityEndDate) { + this.$Message.error('开始时间不能晚于结束时间'); + return; + } + } + if (this.currentStep === 1) { + if (!data.selectCompanyValue || data.selectCompanyValue.length === 0) { + this.$Message.error('请至少选择1家公司'); + return; + } + } + if (this.currentStep === 2) { + if (!data.selectShopValue || data.selectShopValue.length === 0) { + this.$Message.error('请至少选择1家店铺'); + return; + } + } this.currentStep = this.currentStep + 1 }, back() { diff --git a/src/store/modules/activity.js b/src/store/modules/activity.js index a68db3a..a143180 100644 --- a/src/store/modules/activity.js +++ b/src/store/modules/activity.js @@ -3,7 +3,9 @@ const activity = { state: { useData: {}, useModal: false, - id: '' + id: '', + store: [], + company: [], }, mutations: { [types.SET_useData](state, useData) {