Commit 416c031b by 无尘

fix: 修改审核

parent 4c983343
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-10-21 14:27:29 * @Date: 2019-10-21 14:27:29
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-04 11:29:00 * @LastEditTime: 2020-08-05 17:55:27
--> -->
<!-- <!--
...@@ -69,7 +69,7 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue' ...@@ -69,7 +69,7 @@ import reviewResultDetail from '@/components/review/review-result-detail.vue'
</template> </template>
<script> <script>
import fetch from '@/api/review.js'; import fetch from '@/api/review.js';
const { getAuditDetail} = fetch; const { getAuditDetail } = fetch;
export default { export default {
name: 'review-result-detail', name: 'review-result-detail',
props: { props: {
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-07-21 10:10:57
* @LastEditors: 无尘
* @LastEditTime: 2020-08-05 17:36:31
-->
<!--
授权选择门店绑定弹窗
<select-admin-store v-if="setVisible" :enterpriseId="enterpriseId" :selectMode="selectMode" :bindRange="authForm.bindRange" :shareRange="authForm.shareRange" :bindType="bindType" @closeSet="closeSet"></select-admin-store>
import selectAdminStore from '@/components/company/select-admin-store.vue';
-->
<template>
<div class="store-auth-range">
<div class="common-mask" @click.stop="handleClose"></div>
<div class="bind-body border-box">
<div class="auth-range-title">门店管辖范围</div>
<common-alert-tip :width="'100%'" :tipContent="tipContent"></common-alert-tip>
<div class="el-form-item el-form-item--large">
<label for="name" class="el-form-item__label" style="width: 143px;">
门店绑定授权范围
</label>
<div class="el-form-item__content" style="margin-left: 143px;">
<el-radio v-model="formData.sendRange" label="0" @change="changeRange">所有门店</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="1" @change="changeRange">选择分组</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="2" @change="changeRange">选择门店</el-radio>
<div v-if="(formData.sendRange == '1' || formData.sendRange == '2') && !formData.selectList.length" class="el-form-item__error">请选择绑定门店</div>
<store-auth-group v-if="formData.sendRange == '1'" :companyId="enterpriseId" :storeType="bindType" :selectGroup="selectGroupData" @checkGroupIds="checkGroupIds"></store-auth-group>
<store-auth-store v-if="formData.sendRange == '2'" :companyId="enterpriseId" :storeType="bindType" :selectStore="selectStoreData" @checkStoreIds="checkStoreIds"></store-auth-store>
</div>
</div>
<div class="el-form-item el-form-item--large">
<label for="name" class="el-form-item__label" style="width: 143px;">
门店共享授权范围
</label>
<div class="el-form-item__content" style="margin-left: 143px;">
<el-radio v-model="formData.sendRange" label="0" @change="changeRange">所有门店</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="1" @change="changeRange">选择分组</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="2" @change="changeRange">选择门店</el-radio>
<div v-if="(formData.sendRange == '1' || formData.sendRange == '2') && !formData.selectList.length" class="el-form-item__error">请选择绑定门店</div>
<store-auth-group v-if="formData.sendRange == '1'" :companyId="enterpriseId" :storeType="bindType" :selectGroup="selectGroupData" @checkGroupIds="checkGroupIds"></store-auth-group>
<store-auth-store v-if="formData.sendRange == '2'" :companyId="enterpriseId" :storeType="bindType" :selectStore="selectStoreData" @checkStoreIds="checkStoreIds"></store-auth-store>
</div>
</div>
<div class="el-form-item el-form-item--large">
<label for="name" class="el-form-item__label" style="width: 143px;">
管理员管辖范围
</label>
<div class="el-form-item__content" style="margin-left: 143px;">
<el-radio v-model="formData.sendRange" label="0" @change="changeRange">所有门店</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="1" @change="changeRange">选择分组</el-radio>
<el-radio class="m-l-40 m-r-8" v-model="formData.sendRange" label="2" @change="changeRange">选择门店</el-radio>
<div v-if="(formData.sendRange == '1' || formData.sendRange == '2') && !formData.selectList.length" class="el-form-item__error">请选择绑定门店</div>
<store-auth-group v-if="formData.sendRange == '1'" :companyId="enterpriseId" :storeType="bindType" :selectGroup="selectGroupData" @checkGroupIds="checkGroupIds"></store-auth-group>
<store-auth-store v-if="formData.sendRange == '2'" :companyId="enterpriseId" :storeType="bindType" :selectStore="selectStoreData" @checkStoreIds="checkStoreIds"></store-auth-store>
</div>
</div>
<div class="el-form-item el-form-item--large">
<div class="el-form-item__content" style="margin-left: 143px;">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
/* eslint-disable */
import storeAuthGroup from '@/components/company/store-auth-group.vue';
import storeAuthStore from '@/components/company/store-auth-store.vue';
import commonAlertTip from '@/components/common/common-alert-tip.vue';
import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg';
export default {
props: {
enterpriseId: {
type: String,
default: ''
},
bindType: {
type: [String, Number],
default: '1' // 1 门店绑定, 2 门店共享
},
selectMode: {
type: [String, Number],
default: '0' // 0 全部 1部分分组 2 部分门店
},
rangeData: {
type: [Object, Array],
default () {
return [];
}
}
},
data() {
return {
tipContent: '管理范围是根据门店绑定与门店共享选择范围的并集。即选择门店绑定的范围拥有管理权限,门店共享和门店绑定范围的并集拥有查看权限',
setVisible: true,
formData: {
sendRange: '0',
selectList: []
},
selectGroupData: [],// 选择的分组数据
selectStoreData: [] // 选择的门店数据
};
},
computed: {},
watch: {
searchSelect(val) {
this.$refs.groupTree.filter(val);
},
selectMode(val) {
const that = this;
that.formData.sendRange = String(val);
},
rangeData(val) {
const that = this;
that.selectGroupData = that.selectMode == 1 ? JSON.parse(JSON.stringify(val)) : [];
that.selectStoreData = that.selectMode == 2 ? JSON.parse(JSON.stringify(val)) : [];
that.selectList = JSON.parse(JSON.stringify(val)) || [];
}
},
methods: {
/**
* 改变选择范围
*/
changeRange(e) {
const that = this;
that.formData.sendRange = e;
that.formData.selectList = [];
},
/**
* 关闭弹窗
*/
handleClose() {
const that = this;
that.$emit('closeSet', 'close');
that.selectGroupData = [];
that.selectStoreData = [];
},
cancel() {
const that = this;
that.$emit('closeSet', 'close');
that.selectGroupData = [];
that.selectStoreData = [];
},
filterNode(value, data) {
if (!value || !data.label) return true;
return data.label.indexOf(value) !== -1;
},
/**
* 输入
*/
toInput: _debounce(function(e, value) {
const that = this;
if (!that.groupDataCopy.length) {
return false;
}
}, 200),
/**
* 清空
*/
clearSearch() {
const that = this;
that.groupData = JSON.parse(JSON.stringify(that.groupDataCopy));
},
/**
* 每次选择分组
*/
checkGroupIds: function(nodes) {
const that = this;
console.log(nodes);
// that.selectGroupData = JSON.parse(JSON.stringify(nodes));
that.formData.selectList = JSON.parse(JSON.stringify(nodes));
},
/**
* 每次选择门店
*/
checkStoreIds: function(nodes) {
const that = this;
// that.selectStoreData = JSON.parse(JSON.stringify(nodes));
that.formData.selectList = JSON.parse(JSON.stringify(nodes));
},
/**
* 确定
*/
submitForm() {
const that = this;
if (that.formData.sendRange == '1' && !that.formData.selectList.length) {
return false;
}
if (that.formData.sendRange == '2' && !that.formData.selectList.length) {
return false;
}
that.$emit('closeSet', String(that.formData.sendRange), that.formData.selectList);
}
},
components: {
storeAuthGroup,
storeAuthStore,
commonAlertTip
},
mounted() {
const that = this;
that.formData.sendRange = String(that.selectMode);
that.selectGroupData = that.selectMode == 1 ? JSON.parse(JSON.stringify(that.rangeData)) : [];
that.selectStoreData = that.selectMode == 2 ? JSON.parse(JSON.stringify(that.rangeData)) : [];
that.formData.selectList = JSON.parse(JSON.stringify(that.rangeData)) || [];
}
};
</script>
<style lang="less" scoped>
.common-mask {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
opacity: .5;
background: #000;
z-index: 1000;
}
.bind-body {
width: 604px;
padding: 20px;
position: fixed;
z-index: 5000;
top: 0;
bottom: 0;
right: 0;
overflow-y: auto;
background: #fff;
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-05 14:52:20 * @LastEditTime: 2020-08-05 17:50:18
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<div class="right-content"> <div class="right-content">
<div class="apps-content-right border-box"> <div class="apps-content-right border-box">
<el-form :model="adminForm" :rules="rules" ref="adminForm" label-width="100px" > <el-form :model="adminForm" :rules="rules" ref="adminForm" label-width="100px" >
<el-form-item label="活动名称" prop="adminList"> <el-form-item label="管理员" prop="adminList">
<div v-if="$route.query.staffId">{{ adminName || '--'}}</div> <div v-if="$route.query.staffId">{{ adminName || '--'}}</div>
<div v-if="!$route.query.staffId" class="admin-list-wrap"> <div v-if="!$route.query.staffId" class="admin-list-wrap">
<div class="el-select store-item-content admin-select" @click="showAdmin"> <div class="el-select store-item-content admin-select" @click="showAdmin">
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="活动区域" prop="enterpriseList"> <el-form-item label="资源范围" prop="enterpriseList">
<el-table ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width: 100%"> <el-table ref="multipleTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width: 100%">
<el-table-column label="商户名称" width="150"> <el-table-column label="商户名称" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
</div> </div>
<select-admin v-if="showAdminFlag" :selectAdmin="adminForm.adminList" @checkAdmins="checkAdmins"></select-admin> <select-admin v-if="showAdminFlag" :selectAdmin="adminForm.adminList" @checkAdmins="checkAdmins"></select-admin>
<select-admin-store :enterpriseId="enterpriseId" @closeSet="closeSet"></select-admin-store>
<!-- <vue-gic-footer></vue-gic-footer> --> <!-- <vue-gic-footer></vue-gic-footer> -->
</div> </div>
...@@ -71,6 +72,7 @@ ...@@ -71,6 +72,7 @@
<script> <script>
import navCrumb from '@/components/nav/nav.vue'; import navCrumb from '@/components/nav/nav.vue';
import selectAdmin from '@/components/set/select-admin.vue'; import selectAdmin from '@/components/set/select-admin.vue';
import selectAdminStore from '@/components/set/select-admin-store.vue';
import fetch from '@/api/merchantAuth.js'; import fetch from '@/api/merchantAuth.js';
const { getAuthEnterprise } = fetch; const { getAuthEnterprise } = fetch;
// import { _debounce } from '@/common/js/public'; // import { _debounce } from '@/common/js/public';
...@@ -190,7 +192,8 @@ export default { ...@@ -190,7 +192,8 @@ export default {
}, },
components: { components: {
navCrumb, navCrumb,
selectAdmin selectAdmin,
selectAdminStore
} }
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-08-04 15:09:25 * @LastEditTime: 2020-08-05 18:26:37
--> -->
<template> <template>
<div class="unreview-wrap common-set-wrap"> <div class="unreview-wrap common-set-wrap">
...@@ -146,7 +146,7 @@ import { _debounce } from '@/common/js/public'; ...@@ -146,7 +146,7 @@ import { _debounce } from '@/common/js/public';
import fetch from '@/api/review.js'; import fetch from '@/api/review.js';
import api from '@/api/contact.js'; import api from '@/api/contact.js';
const { getStaffDetail } = api; const { getStaffDetail } = api;
const { getReview, getWxEnterprise, postAudit, postBatchApprove, postRefuse } = fetch; const { getReview, getWxEnterprise, postAudit, postBatchApprove, postRefuse, getAuditDetail } = fetch;
export default { export default {
name: 'unreview', name: 'unreview',
data() { data() {
...@@ -223,7 +223,9 @@ export default { ...@@ -223,7 +223,9 @@ export default {
sex: 1 sex: 1
}, },
dialogVisible: false, dialogVisible: false,
loadBtn: false loadBtn: false,
times: null,
loadingFull: ''
}; };
}, },
computed: {}, computed: {},
...@@ -370,13 +372,46 @@ export default { ...@@ -370,13 +372,46 @@ export default {
that.dialogVisible = false; that.dialogVisible = false;
that.auditIds = ids; that.auditIds = ids;
that.$nextTick(()=> { that.$nextTick(()=> {
that.detailShow = true; window.clearInterval(that.times);
that.times = null;
that.times = window.setInterval(() => {
that.getDetailFlag(that.auditIds)
}, 2000);
that.$once('hook:beforeDestroy', () => {
window.clearInterval(that.times);
that.times = null;
});
}) })
}) })
.catch(function(error) { .catch(function(error) {
that.loadBtn = false; that.loadBtn = false;
}); });
}, },
getDetailFlag() {
const that = this;
let para = {
auditIds: that.auditIds
};
getAuditDetail(para)
.then(res => {
console.log(res.result.auditResult, that.times )
if (res.result.auditResult) {
that.loadingFull.close();
window.clearInterval(that.times);
that.times = null;
that.detailShow = true;
}else {
that.loadingFull = that.$loading({
lock: true,
text: '数据处理中,请稍候查看',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
that.detailShow = false;
}
})
.catch(function(error) {});
},
/** /**
* 取消拒绝 * 取消拒绝
...@@ -514,6 +549,10 @@ export default { ...@@ -514,6 +549,10 @@ export default {
that.getTableList(); that.getTableList();
that.getBrandData(); that.getBrandData();
}, },
beforeDestroy() { //清除定时器
window.clearInterval(this.times);
this.times = null;
},
components: { components: {
storeChange, storeChange,
reviewResultDetail reviewResultDetail
......
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