创建公司不必选
This commit is contained in:
parent
75348cc796
commit
ec208de5c7
@ -71,7 +71,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="13">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-form-item label="性别" >
|
||||
<el-select
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
@ -86,7 +86,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item label="身份证号" prop="id_card">
|
||||
<el-form-item label="身份证号" >
|
||||
<el-input
|
||||
v-model="formData.id_card"
|
||||
placeholder="请输入身份证号"
|
||||
@ -212,10 +212,10 @@
|
||||
<div style="font-size: 1.2rem; margin: 10px 0">资质信息</div>
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div>
|
||||
<el-form-item label="身份证" prop="qualification.id_card">
|
||||
<el-form-item label="身份证" >
|
||||
<el-upload
|
||||
v-model="formData.qualification.id_card"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -233,7 +233,7 @@
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.id_card_b"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -252,10 +252,10 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
<el-form-item label="银行卡" prop="qualification.bank_account">
|
||||
<el-form-item label="银行卡" >
|
||||
<el-upload
|
||||
v-model="formData.qualification.bank_account"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -274,7 +274,7 @@
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.bank_account_b"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -298,7 +298,7 @@
|
||||
<el-form-item label="行驶证" prop="car_card">
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -316,7 +316,7 @@
|
||||
</el-upload>
|
||||
<el-upload
|
||||
v-model="formData.qualification.car_card_b"
|
||||
class="avatar-uploader pl-3"
|
||||
class="pl-3 avatar-uploader"
|
||||
:data="{ cid: 1 }"
|
||||
:headers="{ Token: userStore.token }"
|
||||
:action="base_url + '/upload/image'"
|
||||
@ -419,15 +419,8 @@ const rules = ref({
|
||||
company_name: [{ required: true, message: "请选择公司", trigger: "blur" }],
|
||||
group_id: [{ required: true, message: "请选择角色", trigger: "blur" }],
|
||||
nickname: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
||||
sex: [{ required: true, message: "请选择性别", trigger: "blur" }],
|
||||
id_card: [{ required: true, message: "请输入身份证号", trigger: "blur" }],
|
||||
account: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
||||
"qualification.bank_account": [
|
||||
{ required: true, message: "请上传银行卡", trigger: "blur" },
|
||||
],
|
||||
"qualification.id_card": [
|
||||
{ required: true, message: "请上传身份证", trigger: "blur" },
|
||||
],
|
||||
|
||||
});
|
||||
|
||||
// 字典信息
|
||||
@ -598,16 +591,9 @@ getProvinceList();
|
||||
|
||||
// 创建用户
|
||||
const submit = () => {
|
||||
if (!formData.avatar) return ElMessage.error("请上传头像");
|
||||
formRef.value?.validate((e) => {
|
||||
if (e) {
|
||||
if (!formData.qualification.id_card || !formData.qualification.id_card_b)
|
||||
return ElMessage.error("请上传身份证信息");
|
||||
if (
|
||||
!formData.qualification.bank_account ||
|
||||
!formData.qualification.bank_account_b
|
||||
)
|
||||
return ElMessage.error("请上传银行卡信息");
|
||||
|
||||
userAdd(formData).then(() => {
|
||||
ElMessage.success("添加成功");
|
||||
router.back();
|
||||
|
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<!-- <template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form
|
||||
@ -88,7 +88,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
@ -157,4 +157,4 @@ const handleDelete = async (id: number | any[]) => {
|
||||
|
||||
getLists()
|
||||
</script>
|
||||
|
||||
-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user