| | |
| | | <div v-if="active !== 3" class="mx-auto pt-2 pb-5 flex justify-center"> |
| | | <el-button :disabled="active == 1" @click="backStep">上一步</el-button> |
| | | <el-button type="primary" @click="nextStep(ruleFormRef)" |
| | | ><span v-if="active == 1">同意</span>下一步</el-button |
| | | ><span v-if="active == 0">同意</span>下一步</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | <script setup lang="tsx"> |
| | | import { h, ref, reactive, onMounted } from "vue"; |
| | | import { useNav } from "@/layout/hooks/useNav"; |
| | | import { useUserStoreHook } from "@/store/modules/user"; |
| | | import type { FormInstance, FormRules, UploadProps } from "element-plus"; |
| | | import { message } from "@/utils/message"; |
| | | import { baseUrlApi } from "@/api/util"; |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | const router = useRouter(); |
| | | const route = useRoute(); |
| | | const { route } = useNav(); |
| | | |
| | | defineOptions({ |
| | | name: "RegisterNav" |
| | |
| | | }; |
| | | // 页面初始化 |
| | | onMounted(async () => { |
| | | state.ruleForm.transactionCode = route.query.code; |
| | | let nowRole = useUserStoreHook()?.exRoles; |
| | | if (nowRole.length >= 1 && !route.query.code) { |
| | | state.ruleForm.transactionCode = nowRole[0].code; |
| | | } else { |
| | | state.ruleForm.transactionCode = route.query.code; |
| | | } |
| | | // 企业类型 |
| | | let res = await enterpriseTypes(); |
| | | state.enterpriseList = res?.result; |
| | | }); |
| | | let active = ref(0); |
| | | const nextStep = async (formEl: FormInstance | undefined) => { |
| | | console.log(state.ruleForm); |
| | | |
| | | if (active.value >= 1) { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |