Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-4
Commits
c06b0e7e
Commit
c06b0e7e
authored
Sep 07, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改场景人群
parent
57da2a42
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
181 additions
and
36 deletions
+181
-36
sync-crowd-dialog.vue
src/components/app/my-customer/sync-crowd-dialog.vue
+25
-4
crowd-scene.vue
src/views/apps/customer-app/crowd-scene.vue
+5
-3
customer-assign.vue
src/views/apps/customer-app/customer-assign.vue
+148
-27
customer-data-set.vue
src/views/apps/customer-app/customer-data-set.vue
+3
-2
No files found.
src/components/app/my-customer/sync-crowd-dialog.vue
View file @
c06b0e7e
...
...
@@ -4,10 +4,10 @@
* @Author: 无尘
* @Date: 2020-08-28 10:31:09
* @LastEditors: 无尘
* @LastEditTime: 2020-09-0
4 16:18:44
* @LastEditTime: 2020-09-0
7 09:45:16
-->
<!--
<sync-crowd-dialog :brand-id="brandId" :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>
import syncCrowdDialog from '@/components/app/my-customer/sync-crowd-dialog.vue';
-->
<
template
>
...
...
@@ -27,10 +27,10 @@
</div>
<div
class=
"m-t-20"
>
<el-table
class=
"select-table"
v-loading=
"loadingPage"
ref=
"multipleTable"
height=
"500"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%' }" @selection-change="handleSelectionChange">
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
type=
"selection"
:selectable=
"selectable"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
""
label=
"人群名称"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
sceneCrowdName
||
'--'
}}
{{
selectIds
.
includes
(
scope
.
row
.
sceneCrowdId
)
?
'(已选择)'
:
''
}}{{
scope
.
row
.
sceneCrowdName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"所属分类"
show-overflow-tooltip
>
...
...
@@ -74,8 +74,14 @@ export default {
totalNum
:
{
type
:
[
String
,
Number
],
default
:
'0'
},
selectIds
:
{
type
:
Array
,
default
()
{
return
[];
}
},
},
data
()
{
return
{
wxEnterpriseId
:
localStorage
.
getItem
(
'haoBanUser'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)).
wxEnterpriseId
:
''
,
...
...
@@ -103,6 +109,21 @@ export default {
},
methods
:
{
/**
* @description: 禁用当前已选数据
* @param {Object} row
* @param {Number} index
* @return {Boolean}
* @author: 无尘
*/
selectable
(
row
,
index
)
{
const
that
=
this
;
if
(
that
.
selectIds
.
includes
(
row
.
sceneCrowdId
)){
return
false
;
}
else
{
return
true
;
}
},
/**
* @description: 确定保存
* @param {String} form
* @returns {Boolean}
...
...
src/views/apps/customer-app/crowd-scene.vue
View file @
c06b0e7e
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-0
4 15:44:48
* @LastEditTime: 2020-09-0
7 09:48:06
-->
<
template
>
...
...
@@ -64,7 +64,7 @@
</el-table>
</div>
</div>
<sync-crowd-dialog
v-if=
"showSync"
:total-num=
"totalNum"
:brand-id=
"brandId"
@
refreshData=
"refreshData"
></sync-crowd-dialog>
<sync-crowd-dialog
v-if=
"showSync"
:
select-ids=
"selectIds"
:
total-num=
"totalNum"
:brand-id=
"brandId"
@
refreshData=
"refreshData"
></sync-crowd-dialog>
<edit-visiable
v-if=
"showSelectStore"
:brand-id=
"brandId"
:set-item-id=
"setItemId"
:set-type=
"'crowd'"
:select-mode=
"selectMode"
:range-data=
"rangeData"
@
refreshData=
"refreshData"
></edit-visiable>
</div>
</template>
...
...
@@ -106,7 +106,8 @@ export default {
showSelectStore
:
false
,
// 可见范围显示
selectMode
:
''
,
// 选择类型 0:所有; 1:分组; 2:门店
rangeData
:
[],
// 选择的分组或门店
setItemId
:
''
// 选中的场景 id
setItemId
:
''
,
// 选中的场景 id
selectIds
:
[]
// 已选的所以场景 id
};
},
// 生命周期 - 挂载完成(访问DOM元素)
...
...
@@ -178,6 +179,7 @@ export default {
*/
toSync
()
{
const
that
=
this
;
that
.
selectIds
=
that
.
memberCrowdData
.
map
(
ele
=>
ele
.
sceneCrowdId
)
||
[];
that
.
showSync
=
true
;
},
/**
...
...
src/views/apps/customer-app/customer-assign.vue
View file @
c06b0e7e
...
...
@@ -4,12 +4,25 @@
* @Author: 无尘
* @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-0
4 10:09:38
* @LastEditTime: 2020-09-0
7 10:40:30
-->
<
template
>
<div
class=
"app-detail-wrap"
>
<div
class=
"border-box"
>
<div
class=
"list-body flex"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
label=
"分配策略"
name=
"first"
></el-tab-pane>
<el-tab-pane
label=
"顾客列表"
name=
"second"
></el-tab-pane>
</el-tabs>
<div
class=
"customer-assign-set"
>
<div
class=
"m-b-10"
>
<el-checkbox
v-model=
"customerSetData.bindCode"
>
解绑导购code,顾客自动分配给店长
</el-checkbox>
<div
class=
"font-12 color-909399 set-tip-item"
>
注:保存勾选项后,解绑当前导购code,该导购cede名下的顾客会分配到店长,在移动端可重新分配顾客
</div>
</div>
<div
class=
"m-t-46 p-l-20"
>
<el-button
type=
"primary"
:loading=
"loadingSet"
@
click=
"submit"
>
保存
</el-button>
</div>
</div>
<div
v-if=
"activeName == 'second'"
class=
"list-body flex"
>
<div
class=
"list-left border-box"
>
<org-tree
v-if=
"gicData.length"
:brand-id=
"brandId"
:depart-obj=
"departObj"
:item-data=
"gicData"
@
getSelectData=
"getSelectData"
></org-tree>
</div>
...
...
@@ -87,11 +100,11 @@
import
orgTree
from
'@/components/app/my-customer/org-tree.vue'
;
import
customerAssign
from
'@/components/app/my-customer/customer-assign.vue'
;
import
storeList
from
'@/components/app/my-customer/store-list.vue'
;
//
import showMsg from '@/common/js/showmsg';
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
fetch
from
'@/api/my-customer-app.js'
;
const
{
getGroupList
,
getMemberList
,
getNavChain
,
getAssignStatus
,
getClerkList
}
=
fetch
;
const
{
get
CustomerSet
,
saveCustomerSet
,
get
GroupList
,
getMemberList
,
getNavChain
,
getAssignStatus
,
getClerkList
}
=
fetch
;
export
default
{
name
:
'CustomerAssignPage'
,
components
:
{
orgTree
,
customerAssign
,
storeList
},
...
...
@@ -119,6 +132,13 @@ export default {
return
{
projectName
:
''
,
// 当前项目名
wxEnterpriseId
:
localStorage
.
getItem
(
'haoBanUser'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'haoBanUser'
)).
wxEnterpriseId
:
''
,
// 分配策略
activeName
:
'first'
,
loadingSet
:
false
,
cutomerSetData
:
{
bindCode
:
false
},
// 顾客列表
departObj
:
{},
// 选中的部门、门店
gicData
:
[],
// gic
clerkId
:
'0'
,
// 导购
...
...
@@ -144,14 +164,84 @@ export default {
const
that
=
this
;
that
.
$emit
(
'showTab'
,
'/customer-assign'
);
if
(
that
.
brandId
)
{
that
.
getGicData
(
that
.
brandId
);
that
.
getGicData
();
}
},
methods
:
{
/**
* 面包屑选择分组
* @description: 当前函数信息
* @author: 无尘
*/
handleTabClick
()
{
const
that
=
this
;
if
(
that
.
activeName
==
'first'
)
{
that
.
getSetData
();
}
else
{
that
.
showMember
=
false
;
that
.
currentPage
=
1
;
that
.
tableData
=
[];
that
.
clerkOptions
=
[];
that
.
clerkId
=
'0'
;
// 导购
that
.
searchInput
=
''
;
that
.
selectRadio
=
0
;
that
.
multipleSelection
=
[];
that
.
storeObj
=
{};
that
.
getGicData
();
}
},
/**
* 保存
*/
submit
:
_debounce
(
function
()
{
const
that
=
this
;
that
.
loadingSet
=
true
;
that
.
setData
();
},
300
),
/**
* 保存-API
*/
setData
()
{
const
that
=
this
;
const
para
=
{
enterpriseId
:
that
.
brandId
,
switchType
:
2
};
saveCustomerSet
(
para
)
.
then
(
res
=>
{
that
.
loadingSet
=
false
;
that
.
getCustomerData
();
if
(
res
.
code
==
'0000'
)
{
showMsg
.
showmsg
(
'操作成功'
,
'success'
);
}
else
{
showMsg
.
showmsg
(
res
.
message
||
'接口异常'
,
'warning'
);
}
})
.
catch
(
function
(
error
)
{
that
.
loadingSet
=
false
;
});
},
/**
* @description: 获取展示数据
* @author: 无尘
*/
getSetData
()
{
const
that
=
this
;
const
para
=
{
enterpriseId
:
that
.
brandId
};
getCustomerSet
(
para
)
.
then
(
res
=>
{
that
.
cutomerSetData
=
res
.
result
||
[];
})
.
catch
(
function
(
error
)
{
});
},
/**
* @description: 面包屑选择分组
* @param {Object} obj
* @param {Array} copyData
* @author: 无尘
*/
async
setParent
(
obj
,
copyData
)
{
const
that
=
this
;
...
...
@@ -165,8 +255,9 @@ export default {
}
},
/**
* 面包屑选择分组
*
@description:
面包屑选择分组
* @param {Object} item
* @author: 无尘
*/
async
changeDepart
(
item
)
{
const
that
=
this
;
...
...
@@ -189,8 +280,9 @@ export default {
that
.
gicData
[
0
].
expand
=
true
;
},
/**
* 获取会员数据
*
@description:
获取会员数据
* @param {Object} obj
* @author: 无尘
*/
getStore
(
obj
)
{
const
that
=
this
;
...
...
@@ -201,7 +293,8 @@ export default {
that
.
toGetNavData
();
},
/**
* 是否在分配中
* @description: 是否在分配中
* @author: 无尘
*/
async
assignStatus
()
{
const
that
=
this
;
...
...
@@ -225,7 +318,8 @@ export default {
});
},
/**
* 关闭分配
* @description: 关闭分配
* @author: 无尘
*/
closeText
()
{
const
that
=
this
;
...
...
@@ -236,7 +330,8 @@ export default {
that
.
$refs
.
multipleTable
.
clearSelection
();
},
/**
* 完成分配回调
* @description: 完成分配回调
* @author: 无尘
*/
submitText
()
{
const
that
=
this
;
...
...
@@ -261,7 +356,8 @@ export default {
});
},
/**
* 输入
* @description: 输入
* @author: 无尘
*/
toInput
:
_debounce
(
function
()
{
const
that
=
this
;
...
...
@@ -269,7 +365,8 @@ export default {
that
.
getTableList
();
},
500
),
/**
* 搜索标签清空
* @description: 搜索标签清空
* @author: 无尘
*/
clearSearch
()
{
const
that
=
this
;
...
...
@@ -278,8 +375,9 @@ export default {
},
/**
* 每次选中一个树中节点,把当前数据返回,
* 获取选中部门
*
@description:
获取选中部门
* @param {Object} obj
* @author: 无尘
*/
getSelectData
(
obj
)
{
const
that
=
this
;
...
...
@@ -296,23 +394,26 @@ export default {
that
.
multipleSelection
=
[];
},
/**
* 表格选择
*
@description:
表格选择
* @param {Array} val
* @author: 无尘
*/
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
/**
* 显示选择本页/全部
*
@description:
显示选择本页/全部
* @param {String} command
* @author: 无尘
*/
handleCommand
(
command
)
{
this
.
selectRadio
=
command
;
},
/**
* 分配
*
@description:
分配
* @param {Number} index
* @param {Object} row
* @author: 无尘
*/
async
toAssignMember
(
index
,
row
)
{
const
that
=
this
;
...
...
@@ -332,7 +433,8 @@ export default {
that
.
assignShow
=
true
;
},
/**
* 批量分配
* @description: 批量分配
* @author: 无尘
*/
async
toAssign
()
{
const
that
=
this
;
...
...
@@ -355,8 +457,9 @@ export default {
that
.
assignShow
=
true
;
},
/**
* 简单数组-->父子数组对象
*
@description:
简单数组-->父子数组对象
* @param {Array} data
* @author: 无尘
*/
async
treeData
(
data
)
{
let
tree
=
data
.
filter
(
father
=>
{
...
...
@@ -376,7 +479,8 @@ export default {
return
tree
;
},
/**
* 获取 gic 数据
* @description: 获取 gic 数据
* @author: 无尘
*/
getGicData
()
{
const
that
=
this
;
...
...
@@ -406,7 +510,8 @@ export default {
});
},
/**
* 条件
* @description: 条件
* @author: 无尘
*/
changeCondition
()
{
const
that
=
this
;
...
...
@@ -414,8 +519,9 @@ export default {
that
.
getTableList
();
},
/**
* 分页---页码变化
*
@description:
分页---页码变化
* @param {Number} val
* @author: 无尘
*/
handleSizeChange
(
val
)
{
const
that
=
this
;
...
...
@@ -425,8 +531,9 @@ export default {
},
/**
* 分页---当前页变化
*
@description:
分页---当前页变化
* @param {Number} val
* @author: 无尘
*/
handleCurrentChange
(
val
)
{
const
that
=
this
;
...
...
@@ -434,7 +541,8 @@ export default {
that
.
getTableList
();
},
/**
* 获取面包屑
* @description: 获取面包屑
* @author: 无尘
*/
toGetNavData
()
{
const
that
=
this
;
...
...
@@ -456,7 +564,8 @@ export default {
});
},
/**
* 获取导购列表
* @description: 获取导购列表
* @author: 无尘
*/
getClerkData
()
{
const
that
=
this
;
...
...
@@ -474,7 +583,8 @@ export default {
});
},
/**
* 获取列表数据(只有门店才有)
* @description: 获取列表数据(只有门店才有)
* @author: 无尘
*/
getTableList
()
{
const
that
=
this
;
...
...
@@ -510,7 +620,7 @@ export default {
that
.
selectRadio
=
0
;
that
.
multipleSelection
=
[];
that
.
storeObj
=
{};
that
.
getGicData
(
that
.
brandId
);
that
.
getGicData
();
}
}
}
...
...
@@ -540,14 +650,25 @@ export default {
.p-l-199
{
padding-left
:
199px
;
}
.m-b-10
{
margin-bottom
:
10px
;
}
.el-breadcrumb__inner.is-link
:hover
,
.el-breadcrumb__inner
a
:hover
{
color
:
#2f54eb
;
}
.m-t-46
{
margin-top
:
46px
;
}
.set-tip-item
{
line-height
:
22px
;
padding-left
:
25px
;
}
.app-detail-wrap
{
height
:
100%
;
background
:
#fff
;
...
...
src/views/apps/customer-app/customer-data-set.vue
View file @
c06b0e7e
...
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-0
4 10:10:29
* @LastEditTime: 2020-09-0
7 10:23:56
-->
<
template
>
<div
class=
"common-app-right"
>
...
...
@@ -85,7 +85,8 @@ export default {
shopOrder
:
that
.
customerShowData
.
shopOrder
?
1
:
'0'
,
allowGuideMobile
:
that
.
customerShowData
.
allowGuideMobile
?
1
:
'0'
,
allowGuideMessage
:
that
.
customerShowData
.
allowGuideMessage
?
1
:
'0'
,
allowGuideOnlineChat
:
that
.
customerShowData
.
allowGuideOnlineChat
?
1
:
'0'
allowGuideOnlineChat
:
that
.
customerShowData
.
allowGuideOnlineChat
?
1
:
'0'
,
switchType
:
1
};
saveCustomerSet
(
para
)
.
then
(
res
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment