Commit 2372df45 authored by mengwenhao's avatar mengwenhao

feature:

parent 558bec75
...@@ -34,7 +34,31 @@ exports.checkCode = async ctx => { ...@@ -34,7 +34,31 @@ exports.checkCode = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
ctx.body = await req(ctx, opts) ctx.body = await req(ctx, opts);
};
// 审核列表详情页回显信息列表
exports.getRecordInfo = async ctx => {
const url = `${API_INTERNAL_URI}/merchant/inner/get_record_info`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 历史提交审核日志详情页
exports.getLog = async ctx => {
const url = `${API_INTERNAL_URI}/merchant/inner/get_log`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}; };
// 企业信息提交 // 企业信息提交
......
...@@ -21,6 +21,8 @@ router.post(`${API_VERSION}/certification`, enterprise.auditList); ...@@ -21,6 +21,8 @@ router.post(`${API_VERSION}/certification`, enterprise.auditList);
router.post(`${API_VERSION}/emterprise_commit`, enterprise.entCommit); router.post(`${API_VERSION}/emterprise_commit`, enterprise.entCommit);
router.post(`${API_VERSION}/send_code`, enterprise.sendCode); router.post(`${API_VERSION}/send_code`, enterprise.sendCode);
router.post(`${API_VERSION}/check_code`, enterprise.checkCode); router.post(`${API_VERSION}/check_code`, enterprise.checkCode);
router.post(`${API_VERSION}/get_record_info`, enterprise.getRecordInfo);
router.post(`${API_VERSION}/get_log`, enterprise.getLog);
//生活号 //生活号
router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info) router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info)
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<!-- 审核/查看详情/修改详情__企业信息 --> <!-- 审核/查看详情/修改详情__企业信息 -->
<el-card class="message_area"> <el-card class="message_area">
<h4 style="margin-bottom:20px;">企业信息</h4> <h4 style="margin-bottom:20px;">企业信息</h4>
<!-- 审核/查看详情页 --> <!-- 审核/查看详情页 -->
<el-table <el-table
v-if="pageStatus !== 'EDIT'" v-if="pageStatus !== 'EDIT'"
...@@ -19,13 +20,18 @@ ...@@ -19,13 +20,18 @@
<el-table-column <el-table-column
align="center" align="center"
label="审核状态" label="审核状态"
prop="status"
> >
<template #default="scope">
<span v-if="scope.row.audit_status === 5">编辑中</span>
<span v-if="scope.row.audit_status === 10">身份证校验通过待平台审核</span>
<span v-if="scope.row.audit_status === 20">审核成功</span>
<span v-if="scope.row.audit_status === 30">审核失败</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="企业ID" label="企业ID"
prop="id" prop="enterprise_auth_record_id"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -40,40 +46,50 @@ ...@@ -40,40 +46,50 @@
<el-table-column <el-table-column
align="center" align="center"
label="企业营业执照照片" label="企业营业执照照片"
prop="picture"
> >
<template #default="scope"> <template #default="scope">
<el-image <el-image
fit="fill" fit="fill"
:src="scope.row.picture" :src="scope.row.entterprise_image"
></el-image> ></el-image>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="法人或经营者姓名" label="法人或经营者姓名"
prop="userName" prop="legal_person"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="法人或经营者身份证号" label="法人或经营者身份证号"
prop="idNumber" prop="legal_id_card"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="身份证照片" label="身份证正面照片"
>
<template #default="scope">
<el-image
:src="scope.row.legal_front_id_card"
fit="fill"
></el-image>
</template>
</el-table-column>
<el-table-column
align="center"
label="身份证反面照片"
> >
<template #default="scope"> <template #default="scope">
<el-image <el-image
:src="scope.row.idPicture"
fit="fill" fit="fill"
:src="scope.row.legal_back_id_card"
></el-image> ></el-image>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 修改详情页 --> <!-- 修改详情页 -->
<el-form <!-- <el-form
v-if="pageStatus === 'EDIT'" v-if="pageStatus === 'EDIT'"
:rules="messageLishRules" :rules="messageLishRules"
label-width="240px" label-width="240px"
...@@ -164,33 +180,39 @@ ...@@ -164,33 +180,39 @@
> >
<el-input v-model.trim="messageList[0].idcardNumber"></el-input> <el-input v-model.trim="messageList[0].idcardNumber"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form> -->
</el-card> </el-card>
<!-- 审核/查看详情/修改详情__提交信息 --> <!-- 审核/查看详情/修改详情__提交信息 -->
<el-card class="submit_area"> <el-card class="submit_area">
<h4 style="margin-bottom:20px;">提交信息</h4> <h4 style="margin-bottom:20px;">提交信息</h4>
<el-table <el-table
:data="submitList" :data="messageList"
border border
> >
<el-table-column <el-table-column
align="center" align="center"
label="提交类型" label="提交类型"
prop="type" >
></el-table-column> <template #default="scope">
<span v-if="scope.row.data_from === 1">生活圈c端</span>
<span v-if="scope.row.data_from === 2">销售端b端</span>
<span v-if="scope.row.data_from === 3">内部代提交</span>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="提交时间" label="提交时间"
prop="date" prop="audit_time"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="提交人账号" label="提交人账号"
prop="account" prop="proxy_user_name"
></el-table-column> ></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<!-- 审核/查看详情/修改详情__提交历史 --> <!-- 审核/查看详情/修改详情__提交历史 -->
<el-card class="history_area"> <el-card class="history_area">
<h4 style="margin-bottom:20px;">提交历史</h4> <h4 style="margin-bottom:20px;">提交历史</h4>
...@@ -230,6 +252,7 @@ ...@@ -230,6 +252,7 @@
></el-table-column> ></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<!-- 审核__审核意见 --> <!-- 审核__审核意见 -->
<el-card <el-card
class="audit_area" class="audit_area"
...@@ -268,62 +291,30 @@ ...@@ -268,62 +291,30 @@
<el-table-column <el-table-column
label="生活号ID" label="生活号ID"
align="center" align="center"
prop="lifeId" prop="life_account_id"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="生活号名称" label="生活号名称"
align="center" align="center"
prop="lifeName" prop="life_account_name"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="管理员昵称" label="管理员昵称"
align="center" align="center"
prop="adminName" prop="nick_name"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="管理员账号" label="管理员账号"
align="center" align="center"
prop="adminNumber" prop="mobile"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="管理员账号ID" label="管理员账号ID"
align="center" align="center"
prop="adminId" prop="user_id"
></el-table-column> ></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<!-- 查看详情__创建生活号表单 -->
<el-dialog
title="创建生活号"
v-model="isDialogShow"
>
<el-form :model="lifeForm">
<el-form-item label="管理员昵称:">
<el-input v-model="lifeForm.adminName"></el-input>
</el-form-item>
<el-form-item label="管理员手机号:">
<el-input v-model="lifeForm.adminPhone"></el-input>
</el-form-item>
<el-form-item label="生活号名称:">
<el-input
@blur="onCheckLife"
v-model="lifeForm.lifeName"
></el-input>
</el-form-item>
<el-form-item label="生活号管理员:">
<el-input v-model="lifeForm.lifeAdmin"></el-input>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="isDialogShow = false">取 消</el-button>
<el-button
type="primary"
@click="onMakeCreateLife"
>确认创建</el-button>
</span>
</template>
</el-dialog>
<!-- 修改详情__提交表单或取消提交 --> <!-- 修改详情__提交表单或取消提交 -->
<div <div
...@@ -347,7 +338,7 @@ ...@@ -347,7 +338,7 @@
<script> <script>
import Layout from "@/layouts"; import Layout from "@/layouts";
import { checkLife, createLife } from "../../../service/enterprise"; import { getRecordInfo, getLog } from "@/service/enterprise";
export default { export default {
name: "Audit", name: "Audit",
components: { Layout }, components: { Layout },
...@@ -359,9 +350,10 @@ export default { ...@@ -359,9 +350,10 @@ export default {
created () { created () {
const { pageStatus, auditId } = this.$route.params; const { pageStatus, auditId } = this.$route.params;
this.auditId = parseInt(auditId);
this.pageStatus = pageStatus; this.pageStatus = pageStatus;
this.auditId = auditId; this.getInfo();
console.log(this.pageStatus, this.auditId); this.getHistory()
}, },
data () { data () {
...@@ -412,14 +404,7 @@ export default { ...@@ -412,14 +404,7 @@ export default {
idcardPhoto: [] // 身份证照片 idcardPhoto: [] // 身份证照片
} }
], ],
// 审核-提交信息
submitList: [
{
type: 1,
date: "2021-05-26",
account: 492148618
}
],
// 审核-提交历史 // 审核-提交历史
historyList: [ historyList: [
{ {
...@@ -431,27 +416,12 @@ export default { ...@@ -431,27 +416,12 @@ export default {
address: "请求通过,可以提交审核" address: "请求通过,可以提交审核"
} }
], ],
// 审核-审核意见 // 审核-审核意见
opinionArea: "", opinionArea: "",
// 创建生活号表单是否弹出
isDialogShow: false,
// 生活号-生活号信息 // 生活号-生活号信息
lifeList: [ lifeList: [],
{
lifeId: 1,
lifeName: "生活残忍",
adminName: "蒙文昊",
adminNumber: 492148618,
adminId: 1111111111
}
],
// 生活号-提交表单
lifeForm: {
adminName: "蒙文昊",
adminPhone: 18147683288,
lifeName: "",
lifeAdmin: ""
},
// 修改详情-表单校验规则 // 修改详情-表单校验规则
messageLishRules: { messageLishRules: {
...@@ -492,11 +462,13 @@ export default { ...@@ -492,11 +462,13 @@ export default {
} }
], ],
// 商户类型 // 商户类型
merchantsType: [{ merchantsType: [
required: true, {
message: "请选择商户类型", required: true,
trigger: "change" message: "请选择商户类型",
}] trigger: "change"
}
]
}, },
// 生活号状态 // 生活号状态
...@@ -519,6 +491,31 @@ export default { ...@@ -519,6 +491,31 @@ export default {
}, },
methods: { methods: {
// 获取审核信息列表
async getInfo () {
this.messageList = [];
this.lifeList = [];
const params = { enterprise_auth_record_id: this.auditId };
try {
const res = await getRecordInfo(params);
if (res.code !== 0) return this.$message.error(res.result);
this.messageList.push(res.result.record);
this.lifeList.push(res.result.life);
console.log(this.lifeList);
console.log(this.messageList);
console.log(res);
} catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~");
console.error(error);
}
},
// 获取提交日志信息(历史提交)
async getHistory () {
const res = await getLog({ enterprise_auth_record_id: this.auditId });
console.log("提交历史记录", res);
},
// 审核-拒绝审核 // 审核-拒绝审核
auditRefuse () { auditRefuse () {
if (this.opinionArea.length === 0) if (this.opinionArea.length === 0)
...@@ -531,11 +528,11 @@ export default { ...@@ -531,11 +528,11 @@ export default {
}, },
// 生活号-创建生活号弹框显示 // 生活号-创建生活号弹框显示
onCreateLife (params) { // onCreateLife (params) {
console.log(params); // console.log(params);
this.isDialogShow = true; // this.isDialogShow = true;
this.lifeStatus = true; // this.lifeStatus = true;
}, // },
// 修改详情-提交审核 // 修改详情-提交审核
handelSubmit (formName) { handelSubmit (formName) {
...@@ -573,38 +570,6 @@ export default { ...@@ -573,38 +570,6 @@ export default {
onIdPhoneRemove (file, fileList) { onIdPhoneRemove (file, fileList) {
this.messageList[0].idcardPhoto = fileList; this.messageList[0].idcardPhoto = fileList;
console.log("idCarPhoto:", this.messageList[0].idcardPhoto); console.log("idCarPhoto:", this.messageList[0].idcardPhoto);
},
// 查看详情-生活号名称检查
async onCheckLife () {
const res = await checkLife(this.lifeForm.lifeName);
if (res.code !== 0) {
this.lifeErrorMessage = res.reason;
this.lifeStatus = false;
} else {
this.lifeStatus = true;
}
},
// 创建生活号
async onMakeCreateLife () {
if (!this.lifeStatus) {
return this.$message.error(this.lifeErrorMessage);
} else {
const params = {
life_account_name: this.lifeForm.lifeName,
code: this.messageList[0].code,
user_id: ""
};
const res = await createLife(params);
if (res.code !== 0) {
return this.$message.error(res.reason)
} else {
this.$message({ type: 'success', message: '创建生活号成功!' });
this.isDialogShow = false;
}
console.log(res);
}
} }
} }
}; };
......
...@@ -234,6 +234,9 @@ export default { ...@@ -234,6 +234,9 @@ export default {
checkIsCode: "" // 用户修改操作的验证码 checkIsCode: "" // 用户修改操作的验证码
}; };
}, },
computed: {
},
created () { created () {
this.getEnterpriseList(); this.getEnterpriseList();
...@@ -263,7 +266,7 @@ export default { ...@@ -263,7 +266,7 @@ export default {
}; };
try { try {
const res = await auditList(params); const res = await auditList(params);
if (res.code !== 0) return this.$message.error(res.result); if (res.code !== 0) return this.$message.error(res.reason);
this.enterpriseList = res.result.data; this.enterpriseList = res.result.data;
this.totalCount = res.result.count; this.totalCount = res.result.count;
console.log(res); console.log(res);
...@@ -296,10 +299,9 @@ export default { ...@@ -296,10 +299,9 @@ export default {
// 获取验证码 // 获取验证码
async getAuthCode () { async getAuthCode () {
console.log(this.auditId);
try { try {
const res = await sendCode(this.auditId); const res = await sendCode({ enterprise_auth_record_id: this.auditId });
console.log(res); if (res.code !== 0) return this.$message.error(res.reason);
} catch (err) { } catch (err) {
console.log(err); console.log(err);
} }
...@@ -316,13 +318,15 @@ export default { ...@@ -316,13 +318,15 @@ export default {
}; };
const res = await checkCode(parasm); const res = await checkCode(parasm);
console.log(res); console.log(res);
if (res.code !== 0) return this.$message.error(res.reason);
this.$message.success("验证码校验成功!");
this.$router.push({
name: "Audit",
params: { pageStatus: "EDIT", auditId: this.auditId }
});
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
this.$router.push({
name: "Audit",
params: { pageStatus: "EDIT", auditId: this.auditId }
});
} }
}, },
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</el-form-item> </el-form-item>
<!-- 企业代码 --> <!-- 企业代码 -->
<el-form-item <el-form-item
label="统一社会信用代码(注册码:" label="统一社会信用代码(注册码:"
prop="code" prop="code"
> >
<el-input v-model.trim="establishForm.code"></el-input> <el-input v-model.trim="establishForm.code"></el-input>
...@@ -92,6 +92,24 @@ ...@@ -92,6 +92,24 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 代提交人手机号 -->
<el-form-item
label="待提交人手机号:"
prop="mobile"
>
<el-input v-model.number="establishForm.mobile"></el-input>
</el-form-item>
<el-form-item
label="代提交标识"
prop="is_agent"
>
<el-select v-model="establishForm.is_agent">
<el-option
label="代提交"
:value="1"
></el-option>
</el-select>
</el-form-item>
<!-- =================普通企业法人/个体工商户身份认证信息========== --> <!-- =================普通企业法人/个体工商户身份认证信息========== -->
<h3>身份信息</h3> <h3>身份信息</h3>
...@@ -370,7 +388,7 @@ export default { ...@@ -370,7 +388,7 @@ export default {
], ],
// 数据来源 // 数据来源
data_from: [ data_from: [
{ required: true, message: "请选择数据来源", trigger: "blur" } { required: true, message: "请选择数据来源", trigger: "change" }
], ],
/* ****************法人/个体用户身份校验***************** */ /* ****************法人/个体用户身份校验***************** */
// 企业营业执照号 // 企业营业执照号
...@@ -400,7 +418,9 @@ export default { ...@@ -400,7 +418,9 @@ export default {
// 经营者/法人姓名 // 经营者/法人姓名
userName: [ userName: [
{ required: true, message: "请填写经营者(法人姓名)", trigger: "blur" } { required: true, message: "请填写经营者(法人姓名)", trigger: "blur" }
] ],
mobile: [{ required: true, message: "请填写待提交人手机号", trigger: "blur" }],
is_agent: [{ required: true, message: "请填写是否代提交", trigger: "change" }]
} }
}; };
}, },
......
...@@ -31,6 +31,23 @@ export async function checkCode (params) { ...@@ -31,6 +31,23 @@ export async function checkCode (params) {
return res; return res;
} }
/**
* 获取审核列表详情
* @param enterprise_auth_record_id 审核记录id
*/
export async function getRecordInfo (params) {
const res = axios.post(`/api/v1/get_record_info`, params);
return res;
}
/**
* 获取提交审核日志
* @param enterprise_auth_record_id 审核记录id
*/
export async function getLog (params) {
const res = axios.post(`/api/v1/get_log`, params);
return res;
}
// 发送企业信息认证 // 发送企业信息认证
export async function entCommit (query) { export async function entCommit (query) {
const res = await axios.post(`/api/v1/emterprise_commit`, query); const res = await axios.post(`/api/v1/emterprise_commit`, query);
......
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