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());
app.use(serve(path.join(__dirname, './public')));
app.listen(config.port, () => {
console.info(
'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 => {
json: true,
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 => {
} else {
request.result.record.sensitiveWord = true; // 是否有查看敏感词权限
}
ctx.body = request;
ctx.body = JSON.stringify(request);
};
// 历史提交审核日志详情页
......@@ -93,6 +93,17 @@ exports.postAudit = async ctx => {
};
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 => {
......
......@@ -11,7 +11,7 @@ exports.get_life_list = async (ctx, next) => {
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) => {
......@@ -23,5 +23,5 @@ exports.get_life_info = async (ctx, next) => {
timeout: 8000,
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) => {
json: true,
body: ctx.request.body
}
ctx.body = await req(ctx, opts)
ctx.body = JSON.stringify(await req(ctx, opts))
}
exports.getAdd_role = async (ctx, next) => {
var url = `${API_INTERNAL_URI}/merchant/authority/add_role`;
......
......@@ -46,7 +46,7 @@ exports.user_list = async (ctx, next) => {
method: "GET",
qs: ctx.request.query,
};
ctx.body = await req(ctx, opts);
ctx.body = JSON.stringify(await req(ctx, opts));
};
exports.user_detail = async (ctx, next) => {
......@@ -56,7 +56,7 @@ exports.user_detail = async (ctx, next) => {
method: "GET",
qs: ctx.request.query,
};
ctx.body = await req(ctx, opts);
ctx.body = JSON.stringify(await req(ctx, opts));
};
exports.user_edit = async (ctx, next) => {
......@@ -67,7 +67,7 @@ exports.user_edit = async (ctx, next) => {
json: true,
body: ctx.request.body,
};
ctx.body = await req(ctx, opts);
ctx.body = JSON.stringify(await req(ctx, opts));
};
exports.user_new = async (ctx, next) => {
......@@ -78,6 +78,6 @@ exports.user_new = async (ctx, next) => {
json: true,
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);
router.post(`${API_VERSION}/audit`, enterprise.postAudit);
router.post(`${API_VERSION}/business`, enterprise.postBusiness)
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)
......
......@@ -13,7 +13,7 @@
<!-- 审核/查看详情页 -->
<el-table
v-if="pageStatus !== 'EDIT'"
v-if="pageStatus !== 'EDIT' && pageStatus !== 'COMPILE'"
border
:data="messageList"
>
......@@ -23,10 +23,10 @@
label="审核状态"
>
<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>
<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>
<!-- 企业ID -->
......@@ -41,6 +41,16 @@
label="企业注册名称"
prop="name"
></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
align="center"
......@@ -53,13 +63,28 @@
label="企业营业执照照片"
>
<template #default="scope">
<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>
<el-popover
placement="bottom"
:width="600"
trigger="click"
>
<template #reference>
<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>
</el-table-column>
<el-table-column
......@@ -72,18 +97,43 @@
label="法人或经营者身份证号"
prop="legal_id_card"
></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
align="center"
label="身份证正面照片"
>
<template #default="scope">
<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>
<el-popover
placement="bottom"
:width="600"
trigger="click"
>
<template #reference>
<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>
</el-table-column>
<el-table-column
......@@ -91,13 +141,29 @@
label="身份证反面照片"
>
<template #default="scope">
<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>
<el-popover
placement="bottom"
:width="600"
trigger="click"
>
<template #reference>
<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>
</el-table-column>
</el-table>
......@@ -106,7 +172,7 @@
<enterprise-form
:dataForm="messageForm"
:enterpriseId="auditId"
v-if="pageStatus === 'EDIT'"
v-if="pageStatus === 'EDIT' || pageStatus === 'COMPILE'"
></enterprise-form>
</el-card>
......@@ -130,7 +196,7 @@
<el-table-column
align="center"
label="提交时间"
prop="audit_time"
prop="submit_time"
></el-table-column>
<el-table-column
align="center"
......@@ -172,15 +238,21 @@
label="审核状态"
>
<template #default="scope">
<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 == 20">通过</span>
<span v-if="scope.row.audit_status == 30">审核不通过</span>
</template>
</el-table-column>
<el-table-column
align="center"
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-card>
......@@ -327,12 +399,9 @@ export default {
try {
const res = await getRecordInfo(params);
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.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);
} catch (error) {
this.$message.error("发生未知错误,请稍后再试一下吧~~~");
......@@ -370,7 +439,7 @@ export default {
return this.$message.error("请填写审核意见");
const res = await postAudit(params);
if (res.code !== 0) return this.$message.error(res.reason);
this.$message.warning("拒绝审核通过成功!");
this.$message.warning("审核拒绝成功!");
this.$router.replace({ name: "Certification" });
}
},
......
......@@ -45,7 +45,7 @@
v-model="enterpriseForm.audit_status"
>
<el-option
v-for="item in enterpriseForm.statusOptions"
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
......@@ -61,7 +61,7 @@
placeholder="请选择提交类型"
>
<el-option
v-for="item in enterpriseForm.typeOptions"
v-for="item in typeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
......@@ -130,7 +130,7 @@
></el-table-column>
<el-table-column
label="提交日期"
prop="audit_time"
prop="submit_time"
align="center"
></el-table-column>
<el-table-column
......@@ -155,7 +155,7 @@
>
<template #default="scope">
<el-button
v-if=" scope.row.audit_status === 10"
v-if="scope.row.audit_status === 10"
size="mini"
type="primary"
:disabled="!permission.get('audit')"
......@@ -163,14 +163,32 @@
>审核</el-button>
<el-button
v-if=" scope.row.audit_status === 30"
:disabled="!permission.get('edit') || scope.row.audit_status !== 30 ? true : false"
v-if="
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"
type="success"
@click="goAuditPage('EDIT', scope.row.enterprise_auth_record_id)"
>修改提交</el-button>
@click="
goAuditPage(
scope.row.audit_status === 5 ? 'COMPILE' : 'EDIT',
scope.row.enterprise_auth_record_id
)
"
>{{
scope.row.audit_status === 5 ? "编辑" : "修改"
}}提交</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"
type="warning"
@click="
......@@ -195,7 +213,7 @@
v-model="detailDialogVisible"
>
<el-input
style="width:50%"
style="width:40%"
placeholder="请输入您收到的验证码"
v-model="checkIsCode"
></el-input>
......@@ -230,18 +248,19 @@ export default {
audit_status: 10,
data_from: 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: [],
......@@ -258,6 +277,8 @@ export default {
},
created () {
const queryForm = window.localStorage.getItem("queryForm");
this.enterpriseForm = queryForm ? JSON.parse(queryForm) : this.enterpriseForm;
this.getEnterpriseList();
console.log(this.$store);
},
......@@ -265,9 +286,10 @@ export default {
computed: {
// 使用示例: permission.get("audit") 获取是否有审核权限
permission () {
const modulePermissions = this.$store.getters.moduleSubPermissions('enterprise') || [];
console.log('Current page func-permissions:', modulePermissions);
return new Map(modulePermissions.map(ele => [ele.name, true]))
const modulePermissions =
this.$store.getters.moduleSubPermissions("enterprise") || [];
console.log("Current page func-permissions:", modulePermissions);
return new Map(modulePermissions.map(ele => [ele.name, true]));
}
},
......@@ -308,6 +330,14 @@ export default {
// 重置表单
resetForm (formName) {
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();
},
......@@ -319,9 +349,10 @@ export default {
// 跳转到审核页面
goAuditPage (pageStatus, auditId) {
if (pageStatus === "EDIT") {
console.log(auditId);
this.auditId = auditId;
return (this.detailDialogVisible = true);
} else if (pageStatus === "COMPILE") {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
} else {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
}
......@@ -365,6 +396,8 @@ export default {
// 查询列表
queryMessage () {
const queryString = JSON.stringify(this.enterpriseForm);
window.localStorage.setItem("queryForm", queryString);
this.getEnterpriseList(); // 加载数据
}
}
......
......@@ -74,4 +74,11 @@ export async function opCommit (params) {
const res = await axios.post(`/api/v1/op_commit`, params);
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 store from "@/store"
import { v1 as uuidv1 } from 'uuid';
import jsonBig from 'json-bigint'
// import { ElMessage } from "element-plus";
// import { APP_URI } from "../config/app.config";
......@@ -98,7 +99,12 @@ instance.interceptors.response.use(
// showClose: true
// });
// }
return data;
try {
return jsonBig.parse(data);
} catch (err) {
console.log('转换失败', err)
return data;
}
},
// function (error) {
// 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