Commit 7d3b8f10 authored by zhangtong5@yidian-inc.com's avatar zhangtong5@yidian-inc.com

update:合并

parents 8443b3d0 6327f134
...@@ -20,7 +20,6 @@ app.use(router.routes(), router.allowedMethods()); ...@@ -20,7 +20,6 @@ app.use(router.routes(), router.allowedMethods());
app.use(serve(path.join(__dirname, './public'))); app.use(serve(path.join(__dirname, './public')));
app.listen(config.port, () => { app.listen(config.port, () => {
console.info( console.info(
'Listening on port %s in %s mode, Open up http://127.0.0.1:%s/ in your browser.', 'Listening on port %s in %s mode, Open up http://127.0.0.1:%s/ in your browser.',
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ exports.auditList = async ctx => { ...@@ -11,7 +11,7 @@ exports.auditList = async ctx => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
}; };
ctx.body = await req(ctx, opts); ctx.body = JSON.stringify(await req(ctx, opts));
}; };
// 企业认证获取验证码 // 企业认证获取验证码
...@@ -67,7 +67,7 @@ exports.getRecordInfo = async ctx => { ...@@ -67,7 +67,7 @@ exports.getRecordInfo = async ctx => {
} else { } else {
request.result.record.sensitiveWord = true; // 是否有查看敏感词权限 request.result.record.sensitiveWord = true; // 是否有查看敏感词权限
} }
ctx.body = request; ctx.body = JSON.stringify(request);
}; };
// 历史提交审核日志详情页 // 历史提交审核日志详情页
...@@ -93,6 +93,17 @@ exports.postAudit = async ctx => { ...@@ -93,6 +93,17 @@ exports.postAudit = async ctx => {
}; };
ctx.body = await req(ctx, opts); ctx.body = await req(ctx, opts);
}; };
// 企业资料修改
exports.opBusinessUpdate = async ctx => {
const url = `${API_INTERNAL_URI}/merchant/inner/op_business_update`;
const opts = {
url,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
}
// 商户上传营业执照信息 // 商户上传营业执照信息
exports.postBusiness = async ctx => { exports.postBusiness = async ctx => {
......
...@@ -11,7 +11,7 @@ exports.get_life_list = async (ctx, next) => { ...@@ -11,7 +11,7 @@ exports.get_life_list = async (ctx, next) => {
qs: ctx.request.query qs: ctx.request.query
} }
ctx.body = await req(ctx, opts) ctx.body = JSON.stringify(await req(ctx, opts))
} }
//生活号详情 //生活号详情
exports.get_life_info = async (ctx, next) => { exports.get_life_info = async (ctx, next) => {
...@@ -23,5 +23,5 @@ exports.get_life_info = async (ctx, next) => { ...@@ -23,5 +23,5 @@ exports.get_life_info = async (ctx, next) => {
timeout: 8000, timeout: 8000,
body: ctx.request.body body: ctx.request.body
} }
ctx.body = await req(ctx, opts) ctx.body = JSON.stringify(await req(ctx, opts))
} }
...@@ -15,7 +15,7 @@ exports.getRole_list = async (ctx, next) => { ...@@ -15,7 +15,7 @@ exports.getRole_list = async (ctx, next) => {
json: true, json: true,
body: ctx.request.body body: ctx.request.body
} }
ctx.body = await req(ctx, opts) ctx.body = JSON.stringify(await req(ctx, opts))
} }
exports.getAdd_role = async (ctx, next) => { exports.getAdd_role = async (ctx, next) => {
var url = `${API_INTERNAL_URI}/merchant/authority/add_role`; var url = `${API_INTERNAL_URI}/merchant/authority/add_role`;
......
...@@ -46,7 +46,7 @@ exports.user_list = async (ctx, next) => { ...@@ -46,7 +46,7 @@ exports.user_list = async (ctx, next) => {
method: "GET", method: "GET",
qs: ctx.request.query, qs: ctx.request.query,
}; };
ctx.body = await req(ctx, opts); ctx.body = JSON.stringify(await req(ctx, opts));
}; };
exports.user_detail = async (ctx, next) => { exports.user_detail = async (ctx, next) => {
...@@ -56,7 +56,7 @@ exports.user_detail = async (ctx, next) => { ...@@ -56,7 +56,7 @@ exports.user_detail = async (ctx, next) => {
method: "GET", method: "GET",
qs: ctx.request.query, qs: ctx.request.query,
}; };
ctx.body = await req(ctx, opts); ctx.body = JSON.stringify(await req(ctx, opts));
}; };
exports.user_edit = async (ctx, next) => { exports.user_edit = async (ctx, next) => {
...@@ -67,7 +67,7 @@ exports.user_edit = async (ctx, next) => { ...@@ -67,7 +67,7 @@ exports.user_edit = async (ctx, next) => {
json: true, json: true,
body: ctx.request.body, body: ctx.request.body,
}; };
ctx.body = await req(ctx, opts); ctx.body = JSON.stringify(await req(ctx, opts));
}; };
exports.user_new = async (ctx, next) => { exports.user_new = async (ctx, next) => {
...@@ -78,6 +78,6 @@ exports.user_new = async (ctx, next) => { ...@@ -78,6 +78,6 @@ exports.user_new = async (ctx, next) => {
json: true, json: true,
body: ctx.request.body, body: ctx.request.body,
}; };
ctx.body = await req(ctx, opts); ctx.body = JSON.stringify(await req(ctx, opts));
}; };
...@@ -34,6 +34,7 @@ router.post(`${API_VERSION}/get_log`, enterprise.getLog); ...@@ -34,6 +34,7 @@ router.post(`${API_VERSION}/get_log`, enterprise.getLog);
router.post(`${API_VERSION}/audit`, enterprise.postAudit); router.post(`${API_VERSION}/audit`, enterprise.postAudit);
router.post(`${API_VERSION}/business`, enterprise.postBusiness) router.post(`${API_VERSION}/business`, enterprise.postBusiness)
router.post(`${API_VERSION}/op_commit`, enterprise.opCommit); router.post(`${API_VERSION}/op_commit`, enterprise.opCommit);
router.post(`${API_VERSION}/op_business_update`, enterprise.opBusinessUpdate);
//生活号 //生活号
router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info) router.post(`${API_VERSION}/merchant/lifeinner/life_info`, life.get_life_info)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- 审核/查看详情页 --> <!-- 审核/查看详情页 -->
<el-table <el-table
v-if="pageStatus !== 'EDIT'" v-if="pageStatus !== 'EDIT' && pageStatus !== 'COMPILE'"
border border
:data="messageList" :data="messageList"
> >
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
label="审核状态" label="审核状态"
> >
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.audit_status === 5">编辑中</span> <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 == 10">审核</span>
<span v-if="scope.row.audit_status === 20">审核成功</span> <span v-if="scope.row.audit_status == 20">审核成功</span>
<span v-if="scope.row.audit_status === 30">审核失败</span> <span v-if="scope.row.audit_status == 30">审核失败</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 企业ID --> <!-- 企业ID -->
...@@ -41,6 +41,16 @@ ...@@ -41,6 +41,16 @@
label="企业注册名称" label="企业注册名称"
prop="name" prop="name"
></el-table-column> ></el-table-column>
<!-- 商户类型 -->
<el-table-column
align="center"
label="商户类型"
>
<template #default="scope">
<span v-if="scope.row.data_type === 1">个体工商户</span>
<span v-if="scope.row.data_type === 2">普通企业</span>
</template>
</el-table-column>
<!-- 注册码 --> <!-- 注册码 -->
<el-table-column <el-table-column
align="center" align="center"
...@@ -53,13 +63,28 @@ ...@@ -53,13 +63,28 @@
label="企业营业执照照片" label="企业营业执照照片"
> >
<template #default="scope"> <template #default="scope">
<el-image <el-popover
v-if="scope.row.sensitiveWord && scope.row.entterprise_image" placement="bottom"
fit="fill" :width="600"
:src="scope.row.entterprise_image" trigger="click"
></el-image> >
<span v-else-if="scope.row.sensitiveWord && !scope.row.entterprise_image"></span> <template #reference>
<span v-else>无权限</span> <el-image
v-if="scope.row.sensitiveWord && scope.row.entterprise_image"
fit="fill"
:src="scope.row.entterprise_image"
></el-image>
<span v-else-if="
scope.row.sensitiveWord && !scope.row.entterprise_image
"></span>
<span v-else>无权限</span>
</template>
<el-image
fit="fill"
style="width:100%;height:100%"
:src="scope.row.entterprise_image"
></el-image>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -72,18 +97,43 @@ ...@@ -72,18 +97,43 @@
label="法人或经营者身份证号" label="法人或经营者身份证号"
prop="legal_id_card" prop="legal_id_card"
></el-table-column> ></el-table-column>
<el-table-column
align="center"
label="法人手机号"
prop="mobile"
>
<template #default="scope">
<span v-if="scope.row.mobile">{{ scope.row.mobile }}</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="身份证正面照片" label="身份证正面照片"
> >
<template #default="scope"> <template #default="scope">
<el-image <el-popover
v-if="scope.row.sensitiveWord && scope.row.legal_front_id_card" placement="bottom"
:src="scope.row.legal_front_id_card" :width="600"
fit="fill" trigger="click"
></el-image> >
<span v-else-if="scope.row.sensitiveWord && !scope.row.legal_front_id_card"></span> <template #reference>
<span v-else>无权限</span> <el-image
v-if="scope.row.sensitiveWord && scope.row.legal_front_id_card"
:src="scope.row.legal_front_id_card"
fit="fill"
></el-image>
<span v-else-if="
scope.row.sensitiveWord && !scope.row.legal_front_id_card
"></span>
<span v-else>无权限</span>
</template>
<el-image
fit="fill"
style="width:100%;height:100%"
:src="scope.row.legal_front_id_card"
></el-image>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -91,13 +141,29 @@ ...@@ -91,13 +141,29 @@
label="身份证反面照片" label="身份证反面照片"
> >
<template #default="scope"> <template #default="scope">
<el-image <el-popover
v-if="scope.row.sensitiveWord && scope.row.legal_back_id_card" placement="bottom"
fit="fill" :width="600"
:src="scope.row.legal_back_id_card" trigger="click"
></el-image> >
<span v-else-if="scope.row.sensitiveWord && !scope.row.legal_back_id_card"></span> <template #reference>
<span v-else>无权限</span> <el-image
v-if="scope.row.sensitiveWord && scope.row.legal_back_id_card"
fit="fill"
:src="scope.row.legal_back_id_card"
></el-image>
<span v-else-if="
scope.row.sensitiveWord && !scope.row.legal_back_id_card
"></span>
<span v-else>无权限</span>
</template>
<el-image
fit="fill"
style="width:100%;height:100%"
:src="scope.row.legal_back_id_card"
></el-image>
</el-popover>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -106,7 +172,7 @@ ...@@ -106,7 +172,7 @@
<enterprise-form <enterprise-form
:dataForm="messageForm" :dataForm="messageForm"
:enterpriseId="auditId" :enterpriseId="auditId"
v-if="pageStatus === 'EDIT'" v-if="pageStatus === 'EDIT' || pageStatus === 'COMPILE'"
></enterprise-form> ></enterprise-form>
</el-card> </el-card>
...@@ -130,7 +196,7 @@ ...@@ -130,7 +196,7 @@
<el-table-column <el-table-column
align="center" align="center"
label="提交时间" label="提交时间"
prop="audit_time" prop="submit_time"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
align="center" align="center"
...@@ -172,15 +238,21 @@ ...@@ -172,15 +238,21 @@
label="审核状态" label="审核状态"
> >
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.audit_status === 20">通过</span> <span v-if="scope.row.audit_status == 20">通过</span>
<span v-if="scope.row.audit_status === 30">审核不通过</span> <span v-if="scope.row.audit_status == 30">审核不通过</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="审核意见" label="审核意见"
prop="audit_opinion" >
></el-table-column> <template #default="scope">
<span v-if="scope.row.audit_opinion.length !== 0">{{
scope.row.audit_opinion
}}</span>
<span v-else></span>
</template>
</el-table-column>
</el-table> </el-table>
</el-card> </el-card>
...@@ -327,12 +399,9 @@ export default { ...@@ -327,12 +399,9 @@ export default {
try { try {
const res = await getRecordInfo(params); const res = await getRecordInfo(params);
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
this.messageForm = res.result.record; this.messageForm = res.result;
this.messageList.push(res.result.record); this.messageList.push(res.result.record);
this.lifeList.push(res.result.life); this.lifeList.push(res.result.life);
console.log("messageForm=1-2=310=-203", this.messageForm);
console.log("lifeLIST======", this.lifeList);
console.log("messageList", this.messageList);
console.log(res); console.log(res);
} catch (error) { } catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~"); this.$message.error("发生未知错误,请稍后再试一下吧~~~");
...@@ -370,7 +439,7 @@ export default { ...@@ -370,7 +439,7 @@ export default {
return this.$message.error("请填写审核意见"); return this.$message.error("请填写审核意见");
const res = await postAudit(params); const res = await postAudit(params);
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
this.$message.warning("拒绝审核通过成功!"); this.$message.warning("审核拒绝成功!");
this.$router.replace({ name: "Certification" }); this.$router.replace({ name: "Certification" });
} }
}, },
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
v-model="enterpriseForm.audit_status" v-model="enterpriseForm.audit_status"
> >
<el-option <el-option
v-for="item in enterpriseForm.statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
placeholder="请选择提交类型" placeholder="请选择提交类型"
> >
<el-option <el-option
v-for="item in enterpriseForm.typeOptions" v-for="item in typeOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="提交日期" label="提交日期"
prop="audit_time" prop="submit_time"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
> >
<template #default="scope"> <template #default="scope">
<el-button <el-button
v-if=" scope.row.audit_status === 10" v-if="scope.row.audit_status === 10"
size="mini" size="mini"
type="primary" type="primary"
:disabled="!permission.get('audit')" :disabled="!permission.get('audit')"
...@@ -163,14 +163,32 @@ ...@@ -163,14 +163,32 @@
>审核</el-button> >审核</el-button>
<el-button <el-button
v-if=" scope.row.audit_status === 30" v-if="
:disabled="!permission.get('edit') || scope.row.audit_status !== 30 ? true : false" scope.row.audit_status === 30 || scope.row.audit_status === 5
"
:disabled="
!permission.get('edit') &&
scope.row.audit_status !== 30 &&
scope.row.audit_status !== 5
"
size="mini" size="mini"
type="success" type="success"
@click="goAuditPage('EDIT', scope.row.enterprise_auth_record_id)" @click="
>修改提交</el-button> goAuditPage(
scope.row.audit_status === 5 ? 'COMPILE' : 'EDIT',
scope.row.enterprise_auth_record_id
)
"
>{{
scope.row.audit_status === 5 ? "编辑" : "修改"
}}提交</el-button>
<el-button <el-button
v-if=" scope.row.audit_status === 10 || scope.row.audit_status === 20 || scope.row.audit_status === 30 || scope.row.audit_status === 5" v-if="
scope.row.audit_status === 10 ||
scope.row.audit_status === 20 ||
scope.row.audit_status === 30 ||
scope.row.audit_status === 5
"
size="mini" size="mini"
type="warning" type="warning"
@click=" @click="
...@@ -195,7 +213,7 @@ ...@@ -195,7 +213,7 @@
v-model="detailDialogVisible" v-model="detailDialogVisible"
> >
<el-input <el-input
style="width:50%" style="width:40%"
placeholder="请输入您收到的验证码" placeholder="请输入您收到的验证码"
v-model="checkIsCode" v-model="checkIsCode"
></el-input> ></el-input>
...@@ -230,18 +248,19 @@ export default { ...@@ -230,18 +248,19 @@ export default {
audit_status: 10, audit_status: 10,
data_from: null, data_from: null,
proxy_user_name: null, proxy_user_name: null,
statusOptions: [
{ value: 5, label: "编辑中" },
{ value: 10, label: "待审核" },
{ value: 20, label: "审核成功" },
{ value: 30, label: "审核失败" }
],
typeOptions: [
{ value: 1, label: "生活圈c端" },
{ value: 2, label: "销售端b端" },
{ value: 3, label: "内部代提交" }
]
}, },
statusOptions: [
{ value: "", label: "全部" },
{ value: 5, label: "编辑中" },
{ value: 10, label: "待审核" },
{ value: 20, label: "审核成功" },
{ value: 30, label: "审核失败" }
],
typeOptions: [
{ value: 1, label: "生活圈c端" },
{ value: 2, label: "销售端b端" },
{ value: 3, label: "内部代提交" }
],
// 企业认证管理列表 // 企业认证管理列表
enterpriseList: [], enterpriseList: [],
...@@ -258,6 +277,8 @@ export default { ...@@ -258,6 +277,8 @@ export default {
}, },
created () { created () {
const queryForm = window.localStorage.getItem("queryForm");
this.enterpriseForm = queryForm ? JSON.parse(queryForm) : this.enterpriseForm;
this.getEnterpriseList(); this.getEnterpriseList();
console.log(this.$store); console.log(this.$store);
}, },
...@@ -265,9 +286,10 @@ export default { ...@@ -265,9 +286,10 @@ export default {
computed: { computed: {
// 使用示例: permission.get("audit") 获取是否有审核权限 // 使用示例: permission.get("audit") 获取是否有审核权限
permission () { permission () {
const modulePermissions = this.$store.getters.moduleSubPermissions('enterprise') || []; const modulePermissions =
console.log('Current page func-permissions:', modulePermissions); this.$store.getters.moduleSubPermissions("enterprise") || [];
return new Map(modulePermissions.map(ele => [ele.name, true])) console.log("Current page func-permissions:", modulePermissions);
return new Map(modulePermissions.map(ele => [ele.name, true]));
} }
}, },
...@@ -308,6 +330,14 @@ export default { ...@@ -308,6 +330,14 @@ export default {
// 重置表单 // 重置表单
resetForm (formName) { resetForm (formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.enterpriseForm.audit_status = "";
this.enterpriseForm.name = "";
this.enterpriseForm.code = "";
this.enterpriseForm.legal_person = "";
this.enterpriseForm.audit_status = "";
this.enterpriseForm.data_from = null;
this.enterpriseForm.proxy_user_name = null;
window.localStorage.removeItem("queryForm");
this.getEnterpriseList(); this.getEnterpriseList();
}, },
...@@ -319,9 +349,10 @@ export default { ...@@ -319,9 +349,10 @@ export default {
// 跳转到审核页面 // 跳转到审核页面
goAuditPage (pageStatus, auditId) { goAuditPage (pageStatus, auditId) {
if (pageStatus === "EDIT") { if (pageStatus === "EDIT") {
console.log(auditId);
this.auditId = auditId; this.auditId = auditId;
return (this.detailDialogVisible = true); return (this.detailDialogVisible = true);
} else if (pageStatus === "COMPILE") {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
} else { } else {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } }); this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
} }
...@@ -365,6 +396,8 @@ export default { ...@@ -365,6 +396,8 @@ export default {
// 查询列表 // 查询列表
queryMessage () { queryMessage () {
const queryString = JSON.stringify(this.enterpriseForm);
window.localStorage.setItem("queryForm", queryString);
this.getEnterpriseList(); // 加载数据 this.getEnterpriseList(); // 加载数据
} }
} }
......
...@@ -74,4 +74,11 @@ export async function opCommit (params) { ...@@ -74,4 +74,11 @@ export async function opCommit (params) {
const res = await axios.post(`/api/v1/op_commit`, params); const res = await axios.post(`/api/v1/op_commit`, params);
return res; return res;
} }
/**
* 414-3商户后台营业执照更新(op后台)
* @param params 修改企业信息
*/
export async function opBusinessUpdate (params) {
const res = await axios.post(`/api/v1/op_business_update`, params);
return res;
}
import axios from "axios"; import axios from "axios";
import store from "@/store" import store from "@/store"
import { v1 as uuidv1 } from 'uuid'; import { v1 as uuidv1 } from 'uuid';
import jsonBig from 'json-bigint'
// import { ElMessage } from "element-plus"; // import { ElMessage } from "element-plus";
// import { APP_URI } from "../config/app.config"; // import { APP_URI } from "../config/app.config";
...@@ -98,7 +99,12 @@ instance.interceptors.response.use( ...@@ -98,7 +99,12 @@ instance.interceptors.response.use(
// showClose: true // showClose: true
// }); // });
// } // }
return data; try {
return jsonBig.parse(data);
} catch (err) {
console.log('转换失败', err)
return data;
}
}, },
// function (error) { // function (error) {
// if (!(error.code && error.code === -1)) error.message = "接口请求错误"; // if (!(error.code && error.code === -1)) error.message = "接口请求错误";
......
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