Commit 699381ff authored by mengwenhao's avatar mengwenhao

feature: 企业信息提交校验完成

parent bf3b3871
......@@ -20,12 +20,6 @@
{{ item.name }}
<!-- <router-link :to="item.path" class="menu-router">{{ item.name }}</router-link> -->
</el-menu-item>
<el-button
type="primary"
class="setUp"
@click="goEstablish"
>企业信息提交</el-button>
</el-menu>
</div>
</template>
......@@ -46,11 +40,6 @@ export default {
methods: {
handleSelect (path) {
this.activeMenu = path;
},
// 跳转到企业信息提交
goEstablish () {
this.$router.push({ name: 'Establish' })
}
},
};
......@@ -63,9 +52,4 @@ export default {
width: 100%;
position: relative;
}
.setUp {
position: absolute;
right: 0;
transform: translate(-50%, 25%);
}
</style>
......@@ -9,7 +9,9 @@
<!-- 审核/查看详情/修改详情__企业信息 -->
<el-card class="message_area">
<h4 style="margin-bottom:20px;">企业信息</h4>
<!-- 审核/查看详情页 -->
<el-table
v-if="pageStatus !=='EDIT' "
border
:data="messageList"
>
......@@ -17,7 +19,8 @@
align="center"
label="审核状态"
prop="status"
></el-table-column>
>
</el-table-column>
<el-table-column
align="center"
label="企业ID"
......@@ -67,6 +70,80 @@
</template>
</el-table-column>
</el-table>
<!-- 修改详情页 -->
<el-table
v-else
border
:data="messageList"
>
<el-table-column
align="center"
label="审核状态"
>
<template #default="scope">
<el-input v-model="scope.row.status"></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="企业ID"
>
<template #default="scope">
<el-input v-model="scope.row.id"></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="企业注册名称"
>
<template #default="scope">
<el-input v-model="scope.row.name"></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="注册码"
prop="code"
>
<template #default="scope">
<el-input v-model="scope.row.code"></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="企业营业执照照片"
prop="picture"
>
<template #default="scope">
<el-image
fit="fill"
:src="scope.row.picture"
></el-image>
</template>
</el-table-column>
<el-table-column
align="center"
label="法人或经营者姓名"
prop="userName"
></el-table-column>
<el-table-column
align="center"
label="法人或经营者身份证号"
prop="idNumber"
></el-table-column>
<el-table-column
align="center"
label="身份证照片"
>
<template #default="scope">
<el-image
:src="scope.row.idPicture"
fit="fill"
></el-image>
</template>
</el-table-column>
</el-table>
</el-card>
<!-- 审核/查看详情/修改详情__提交信息 -->
......@@ -140,7 +217,7 @@
<h4 style="margin-bottom:20px;">审核区域</h4>
<h5 class="mgtb20">审核意见</h5>
<textarea
style="width:100%;border-radius:10px;padding:10px"
style="width:100%;border-radius:10px;padding:10px;border:1px solid #EBEEF5;"
placeholder="请输入审核意见"
id=""
v-model="opinionArea"
......@@ -350,12 +427,12 @@ export default {
// 审核-拒绝审核
auditRefuse () {
if (this.opinionArea === "") return this.$message.error("请填写拒绝原因");
if (this.opinionArea.length === 0) return this.$message.error("请填写拒绝原因");
},
// 返回上一页
goBack () {
this.$router.push({ name: 'Certification' });
this.$router.replace({ name: 'Certification' });
},
// 生活号-创建生活号弹框显示
......
.setUp {
position: absolute;
right: 20px;
transform: translate(-50%, 25%);
}
.enterprise_card {
padding: 50px;
}
......
// 跳转到企业信息提交
.setUp {
position: absolute;
right: 20px;
transform: translate(-50%, 25%);
}
.enterprise_card{
padding: 50px;
.enterprise_form{
......
<template>
<div>
<!-- 企业信息提交 -->
<el-button
type="primary"
class="setUp"
@click="goEstablish"
>企业信息提交</el-button>
<el-card class="enterprise_card">
<!-- 企业认证筛选 -->
<el-form
......@@ -65,7 +72,7 @@
prop="number"
>
<el-input
type="number"
type="text"
v-model="enterpriseForm.number"
></el-input>
</el-form-item>
......@@ -159,7 +166,7 @@
</div>
</template>
<style lang="less" src="./index.less"></style>
<style lang="less" src="./index.less" scope></style>
<script>
export default {
......@@ -223,6 +230,11 @@ export default {
}
}
);
},
// 跳转到企业信息提交
goEstablish () {
this.$router.push({ name: 'Establish' })
}
}
};
......
.title {
padding: 20px;
}
.establish {
padding: 50px;
}
// 标题
.title{
padding: 20px;
}
// 主体区域
.establish{
padding: 50px;
}
\ No newline at end of file
<template>
<!-- 标题 -->
<el-page-header
class="title"
content="企业信息提交"
@back="goBack"
></el-page-header>
<div class="establish">
<el-form
:rules="establish_rules"
:rules="establishRules"
label-width="240px"
ref="establish_form"
:model="establishForm"
>
<el-form-item
label="营业执照:"
:rules="[
{ required: true, message: '请上传营业执照', trigger: 'change' }
]"
ref="licenseChange"
prop="businessLicense"
>
<el-upload
action=""
ref="licenseChange"
multiple
show-file-list
:limit="4"
:auto-upload="false"
:http-request="onLicenseUpload"
:file-list="establishForm.licenseList"
:on-change="onLicenseChange"
:on-remove="onLicenseRemove"
......@@ -34,7 +38,6 @@
<el-form-item
label="企业注册名称:"
prop="registeredName"
:rules="[{ required: true, message: '请输入企业注册名称' }]"
>
<el-input v-model="establishForm.registeredName"></el-input>
</el-form-item>
......@@ -42,26 +45,23 @@
<el-form-item
label="统一社会信用代码(注册码):"
prop="registrationCode"
:rules="[
{ required: true, message: '请输入统一社会信用代码(注册码)' }
]"
>
<el-input v-model="establishForm.registrationCode"></el-input>
</el-form-item>
<el-form-item
label="经营者(法人)身份证照片:"
:rules="[{ required: true, message: '请上传经营者(法人)身份证照片' }]"
ref="idcardPhotoChange"
prop="legalPhoto"
>
<el-upload
action=""
ref="licenseChange"
multiple
show-file-list
:limit="4"
:auto-upload="false"
:http-request="onLicenseUpload"
:file-list="establishForm.licenseList"
:on-change="onLicenseChange"
:file-list="establishForm.idcardPhoto"
:on-change="onIdPhoneChange"
:on-remove="onIdPhoneRemove"
>
<el-button
size="small"
......@@ -73,7 +73,6 @@
<el-form-item
label="经营者(法人)姓名:"
prop="legalName"
:rules="[{ required: true, message: '请输入经营者(法人)姓名' }]"
>
<el-input v-model="establishForm.legalName"></el-input>
</el-form-item>
......@@ -81,10 +80,6 @@
<el-form-item
label="经营者(法人)身份证号:"
prop="idcardNumber"
:rules="[
{ required: true, message: '请输入经营者(法人)身份证号' },
{ type: 'number', message: '身份证号必须为数字' }
]"
>
<el-input v-model.number="establishForm.idcardNumber"></el-input>
</el-form-item>
......@@ -99,15 +94,31 @@
</div>
</template>
<style lang="less" src="./index.less"></style>
<style lang="less" src="./index.less" scope></style>
<script>
export default {
data () {
// 营业执照校验规则
let businessRules = (rule, value, callback) => {
if (this.establishForm.licenseList.length === 0) {
callback(new Error("请上传营业执照"));
} else {
callback();
}
};
// 身份证照片校验规则
let idPhotoRules = (rule, value, callback) => {
if (this.establishForm.idcardPhoto.length === 0) {
callback(new Error("请上传身份证照片"));
} else {
callback();
}
};
return {
// 表单输入项
establishForm: {
licenseList: [],// 营业执照
licenseList: [], // 营业执照
registeredName: "", // 注册名称
registrationCode: "", // 注册码
idcardPhoto: [], // 身份证照片
......@@ -116,45 +127,67 @@ export default {
},
// 表单校验规则
establish_rules: {
legal_name: [
{
required: true,
message: "请输入经营者(法人)姓名",
trigger: "blur"
}
establishRules: {
// 营业执照
businessLicense: [
{ validator: businessRules, trigger: "change" }
],
idcard_number: [
{
required: true,
message: "请输入经营者(法人)身份证号",
trigger: "blur"
}
// 企业注册名称
registeredName: [
{ required: true, message: "请输入企业注册名称", trigger: "blur" }
],
// 注册码
registrationCode: [
{ required: true, message: "请输入统一社会信用代码(注册码)", trigger: "blur" }
],
// 法人照片
legalPhoto: [
{ validator: idPhotoRules, trigger: "change" }
],
// 法人姓名
legalName: [
{ required: true, message: "请输入经营者(法人)姓名", trigger: "blur" }
],
// 法人身份证号
idcardNumber: [
{ required: true, message: "请输入经营者(法人)身份证号", trigger: "blur" }
]
}
};
},
methods: {
// 上传执照更改
onLicenseUpload (file) {
console.log("file:", file);
// 返回
goBack () {
this.$router.replace({ name: "Certification" });
},
// 执照列表更改时
onLicenseChange (file, fileList) {
console.log('file:', file);
console.log('fileList:', fileList);
this.establishForm.licenseList = fileList
console.log('licenseList', this.establishForm.licenseList);
this.establishForm.licenseList = fileList;
this.$refs['licenseChange'].clearValidate();
console.log("licenseList", this.establishForm.licenseList);
},
// 身份证照片更改时
onIdPhoneChange (file, fileList) {
this.establishForm.idcardPhoto = fileList;
this.$refs['idcardPhotoChange'].clearValidate();
console.log('idcardPhoto:', this.establishForm.idcardPhoto);
},
// 取消选择执照
// 删除上传的营业执照
onLicenseRemove (file, fileList) {
console.log('file', file);
console.log('fileList', fileList);
this.establishForm.licenseList = fileList
console.log('licenseList', this.establishForm.licenseList);
console.log("file", file);
console.log("fileList", fileList);
this.establishForm.licenseList = fileList;
console.log("licenseList", this.establishForm.licenseList);
},
// 删除上传的身份证照片
onIdPhoneRemove (file, fileList) {
this.establishForm.idcardPhoto = fileList
console.log("idCarPhoto:", this.establishForm.idcardPhoto);
},
// 取消创建表单
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment