|
|
@ -1,60 +1,49 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="use_box">
|
|
|
|
<div class="use_box">
|
|
|
|
<Modal
|
|
|
|
<Modal :scrollable="false"
|
|
|
|
:scrollable="false"
|
|
|
|
|
|
|
|
v-model="showUse"
|
|
|
|
v-model="showUse"
|
|
|
|
title="使用活动"
|
|
|
|
title="使用活动"
|
|
|
|
@on-cancel="cancel"
|
|
|
|
@on-cancel="cancel"
|
|
|
|
:loading="true"
|
|
|
|
:loading="true"
|
|
|
|
width="70%"
|
|
|
|
width="70%">
|
|
|
|
>
|
|
|
|
<Steps style="padding: 40px;"
|
|
|
|
<Steps style="padding: 40px;" :current="currentStep">
|
|
|
|
:current="currentStep">
|
|
|
|
<Step title="基本信息"></Step>
|
|
|
|
<Step title="基本信息"></Step>
|
|
|
|
<Step title="选择零售公司" content></Step>
|
|
|
|
<Step :title="isModify ? '修改零售公司' : '选择零售公司'"
|
|
|
|
<Step title="选择店铺" content></Step>
|
|
|
|
content></Step>
|
|
|
|
<Step title="确认信息" content></Step>
|
|
|
|
<Step :title="isModify ? '修改店铺' : '选择店铺'"
|
|
|
|
|
|
|
|
content></Step>
|
|
|
|
|
|
|
|
<Step title="确认信息"
|
|
|
|
|
|
|
|
content></Step>
|
|
|
|
</Steps>
|
|
|
|
</Steps>
|
|
|
|
<useActivityStepOne
|
|
|
|
<useActivityStepOne :schedule="schedule"
|
|
|
|
:schedule="schedule"
|
|
|
|
:isModify="isModify"
|
|
|
|
v-if="currentStep == 0 && show"
|
|
|
|
v-if="currentStep == 0 && show"></useActivityStepOne>
|
|
|
|
></useActivityStepOne>
|
|
|
|
<useActivityStepTwo :schedule="schedule"
|
|
|
|
<useActivityStepTwo
|
|
|
|
:isModify="isModify"
|
|
|
|
:schedule="schedule"
|
|
|
|
v-if="currentStep == 1"></useActivityStepTwo>
|
|
|
|
v-if="currentStep == 1"
|
|
|
|
<useActivityStepThree :schedule="schedule"
|
|
|
|
></useActivityStepTwo>
|
|
|
|
:isModify="isModify"
|
|
|
|
<useActivityStepThree
|
|
|
|
v-if="currentStep == 2"></useActivityStepThree>
|
|
|
|
:schedule="schedule"
|
|
|
|
<useActivityStepFoure :schedule="schedule"
|
|
|
|
v-if="currentStep == 2"
|
|
|
|
:isModify="isModify"
|
|
|
|
></useActivityStepThree>
|
|
|
|
v-if="currentStep == 3"></useActivityStepFoure>
|
|
|
|
<useActivityStepFoure
|
|
|
|
|
|
|
|
:schedule="schedule"
|
|
|
|
|
|
|
|
v-if="currentStep == 3"
|
|
|
|
|
|
|
|
></useActivityStepFoure>
|
|
|
|
|
|
|
|
<div slot="footer">
|
|
|
|
<div slot="footer">
|
|
|
|
<Button
|
|
|
|
<Button v-if="currentStep !== 0"
|
|
|
|
v-if="currentStep !== 0"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
shape="circle"
|
|
|
|
shape="circle"
|
|
|
|
:loading="modal_loading"
|
|
|
|
:loading="modal_loading"
|
|
|
|
@click="back"
|
|
|
|
@click="back">上一步</Button>
|
|
|
|
>上一步</Button
|
|
|
|
<Button v-if="currentStep !== 3"
|
|
|
|
>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
v-if="currentStep !== 3"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
shape="circle"
|
|
|
|
shape="circle"
|
|
|
|
:loading="modal_loading"
|
|
|
|
:loading="modal_loading"
|
|
|
|
@click="next"
|
|
|
|
@click="next">下一步</Button>
|
|
|
|
>下一步</Button
|
|
|
|
<Button v-if="currentStep == 3"
|
|
|
|
>
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
v-if="currentStep == 3"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
shape="circle"
|
|
|
|
shape="circle"
|
|
|
|
:loading="modal_loading"
|
|
|
|
:loading="modal_loading"
|
|
|
|
@click="finish"
|
|
|
|
@click="finish">完成</Button>
|
|
|
|
>完成</Button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Modal>
|
|
|
|
</Modal>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -74,7 +63,7 @@ export default {
|
|
|
|
useActivityStepThree,
|
|
|
|
useActivityStepThree,
|
|
|
|
useActivityStepFoure,
|
|
|
|
useActivityStepFoure,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
currentStep: 0,
|
|
|
|
currentStep: 0,
|
|
|
|
modal_loading: false,
|
|
|
|
modal_loading: false,
|
|
|
@ -85,28 +74,29 @@ export default {
|
|
|
|
id: String,
|
|
|
|
id: String,
|
|
|
|
schedule: Object,
|
|
|
|
schedule: Object,
|
|
|
|
show: Boolean,
|
|
|
|
show: Boolean,
|
|
|
|
|
|
|
|
isModify: Boolean
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
show() {
|
|
|
|
show () {
|
|
|
|
this.showUse = this.show;
|
|
|
|
this.showUse = this.show;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
schedule() {
|
|
|
|
schedule () {
|
|
|
|
store.getters.useData.scheduleId = this.schedule.id;
|
|
|
|
store.getters.useData.scheduleId = this.schedule.id;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
mounted () { },
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
cancel() {
|
|
|
|
cancel () {
|
|
|
|
this.currentStep = 0;
|
|
|
|
this.currentStep = 0;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
cancel() {
|
|
|
|
cancel () {
|
|
|
|
store.commit("RSET_useData");
|
|
|
|
store.commit("RSET_useData");
|
|
|
|
this.$emit("doShow", false);
|
|
|
|
this.$emit("doShow", false);
|
|
|
|
this.modal_loading = false;
|
|
|
|
this.modal_loading = false;
|
|
|
|
this.showUse = false;
|
|
|
|
this.showUse = false;
|
|
|
|
this.currentStep = 0;
|
|
|
|
this.currentStep = 0;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
next() {
|
|
|
|
next () {
|
|
|
|
let data = store.getters.useData;
|
|
|
|
let data = store.getters.useData;
|
|
|
|
data.name = this.schedule.name;
|
|
|
|
data.name = this.schedule.name;
|
|
|
|
if (this.currentStep === 0) {
|
|
|
|
if (this.currentStep === 0) {
|
|
|
@ -142,15 +132,15 @@ export default {
|
|
|
|
store.commit("SET_useData", data);
|
|
|
|
store.commit("SET_useData", data);
|
|
|
|
this.currentStep = this.currentStep + 1;
|
|
|
|
this.currentStep = this.currentStep + 1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
back() {
|
|
|
|
back () {
|
|
|
|
this.currentStep = this.currentStep - 1;
|
|
|
|
this.currentStep = this.currentStep - 1;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
finish() {
|
|
|
|
finish () {
|
|
|
|
let that = this;
|
|
|
|
let that = this;
|
|
|
|
let data = store.getters.useData;
|
|
|
|
let data = store.getters.useData;
|
|
|
|
data.isGetActivityInfo = true;
|
|
|
|
data.isGetActivityInfo = true;
|
|
|
|
this.modal_loading = true;
|
|
|
|
this.modal_loading = true;
|
|
|
|
ActivityManager.saveActivityData(store.getters.useData, function(data) {
|
|
|
|
ActivityManager.saveActivityData(store.getters.useData, function (data) {
|
|
|
|
store.commit("RSET_useData");
|
|
|
|
store.commit("RSET_useData");
|
|
|
|
that.$emit("doShow", false);
|
|
|
|
that.$emit("doShow", false);
|
|
|
|
that.$router.push("/activity/plan");
|
|
|
|
that.$router.push("/activity/plan");
|
|
|
|