Commit 90985541 by caoyanzhi

feat: 审核中心-审核设置

parent be2cb52c
......@@ -50,6 +50,8 @@ let api = {
addAuditItem: '/auditGroup/add-audit-item', // 添加审核事项
editAuditItem: '/auditGroup/edit-audit-item', // 编辑审核事项
auditItemDetail: '/auditGroup/audit-item-detail', // 审核事项详情
findAuditSetting: '/audit/find-audit-setting', // 审核设置-查看
saveAuditSetting: '/audit/save-audit-setting', // 审核设置-保存
};
api = getFetch(api, '/hb-manage-web');
......
......@@ -101,6 +101,11 @@ export const routes = [
meta: { title: '新建、编辑审核事项' },
component: _import('review-center', 'create-audit-item')
},
{
path: '/audit-config',
meta: { title: '审核设置' },
component: _import('review-center', 'audit-config')
}
]
},
{
......
<template>
<div class="audit-config">
<h3 class="audit-config-title">需要进行审核的事项</h3>
<div class="audit-config-content">
<el-switch :value="clerkAddFlag == 1" v-loading="loading" @change="saveAuditConfig"></el-switch>
<div class="audit-config-desc">
<p class="desc-content">导购账号新增</p>
<p class="desc-tip">门店角色添加导购账号,需要经过管理员审批同意后才能新增成功,管理员新增导购无需审核</p>
</div>
</div>
</div>
</template>
<script>
import fetch from '@/api/review';
const { findAuditSetting, saveAuditSetting } = fetch;
export default {
name: 'AuditConfig',
data() {
return {
wxEnterpriseId: '',
clerkAddFlag: 1, // 1,开启,0关闭
loading: false,
};
},
created() {
const haobanUser = JSON.parse(localStorage.getItem('haoBanUser') || '{}');
this.wxEnterpriseId = haobanUser.wxEnterpriseId;
this.getAuditConfig();
},
methods: {
getAuditConfig() {
findAuditSetting({ wxEnterpriseId: this.wxEnterpriseId }).then(res => {
const { clerkAddFlag } = res.result || {};
this.clerkAddFlag = clerkAddFlag;
});
},
saveAuditConfig(flag) {
const params = {
clerkAddFlag: Number(flag),
wxEnterpriseId: this.wxEnterpriseId
};
this.loading = true;
saveAuditSetting(params).then(res => {
this.$message.success('保存成功!');
this.getAuditConfig();
}).finally(() => this.loading = false);
}
}
};
</script>
<style lang="less" scoped>
.audit-config {
padding: 30px;
min-height: 100%;
background-color: #fff;
.audit-config-title {
margin-bottom: 20px;
font-size: 14px;
font-weight: 700;
color: @gray01;
line-height: 20px;
}
.audit-config-content {
display: flex;
justify-content: flex-start;
align-items: flex-start;
.audit-config-desc {
margin-left: 17px;
}
.desc-content {
font-size: 14px;
font-weight: 400;
color: @gray02;
line-height: 20px;
}
.desc-tip {
font-size: 12px;
font-weight: 400;
color: @gray03;
line-height: 22px;
}
}
}
</style>
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