提交 2a2c1b2b authored 作者: lihuihui's avatar lihuihui
...@@ -27,12 +27,6 @@ export default { ...@@ -27,12 +27,6 @@ export default {
}, },
stepTwoList: { stepTwoList: {
type: Array type: Array
},
time: {
type: String
},
time2: {
type: String
} }
}, },
...@@ -60,16 +54,30 @@ export default { ...@@ -60,16 +54,30 @@ export default {
handleTab(index) { handleTab(index) {
this.showIndex = index this.showIndex = index
}, },
handlePrev() {
this.$parent.$parent.handlePrev()
},
handleStepTwo() { handleStepTwo() {
if (this.showIndex === 0) {
this.activeIndexName = '单次触发'
} else {
this.activeIndexName = '条件触发'
}
this.$emit('getShowIndex', this.showIndex)
let flag = true let flag = true
this.stepTwoList[0].form.triggerList.forEach(item => { console.log(this.showIndex, 'index')
if (item.triggerValue === '') { if (this.showIndex === 0) {
flag = false this.stepTwoList[0].form.triggerList.forEach(item => {
} if (item.startValue === '') {
}) flag = false
}
})
} else if (this.showIndex === 1) {
this.stepTwoList2[0].form.triggerList.forEach(item => {
if (item.triggerValue === '') {
flag = false
}
})
}
if (!flag) { if (!flag) {
this.$message.warning('请完善改步骤后才能进入下一步') this.$message.warning('请完善改步骤后才能进入下一步')
} }
......
...@@ -18,10 +18,7 @@ ...@@ -18,10 +18,7 @@
</div> </div>
</template> </template>
</StepTab> </StepTab>
<div class="main_content_btn"> <div class="main_content_btn"></div>
<!-- <div class="step_prev step_btn" @click="handlePrev">上一步</div>
<div class="step_next step_btn" @click="handleNext">下一步</div> -->
</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -59,7 +56,8 @@ export default { ...@@ -59,7 +56,8 @@ export default {
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png', iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png',
tabName: '条件触发' tabName: '条件触发'
} }
] ],
activeIndexName: ''
} }
}, },
mounted() { mounted() {
...@@ -71,17 +69,27 @@ export default { ...@@ -71,17 +69,27 @@ export default {
handleTab(index) { handleTab(index) {
this.showIndex = index this.showIndex = index
}, },
handlePrev() {
this.$parent.$parent.handlePrev()
},
handleStepTwo() { handleStepTwo() {
this.$emit('getTime', this.times, this.times2) this.$emit('getTime', this.times, this.times2)
if (this.showIndex === 0) {
this.activeIndexName = '单次触发'
} else {
this.activeIndexName = '条件触发'
}
this.$emit('getShowIndex', this.activeIndexName)
let flag = true let flag = true
this.stepTwoList[0].form.triggerList.forEach(item => { if (this.showIndex === 1) {
if (item.triggerValue === '' || this.times === '' || this.times2 === '') { this.stepTwoList[0].form.triggerList.forEach(item => {
if (item.triggerValue === '') {
flag = false
}
})
} else if (this.showIndex === 0) {
if (this.times === '' || this.times2 === '') {
flag = false flag = false
} }
}) }
if (!flag) { if (!flag) {
this.$message.warning('请完善改步骤后才能进入下一步') this.$message.warning('请完善改步骤后才能进入下一步')
} }
......
...@@ -136,6 +136,7 @@ export default { ...@@ -136,6 +136,7 @@ export default {
times_send: '', // 节日触发 触发时间 times_send: '', // 节日触发 触发时间
caseId: '', caseId: '',
showIndex: 0, showIndex: 0,
showIndexName: '',
// tab切换列表 // tab切换列表
tabList: [ tabList: [
{ {
...@@ -144,13 +145,13 @@ export default { ...@@ -144,13 +145,13 @@ export default {
tabName: '单次触发' tabName: '单次触发'
}, },
{ {
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon21.png', icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon41.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png', iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon42.png',
tabName: '周期触发' tabName: '周期触发'
}, },
{ {
icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon21.png', icon: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon31.png',
iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon22.png', iconActive: 'https://webapp-pub.ezijing.com/x-training-new/tab_icon32.png',
tabName: '节日触发' tabName: '节日触发'
} }
], ],
...@@ -254,6 +255,16 @@ export default { ...@@ -254,6 +255,16 @@ export default {
}, },
// 进去下一步之前的判断 // 进去下一步之前的判断
handleStepTwo() { handleStepTwo() {
if (this.showIndex === 0) {
this.showIndexName = '单次触发'
} else if (this.showIndex === 1) {
this.showIndexName = '周期触发'
} else {
this.showIndexName = '节日触发'
}
console.log(this.showIndexName, 'this.showIndexName')
this.$emit('getShowIndex', this.showIndexName)
const stepTwoData = { const stepTwoData = {
triggerDate: this.triggerDate, triggerDate: this.triggerDate,
triggerTime: this.triggerTime, triggerTime: this.triggerTime,
...@@ -266,16 +277,21 @@ export default { ...@@ -266,16 +277,21 @@ export default {
} }
this.$emit('getTime', stepTwoData) this.$emit('getTime', stepTwoData)
if ( console.log(this.time_range[0], this.time_range[1], this.times_every, '--000', this.times_send, '----')
this.triggerDate === '' || if (this.showIndex === 0 && (this.triggerDate === '' || this.triggerTime === '')) {
this.triggerTime === '' || this.$message.warning('请完善改步骤后才能进入下一步')
this.time_range[0] === '' || return false
this.time_range[1] === '' || } else if (
this.times_every === '' || this.showIndex === 1 &&
this.times_hour === '' || (this.time_range[0] === '' || this.time_range[1] === '' || this.times_every === '' || this.times_hour === '')
this.times_send === '' || ) {
this.festivalList.filter(item => item.isActive === false).length === this.festivalList.length || this.$message.warning('请完善改步骤后才能进入下一步')
this.solarTermsList.filter(item => item.isActive === false).length === this.solarTermsList.length return false
} else if (
this.showIndex === 2 &&
(this.times_send === null ||
this.festivalList.filter(item => item.isActive === false).length === this.festivalList.length ||
this.solarTermsList.filter(item => item.isActive === false).length === this.solarTermsList.length)
) { ) {
this.$message.warning('请完善改步骤后才能进入下一步') this.$message.warning('请完善改步骤后才能进入下一步')
return false return false
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
class="pt-50" class="pt-50"
:stepTwoList="stepTwoList" :stepTwoList="stepTwoList"
:stepTwoList2="stepTwoList2" :stepTwoList2="stepTwoList2"
@getTime="getTime"
ref="mailStepTwo" ref="mailStepTwo"
@getShowIndex="getShowIndex"
/> />
<div class="main_content_btn"> <div class="main_content_btn">
<div class="step_prev step_btn" @click="handlePrev" v-if="activeStep > 0">上一步</div> <div class="step_prev step_btn" @click="handlePrev" v-if="activeStep > 0">上一步</div>
...@@ -51,11 +51,15 @@ export default { ...@@ -51,11 +51,15 @@ export default {
stepOneList: [], stepOneList: [],
stepTwoList: [], stepTwoList: [],
stepTwoList2: [], stepTwoList2: [],
caseId: '' caseId: '',
activeIndexName: ''
} }
}, },
methods: { methods: {
getShowIndex(name) {
this.activeIndexName = name
},
// 上一步 // 上一步
handlePrev() { handlePrev() {
this.handleStep(2) this.handleStep(2)
...@@ -114,8 +118,6 @@ export default { ...@@ -114,8 +118,6 @@ export default {
this.stepOneList = answerList[0].answer.commit_report[0].stepOneList this.stepOneList = answerList[0].answer.commit_report[0].stepOneList
this.stepTwoList = answerList[0].answer.commit_report[1].form this.stepTwoList = answerList[0].answer.commit_report[1].form
this.stepTwoList2 = answerList[0].answer.commit_report[1].form1 this.stepTwoList2 = answerList[0].answer.commit_report[1].form1
this.time = answerList[0].answer.commit_report[2].time || ''
this.time2 = answerList[0].answer.commit_report[2].time2 || ''
} else { } else {
this.initStepList() this.initStepList()
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
:time="time" :time="time"
:time2="time2" :time2="time2"
@getTime="getTime" @getTime="getTime"
@getShowIndex="getShowIndex"
ref="mailStepTwo" ref="mailStepTwo"
/> />
<MailStepThree :data="stepThreeData" ref="mailStepThree" v-if="activeStep === 2" /> <MailStepThree :data="stepThreeData" ref="mailStepThree" v-if="activeStep === 2" />
...@@ -61,11 +62,15 @@ export default { ...@@ -61,11 +62,15 @@ export default {
caseId: '', caseId: '',
times: '', times: '',
times2: '', times2: '',
time2: '' time2: '',
activeIndexName: ''
} }
}, },
methods: { methods: {
getShowIndex(name) {
this.activeIndexName = name
},
// 获取第二步时间 // 获取第二步时间
getTime(val, val2) { getTime(val, val2) {
this.time = val this.time = val
...@@ -74,7 +79,6 @@ export default { ...@@ -74,7 +79,6 @@ export default {
// 上一步 // 上一步
handlePrev() { handlePrev() {
this.activeStep-- this.activeStep--
// this.handleStep(2)
}, },
// 下一步 // 下一步
handleNext() { handleNext() {
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
class="pt-50" class="pt-50"
ref="mailStepTwo" ref="mailStepTwo"
@getTime="getTime" @getTime="getTime"
@getShowIndex="getShowIndex"
:stepTwoData="stepTwoData" :stepTwoData="stepTwoData"
/> />
<SmsStepThree <SmsStepThree
...@@ -61,12 +62,16 @@ export default { ...@@ -61,12 +62,16 @@ export default {
times_hour: '', times_hour: '',
times_send: '', times_send: '',
solarTermsList: [], solarTermsList: [],
festivalList: [] festivalList: [],
activeName: ''
} }
} }
}, },
methods: { methods: {
getShowIndex(name) {
this.activeName = name
},
// 获取第二步时间 // 获取第二步时间
getTime(val) { getTime(val) {
this.stepTwoData = val this.stepTwoData = val
...@@ -162,6 +167,7 @@ export default { ...@@ -162,6 +167,7 @@ export default {
.main_content_btn { .main_content_btn {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 41px;
padding-bottom: 70px; padding-bottom: 70px;
.step_btn { .step_btn {
width: 119px; width: 119px;
......
...@@ -38,7 +38,6 @@ const cardList = [ ...@@ -38,7 +38,6 @@ const cardList = [
value: 'occupation', value: 'occupation',
label: '职业', label: '职业',
disabled: false, disabled: false,
children: [ children: [
{ value: '0', label: '学生' }, { value: '0', label: '学生' },
{ value: '1', label: '人事' }, { value: '1', label: '人事' },
...@@ -49,7 +48,6 @@ const cardList = [ ...@@ -49,7 +48,6 @@ const cardList = [
value: 'fund', value: 'fund',
label: '是否交易过基金产品', label: '是否交易过基金产品',
disabled: false, disabled: false,
children: [ children: [
{ value: '0', label: '是' }, { value: '0', label: '是' },
{ value: '1', label: '否' } { value: '1', label: '否' }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论