Commit 4849f7a2 authored by mengwenhao's avatar mengwenhao

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

parent ffcd9670
......@@ -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 => {
......
......@@ -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 -->
......@@ -126,7 +126,7 @@
<enterprise-form
:dataForm="messageForm"
:enterpriseId="auditId"
v-if="pageStatus === 'EDIT'"
v-if="pageStatus === 'EDIT' || pageStatus === 'COMPILE'"
></enterprise-form>
</el-card>
......@@ -192,15 +192,19 @@
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>
......
......@@ -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,28 @@
>审核</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 +209,7 @@
v-model="detailDialogVisible"
>
<el-input
style="width:50%"
style="width:40%"
placeholder="请输入您收到的验证码"
v-model="checkIsCode"
></el-input>
......@@ -266,9 +280,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]));
}
},
......@@ -321,10 +336,12 @@ export default {
// 跳转到审核页面
goAuditPage (pageStatus, auditId) {
if (pageStatus === "EDIT") {
console.log(auditId);
this.auditId = auditId;
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 } });
}
},
......
......@@ -172,7 +172,7 @@
</style>
<script>
import { postBusiness, opCommit } from "@/service/enterprise";
import { postBusiness, opCommit, opBusinessUpdate } from "@/service/enterprise";
import { API_INTERNAL_URI } from "../../../../server/config";
export default {
props: {
......@@ -326,8 +326,12 @@ export default {
this.establishForm.userName = val.legal_person;
this.establishForm.legal_mobile = val.legal_mobile;
this.establishForm.mobile = val.mobile;
this.establishForm.legal_mobile = val.legal_mobile;
this.establishForm.user_id = val.user_id;
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 {
user_id
} = this.establishForm;
/**
* 第一步 企业信息提交
* 第一步 企业信息提交(修改)
* @param enterpriseQuery
*/
// 1.设置提交参数
const enterpriseQuery = {
code,
name,
entterprise_image,
data_from: 3,
data_type,
mobile
};
const res = await postBusiness(enterpriseQuery);
if (res.code !== 0) return this.$message.error(res.reason);
this.establishForm.enterprise_id = res.result.enterprise_auth_record_id;
console.log("是否为修改的ID", this.enterpriseId);
// 提交
if (!this.enterpriseId) {
const enterpriseQuery = {
code,
name,
entterprise_image,
data_from: 3,
data_type,
mobile,
proxy_user_name: this.$store.state.userInfo.email
};
const res = await postBusiness(enterpriseQuery);
if (res.code !== 0) return this.$message.error(res.reason);
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 {
idcard_number,
name: userName,
legal_mobile,
mobile,
data_type,
user_id: user_id ? parseInt(user_id) : ""
};
......
......@@ -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;
}
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