Commit 4849f7a2 authored by mengwenhao's avatar mengwenhao

fix:部分显示补全修改,编辑提交功能增加

parent ffcd9670
...@@ -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 => {
......
...@@ -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 -->
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,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>
...@@ -192,15 +192,19 @@ ...@@ -192,15 +192,19 @@
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>
......
...@@ -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,28 @@ ...@@ -163,14 +163,28 @@
>审核</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="goAuditPage(scope.row.audit_status=== 5 ? 'COMPILE' : 'EDIT',
>修改提交</el-button> 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 +209,7 @@ ...@@ -195,7 +209,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>
...@@ -266,9 +280,10 @@ export default { ...@@ -266,9 +280,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]));
} }
}, },
...@@ -321,10 +336,12 @@ export default { ...@@ -321,10 +336,12 @@ 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 { } else if (pageStatus === "COMPILE") {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
}
else {
this.$router.push({ name: "Audit", params: { pageStatus, auditId } }); this.$router.push({ name: "Audit", params: { pageStatus, auditId } });
} }
}, },
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</style> </style>
<script> <script>
import { postBusiness, opCommit } from "@/service/enterprise"; import { postBusiness, opCommit, opBusinessUpdate } from "@/service/enterprise";
import { API_INTERNAL_URI } from "../../../../server/config"; import { API_INTERNAL_URI } from "../../../../server/config";
export default { export default {
props: { props: {
...@@ -326,8 +326,12 @@ export default { ...@@ -326,8 +326,12 @@ export default {
this.establishForm.userName = val.legal_person; this.establishForm.userName = val.legal_person;
this.establishForm.legal_mobile = val.legal_mobile; this.establishForm.legal_mobile = val.legal_mobile;
this.establishForm.mobile = val.mobile; this.establishForm.mobile = val.mobile;
this.establishForm.legal_mobile = val.legal_mobile;
this.establishForm.user_id = val.user_id; this.establishForm.user_id = val.user_id;
this.establishForm.sensitiveWord = val.sensitiveWord; this.establishForm.sensitiveWord = val.sensitiveWord;
this.establishForm.entterpriseImage = val.entterprise_image;
this.establishForm.frontImg = val.legal_front_id_card;
this.establishForm.bakImg = val.legal_back_id_card;
} }
}, },
...@@ -378,21 +382,47 @@ export default { ...@@ -378,21 +382,47 @@ export default {
user_id user_id
} = this.establishForm; } = this.establishForm;
/** /**
* 第一步 企业信息提交 * 第一步 企业信息提交(修改)
* @param enterpriseQuery * @param enterpriseQuery
*/ */
// 1.设置提交参数 console.log("是否为修改的ID", this.enterpriseId);
// 提交
if (!this.enterpriseId) {
const enterpriseQuery = { const enterpriseQuery = {
code, code,
name, name,
entterprise_image, entterprise_image,
data_from: 3, data_from: 3,
data_type, data_type,
mobile mobile,
proxy_user_name: this.$store.state.userInfo.email
}; };
const res = await postBusiness(enterpriseQuery); const res = await postBusiness(enterpriseQuery);
if (res.code !== 0) return this.$message.error(res.reason); if (res.code !== 0) return this.$message.error(res.reason);
this.establishForm.enterprise_id = res.result.enterprise_auth_record_id; this.establishForm.enterprise_id = res.result.enterprise_auth_record_id;
}
// 修改
else {
const {
code,
name,
entterprise_image,
data_type,
mobile
} = this.establishForm;
const editQuery = {
record_id: this.enterpriseId,
code,
name,
entterprise_image,
data_type,
data_from: 3,
mobile
};
const res = await opBusinessUpdate(editQuery);
console.log(res);
if (res.code !== 0) return this.$message.error(res.reason);
}
/** /**
* 第二步 法人(经营者信息提交) * 第二步 法人(经营者信息提交)
*/ */
...@@ -408,7 +438,6 @@ export default { ...@@ -408,7 +438,6 @@ export default {
idcard_number, idcard_number,
name: userName, name: userName,
legal_mobile, legal_mobile,
mobile,
data_type, data_type,
user_id: user_id ? parseInt(user_id) : "" user_id: user_id ? parseInt(user_id) : ""
}; };
......
...@@ -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;
}
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