Commit bbb60936 by 无尘

fix: 修改授权判断

parent c476f867
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-07-21 10:10:57
* @LastEditors: 无尘
* @LastEditTime: 2020-08-10 11:20:20
* @LastEditTime: 2020-08-12 17:57:01
-->
<!--
授权选择门店绑定弹窗
......@@ -128,7 +128,6 @@ export default {
*/
checkGroupIds: function(nodes) {
const that = this;
console.log(nodes);
// that.selectGroupData = JSON.parse(JSON.stringify(nodes));
that.formData.selectList = JSON.parse(JSON.stringify(nodes));
},
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-12 16:09:16
* @LastEditTime: 2020-08-12 17:56:16
-->
<template>
<div class="my-customer-wrap common-set-wrap">
......@@ -27,7 +27,7 @@
</el-form-item>
<el-form-item label="门店绑定" prop="bindRange">
<div class="el-select store-item-content" @click="showStore(1)">
<div v-if="authForm.bindStoreMode != 0" class="el-select__tags">
<div v-if="authForm.bindStoreMode > 0" class="el-select__tags">
<span style="display:block;">
<template v-for="(item, index) in authForm.bindRange">
<span class="el-tag el-tag--info el-tag--small" :key="index+'bind'">
......@@ -42,7 +42,7 @@
</el-form-item>
<el-form-item label="门店共享" prop="shareRange">
<div class="el-select store-item-content" @click="showStore(2)">
<div v-if="authForm.shareStoreMode != 0" class="el-select__tags">
<div v-if="authForm.shareStoreMode > 0" class="el-select__tags">
<span style="display:block; ">
<template v-for="(item, index) in authForm.shareRange">
<span class="el-tag el-tag--info el-tag--small" :key="index+'bind'">
......@@ -299,11 +299,11 @@ export default {
const para = {
enterpriseId: that.authForm.enterpriseId,
wxEnterpriseId: that.wxEnterpriseId,
shareRange: that.authForm.shareStoreMode != 0 ? that.authForm.shareStoreMode == 1 ? that.authForm.shareRange.map(ele=>ele.storeGroupId).join(',') : that.authForm.shareRange.map(ele=>ele.storeInfoId).join(',') : '',
bindRange: that.authForm.bindStoreMode != 0 ? that.authForm.bindStoreMode == 1 ? that.authForm.bindRange.map(ele=>ele.storeGroupId).join(',') : that.authForm.bindRange.map(ele=>ele.storeInfoId).join(',') : '',
shareRange: that.authForm.shareStoreMode > 0 ? that.authForm.shareStoreMode == 1 ? that.authForm.shareRange.map(ele=>ele.storeGroupId).join(',') : that.authForm.shareRange.map(ele=>ele.storeInfoId).join(',') : '',
bindRange: that.authForm.bindStoreMode > 0 ? that.authForm.bindStoreMode == 1 ? that.authForm.bindRange.map(ele=>ele.storeGroupId).join(',') : that.authForm.bindRange.map(ele=>ele.storeInfoId).join(',') : '',
auditReason: that.authForm.auditReason,
shareStoreMode: !that.authForm.shareRange.length && that.authForm.shareStoreMode != 0 ? '' : String(that.authForm.shareStoreMode), // 0 全部 1部分分组 2 部分门店
bindStoreMode: !that.authForm.bindRange.length && that.authForm.bindStoreMode != 0 ? '' : String(that.authForm.bindStoreMode),
shareStoreMode: !that.authForm.shareRange.length && that.authForm.shareStoreMode > 0 ? '' : String(that.authForm.shareStoreMode), // 0 全部 1部分分组 2 部分门店
bindStoreMode: !that.authForm.bindRange.length && that.authForm.bindStoreMode > 0 ? '' : String(that.authForm.bindStoreMode),
auditorName: that.auditorName
}
postEnterpriseAuth(para)
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-11 09:15:08
* @LastEditTime: 2020-08-12 18:11:27
-->
<template>
<div class="my-customer-wrap common-set-wrap">
......@@ -275,7 +275,7 @@ export default {
.then(res => {
if (!!res.result && !!res.result.length) {
res.result.forEach(ele=> {
ele.radio = (ele.bindStoreMode == null || ele.bindStoreMode === '') && (ele.bindRange == '[]' || ele.bindRange == '') ? '2' : '1';
ele.radio = (ele.bindStoreMode == null || ele.bindStoreMode === '') && (ele.bindRange == '[]' || ele.bindRange == '') || ele.bindStoreMode == -1 ? '2' : '1';
if (!!ele.bindRange) {
ele.bindRange = JSON.parse(ele.bindRange);
}else {
......
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