2025-04-14 10:57:27 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
2025-04-14 12:31:03 +08:00
|
|
|
<div style="display: flex;justify-content: center;">
|
|
|
|
|
<a-steps
|
|
|
|
|
style="margin-top: 20px;width: 80%;"
|
|
|
|
|
:current="current"
|
|
|
|
|
:items="items"
|
|
|
|
|
></a-steps>
|
|
|
|
|
</div>
|
2025-04-14 10:57:27 +08:00
|
|
|
<div class="steps-content">
|
|
|
|
|
<div v-if="current == 0">
|
2025-04-14 12:31:03 +08:00
|
|
|
<OperateAddForm ref="formModelOperateAdd">
|
|
|
|
|
</OperateAddForm>
|
2025-04-14 10:57:27 +08:00
|
|
|
</div>
|
|
|
|
|
<div v-if="current == 1">
|
2025-04-14 12:31:03 +08:00
|
|
|
<RegionFeeCofFrom ref="formModel"></RegionFeeCofFrom>
|
2025-04-14 10:57:27 +08:00
|
|
|
</div>
|
|
|
|
|
<div v-if="current == 2">
|
2025-04-14 12:31:03 +08:00
|
|
|
<OperateConfForm ref="formModelConfig"></OperateConfForm>
|
2025-04-14 10:57:27 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="steps-action">
|
|
|
|
|
<a-button
|
|
|
|
|
v-if="current < steps.length - 1"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="next"
|
|
|
|
|
>下一步</a-button>
|
|
|
|
|
<a-button
|
|
|
|
|
v-if="current > 0"
|
|
|
|
|
style="margin-left: 8px"
|
|
|
|
|
@click="prev"
|
|
|
|
|
>上一步</a-button>
|
2025-04-16 09:18:28 +08:00
|
|
|
<a-button
|
|
|
|
|
v-if="current == 2"
|
|
|
|
|
style="margin-left: 8px"
|
2025-05-28 11:00:39 +08:00
|
|
|
@click="next"
|
2025-04-16 09:18:28 +08:00
|
|
|
>完成</a-button>
|
|
|
|
|
<a-button
|
|
|
|
|
type="default"
|
|
|
|
|
style="margin-left: 8px"
|
|
|
|
|
@click="goBack"
|
|
|
|
|
>
|
|
|
|
|
返回
|
|
|
|
|
</a-button>
|
2025-04-14 10:57:27 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
import { callOperate } from '@/apis/call.js'
|
|
|
|
|
import { message } from 'ant-design-vue'
|
2025-05-16 11:13:44 +08:00
|
|
|
import RegionFeeCofFrom from '@/views/form/operateregion/feeconfig/RegionFeeCofFrom.vue'
|
|
|
|
|
import OperateConfForm from '@/views/form/operateregion/operateconfig/OperateConfForm.vue'
|
|
|
|
|
import OperateAddForm from '@/views/form/operateregion/operateconfig/OperateAddForm.vue'
|
2025-04-14 10:57:27 +08:00
|
|
|
import { useRouter, useRoute } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const current = ref(0);
|
|
|
|
|
const formModel = ref(null);
|
|
|
|
|
const formModelConfig = ref(null);
|
2025-04-14 12:31:03 +08:00
|
|
|
const formModelOperateAdd = ref(null);
|
2025-04-14 10:57:27 +08:00
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const steps = ref([
|
|
|
|
|
{
|
|
|
|
|
title: '基本配置',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '费用信息',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '运营配置',
|
|
|
|
|
},
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const items = steps.value.map(item => ({ key: item.title, title: item.title }));
|
|
|
|
|
|
|
|
|
|
const next = () => {
|
2025-04-14 12:31:03 +08:00
|
|
|
switch (current.value) {
|
|
|
|
|
case 0:
|
2025-04-16 09:18:28 +08:00
|
|
|
formModelOperateAdd.value.formSave((bres, data) => {
|
2025-05-28 11:00:39 +08:00
|
|
|
if (bres) current.value++;
|
2025-04-16 09:18:28 +08:00
|
|
|
});
|
2025-04-14 12:31:03 +08:00
|
|
|
break;
|
2025-05-28 11:00:39 +08:00
|
|
|
case 1:
|
|
|
|
|
formModel.value.formSave((bres, data) => {
|
|
|
|
|
if (bres) current.value++;
|
|
|
|
|
}); break;
|
|
|
|
|
case 2:
|
|
|
|
|
formModelOperateAdd.value.formSave((bres, data) => {
|
|
|
|
|
if (bres) current.value++;
|
|
|
|
|
}); break;
|
2025-04-14 12:31:03 +08:00
|
|
|
default: break
|
|
|
|
|
}
|
2025-04-14 10:57:27 +08:00
|
|
|
};
|
|
|
|
|
const prev = () => {
|
|
|
|
|
current.value--;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const goBack = () => {
|
|
|
|
|
router.back()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.steps-content {
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.steps-action {
|
|
|
|
|
margin-top: 24px;
|
2025-04-14 12:31:03 +08:00
|
|
|
text-align: center;
|
2025-04-14 10:57:27 +08:00
|
|
|
}
|
|
|
|
|
</style>
|