Commit 3874e35d by 无尘

fix: 修改我的顾客

parent d6423ad9
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.9b35300495b0aca570736f62dd5c18d0.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.2f45aaaabe8de9a0b326.js></script><script type=text/javascript src=./static/js/vendor.62ac2d475dfcb7888aad.js></script><script type=text/javascript src=./static/js/app.41cf9f0f06f76da99a8c.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.e04bfbb7e10f01d4b3967007f6401e39.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.006ca549f618dbc0537e.js></script><script type=text/javascript src=./static/js/vendor.62ac2d475dfcb7888aad.js></script><script type=text/javascript src=./static/js/app.afa835a6d46a5e7c196c.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var a={},f={80:0};function d(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};return e[c].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var c=f[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,d){c=f[e]=[a,d]});c[2]=a;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"cbedb09f8527f7df9eb0",1:"954a8a70c5f1171933ac",2:"a280cacc2b4b43a244e1",3:"00e1cab932674e11a7ac",4:"7fb54b0d6edc84c910b5",5:"3c335bf1dd72ca957262",6:"987ab930d70320e9de11",7:"e2471fa3903291b9c591",8:"7411f2676b22263af82a",9:"893877b035c3b35f556e",10:"72fccf60a68381f76d55",11:"e50caf7e54aeba14012b",12:"3a716cdc462dbec28cf8",13:"3d730de7c60fa8d18ccb",14:"e11f31e60dab3db1f2ea",15:"6f6e42df3e657913869b",16:"b692b43283275c0bc6b9",17:"62255cf03bb549956c58",18:"7ffc38554bc63393a91e",19:"35726f60c578a23e9017",20:"ba2e2bd0823422a4de6c",21:"2073753ae49abdc23a5e",22:"41ffd63f72a1ec6e59b8",23:"e0c916556828fa70af60",24:"7a57624e89e34e420a52",25:"b33652a002af7a00f907",26:"9cbcbc21da1497c3c88d",27:"7b3dd90cfa2c0d5203d2",28:"53e6616ed021ab731d6c",29:"44433e90d6affacc76f8",30:"196dbd7ed8dc5dac2699",31:"18ef42ac5cec84cc247e",32:"5c7e44cdd6fbfea3e17b",33:"9081ead4ff7da6bbcc09",34:"5ddc08b92106aa050122",35:"813f9fa7bd98fbca9dd8",36:"cf85d431bf885b5e642d",37:"47cbd1ef2f65ae69c2d6",38:"778a114acece521cbeb2",39:"3b0a409728d724b82c12",40:"9b42df34317bf72a31fd",41:"d897544ef0e120fa5e4e",42:"bce71b4227f6a89e1f0e",43:"6dbdea53d2130ebc0609",44:"3cb0ad37cd3b652bf968",45:"2c6b2a0c1ecdf5dbf3c8",46:"9dad3123f2fc347c9f46",47:"a7bb6a30ce7426c8424b",48:"e7d2534c955cec793d9d",49:"27afa66e95971d59227a",50:"adff1b1ecb27fb4bfcad",51:"f693420dcf48a7d94ae8",52:"4c730b50f978ad037ef1",53:"10ff6c8961898574121c",54:"057590a3480a333bd474",55:"3295563b7fbab7d7c92f",56:"392c874cbb83e68ba9b0",57:"0e458cb17af2cd84e871",58:"1606f8fed39bf289ed0e",59:"cb5a57c61337260a25ea",60:"e10d02ed3d3fd3f20f60",61:"ad09f0a95c5679ad6552",62:"7e6e0052d51c7547d70a",63:"0f8d3111b2b4e4f8c57b",64:"ce82fb945a44f47f1c1f",65:"52304eb24aada488c91f",66:"806271562f576dd0122c",67:"371a3d9f0e8c7aa3be9b",68:"5b0ebf4833498e06a8ed",69:"a76ca6ffb3668870b792",70:"da7c2a6096a1f44d78c1",71:"1730b154501db72324c2",72:"c3f9e8708ab92c13ba82",73:"54639ebdb8b503e723e0",74:"ddf9ccf79dcddaf6526e",75:"cf01c9adbf3c4e3828c7",76:"e98d846979e8bfbcf0dd",77:"57945ae646bb44434010"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},d.m=e,d.c=a,d.d=function(e,c,a){d.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},d.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(c,"a",c),c},d.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]); !function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var a={},f={80:0};function d(c){if(a[c])return a[c].exports;var f=a[c]={i:c,l:!1,exports:{}};return e[c].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var c=f[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,d){c=f[e]=[a,d]});c[2]=a;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"cbedb09f8527f7df9eb0",1:"954a8a70c5f1171933ac",2:"a280cacc2b4b43a244e1",3:"00e1cab932674e11a7ac",4:"7fb54b0d6edc84c910b5",5:"3c335bf1dd72ca957262",6:"987ab930d70320e9de11",7:"21ba80aa3751b3b4b200",8:"bbbda38e867acaa03e56",9:"893877b035c3b35f556e",10:"72fccf60a68381f76d55",11:"e50caf7e54aeba14012b",12:"3a716cdc462dbec28cf8",13:"3d730de7c60fa8d18ccb",14:"e11f31e60dab3db1f2ea",15:"6f6e42df3e657913869b",16:"b692b43283275c0bc6b9",17:"62255cf03bb549956c58",18:"7ffc38554bc63393a91e",19:"35726f60c578a23e9017",20:"ba2e2bd0823422a4de6c",21:"2073753ae49abdc23a5e",22:"41ffd63f72a1ec6e59b8",23:"e0c916556828fa70af60",24:"7a57624e89e34e420a52",25:"b33652a002af7a00f907",26:"9cbcbc21da1497c3c88d",27:"7b3dd90cfa2c0d5203d2",28:"53e6616ed021ab731d6c",29:"44433e90d6affacc76f8",30:"196dbd7ed8dc5dac2699",31:"18ef42ac5cec84cc247e",32:"5c7e44cdd6fbfea3e17b",33:"9081ead4ff7da6bbcc09",34:"5ddc08b92106aa050122",35:"813f9fa7bd98fbca9dd8",36:"cf85d431bf885b5e642d",37:"47cbd1ef2f65ae69c2d6",38:"778a114acece521cbeb2",39:"3b0a409728d724b82c12",40:"9b42df34317bf72a31fd",41:"d897544ef0e120fa5e4e",42:"bce71b4227f6a89e1f0e",43:"6dbdea53d2130ebc0609",44:"3cb0ad37cd3b652bf968",45:"2c6b2a0c1ecdf5dbf3c8",46:"9dad3123f2fc347c9f46",47:"a7bb6a30ce7426c8424b",48:"e7d2534c955cec793d9d",49:"27afa66e95971d59227a",50:"adff1b1ecb27fb4bfcad",51:"f693420dcf48a7d94ae8",52:"4c730b50f978ad037ef1",53:"10ff6c8961898574121c",54:"057590a3480a333bd474",55:"3295563b7fbab7d7c92f",56:"392c874cbb83e68ba9b0",57:"0e458cb17af2cd84e871",58:"1606f8fed39bf289ed0e",59:"cb5a57c61337260a25ea",60:"e10d02ed3d3fd3f20f60",61:"ad09f0a95c5679ad6552",62:"7e6e0052d51c7547d70a",63:"0f8d3111b2b4e4f8c57b",64:"ce82fb945a44f47f1c1f",65:"52304eb24aada488c91f",66:"806271562f576dd0122c",67:"371a3d9f0e8c7aa3be9b",68:"5b0ebf4833498e06a8ed",69:"a76ca6ffb3668870b792",70:"da7c2a6096a1f44d78c1",71:"1730b154501db72324c2",72:"c3f9e8708ab92c13ba82",73:"54639ebdb8b503e723e0",74:"ddf9ccf79dcddaf6526e",75:"cf01c9adbf3c4e3828c7",76:"e98d846979e8bfbcf0dd",77:"57945ae646bb44434010"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=f[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},d.m=e,d.c=a,d.d=function(e,c,a){d.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},d.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(c,"a",c),c},d.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -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-06-18 15:11:23 * @LastEditTime: 2020-06-19 11:36:57
--> -->
<!-- <!--
<customer-assign v-if="assignShow" :brandId="brandId" :clerkId="clerkId" :searchParams="searchInput" :chooseAll="selectRadio" :departObj="departObj" :multipleData="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign> <customer-assign v-if="assignShow" :brandId="brandId" :clerkId="clerkId" :searchParams="searchInput" :chooseAll="selectRadio" :departObj="departObj" :multipleData="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
let para = { let para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseRelatedId: that.wxEnterpriseRelatedId,
storeId: that.departObj.departmentId storeId: that.departObj.storeId
}; };
postRequest('/haoban-app-customer-web/clerk-list', para) postRequest('/haoban-app-customer-web/clerk-list', para)
.then(res => { .then(res => {
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
let para = { let para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseRelatedId: that.wxEnterpriseRelatedId,
storeId: that.departObj.departmentId, storeId: that.departObj.storeId,
clerkId: that.clerkId, clerkId: that.clerkId,
keyword: that.searchParams keyword: that.searchParams
}; };
...@@ -331,7 +331,7 @@ export default { ...@@ -331,7 +331,7 @@ export default {
const data = { const data = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
chooseAll: that.chooseAll, chooseAll: that.chooseAll,
storeId: that.departObj.departmentId, storeId: that.departObj.storeId,
clerkId: that.clerkId, clerkId: that.clerkId,
keyword: that.searchParams, keyword: that.searchParams,
memberIds: that.chooseAll == 1 ? '' : Object.keys(that.editRow).length ? that.editRow.memberId : that.multipleData.map(ele => ele.memberId).join(','), memberIds: that.chooseAll == 1 ? '' : Object.keys(that.editRow).length ? that.editRow.memberId : that.multipleData.map(ele => ele.memberId).join(','),
...@@ -370,7 +370,7 @@ export default { ...@@ -370,7 +370,7 @@ export default {
watch: { watch: {
departObj(newData) { departObj(newData) {
const that = this; const that = this;
if (Object.keys(newData).length && newData.isStore == 1) { if (Object.keys(newData).length) {
that.getClerkData(); that.getClerkData();
that.setNum(); that.setNum();
} }
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
}, },
mounted() { mounted() {
const that = this; const that = this;
if (Object.keys(that.departObj).length && that.departObj.isStore == 1) { if (Object.keys(that.departObj).length) {
that.getClerkData(); that.getClerkData();
that.setNum(); that.setNum();
} }
......
<!--
* @Descripttion : 当前组件信息
* @Author : 无尘
* @Date : 2020-02-13 14:02:22
* @LastEditors: 无尘
* @LastEditTime: 2020-06-19 10:55:10
* @FilePath : haoban-3\src\components\app\customer\store-list.vue
-->
<!--
<store-list :departObj="departObj" @getStore="getStore"></store-list>
import storeList from '@/components/app/customer/store-list.vue';
-->
<template>
<div class="depart-list-body">
<div class="depart-name-wrap m-b-20">
<div class="font-14 color-303133">门店 {{ total }}</div>
<div class="flex flex-space-between">
<div>
<el-input placeholder="请输入门店名称/代码" prefix-icon="el-icon-search" v-model="searchInput" class="w-274" @keyup.native="value => toInput(value, searchInput)" clearable @clear="clearInput"></el-input>
</div>
<div class="to-log flex m-t-20"></div>
</div>
</div>
<div class="depart-children-list border-box m-t-18">
<div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column class="cursor-pointer" label="门店名称" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeName || '--' }}</template>
</el-table-column>
<el-table-column class="cursor-pointer" prop="" label="门店类型" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.storeType || '--' }}</template>
</el-table-column>
<el-table-column class="cursor-pointer" prop="" label="门店分组" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.storeGroupName || '--' }}
</template>
</el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click="showMember(scope.row)">查看会员</el-button>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" layout="total, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div>
</div>
</div>
</div>
</template>
<script>
import { _debounce } from '@/common/js/public';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
// import showMsg from '@/common/js/showmsg';
export default {
name: 'depart-list',
components: {},
props: {
departObj: {
type: Object,
default() {
return {
departmentId: '',
departmentName: '',
wxDepartmentId: '',
parentId: '',
isStore: '',
staffCount: '',
bindFlag: ''
};
}
}
},
data() {
return {
nameVisible: false,
departmentName: this.departObj.departmentName || '',
searchInput: '',
// 分页参数
currentPage: 1,
pageSize: 10,
total: 0,
tableData: []
};
},
methods: {
showMember(item) {
const that = this;
that.$emit('getStore', item);
},
/**
* 输入
*/
toInput: _debounce(function(e, value) {
const that = this;
that.currentPage = 1;
that.getTableList();
}, 500),
// 搜索清除
clearInput() {
const that = this;
that.currentPage = 1;
that.getTableList();
},
/**
* 分页---页码变化
*/
handleSizeChange(val) {
const that = this;
that.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
*/
handleCurrentChange(val) {
const that = this;
that.currentPage = val;
that.getTableList();
},
/**
* 获取列表数据
*/
getTableList() {
const that = this;
let para = {
parentId: that.departObj.departmentId,
isStore: that.departObj.isStore,
keyWord: that.searchInput || '', // 搜索字段
pageNum: that.currentPage, // 当前页
pageSize: that.pageSize // 一页显示个数
};
getRequest('/haoban-manage3-web/department-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.list || [];
that.total = resData.result.total;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
departObj(newData, oldData) {
const that = this;
if (Object.keys(newData)) {
that.currentPage = 1;
that.getTableList();
}
}
},
mounted() {
const that = this;
if (Object.keys(that.departObj)) {
that.currentPage = 1;
that.getTableList();
}
}
};
</script>
<style lang="less" scoped>
.m-b-10 {
margin-bottom: 10px;
}
.el-breadcrumb__inner.is-link:hover,
.el-breadcrumb__inner a:hover {
color: #2f54eb;
}
.log-icon {
width: 28px;
height: 28px;
border-radius: 2px;
margin-right: 15px;
span {
color: #c0c4cc;
}
&:hover {
background: rgba(240, 245, 255, 1);
span {
color: #909399;
}
}
}
.to-log-btn {
width: 102px;
height: 28px;
line-height: 28px;
text-align: center;
background: rgba(245, 247, 250, 1);
&:hover {
color: #597ef7;
}
}
.w-274 {
width: 274px;
}
.iconchangyongicon- {
&:hover {
background: #eaedfd;
border-radius: 2px;
}
}
.depart-list-body {
.depart-id {
margin-top: 5px;
}
.depart-children-list {
padding: 16px 10px;
background: #f5f7fa;
}
}
</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-06-19 10:25:21 * @LastEditTime: 2020-06-19 11:31:40
--> -->
<template> <template>
<div class="app-detail-wrap"> <div class="app-detail-wrap">
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
<org-tree v-if="gicData.length" :brandId="brandId" :departObj="departObj" :itemData="gicData" @getSelectData="getSelectData"></org-tree> <org-tree v-if="gicData.length" :brandId="brandId" :departObj="departObj" :itemData="gicData" @getSelectData="getSelectData"></org-tree>
</div> </div>
<div class="list-right p-20 border-box"> <div class="list-right p-20 border-box">
<div class="list-right-body"> <store-list v-if="!showMember" :departObj="departObj" @getStore="getStore"></store-list>
<div v-if="showMember" class="list-right-body">
<div class="table-top flex flex-space-between"> <div class="table-top flex flex-space-between">
<div> <div>
<el-select class="w-168" v-model="clerkId" placeholder="" @change="changeCondition"> <el-select class="w-168" v-model="clerkId" placeholder="" @change="changeCondition">
...@@ -77,12 +79,13 @@ ...@@ -77,12 +79,13 @@
</div> </div>
</div> </div>
</div> </div>
<customer-assign v-if="assignShow" :brandId="brandId" :clerkId="clerkId" :searchParams="searchInput" :editRow="editRow" :chooseAll="selectRadio" :departObj="departObj" :multipleData="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign> <customer-assign v-if="assignShow" :brandId="brandId" :clerkId="clerkId" :searchParams="searchInput" :editRow="editRow" :chooseAll="selectRadio" :departObj="storeObj" :multipleData="multipleSelection" @closeText="closeText" @submitText="submitText"></customer-assign>
</div> </div>
</template> </template>
<script> <script>
import orgTree from '@/components/company/org-tree.vue'; import orgTree from '@/components/company/org-tree.vue';
import customerAssign from '@/components/app/customer/customer-assign.vue'; import customerAssign from '@/components/app/customer/customer-assign.vue';
import storeList from '@/components/app/customer/store-list.vue';
// import showMsg from '@/common/js/showmsg'; // import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
...@@ -117,7 +120,7 @@ export default { ...@@ -117,7 +120,7 @@ export default {
gicData: [], // gic gicData: [], // gic
clerkId: '0', // 导购 clerkId: '0', // 导购
searchInput: '', searchInput: '',
clerkOptions: [], clerkOptions: [], // 导购下拉列表
tableData: [], tableData: [],
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
...@@ -125,18 +128,31 @@ export default { ...@@ -125,18 +128,31 @@ export default {
loading: false, loading: false,
selectRadio: 0, // 0:选择当页; 1:选择全部 selectRadio: 0, // 0:选择当页; 1:选择全部
multipleSelection: [], multipleSelection: [],
assignShow: false assignShow: false,
// 是否显示会员列表
showMember: false,
storeObj: {}
}; };
}, },
methods: { methods: {
/** /**
* 获取会员数据
*/
getStore(obj) {
const that = this;
that.storeObj = obj;
that.showMember = true;
that.getClerkData();
that.getTableList();
},
/**
* 是否在分配中 * 是否在分配中
*/ */
async assignStatus() { async assignStatus() {
const that = this; const that = this;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let para = { let para = {
storeId: that.departObj.departmentId storeId: that.storeObj.storeId
}; };
getRequest('/haoban-app-customer-web/app-distribute-status', para) getRequest('/haoban-app-customer-web/app-distribute-status', para)
.then(res => { .then(res => {
...@@ -197,26 +213,22 @@ export default { ...@@ -197,26 +213,22 @@ export default {
}, },
/** /**
* 每次选中一个树中节点,把当前数据返回, * 每次选中一个树中节点,把当前数据返回,
* 获取选中部门/门店数据 * 获取选中部门
*/ */
getSelectData(obj) { getSelectData(obj) {
const that = this; const that = this;
console.log(obj); console.log(obj);
that.departObj = obj; that.departObj = obj;
that.selectRadio = 0; that.selectRadio = 0;
that.showMember = false;
that.storeObj = {};
// 判断是不是门店 // 判断是不是门店
if (obj.isStore == 0) { that.currentPage = 1;
that.currentPage = 1; that.tableData = [];
that.tableData = []; that.clerkOptions = [];
that.clerkOptions = []; that.clerkId = '0'; // 导购
that.clerkId = '0'; // 导购 that.searchInput = '';
that.searchInput = ''; that.multipleSelection = [];
that.multipleSelection = [];
return false;
}
// 如果是门店
that.getClerkData();
that.getTableList();
}, },
/** /**
* 表格选择 * 表格选择
...@@ -313,8 +325,12 @@ export default { ...@@ -313,8 +325,12 @@ export default {
ele.expand = false; ele.expand = false;
ele.children = []; ele.children = [];
ele.label = ele.storeGroupName; ele.label = ele.storeGroupName;
if (ele.parentGroupId == 0) {
ele.expand = true;
that.departObj = ele;
}
}); });
that.gicData = await that.treeData(resData.result); that.gicData = await that.treeData(JSON.parse(JSON.stringify(resData.result)));
} }
return false; return false;
} }
...@@ -361,7 +377,7 @@ export default { ...@@ -361,7 +377,7 @@ export default {
let para = { let para = {
enterpriseId: that.brandId, enterpriseId: that.brandId,
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseRelatedId: that.wxEnterpriseRelatedId,
storeId: that.departObj.departmentId storeId: that.storeObj.storeId
}; };
postRequest('/haoban-app-customer-web/clerk-list', para) postRequest('/haoban-app-customer-web/clerk-list', para)
.then(res => { .then(res => {
...@@ -389,7 +405,7 @@ export default { ...@@ -389,7 +405,7 @@ export default {
wxEnterpriseRelatedId: that.wxEnterpriseRelatedId, wxEnterpriseRelatedId: that.wxEnterpriseRelatedId,
pageNum: that.currentPage, pageNum: that.currentPage,
pageSize: that.pageSize, pageSize: that.pageSize,
storeId: that.departObj.departmentId, storeId: that.storeObj.storeId,
clerkId: that.clerkId, clerkId: that.clerkId,
keyword: that.searchInput keyword: that.searchInput
}; };
...@@ -415,6 +431,7 @@ export default { ...@@ -415,6 +431,7 @@ export default {
brandId: function(newData, oldData) { brandId: function(newData, oldData) {
const that = this; const that = this;
if (newData) { if (newData) {
that.showMember = false;
that.currentPage = 1; that.currentPage = 1;
that.tableData = []; that.tableData = [];
that.clerkOptions = []; that.clerkOptions = [];
...@@ -422,6 +439,7 @@ export default { ...@@ -422,6 +439,7 @@ export default {
that.searchInput = ''; that.searchInput = '';
that.selectRadio = 0; that.selectRadio = 0;
that.multipleSelection = []; that.multipleSelection = [];
that.storeObj = {};
that.getGicData(that.brandId); that.getGicData(that.brandId);
} }
} }
...@@ -433,7 +451,7 @@ export default { ...@@ -433,7 +451,7 @@ export default {
that.getGicData(that.brandId); that.getGicData(that.brandId);
} }
}, },
components: { orgTree, customerAssign } components: { orgTree, customerAssign, storeList }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
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