Commit 9111d72b authored by lvweichao's avatar lvweichao

Merge branch 'dev' of https://git.yidian-inc.com:8021/bp/op-web-service into dev

parents 02471f8b 9fc288a8
......@@ -34,7 +34,31 @@ exports.checkCode = async ctx => {
json: true,
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);
};
// 企业信息提交
......
......@@ -29,6 +29,8 @@ router.post(`${API_VERSION}/certification`, enterprise.auditList);
router.post(`${API_VERSION}/emterprise_commit`, enterprise.entCommit);
router.post(`${API_VERSION}/send_code`, enterprise.sendCode);
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.get(`${API_VERSION}/image/get_image_id`, image.get_obj_id)
router.get(`${API_VERSION}/image/get_bucket`, image.get_bucket)
......
......@@ -10,6 +10,7 @@
<!-- 审核/查看详情/修改详情__企业信息 -->
<el-card class="message_area">
<h4 style="margin-bottom:20px;">企业信息</h4>
<!-- 审核/查看详情页 -->
<el-table
v-if="pageStatus !== 'EDIT'"
......@@ -19,13 +20,18 @@
<el-table-column
align="center"
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
align="center"
label="企业ID"
prop="id"
prop="enterprise_auth_record_id"
></el-table-column>
<el-table-column
align="center"
......@@ -40,40 +46,50 @@
<el-table-column
align="center"
label="企业营业执照照片"
prop="picture"
>
<template #default="scope">
<el-image
fit="fill"
:src="scope.row.picture"
:src="scope.row.entterprise_image"
></el-image>
</template>
</el-table-column>
<el-table-column
align="center"
label="法人或经营者姓名"
prop="userName"
prop="legal_person"
></el-table-column>
<el-table-column
align="center"
label="法人或经营者身份证号"
prop="idNumber"
prop="legal_id_card"
></el-table-column>
<el-table-column
align="center"
label="身份证照片"
label="身份证正面照片"
>
<template #default="scope">
<el-image
:src="scope.row.idPicture"
:src="scope.row.legal_front_id_card"
fit="fill"
></el-image>
</template>
</el-table-column>
<el-table-column
align="center"
label="身份证反面照片"
>
<template #default="scope">
<el-image
fit="fill"
:src="scope.row.legal_back_id_card"
></el-image>
</template>
</el-table-column>
</el-table>
<!-- 修改详情页 -->
<el-form
<!-- <el-form
v-if="pageStatus === 'EDIT'"
:rules="messageLishRules"
label-width="240px"
......@@ -164,33 +180,39 @@
>
<el-input v-model.trim="messageList[0].idcardNumber"></el-input>
</el-form-item>
</el-form>
</el-form> -->
</el-card>
<!-- 审核/查看详情/修改详情__提交信息 -->
<el-card class="submit_area">
<h4 style="margin-bottom:20px;">提交信息</h4>
<el-table
:data="submitList"
:data="messageList"
border
>
<el-table-column
align="center"
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
align="center"
label="提交时间"
prop="date"
prop="audit_time"
></el-table-column>
<el-table-column
align="center"
label="提交人账号"
prop="account"
prop="proxy_user_name"
></el-table-column>
</el-table>
</el-card>
<!-- 审核/查看详情/修改详情__提交历史 -->
<el-card class="history_area">
<h4 style="margin-bottom:20px;">提交历史</h4>
......@@ -230,6 +252,7 @@
></el-table-column>
</el-table>
</el-card>
<!-- 审核__审核意见 -->
<el-card
class="audit_area"
......@@ -268,62 +291,30 @@
<el-table-column
label="生活号ID"
align="center"
prop="lifeId"
prop="life_account_id"
></el-table-column>
<el-table-column
label="生活号名称"
align="center"
prop="lifeName"
prop="life_account_name"
></el-table-column>
<el-table-column
label="管理员昵称"
align="center"
prop="adminName"
prop="nick_name"
></el-table-column>
<el-table-column
label="管理员账号"
align="center"
prop="adminNumber"
prop="mobile"
></el-table-column>
<el-table-column
label="管理员账号ID"
align="center"
prop="adminId"
prop="user_id"
></el-table-column>
</el-table>
</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
......@@ -347,7 +338,7 @@
<script>
import Layout from "@/layouts";
import { checkLife, createLife } from "../../../service/enterprise";
import { getRecordInfo, getLog } from "@/service/enterprise";
export default {
name: "Audit",
components: { Layout },
......@@ -359,9 +350,10 @@ export default {
created () {
const { pageStatus, auditId } = this.$route.params;
this.auditId = parseInt(auditId);
this.pageStatus = pageStatus;
this.auditId = auditId;
console.log(this.pageStatus, this.auditId);
this.getInfo();
this.getHistory()
},
data () {
......@@ -412,14 +404,7 @@ export default {
idcardPhoto: [] // 身份证照片
}
],
// 审核-提交信息
submitList: [
{
type: 1,
date: "2021-05-26",
account: 492148618
}
],
// 审核-提交历史
historyList: [
{
......@@ -431,27 +416,12 @@ export default {
address: "请求通过,可以提交审核"
}
],
// 审核-审核意见
opinionArea: "",
// 创建生活号表单是否弹出
isDialogShow: false,
// 生活号-生活号信息
lifeList: [
{
lifeId: 1,
lifeName: "生活残忍",
adminName: "蒙文昊",
adminNumber: 492148618,
adminId: 1111111111
}
],
// 生活号-提交表单
lifeForm: {
adminName: "蒙文昊",
adminPhone: 18147683288,
lifeName: "",
lifeAdmin: ""
},
lifeList: [],
// 修改详情-表单校验规则
messageLishRules: {
......@@ -492,11 +462,13 @@ export default {
}
],
// 商户类型
merchantsType: [{
merchantsType: [
{
required: true,
message: "请选择商户类型",
trigger: "change"
}]
}
]
},
// 生活号状态
......@@ -519,6 +491,31 @@ export default {
},
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 () {
if (this.opinionArea.length === 0)
......@@ -531,11 +528,11 @@ export default {
},
// 生活号-创建生活号弹框显示
onCreateLife (params) {
console.log(params);
this.isDialogShow = true;
this.lifeStatus = true;
},
// onCreateLife (params) {
// console.log(params);
// this.isDialogShow = true;
// this.lifeStatus = true;
// },
// 修改详情-提交审核
handelSubmit (formName) {
......@@ -573,38 +570,6 @@ export default {
onIdPhoneRemove (file, fileList) {
this.messageList[0].idcardPhoto = fileList;
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 {
checkIsCode: "" // 用户修改操作的验证码
};
},
computed: {
},
created () {
this.getEnterpriseList();
......@@ -272,7 +275,7 @@ export default {
};
try {
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.totalCount = res.result.count;
console.log(res);
......@@ -305,10 +308,9 @@ export default {
// 获取验证码
async getAuthCode () {
console.log(this.auditId);
try {
const res = await sendCode(this.auditId);
console.log(res);
const res = await sendCode({ enterprise_auth_record_id: this.auditId });
if (res.code !== 0) return this.$message.error(res.reason);
} catch (err) {
console.log(err);
}
......@@ -325,13 +327,15 @@ export default {
};
const res = await checkCode(parasm);
console.log(res);
} catch (error) {
console.log(error);
}
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) {
console.log(error);
}
}
},
......
......@@ -64,7 +64,7 @@
</el-form-item>
<!-- 企业代码 -->
<el-form-item
label="统一社会信用代码(注册码:"
label="统一社会信用代码(注册码:"
prop="code"
>
<el-input v-model.trim="establishForm.code"></el-input>
......@@ -92,6 +92,24 @@
></el-option>
</el-select>
</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>
......@@ -370,7 +388,7 @@ export default {
],
// 数据来源
data_from: [
{ required: true, message: "请选择数据来源", trigger: "blur" }
{ required: true, message: "请选择数据来源", trigger: "change" }
],
/* ****************法人/个体用户身份校验***************** */
// 企业营业执照号
......@@ -400,7 +418,9 @@ export default {
// 经营者/法人姓名
userName: [
{ 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) {
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) {
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