企业注册
+
填写企业与经办人信息、上传证件后提交审核
+
+
已注册?
去登录
@@ -45,20 +39,41 @@ const { register } = useHjcAuth()
const route = useRoute()
const loading = ref(false)
const error = ref('')
-const form = reactive({
- enterpriseName: '',
+const entForm = ref(null)
+
+const form = ref>({
+ name: '',
password: '',
creditCode: '',
+ address: '',
contactPhone: '',
contactEmail: '',
- agentPhone: ''
+ agentName: '',
+ idCardNo: '',
+ agentEmail: '',
+ agentPhone: '',
+ authorizeExpire: ''
})
+const materials = ref([
+ { materialType: 'idcard_front', label: '身份证人像面', materialName: '身份证人像面', fileUrl: '' },
+ { materialType: 'idcard_back', label: '身份证国徽面', materialName: '身份证国徽面', fileUrl: '' },
+ { materialType: 'handbook', label: '授权委托书', materialName: '授权委托书', fileUrl: '' },
+ { materialType: 'license', label: '营业执照', materialName: '营业执照', fileUrl: '' }
+])
+
async function submitForm() {
error.value = ''
+ if (!entForm.value?.validate()) return
loading.value = true
try {
- const res = await register({ ...form })
+ // buildPayload 返回 { name, ... };注册接口用 enterpriseName 作为登录账号
+ const { name, ...rest } = entForm.value.buildPayload()
+ const res = await register({
+ enterpriseName: name,
+ password: form.value.password,
+ ...rest
+ })
if (res.ok) {
return navigateTo((route.query.redirect as string) || '/tender')
}
diff --git a/app/pages/tender/qualification.vue b/app/pages/tender/qualification.vue
index c1a5ccb..effa3f1 100644
--- a/app/pages/tender/qualification.vue
+++ b/app/pages/tender/qualification.vue
@@ -7,7 +7,12 @@
请先登录后管理企业资质
-
去登录
+
+ 去登录
+
@@ -20,24 +25,18 @@