Commit e61f9827 by 无尘

fix: 修改标签人群开关

parent 59117a86
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 09:29:13 * @Date: 2020-08-27 09:29:13
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:56:32 * @LastEditTime: 2020-09-09 10:41:04
*/ */
import getFetch from './get-fetch.js'; import getFetch from './get-fetch.js';
...@@ -91,6 +91,7 @@ let api = { ...@@ -91,6 +91,7 @@ let api = {
}, },
// 导购标签 // 导购标签
getTagClassify: '/tag-category-list', // 获取导购标签分类 getTagClassify: '/tag-category-list', // 获取导购标签分类
getTagLicense: '/member-tag-license', // 获取标签license
addClassify: { addClassify: {
// 新增分类 // 新增分类
url: '/tag-category-add', url: '/tag-category-add',
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 10:31:09 * @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 10:06:07 * @LastEditTime: 2020-09-09 11:09:15
--> -->
<!-- <!--
<sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog> <sync-crowd-dialog :brand-id="brandId" :select-ids="selectIds" :total-num="totalNum" @refreshData="refreshData"></sync-crowd-dialog>
...@@ -310,4 +310,15 @@ export default { ...@@ -310,4 +310,15 @@ export default {
.dialog-footer { .dialog-footer {
margin-top: -20px; margin-top: -20px;
} }
.el-table {
.cell {
&.el-tooltip {
div {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
</style> </style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 16:51:22 * @Date: 2020-08-28 16:51:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 10:09:42 * @LastEditTime: 2020-09-09 10:58:20
--> -->
<template> <template>
...@@ -20,7 +20,15 @@ ...@@ -20,7 +20,15 @@
<div class="clerk-tag-search"> <div class="clerk-tag-search">
<div class="flex flex-space-between"> <div class="flex flex-space-between">
<div><el-input placeholder="请输入标签名称" maxlength="50" v-model="searchVal" style="width: 298px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, searchVal)" clearable @clear="clearInput"></el-input></div> <div><el-input placeholder="请输入标签名称" maxlength="50" v-model="searchVal" style="width: 298px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value, searchVal)" clearable @clear="clearInput"></el-input></div>
<div><el-button type="primary" @click="toAddTag">新建标签</el-button></div> <div>
<el-tooltip class="item" effect="dark" placement="top-start">
<div slot="content">
<span v-if="licenseData.count < licenseData.limit">当前标签数量/购买license:{{licenseData.count}}/{{licenseData.limit}}</span>
<span v-else>当前标签数量已达license,请先删除不使用的标签或扩容license</span>
</div>
<el-button :disabled="licenseData.count >= licenseData.limit" type="primary" @click="toAddTag">新建标签</el-button>
</el-tooltip>
</div>
</div> </div>
</div> </div>
<div class="m-t-20"> <div class="m-t-20">
...@@ -30,9 +38,9 @@ ...@@ -30,9 +38,9 @@
v-loading="loading" v-loading="loading"
ref="tagsData" ref="tagsData"
style="width: 100%"> style="width: 100%">
<el-table-column prop="" label="" width="56" class-name="move-row-cell"> <el-table-column v-if="currentClassify == ''" prop="" label="" width="56" class-name="move-row-cell">
<template> <template>
<span v-if="currentClassify == ''" class="font-22 iconfont icontuozhuaiopen color-c0c4cc" style="cursor: move;"></span> <span class="font-22 iconfont icontuozhuaiopen color-c0c4cc" style="cursor: move;"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -66,7 +74,7 @@ import tagClassifyDialog from '@/components/app/my-customer/tag-classify-dialog. ...@@ -66,7 +74,7 @@ import tagClassifyDialog from '@/components/app/my-customer/tag-classify-dialog.
import editTagDialog from '@/components/app/my-customer/edit-tag-dialog.vue'; import editTagDialog from '@/components/app/my-customer/edit-tag-dialog.vue';
import editVisiable from '@/components/app/my-customer/edit-visiable.vue'; import editVisiable from '@/components/app/my-customer/edit-visiable.vue';
import fetch from '@/api/my-customer-app.js'; import fetch from '@/api/my-customer-app.js';
const { getTagClassify, getClerkTag, getTagDetail, getTagVisiable, sortClerkTag, delClerkTag } = fetch; const { getTagClassify, getClerkTag, getTagLicense, getTagDetail, getTagVisiable, sortClerkTag, delClerkTag } = fetch;
import { _debounce } from '@/common/js/public.js'; import { _debounce } from '@/common/js/public.js';
import showMsg from '@/common/js/showmsg.js'; import showMsg from '@/common/js/showmsg.js';
import Sortable from 'sortablejs'; import Sortable from 'sortablejs';
...@@ -95,6 +103,10 @@ export default { ...@@ -95,6 +103,10 @@ export default {
loading: false, loading: false,
showTagCate: false, // 分类 showTagCate: false, // 分类
editRow: {}, editRow: {},
licenseData: {
limit: 0, // 总数
count: 0, // 使用数
},
// 可见范围 // 可见范围
showTagVisiable: false, // 可见范围 showTagVisiable: false, // 可见范围
selectMode: '', selectMode: '',
...@@ -114,6 +126,25 @@ export default { ...@@ -114,6 +126,25 @@ export default {
// methods // methods
methods: { methods: {
/** /**
* @description: 获取标签 license
* @author: 无尘
*/
getTagLicenseData() {
const that = this;
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId
};
getTagLicense(para)
.then(res => {
that.licenseData.limit = res.result.limit || 0;
that.licenseData.count = res.result.count || 0;
})
.catch(function(error) {
});
},
/**
* @description: 刷新标签数据 * @description: 刷新标签数据
* @author: 无尘 * @author: 无尘
*/ */
...@@ -215,6 +246,7 @@ export default { ...@@ -215,6 +246,7 @@ export default {
*/ */
toAddTag() { toAddTag() {
const that = this; const that = this;
that.editRow = {};
that.showTagDialog = true; that.showTagDialog = true;
}, },
/** /**
...@@ -364,6 +396,7 @@ export default { ...@@ -364,6 +396,7 @@ export default {
.then(res => { .then(res => {
that.loading = false; that.loading = false;
that.tagsData = res.result || []; that.tagsData = res.result || [];
that.getTagLicenseData();
}) })
.catch(function(error) { .catch(function(error) {
that.loading = false; that.loading = false;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:27:34 * @LastEditTime: 2020-09-09 11:15:25
--> -->
<template> <template>
...@@ -314,6 +314,7 @@ export default { ...@@ -314,6 +314,7 @@ export default {
that.memberCrowdData = that.sortTable(res.result); that.memberCrowdData = that.sortTable(res.result);
}else { }else {
that.memberCrowdData = []; that.memberCrowdData = [];
that.totalNum = 0;
} }
if (!that.searchVal && !that.classifyId && !!res.result && !!res.result.length) { if (!that.searchVal && !that.classifyId && !!res.result && !!res.result.length) {
that.totalNum = res.result.length; that.totalNum = res.result.length;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-20 14:36:37 * @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:59:32 * @LastEditTime: 2020-09-09 10:28:56
--> -->
<template> <template>
<div class="customer-assign-wrap"> <div class="customer-assign-wrap">
...@@ -253,9 +253,15 @@ export default { ...@@ -253,9 +253,15 @@ export default {
}; };
getCustomerSet(para) getCustomerSet(para)
.then(res => { .then(res => {
res.result.forEach(ele => { if (res.result && !!res.result.length) {
that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false; res.result.forEach(ele => {
}); that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
});
}else {
that.customerSetData = {
unbindClerkDisMemberFlag: false
};
}
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:49:41 * @LastEditTime: 2020-09-09 10:30:59
--> -->
<template> <template>
<div class="common-app-right"> <div class="common-app-right">
...@@ -126,9 +126,20 @@ export default { ...@@ -126,9 +126,20 @@ export default {
}; };
getCustomerSet(para) getCustomerSet(para)
.then(res => { .then(res => {
res.result.forEach(ele => { if (res.result && !!res.result.length) {
that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false; res.result.forEach(ele => {
}); that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
});
}else {
that.customerShowData = {
showAllOrderFlag: false,
showMallOrderFlag: false,
showWmOrderFlag: false,
clerkContactPhoneFlag: false,
clerkContactSmsFlag: false,
clerkAddMemberFlag: false
};
}
}) })
.catch(function(error) { .catch(function(error) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:59:05 * @LastEditTime: 2020-09-09 10:31:37
--> -->
<template> <template>
...@@ -116,9 +116,17 @@ export default { ...@@ -116,9 +116,17 @@ export default {
}; };
getShowSet(para) getShowSet(para)
.then(res => { .then(res => {
res.result.forEach(ele => { if (res.result && !!res.result.length) {
that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false; res.result.forEach(ele => {
}); that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
});
}else {
that.customerShowData = {
mainStoreFlag: false,
minorStoreFlag: false,
openCardStoreFlag: false
};
}
}) })
.catch(function(error) { .catch(function(error) {
......
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