Commit 26a4843f by 无尘

fix: 修改人群场景

parent 4290a165
...@@ -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-03 16:48:50 * @LastEditTime: 2020-09-04 10:38:35
*/ */
import getFetch from './get-fetch.js'; import getFetch from './get-fetch.js';
...@@ -57,7 +57,7 @@ let api = { ...@@ -57,7 +57,7 @@ let api = {
useIntercept: false useIntercept: false
}, },
// 人群场景 // 人群场景
getGroupData: '/member-group-list', // 获取人群场景数据 getGroupData: '/member-group-hb-list', // 获取人群场景数据
getClassifyData: '/member-group-category-list', // 获取分类数据 getClassifyData: '/member-group-category-list', // 获取分类数据
postSortGroup: { postSortGroup: {
// 排序 // 排序
...@@ -66,7 +66,7 @@ let api = { ...@@ -66,7 +66,7 @@ let api = {
useFormData: true, useFormData: true,
useIntercept: false useIntercept: false
}, },
getSyncMemberData: '/member-group-hb-list', // 获取人群场景同步数据 getSyncMemberData: '/member-group-list', // 获取人群场景同步数据
saveSync: { saveSync: {
// 保存同步 // 保存同步
url: '/member-group-save', url: '/member-group-save',
...@@ -76,7 +76,7 @@ let api = { ...@@ -76,7 +76,7 @@ let api = {
}, },
getVisiable: '/member-group-range-view', // 获取可见范围详情 getVisiable: '/member-group-range-view', // 获取可见范围详情
saveVisiable: { saveVisiable: {
// 保存可见范围 // 保存人群场景可见范围
url: '/member-group-range-save', url: '/member-group-range-save',
method: 'post', method: 'post',
useFormData: true, useFormData: true,
...@@ -94,6 +94,7 @@ let api = { ...@@ -94,6 +94,7 @@ let api = {
}, },
getClerkTag: '/member-tag-list', // 获取导购标签 getClerkTag: '/member-tag-list', // 获取导购标签
addClerkTag: '/member-tag-add', // 新增导购标签 addClerkTag: '/member-tag-add', // 新增导购标签
getTagDetail: '/member-tag-detail', // 获取标签详情
editClerkTag: '/member-tag-edit', // 编辑导购标签 editClerkTag: '/member-tag-edit', // 编辑导购标签
delClerkTag: { delClerkTag: {
// 删除导购标签 // 删除导购标签
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-04-14 09:50:16 * @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 11:22:53 * @LastEditTime: 2020-09-04 10:32:15
--> -->
<!-- <!--
<customer-assign v-if="assignShow" :brand-id="brandId" :clerk-id="clerkId" :search-params="searchInput" :choose-all="selectRadio" :depart-obj="departObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign> <customer-assign v-if="assignShow" :brand-id="brandId" :clerk-id="clerkId" :search-params="searchInput" :choose-all="selectRadio" :depart-obj="departObj" :multiple-data="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
staffName: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).staffName : '', staffName: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).staffName : '',
dialogVisible: true, dialogVisible: true,
unbindFlag: false, unbindFlag: false,
...@@ -271,7 +272,7 @@ export default { ...@@ -271,7 +272,7 @@ export default {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseId: that.wxEnterpriseId,
storeId: that.departObj.storeId storeId: that.departObj.storeId
}; };
getClerkList(para) getClerkList(para)
...@@ -300,7 +301,7 @@ export default { ...@@ -300,7 +301,7 @@ export default {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseId: that.wxEnterpriseId,
storeId: that.departObj.storeId, storeId: that.departObj.storeId,
clerkId: that.clerkId, clerkId: that.clerkId,
keyword: that.searchParams keyword: that.searchParams
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 15:24:12 * @Date: 2020-08-28 15:24:12
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 15:58:09 * @LastEditTime: 2020-09-04 10:29:25
--> -->
<!-- <!--
门店绑定-选择分组 门店绑定-选择分组
...@@ -49,6 +49,7 @@ export default { ...@@ -49,6 +49,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
searchSelect: '', // 搜索字段 searchSelect: '', // 搜索字段
groupData: [], groupData: [],
groupDataCopy: [], groupDataCopy: [],
...@@ -150,7 +151,8 @@ export default { ...@@ -150,7 +151,8 @@ export default {
const that = this; const that = this;
const para = { const para = {
type: that.storeType, type: that.storeType,
enterpriseId: that.brandId enterpriseId: that.brandId,
wxEnterpriseId: that.wxEnterpriseId
}; };
getGroupList(para) getGroupList(para)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 15:24:42 * @Date: 2020-08-28 15:24:42
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 15:58:36 * @LastEditTime: 2020-09-04 10:32:24
--> -->
<!-- <!--
<customer-store :brand-id="brandId" :select-store="selectStore" @checkStoreIds="checkStoreIds"></customer-store> <customer-store :brand-id="brandId" :select-store="selectStore" @checkStoreIds="checkStoreIds"></customer-store>
...@@ -56,6 +56,7 @@ export default { ...@@ -56,6 +56,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
checkAll: false, // 全选 checkAll: false, // 全选
isIndeterminate: false, isIndeterminate: false,
searchSelect: '', // 搜索字段 searchSelect: '', // 搜索字段
...@@ -132,7 +133,8 @@ export default { ...@@ -132,7 +133,8 @@ export default {
enterpriseId: that.brandId, enterpriseId: that.brandId,
type: that.storeType, type: that.storeType,
pageNum: that.pageNum, pageNum: that.pageNum,
pageSize: that.pageSize pageSize: that.pageSize,
wxEnterpriseId: that.wxEnterpriseId
}; };
getStoreList(para) getStoreList(para)
.then(res => { .then(res => {
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-09-01 17:16:25 * @Date: 2020-09-01 17:16:25
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 11:20:52 * @LastEditTime: 2020-09-04 10:32:31
--> -->
<!-- <!--
<edit-tag-dialog :edit-row="editRow" @closeTag="closeTag"></edit-tag-dialog> <edit-tag-dialog :brand-id="brandId" :edit-row="editRow" @closeTag="closeTag"></edit-tag-dialog>
import editTagDialog from '@/components/app/my-customer/edit-tag-dialog.vue'; import editTagDialog from '@/components/app/my-customer/edit-tag-dialog.vue';
--> -->
<template> <template>
...@@ -20,28 +20,28 @@ ...@@ -20,28 +20,28 @@
:input-width="440" :input-width="440"
:input-value.sync="form.tagName" :input-value.sync="form.tagName"
:holder="'请输入标签名称'" :holder="'请输入标签名称'"
:get-by-type="'word'" :get-by-type="'normal'"
:max-length="10"> :max-length="10">
</limit-input> </limit-input>
</el-form-item> </el-form-item>
<el-form-item label="所属分类" prop="classifyId"> <el-form-item label="所属分类" prop="categoryId">
<el-select v-model="form.classifyId" placeholder="请选择"> <el-select v-model="form.categoryId" placeholder="请选择">
<el-option <el-option
v-for="item in classOptions" v-for="item in tagsClassifyData"
:key="item.value" :key="item.categoryId"
:label="item.label" :label="item.categoryName"
:value="item.value"> :value="item.categoryId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标签值" prop="tagVal"> <el-form-item label="标签值" prop="childList">
<el-tag <el-tag
:key="index+'tag'" :key="index+'tag'"
v-for="(item, index) in form.tagVal" v-for="(item, index) in form.childList"
closable closable
:disable-transitions="false" :disable-transitions="false"
@close="handleDel(index)"> @close="handleDel(index)">
{{item}} {{item.tagValue}}
</el-tag> </el-tag>
<div> <div>
<el-input <el-input
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" :loading="loadingBtn" @click="submit('tagForm')">确定</el-button> <el-button type="primary" :loading="loadingBtn" @click="submit('tagForm')">{{form.tagId ? '保存' : '新建'}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -67,7 +67,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue'; ...@@ -67,7 +67,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue';
import { _debounce, emojiToStr } from '@/common/js/public.js'; import { _debounce, emojiToStr } from '@/common/js/public.js';
import showMsg from '@/common/js/showmsg.js'; import showMsg from '@/common/js/showmsg.js';
import api from '@/api/my-customer-app.js'; import api from '@/api/my-customer-app.js';
const { addClerkTag } = api; const { addClerkTag, getTagClassify } = api;
export default { export default {
name: 'TagClassifyDialog', name: 'TagClassifyDialog',
components: { components: {
...@@ -75,36 +75,41 @@ export default { ...@@ -75,36 +75,41 @@ export default {
commonAlertTip commonAlertTip
}, },
props: { props: {
brandId: {
type: String,
default: ''
},
editRow: { editRow: {
type: Object, type: Object,
default() { default() {
return { return {
tagId: '', tagId: '',
tagName: '', tagName: '',
classifyId: '', categoryId: '',
tagVal: [] childList: []
}; };
} }
} }
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
tipContent: '在好办新建的标签会在GIC虫洞派应用中也会同步创建并消耗license', tipContent: '在好办新建的标签会在GIC虫洞派应用中也会同步创建并消耗license',
classOptions: [], tagsClassifyData: [],
form: { form: {
tagId: '', tagId: '',
tagName: '', tagName: '',
classifyId: '', categoryId: '',
tagVal: [] childList: []
}, },
rules: { rules: {
tagName: [ tagName: [
{ required: true, message: '请输入标签名称', trigger: 'blur' }, { required: true, message: '请输入标签名称', trigger: 'blur' },
], ],
classifyId: [ categoryId: [
{ required: true, message: '请选择所属分类', trigger: 'change' } { required: true, message: '请选择所属分类', trigger: 'change' }
], ],
tagVal: [ childList: [
{ type: 'array', required: true, message: '请添加标签值', trigger: 'change' } { type: 'array', required: true, message: '请添加标签值', trigger: 'change' }
], ],
}, },
...@@ -116,6 +121,7 @@ export default { ...@@ -116,6 +121,7 @@ export default {
// 生命周期 - 挂载完成(访问DOM元素) // 生命周期 - 挂载完成(访问DOM元素)
mounted() { mounted() {
const that = this; const that = this;
that.getClassifyList();
if (Object.keys(that.editRow).length) { if (Object.keys(that.editRow).length) {
that.form = JSON.parse(JSON.stringify(that.editRow)); that.form = JSON.parse(JSON.stringify(that.editRow));
} }
...@@ -128,14 +134,19 @@ export default { ...@@ -128,14 +134,19 @@ export default {
* @author: 无尘 * @author: 无尘
*/ */
handleDel(index) { handleDel(index) {
this.form.tagVal.splice(index, 1); this.form.childList.splice(index, 1);
}, },
handleInputConfirm() { handleInputConfirm() {
const that = this; const that = this;
let inputValue = emojiToStr(that.inputValue); let inputValue = emojiToStr(that.inputValue);
if (inputValue) { if (inputValue) {
that.form.tagVal.push(inputValue); that.form.childList.push(
{
tagValueId: that.form.tagId,
tagValue: inputValue
}
);
} }
that.inputValue = ''; that.inputValue = '';
}, },
...@@ -144,12 +155,12 @@ export default { ...@@ -144,12 +155,12 @@ export default {
*/ */
cancel() { cancel() {
const that = this; const that = this;
that.$emit('closeClassify', 'close'); that.$emit('closeTag', 'close');
}, },
handleClose() { handleClose() {
const that = this; const that = this;
that.tableData = []; that.tableData = [];
that.$emit('closeClassify', 'close'); that.$emit('closeTag', 'close');
}, },
/** /**
* @description: 确定保存 * @description: 确定保存
...@@ -170,7 +181,9 @@ export default { ...@@ -170,7 +181,9 @@ export default {
const param = { const param = {
tagId: that.form.tagId, tagId: that.form.tagId,
tagName: emojiToStr(that.form.tagName), tagName: emojiToStr(that.form.tagName),
classifyId: that.form.classifyId childList: JSON.stringify(that.form.childList),
categoryId: that.form.categoryId,
wxEnterpriseId: that.wxEnterpriseId
}; };
addClerkTag(param) addClerkTag(param)
.then(res => { .then(res => {
...@@ -178,7 +191,7 @@ export default { ...@@ -178,7 +191,7 @@ export default {
if (res.code == '0000') { if (res.code == '0000') {
showMsg.showmsg('操作成功', 'success'); showMsg.showmsg('操作成功', 'success');
that.$refs['tagForm'].resetFields(); that.$refs['tagForm'].resetFields();
that.$emit('closeClassify', that.form.classifyName); that.$emit('closeTag', 'success');
}else { }else {
showMsg.showmsg(res.message || '未知错误', 'warning'); showMsg.showmsg(res.message || '未知错误', 'warning');
} }
...@@ -186,6 +199,23 @@ export default { ...@@ -186,6 +199,23 @@ export default {
.catch(error => { .catch(error => {
that.loadBtn = false; that.loadBtn = false;
}); });
},
/**
* @description: 获取分类数据
*/
getClassifyList() {
const that = this;
const para = {
enterpriseId: that.brandId,
wxEnterpriseId: that.wxEnterpriseId
};
getTagClassify(para)
.then(res => {
that.tagsClassifyData = res.result || [];
})
.catch(function(error) {
});
} }
}, },
watch: { watch: {
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 11:07:46 * @Date: 2020-08-28 11:07:46
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 14:23:23 * @LastEditTime: 2020-09-04 10:46:19
--> -->
<!-- <!--
<edit-visiable :brand-id="brandId" @refreshData="refreshData"></edit-visiable> <edit-visiable :brand-id="brandId" :set-type="setType" :select-mode="selectMode" :range-data="rangeData" @refreshData="refreshData"></edit-visiable>
import editVisiable from '@/components/app/my-customer/edit-visiable.vue'; import editVisiable from '@/components/app/my-customer/edit-visiable.vue';
--> -->
<template> <template>
...@@ -41,7 +41,7 @@ import customerStoreGroup from '@/components/app/my-customer/customer-store-grou ...@@ -41,7 +41,7 @@ import customerStoreGroup from '@/components/app/my-customer/customer-store-grou
import customerStore from '@/components/app/my-customer/customer-store.vue'; import customerStore from '@/components/app/my-customer/customer-store.vue';
import commonAlertTip from '@/components/common/common-alert-tip.vue'; import commonAlertTip from '@/components/common/common-alert-tip.vue';
import fetch from '@/api/my-customer-app.js'; import fetch from '@/api/my-customer-app.js';
const { saveVisiable } = fetch; const { saveVisiable, saveTagVisiable } = fetch;
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
export default { export default {
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
}, },
selectMode: { selectMode: {
type: [ String, Number ], type: [ String, Number ],
default: '0' // 0 全部 1部分分组 2 部分门店 default: '' // 0 全部 1部分分组 2 部分门店
}, },
rangeData: { rangeData: {
type: [ Object, Array ], type: [ Object, Array ],
...@@ -74,10 +74,11 @@ export default { ...@@ -74,10 +74,11 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
setVisible: true, setVisible: true,
tipContent: '修改后的内容将于次日生效', tipContent: '修改后的内容将于次日生效',
formData: { formData: {
sendRange: '0', sendRange: '',
selectList: [] selectList: []
}, },
selectGroupData: [], // 选择的分组数据 selectGroupData: [], // 选择的分组数据
...@@ -157,10 +158,24 @@ export default { ...@@ -157,10 +158,24 @@ export default {
postSave() { postSave() {
const that = this; const that = this;
const params = { const params = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
storeMode: that.formData.sendRange, storeMode: that.formData.sendRange,
bingRange: that.formData.selectList bingRange: that.formData.selectList
}; };
if (that.setType == 'crowd') {
that.saveCrowd(params);
}else {
that.saveTag(params);
}
},
/**
* @description: 保存人群可见范围
* @param {Object} params
* @author: 无尘
*/
saveCrowd(params) {
const that = this;
saveVisiable(params) saveVisiable(params)
.then(res => { .then(res => {
that.loadingBtn = false; that.loadingBtn = false;
...@@ -174,6 +189,27 @@ export default { ...@@ -174,6 +189,27 @@ export default {
.catch(function(error) { .catch(function(error) {
that.loadingBtn = false; that.loadingBtn = false;
}); });
},
/**
* @description: 保存标签可见范围
* @param {Object} params
* @author: 无尘
*/
saveTag(params) {
const that = this;
saveTagVisiable(params)
.then(res => {
that.loadingBtn = false;
if (res.code == '0000') {
showMsg.showmsg('保存成功', 'success');
that.$emit('refreshData', 'success');
}else {
showMsg.showmsg(res.message || '接口异常', 'warning');
}
})
.catch(function(error) {
that.loadingBtn = false;
});
} }
}, },
watch: { watch: {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-08-13 14:02:22 * @Date : 2020-08-13 14:02:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 11:20:32 * @LastEditTime: 2020-09-04 10:32:52
* @FilePath : haoban-4\src\components\app\my-customer\store-list.vue * @FilePath : haoban-4\src\components\app\my-customer\store-list.vue
--> -->
<!-- <!--
...@@ -81,6 +81,7 @@ export default { ...@@ -81,6 +81,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
nameVisible: false, nameVisible: false,
departmentName: this.departObj.departmentName || '', departmentName: this.departObj.departmentName || '',
searchInput: '', searchInput: '',
...@@ -158,6 +159,7 @@ export default { ...@@ -158,6 +159,7 @@ export default {
getTableList() { getTableList() {
const that = this; const that = this;
let para = { let para = {
wxEnterpriseId: that.wxEnterpriseId,
departmentId: that.departObj.storeGroupId, departmentId: that.departObj.storeGroupId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
searchName: that.searchInput || '', // 搜索字段 searchName: that.searchInput || '', // 搜索字段
......
...@@ -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-03 14:42:48 * @LastEditTime: 2020-09-04 10:35:44
--> -->
<!-- <!--
<sync-crowd-dialog :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog> <sync-crowd-dialog :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div> <div>
<el-input placeholder="请输入人群名称" maxlength="50" v-model="searchVal" style="width: 292px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value)" clearable @clear="clearInput"></el-input><el-select class="w-165 m-l-10" v-model="classifyId" placeholder="所有分类" @change="changeCondition"> <el-input placeholder="请输入人群名称" maxlength="50" v-model="searchVal" style="width: 292px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value)" clearable @clear="clearInput"></el-input><el-select class="w-165 m-l-10" v-model="classifyId" placeholder="所有分类" @change="changeCondition">
<el-option label="所有分类" value=""></el-option> <el-option label="所有分类" value=""></el-option>
<el-option v-for="item in classifyList" :key="item.categoryId" :label="itemcategoryName" :value="item.categoryId"> </el-option> <el-option v-for="item in classifyList" :key="item.sceneCrowdCategoryId" :label="itemcategoryName" :value="item.sceneCrowdCategoryId"> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
...@@ -30,22 +30,22 @@ ...@@ -30,22 +30,22 @@
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="" label="人群名称" show-overflow-tooltip> <el-table-column prop="" label="人群名称" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.memberGroupName || '--' }} {{ scope.row.sceneCrowdName || '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="所属分类" show-overflow-tooltip> <el-table-column prop="" label="所属分类" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.categoryName || '--' }} {{ scope.row.sceneCrowdCategoryName || '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="" label="到期时间"> <el-table-column prop="" label="到期时间">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="color-606266 line-18">{{ scope.row.overTime | timeStampToYmd }} {{ !scope.row.overTime? '--':'' }}</div> <div class="color-606266 line-18">{{ scope.row.sceneCrowdExpireTime | timeStampToYmd }} {{ !scope.row.sceneCrowdExpireTime? '--':'' }}</div>
<div class="color-606266 line-18">{{ scope.row.overTime | timeStampToHms }} {{ !scope.row.overTime? '--':'' }}</div> <div class="color-606266 line-18">{{ scope.row.sceneCrowdExpireTime | timeStampToHms }} {{ !scope.row.sceneCrowdExpireTime? '--':'' }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0"> <div v-if="tableData.length" class="block common-wrap__page text-right m-t-24">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination> <dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div> </div>
</div> </div>
...@@ -74,6 +74,7 @@ export default { ...@@ -74,6 +74,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
dialogVisible: true, dialogVisible: true,
tipContent: '从GIC最多可同步20个场景人群', tipContent: '从GIC最多可同步20个场景人群',
searchVal: '', searchVal: '',
...@@ -118,8 +119,9 @@ export default { ...@@ -118,8 +119,9 @@ export default {
postAdd() { postAdd() {
const that = this; const that = this;
const params = { const params = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
categoryIds: that.multipleSelection.map(ele => ele.categoryId).join(',') sceneCrowdCategoryIds: that.multipleSelection.map(ele => ele.sceneCrowdCategoryId).join(',')
}; };
saveSync(params) saveSync(params)
.then(res => { .then(res => {
...@@ -216,6 +218,7 @@ export default { ...@@ -216,6 +218,7 @@ export default {
getGroupClassify() { getGroupClassify() {
const that = this; const that = this;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId enterpriseId: that.brandId
}; };
getClassifyData(para) getClassifyData(para)
...@@ -233,14 +236,18 @@ export default { ...@@ -233,14 +236,18 @@ export default {
const that = this; const that = this;
that.loadingPage = true; that.loadingPage = true;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
keyword: that.searchVal, keyword: that.searchVal,
categoryId: that.classifyId sceneCrowdCategoryId: that.classifyId,
pageNum: that.currentPage, // 当前页
pageSize: that.pageSize, // 一页显示个数
}; };
getSyncMemberData(para) getSyncMemberData(para)
.then(res => { .then(res => {
that.loadingPage = false; that.loadingPage = false;
that.tableData = res.result || []; that.tableData = res.result.result || [];
that.total = res.result.totalCount;
}) })
.catch(function(error) { .catch(function(error) {
that.loadingPage = false; that.loadingPage = false;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-09-01 13:53:59 * @Date: 2020-09-01 13:53:59
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 14:49:43 * @LastEditTime: 2020-09-04 10:33:16
--> -->
<!-- <!--
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
import tagClassifyDialog from '@/components/app/my-customer/tag-classify-dialog.vue'; import tagClassifyDialog from '@/components/app/my-customer/tag-classify-dialog.vue';
--> -->
<template> <template>
<el-dialog :title="form.tagCategoryId ? '编辑分类' : '新建分类'" width="600px" :visible.sync="editVisible" :before-close="handleClose"> <el-dialog :title="form.categoryId ? '编辑分类' : '新建分类'" width="600px" :visible.sync="editVisible" :before-close="handleClose">
<el-form :model="form" :rules="rules" ref="tagForm" label-width="110px"> <el-form :model="form" :rules="rules" ref="tagForm" label-width="110px">
<el-form-item label="分类名称" prop="tagCategoryName"> <el-form-item label="分类名称" prop="categoryName">
<limit-input <limit-input
:input-width="440" :input-width="440"
:input-value.sync="form.tagCategoryName" :input-value.sync="form.categoryName"
:holder="'请输入分类名称'" :holder="'请输入分类名称'"
:get-by-type="'word'" :get-by-type="'normal'"
:max-length="10"> :max-length="10">
</limit-input> </limit-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" :loading="loadingBtn" @click="submit('tagForm')">确定</el-button> <el-button type="primary" :loading="loadingBtn" @click="submit('tagForm')">{{form.categoryId ? '保存' : '新建'}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -47,20 +47,21 @@ export default { ...@@ -47,20 +47,21 @@ export default {
type: Object, type: Object,
default() { default() {
return { return {
tagCategoryId: '', categoryId: '',
tagCategoryName: '' categoryName: ''
}; };
} }
} }
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
form: { form: {
tagCategoryId: '', categoryId: '',
tagCategoryName: '' categoryName: ''
}, },
rules: { rules: {
tagCategoryName: [ categoryName: [
{ required: true, message: '请输入分类名称', trigger: 'blur' }, { required: true, message: '请输入分类名称', trigger: 'blur' },
] ]
}, },
...@@ -106,8 +107,9 @@ export default { ...@@ -106,8 +107,9 @@ export default {
const that = this; const that = this;
that.loadBtn = true; that.loadBtn = true;
const param = { const param = {
tagCategoryId: that.form.tagCategoryId, wxEnterpriseId: that.wxEnterpriseId,
tagCategoryName: emojiToStr(that.form.tagCategoryName) categoryId: that.form.categoryId,
categoryName: emojiToStr(that.form.categoryName)
}; };
addClassify(param) addClassify(param)
.then(res => { .then(res => {
...@@ -115,7 +117,7 @@ export default { ...@@ -115,7 +117,7 @@ export default {
if (res.code == '0000') { if (res.code == '0000') {
showMsg.showmsg('操作成功', 'success'); showMsg.showmsg('操作成功', 'success');
that.$refs['tagForm'].resetFields(); that.$refs['tagForm'].resetFields();
that.$emit('closeClassify', that.form.tagCategoryName); that.$emit('closeClassify', that.form.categoryName);
}else { }else {
showMsg.showmsg(res.message || '未知错误', 'warning'); showMsg.showmsg(res.message || '未知错误', 'warning');
} }
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-07-29 20:00:00 * @Date: 2019-07-29 20:00:00
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-01 13:59:40 * @LastEditTime: 2020-09-03 18:02:40
--> -->
<!-- <!--
限制输入框组件 限制输入框组件
<limitInput <limit-input-blur
:input-width="500" :input-width="500"
:limit-class="'limit-color'" :limit-class="'limit-color'"
:disflag='!childItem.fieldEdited' :disflag='!childItem.fieldEdited'
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
:holder="'请输入详细地址'" :holder="'请输入详细地址'"
:get-by-type="'word'" :get-by-type="'word'"
:max-length="40"> :max-length="40">
</limitInput> </limit-input-blur>
--> -->
<template> <template>
<div :class="['input-line-cell', limitClass]" :style="{ width: inputWidth + 'px' }"> <div :class="['input-line-cell', limitClass]" :style="{ width: inputWidth + 'px' }">
......
...@@ -4,11 +4,11 @@ ...@@ -4,11 +4,11 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-12-06 13:44:22 * @Date: 2018-12-06 13:44:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-01 14:01:07 * @LastEditTime: 2020-09-03 18:07:27
--> -->
<!-- <!--
限制输入框组件 限制输入框组件
<limitInput <limit-input
:input-width="500" :input-width="500"
:limit-class="'limit-color'" :limit-class="'limit-color'"
:disflag='!childItem.fieldEdited' :disflag='!childItem.fieldEdited'
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
:holder="'请输入详细地址'" :holder="'请输入详细地址'"
:get-by-type="'word'" :get-by-type="'word'"
:max-length="40"> :max-length="40">
</limitInput> </limit-input>
import limitInput from '@/components/limit-input.vue'; import limitInput from '@/components/limit-input.vue';
--> -->
<template> <template>
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
// 字或字符判断类型 // 字或字符判断类型
getByType: { getByType: {
type: String, type: String,
default: 'word' // word: 字, char: 字符 default: 'word' // word: 字, char: 字符, normal: 一个字一个字符都算一个
}, },
holder: { holder: {
...@@ -81,6 +81,10 @@ export default { ...@@ -81,6 +81,10 @@ export default {
let that = this; let that = this;
that.limitLength = that.maxLength; that.limitLength = that.maxLength;
that.itemValue = that.inputValue || ''; that.itemValue = that.inputValue || '';
if (that.getByType == 'normal') {
that.inputNum = that.inputValue.length;
return false;
}
if (that.getByType == 'word') { if (that.getByType == 'word') {
that.inputNum = strLength.getZhLen(that.inputValue); that.inputNum = strLength.getZhLen(that.inputValue);
} else { } else {
...@@ -91,10 +95,17 @@ export default { ...@@ -91,10 +95,17 @@ export default {
/** /**
* @description: 当前函数信息 * @description: 当前函数信息
* @param {String} value * @param {String} value
* @returns {Boolean}
* @author: 无尘 * @author: 无尘
*/ */
toInput: function(value) { toInput: function(value) {
const that = this; const that = this;
if (that.getByType == 'normal') {
that.itemValue = String(value.target.value).trim();
that.inputNum = that.itemValue.length;
that.$emit('update:inputValue', that.itemValue);
return false;
}
let temp = ''; let temp = '';
if (that.getByType == 'word') { if (that.getByType == 'word') {
temp = strLength.getByteVal(value.target.value, that.limitLength); temp = strLength.getByteVal(value.target.value, that.limitLength);
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-28 16:51:22 * @Date: 2020-08-28 16:51:22
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 15:20:25 * @LastEditTime: 2020-09-04 10:37:03
--> -->
<template> <template>
<div class="common-app-right"> <div class="common-app-right no-padding">
<div class="clerk-tag-body flex"> <div class="clerk-tag-body flex">
<div class="clerk-tag-left border-box"> <div class="clerk-tag-left border-box">
<div class="clerk-tag-add"> <div class="clerk-tag-add text-center">
<el-button icon="el-icon-plus" @click="toAddCate">新建分类</el-button> <el-button icon="el-icon-plus" @click="toAddCate">新建分类</el-button>
</div> </div>
<tag-classify-list :brand-id="brandId" @refreshClassify="refreshClassify" @changeClass="changeClass"></tag-classify-list> <tag-classify-list :brand-id="brandId" @refreshClassify="refreshClassify" @changeClass="changeClass"></tag-classify-list>
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
<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)" 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)" clearable @clear="clearInput"></el-input></div>
<div><el-button type="primary">新建标签</el-button></div> <div><el-button type="primary" @click="toAddTag">新建标签</el-button></div>
</div> </div>
</div> </div>
<div> <div class="m-t-20">
<el-table <el-table
:data="tagsData" :data="tagsData"
row-key="memberTagId" row-key="memberTagId"
...@@ -55,21 +55,28 @@ ...@@ -55,21 +55,28 @@
</div> </div>
</div> </div>
<tag-classify-dialog v-if="showTagCate" @closeClassify="closeClassify"></tag-classify-dialog> <tag-classify-dialog v-if="showTagCate" @closeClassify="closeClassify"></tag-classify-dialog>
<edit-tag-dialog v-if="showTagDialog" :edit-row="editRow" @closeTag="closeTag"></edit-tag-dialog>
<edit-visiable v-if="showTagVisiable" :brand-id="brandId" :set-type="'tag'" :select-mode="selectMode" :range-data="rangeData" @refreshData="refreshData"></edit-visiable>
</div> </div>
</template> </template>
<script> <script>
import tagClassifyList from '@/components/app/my-customer/tag-classify-list.vue'; import tagClassifyList from '@/components/app/my-customer/tag-classify-list.vue';
import tagClassifyDialog from '@/components/app/my-customer/tag-classify-dialog.vue';
import editTagDialog from '@/components/app/my-customer/edit-tag-dialog.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, sortClerkTag, delClerkTag } = fetch; const { getTagClassify, getClerkTag, 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';
export default { export default {
name: 'ClerkTag', name: 'ClerkTag',
components: { components: {
tagClassifyList tagClassifyList,
tagClassifyDialog,
editTagDialog,
editVisiable
}, },
props: { props: {
brandId: { brandId: {
...@@ -79,13 +86,18 @@ export default { ...@@ -79,13 +86,18 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
currentClassify: '', currentClassify: '',
tagsClassifyData: [], tagsClassifyData: [],
tagsData: [], tagsData: [],
showTagDialog: false, showTagDialog: false, // 标签
showTagVisiable: false,
loading: false, loading: false,
showTagCate: false showTagCate: false, // 分类
editRow: {},
// 可见范围
showTagVisiable: false, // 可见范围
selectMode: '',
rangeData: []
}; };
}, },
// 生命周期 - 挂载完成(访问DOM元素) // 生命周期 - 挂载完成(访问DOM元素)
...@@ -141,10 +153,12 @@ export default { ...@@ -141,10 +153,12 @@ export default {
} }
}); });
}, },
setSort() { setSort(arr) {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
tagIds: arr.map(ele => ele.tagId).join(',')
}; };
sortClerkTag(para) sortClerkTag(para)
.then(res => { .then(res => {
...@@ -169,32 +183,73 @@ export default { ...@@ -169,32 +183,73 @@ export default {
that.getClassifyList(); that.getClassifyList();
}, },
/** /**
* 编辑标签 * @description: 添加标签
* @author: 无尘
*/
toAddTag() {
const that = this;
that.showTagDialog = true;
},
/**
* @description: 编辑标签
* @param {Number} index * @param {Number} index
* @param {Object} row * @param {Object} row
*/ */
toEditTag(index, row) { toEditTag(index, row) {
const that = this; const that = this;
that.getTagData(row.tagId);
},
closeTag(res) {
const that = this;
that.showTagDialog = false;
if (res == 'close') {
return false;
}
that.getTableList();
},
getTagData(tagId) {
const that = this;
const para = { tagId };
getTagDetail(para)
.then(res => {
that.editRow = res.result || {};
that.showTagDialog = true; that.showTagDialog = true;
})
.catch(function(error) {
});
}, },
/** /**
* 编辑可见范围 * @description: 编辑可见范围
* @param {Number} index * @param {Number} index
* @param {Object} row * @param {Object} row
*/ */
toEditVisiable(index, row) { toEditVisiable(index, row) {
const that = this; const that = this;
that.getVisiableData(row.tagId);
},
getVisiableData(tagId) {
const that = this;
const para = { tagId };
getTagVisiable(para)
.then(res => {
that.selectMode = res.result.storeMode;
that.rangeData = res.result.bindRange || {};
that.showTagVisiable = true; that.showTagVisiable = true;
})
.catch(function(error) {
});
}, },
/** /**
* 编辑后刷新数据 * @description: 编辑后刷新数据
*/ */
refreshTagData() { refreshTagData() {
const that = this; const that = this;
that.getTableList(); that.getTableList();
}, },
/** /**
* 删除标签 * @description: 删除标签
* @param {Number} index * @param {Number} index
* @param {Object} row * @param {Object} row
*/ */
...@@ -228,26 +283,27 @@ export default { ...@@ -228,26 +283,27 @@ export default {
}); });
}, },
/** /**
* 搜索输入 * @description: 搜索输入
*/ */
toInput: _debounce(function() { toInput: _debounce(function() {
const that = this; const that = this;
that.getTableList(); that.getTableList();
}, 500), }, 500),
/** /**
* 搜索清除 * @description: 搜索清除
*/ */
clearInput() { clearInput() {
const that = this; const that = this;
that.getTableList(); that.getTableList();
}, },
/** /**
* 获取列表数据 * @description: 获取列表数据
*/ */
getTableList() { getTableList() {
const that = this; const that = this;
that.loading = true; that.loading = true;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
keyword: that.searchVal, keyword: that.searchVal,
tagCategoryId: that.currentClassify tagCategoryId: that.currentClassify
...@@ -262,11 +318,14 @@ export default { ...@@ -262,11 +318,14 @@ export default {
}); });
}, },
/** /**
* 获取分类数据 * @description: 获取分类数据
*/ */
getClassifyList() { getClassifyList() {
const that = this; const that = this;
const para = {}; const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId
};
getTagClassify(para) getTagClassify(para)
.then(res => { .then(res => {
that.tagsClassifyData = res.result || []; that.tagsClassifyData = res.result || [];
......
...@@ -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-03 14:43:34 * @LastEditTime: 2020-09-04 10:49:48
--> -->
<template> <template>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div> <div>
<el-input placeholder="请输入人群名称" maxlength="50" v-model="searchVal" style="width: 408px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value)" clearable @clear="clearInput"></el-input><el-select class="w-162 m-l-10" v-model="classifyId" placeholder="所有分类" @change="changeCondition"> <el-input placeholder="请输入人群名称" maxlength="50" v-model="searchVal" style="width: 408px;" prefix-icon="el-icon-search" @keyup.native="value => toInput(value)" clearable @clear="clearInput"></el-input><el-select class="w-162 m-l-10" v-model="classifyId" placeholder="所有分类" @change="changeCondition">
<el-option label="所有分类" value=""></el-option> <el-option label="所有分类" value=""></el-option>
<el-option v-for="item in classifyList" :key="item.categoryId" :label="item.categoryName" :value="item.categoryId"> </el-option> <el-option v-for="item in classifyList" :key="item.sceneCrowdCategoryId" :label="item.sceneCrowdCategoryName" :value="item.sceneCrowdCategoryId"> </el-option>
</el-select> </el-select>
</div> </div>
<div><el-button type="primary" @click="toSync">同步场景人群</el-button></div> <div><el-button type="primary" @click="toSync">同步场景人群</el-button></div>
...@@ -38,20 +38,20 @@ ...@@ -38,20 +38,20 @@
prop="" prop=""
label="人群名称" label="人群名称"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope">{{scope.row.memberGroupName || '--'}}</template> <template slot-scope="scope">{{scope.row.sceneCrowdName || '--'}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop=""
label="所属分类" label="所属分类"
show-overflow-tooltip> show-overflow-tooltip>
<template slot-scope="scope">{{scope.row.categoryName || '--'}}</template> <template slot-scope="scope">{{scope.row.sceneCrowdCategoryName || '--'}}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="" prop=""
label="到期时间"> label="到期时间">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="line-18">{{ scope.row.overTime | timeStampToYmd }} {{ scope.row.overTime ? '' : '--'}}</div> <div class="line-18">{{ scope.row.sceneCrowdExpireTime | timeStampToYmd }} {{ scope.row.sceneCrowdExpireTime ? '' : '--'}}</div>
<div class="line-18">{{ scope.row.overTime | timeStampToHms }} {{ scope.row.overTime ? '' : '--'}}</div> <div class="line-18">{{ scope.row.sceneCrowdExpireTime | timeStampToHms }} {{ scope.row.sceneCrowdExpireTime ? '' : '--'}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
</div> </div>
<sync-crowd-dialog v-if="showSync" :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog> <sync-crowd-dialog v-if="showSync" :brand-id="brandId" @refreshData="refreshData"></sync-crowd-dialog>
<edit-visiable v-if="showSelectStore" :select-mode="selectMode" :range-data="rangeData" :brand-id="brandId" @refreshData="refreshData"></edit-visiable> <edit-visiable v-if="showSelectStore" :set-type="'crowd'" :select-mode="selectMode" :range-data="rangeData" :brand-id="brandId" @refreshData="refreshData"></edit-visiable>
</div> </div>
</template> </template>
...@@ -73,7 +73,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue'; ...@@ -73,7 +73,7 @@ import commonAlertTip from '@/components/common/common-alert-tip.vue';
import syncCrowdDialog from '@/components/app/my-customer/sync-crowd-dialog.vue'; import syncCrowdDialog from '@/components/app/my-customer/sync-crowd-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 { getGroupData, getClassifyData, postSortGroup } = fetch; const { getGroupData, getClassifyData, getVisiable, postSortGroup } = 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';
...@@ -92,6 +92,7 @@ export default { ...@@ -92,6 +92,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
tipContent: 'GIC设置场景人群后,好办顾客人群列表最多同步20个人群,次日刷新,每日刷新一次;', tipContent: 'GIC设置场景人群后,好办顾客人群列表最多同步20个人群,次日刷新,每日刷新一次;',
tipTwoContent: 'GIC中设置的场景人群到期后,好办移动端将不再展示该条人群;', tipTwoContent: 'GIC中设置的场景人群到期后,好办移动端将不再展示该条人群;',
searchVal: '', searchVal: '',
...@@ -146,9 +147,21 @@ export default { ...@@ -146,9 +147,21 @@ export default {
*/ */
toEdit(index, row) { toEdit(index, row) {
const that = this; const that = this;
that.showSelectStore = true; that.getVisiableData(row.sceneCrowdId);
}, },
getVisiableData(sceneCrowdId) {
const that = this;
const para = { sceneCrowdId };
getVisiable(para)
.then(res => {
that.selectMode = res.result.storeMode;
that.rangeData = res.result.bindRange || {};
that.showSelectStore = true;
})
.catch(function(error) {
});
},
/** /**
* @description: 搜索输入 * @description: 搜索输入
*/ */
...@@ -190,10 +203,12 @@ export default { ...@@ -190,10 +203,12 @@ export default {
} }
}); });
}, },
setSort() { setSort(arr) {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
sceneCrowdIds: arr.map(ele => ele.sceneCrowdId).join(',')
}; };
postSortGroup(para) postSortGroup(para)
.then(res => { .then(res => {
...@@ -214,6 +229,7 @@ export default { ...@@ -214,6 +229,7 @@ export default {
getGroupClassify() { getGroupClassify() {
const that = this; const that = this;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId enterpriseId: that.brandId
}; };
getClassifyData(para) getClassifyData(para)
...@@ -232,9 +248,10 @@ export default { ...@@ -232,9 +248,10 @@ export default {
const that = this; const that = this;
that.loading = true; that.loading = true;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
keyword: that.searchVal, keyword: that.searchVal,
categoryId: that.classifyId sceneCrowdCategoryId: that.classifyId
}; };
getGroupData(para) getGroupData(para)
.then(res => { .then(res => {
......
...@@ -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-08-27 14:17:07 * @LastEditTime: 2020-09-04 10:09:38
--> -->
<template> <template>
<div class="app-detail-wrap"> <div class="app-detail-wrap">
...@@ -207,6 +207,7 @@ export default { ...@@ -207,6 +207,7 @@ export default {
const that = this; const that = this;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let para = { let para = {
wxEnterpriseId: that.wxEnterpriseId,
storeId: that.storeObj.storeId storeId: that.storeObj.storeId
}; };
getAssignStatus(para) getAssignStatus(para)
...@@ -381,7 +382,7 @@ export default { ...@@ -381,7 +382,7 @@ export default {
const that = this; const that = this;
let para = { let para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId wxEnterpriseId: that.wxEnterpriseId,
}; };
getGroupList(para) getGroupList(para)
.then(async res => { .then(async res => {
...@@ -438,6 +439,7 @@ export default { ...@@ -438,6 +439,7 @@ export default {
toGetNavData() { toGetNavData() {
const that = this; const that = this;
let params = { let params = {
wxEnterpriseId: that.wxEnterpriseId,
departmentId: that.storeObj.storeGroupId departmentId: that.storeObj.storeGroupId
}; };
getNavChain( params) getNavChain( params)
...@@ -460,7 +462,7 @@ export default { ...@@ -460,7 +462,7 @@ export default {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseId: that.wxEnterpriseId,
storeId: that.storeObj.storeId storeId: that.storeObj.storeId
}; };
getClerkList(para) getClerkList(para)
...@@ -478,7 +480,7 @@ export default { ...@@ -478,7 +480,7 @@ export default {
const that = this; const that = this;
const para = { const para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseId: that.wxEnterpriseId,
pageNum: that.currentPage, pageNum: that.currentPage,
pageSize: that.pageSize, pageSize: that.pageSize,
storeId: that.storeObj.storeId, storeId: that.storeObj.storeId,
......
...@@ -4,16 +4,16 @@ ...@@ -4,16 +4,16 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 10:16:37 * @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 15:51:27 * @LastEditTime: 2020-09-04 10:10:29
--> -->
<template> <template>
<div class="common-app-right"> <div class="common-app-right">
<div class="customer-data-body"> <div class="customer-data-body">
<div class="m-b-20"> <div class="m-b-10">
<el-checkbox class="w-195" v-model="customerShowData.allStoreOrder">展示所有门店的订单</el-checkbox> <el-checkbox class="w-195" v-model="customerShowData.allStoreOrder">展示所有门店的订单</el-checkbox>
<div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在本店以外的消费订单</div> <div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在本店以外的消费订单</div>
</div> </div>
<div class="m-b-10"> <div class="m-b-20">
<el-checkbox class="w-195" v-model="customerShowData.shopOrder">展示微商城的订单</el-checkbox> <el-checkbox class="w-195" v-model="customerShowData.shopOrder">展示微商城的订单</el-checkbox>
<div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在微商城的消费订单</div> <div class="font-12 color-909399 set-tip-item">注:保存勾选项后,门店导购和店长可查看顾客在微商城的消费订单</div>
</div> </div>
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
customerShowData: { customerShowData: {
allStoreOrder: false, allStoreOrder: false,
shopOrder: false, shopOrder: 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-08-28 14:58:52 * @LastEditTime: 2020-09-04 10:10:21
--> -->
<template> <template>
...@@ -43,6 +43,7 @@ export default { ...@@ -43,6 +43,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
customerShowData: { customerShowData: {
mainStoreFlag: false, mainStoreFlag: false,
minorStoreFlag: false, minorStoreFlag: false,
...@@ -74,6 +75,7 @@ export default { ...@@ -74,6 +75,7 @@ export default {
setData() { setData() {
const that = this; const that = this;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
mainStoreFlag: that.customerShowData.mainStoreFlag ? 1 : '0', mainStoreFlag: that.customerShowData.mainStoreFlag ? 1 : '0',
minorStoreFlag: that.customerShowData.minorStoreFlag ? 1 : '0', minorStoreFlag: that.customerShowData.minorStoreFlag ? 1 : '0',
...@@ -100,6 +102,7 @@ export default { ...@@ -100,6 +102,7 @@ export default {
getShowData() { getShowData() {
const that = this; const that = this;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId enterpriseId: that.brandId
}; };
getShowSet(para) getShowSet(para)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-08-27 11:36:51 * @Date: 2020-08-27 11:36:51
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-09-03 16:00:35 * @LastEditTime: 2020-09-04 10:08:10
--> -->
<template> <template>
...@@ -93,6 +93,7 @@ export default { ...@@ -93,6 +93,7 @@ export default {
}, },
data() { data() {
return { return {
wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
tipContent: '当商户有多个会员卡和服务号时,会造成单家门店适用于多个会员卡或服务号,即单个顾客会有多个域的身份信息,这容易造成门店成员的困扰。请为以下会员卡和服务号域做权重排序,当顾客有多个域的身份信息时,门店成员将只能看到权重最高域的一个身份信息。', tipContent: '当商户有多个会员卡和服务号时,会造成单家门店适用于多个会员卡或服务号,即单个顾客会有多个域的身份信息,这容易造成门店成员的困扰。请为以下会员卡和服务号域做权重排序,当顾客有多个域的身份信息时,门店成员将只能看到权重最高域的一个身份信息。',
memberCardData: [], // 会员卡 memberCardData: [], // 会员卡
serviceNumData: [], // 服务号 serviceNumData: [], // 服务号
...@@ -134,6 +135,7 @@ export default { ...@@ -134,6 +135,7 @@ export default {
setSort(arr, data) { setSort(arr, data) {
const that = this; const that = this;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId, enterpriseId: that.brandId,
sorts: arr.map(ele => ele.id).join(','), sorts: arr.map(ele => ele.id).join(','),
type: data == 'memberCardData' ? '0' : '1' type: data == 'memberCardData' ? '0' : '1'
...@@ -160,6 +162,7 @@ export default { ...@@ -160,6 +162,7 @@ export default {
that.loadingMember = true; that.loadingMember = true;
that.loadingService = true; that.loadingService = true;
const para = { const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId enterpriseId: that.brandId
}; };
getMemberData(para) getMemberData(para)
......
...@@ -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-09-03 09:50:19 * @LastEditTime: 2020-09-04 10:07:19
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -38,8 +38,7 @@ export default { ...@@ -38,8 +38,7 @@ export default {
}, },
data() { data() {
return { return {
bgHeight: window.screen.availHeight - 380 + 'px', wxEnterpriseId: localStorage.getItem('haoBanUser') ? JSON.parse(localStorage.getItem('haoBanUser')).wxEnterpriseId : '',
activeSelTab: '1', activeSelTab: '1',
activeTab: '1', activeTab: '1',
// 面包屑参数 // 面包屑参数
...@@ -205,6 +204,9 @@ export default { ...@@ -205,6 +204,9 @@ export default {
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
background: #fff; background: #fff;
&.no-padding {
padding: 0;
}
} }
} }
} }
......
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