Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
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-3
Commits
bd209dc6
Commit
bd209dc6
authored
May 24, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 客户展示设置
parent
1e876f6b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
347 additions
and
282 deletions
+347
-282
button-code.js
menu-data/button-code.js
+10
-4
menu-data.js
menu-data/menu-data.js
+7
-7
index.js
src/router/index.js
+10
-0
add-member-show-rules.vue
src/views/apps/customerApp/add-member-show-rules.vue
+201
-0
memberShowSet.vue
src/views/apps/customerApp/memberShowSet.vue
+119
-271
No files found.
menu-data/button-code.js
View file @
bd209dc6
...
...
@@ -16,10 +16,16 @@ module.exports = {
// 2.待开启同步标签 (按钮,控制“待开启同步标签”所有操作权限)
willSyncTag
:
[
'待开启同步标签'
,
1
,
2
]
},
// TODO 客户展示设置
// TODO 1.特殊策略配置 (按钮,控制“新增特殊策略配置”弹窗内所有操作权限)
// TODO 2.编辑 (按钮,控制“修改特殊策略配置”弹窗内所有操作权限)
// TODO 3.删除 (按钮)
// 客户展示设置
memberShowSet
:
{
// 按钮名称、是否受权限控制0否1是、是否增删改0跳转1是2其他、按钮跳转路径
// 1.特殊策略配置 (按钮,控制“新增特殊策略配置”弹窗内所有操作权限)
addShowRules
:
[
'新增特殊策略'
,
1
,
0
,
'addMemberShowRules'
],
// 2.编辑 (按钮,控制“修改特殊策略配置”弹窗内所有操作权限)
editShowRules
:
[
'编辑'
,
1
,
0
,
'editMemberShowRules'
],
// 3.删除 (按钮)
delShowRules
:
[
'删除'
,
1
,
1
]
},
memberGroupSet
:
{
// 1.会员分组失效后不展示(按钮)
groupExpire
:
[
'分组失效后不展示'
,
1
,
2
],
...
...
menu-data/menu-data.js
View file @
bd209dc6
...
...
@@ -20,13 +20,13 @@ module.exports = [
{
menu
:
[
'客户基础设置'
,
''
,
1
,
'iconkehushezhi'
],
children
:
[
//
{
// menu: ['客户展示设置', '', 1],// TODO 本次新增页面
//
children: [
// { menu: ['新增特殊策略', '', 1] },// TODO 本次新增页面
// { menu: ['编辑特殊策略', '', 1] },// TODO 本次新增页面
//
]
//
},
{
menu
:
[
'客户展示设置'
,
'memberShowSet'
,
1
],
children
:
[
{
menu
:
[
'新增特殊策略'
,
'addMemberShowRules'
,
1
]
},
{
menu
:
[
'编辑特殊策略'
,
'editMemberShowRules'
,
1
]
},
]
},
{
menu
:
[
'客户分组设置'
,
'memberGroupSet'
,
1
],
children
:
[
...
...
src/router/index.js
View file @
bd209dc6
...
...
@@ -217,6 +217,16 @@ export const constantRouterMap = [
component
:
_import
(
'apps/customerApp'
,
'memberShowSet'
)
},
{
path
:
'/addMemberShowRules'
,
name
:
'新增特殊策略'
,
component
:
_import
(
'apps/customerApp'
,
'add-member-show-rules'
)
},
{
path
:
'/editMemberShowRules'
,
name
:
'编辑特殊策略'
,
component
:
_import
(
'apps/customerApp'
,
'add-member-show-rules'
)
},
{
path
:
'/memberGroupSet'
,
name
:
'客户分组设置'
,
component
:
_import
(
'apps/customerApp'
,
'memberGroupSet'
)
...
...
src/views/apps/customerApp/add-member-show-rules.vue
0 → 100644
View file @
bd209dc6
<
template
>
<div
class=
"add-rules"
>
<el-form
:model=
"myCustomData"
:rules=
"rules"
ref=
"myCustomData"
label-width=
"100px"
>
<el-form-item
label=
"策略名称"
prop=
"strategyName"
>
<el-input
v-model=
"myCustomData.strategyName"
style=
"width: 460px"
placeholder=
"请输入策略名称"
maxlength=
"10"
show-word-limit
></el-input>
</el-form-item>
<el-form-item
label=
"门店类型"
prop=
"storeType"
>
<el-checkbox-group
v-model=
"myCustomData.storeType"
>
<el-checkbox
v-for=
"el in storeTypes"
:key=
"el.value"
:disabled=
"selectedTypes.includes(el.value)"
:label=
"el.value"
>
{{
el
.
label
}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"设置项"
prop=
"options"
>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.mainStoreFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
展示服务门店客户
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购和店长可查看本门店作为服务门店名下客户
</div>
</div>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.minorStoreFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
展示协管门店客户
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购和店长可查看本门店作为协管门店名下客户
</div>
</div>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.openCardStoreFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
展示开卡门店客户
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购和店长可查看本门店作为开卡门店名下客户
</div>
</div>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.showFreezeFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
展示冻结会员
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购和店长可查看本门店冻结会员
</div>
</div>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.isSeeAuthMember"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
展示已开卡会员
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购和店长可查看本门店微信会员(不含未开卡会员)及POS会员,不勾选将展示微信会员(即微信总量,含未开卡会员)及POS会员
</div>
</div>
<div
class=
"setting-item"
>
<el-checkbox
v-model=
"myCustomData.clerkSeeOtherFlag"
:true-label=
"1"
:false-label=
"0"
@
change=
"onOptionsChange"
>
允许导购查看其他导购客户
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,门店导购可查看本门店其他导购名下客户
</div>
</div>
</el-form-item>
</el-form>
<hb-form-bottom>
<el-button
@
click=
"$router.go(-1)"
>
取消
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"onSave"
>
保 存
</el-button>
</hb-form-bottom>
</div>
</
template
>
<
script
>
import
errMsg
from
'@/common/js/error'
;
import
{
postRequest
,
getRequest
}
from
'@/api/api'
;
export
default
{
name
:
'AddMemberShowRules'
,
props
:
{
brandId
:
{
type
:
String
,
default
()
{
return
''
;
}
}
},
data
()
{
const
valiStoreType
=
(
rules
,
value
,
callback
)
=>
{
const
data
=
value
.
filter
(
el
=>
!
this
.
selectedTypes
.
includes
(
el
));
if
(
data
.
length
==
0
)
{
return
callback
(
new
Error
(
'请选择门店类型'
));
}
callback
();
};
return
{
// 门店类型 -1:全部;1:自营;2:联营;3:代理;4:代销;5:托管
storeTypes
:
[
{
label
:
'自营'
,
value
:
'1'
},
{
label
:
'联营'
,
value
:
'2'
},
{
label
:
'代理'
,
value
:
'3'
},
{
label
:
'代销'
,
value
:
'4'
},
{
label
:
'托管'
,
value
:
'5'
}
],
selectedTypes
:
[],
wxEnterpriseRelatedId
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
,
myCustomData
:
{
memberManageSettingId
:
''
,
// 会员设置id,更新时必传
strategyName
:
''
,
storeType
:
[],
//门店类型 -1:全部;1:自营;2:联营;3:代理;4:代销;5:托管
mainStoreFlag
:
0
,
// 服务门店显示,1显示0不现实
minorStoreFlag
:
0
,
// 协管门店显示,1显示0不显示
openCardStoreFlag
:
0
,
// 开卡门店显示,1显示0不显示
clerkSeeOtherFlag
:
0
,
// 导购查看其他导购,1显示0不显示
showFreezeFlag
:
0
,
isSeeAuthMember
:
0
,
options
:
''
},
rules
:
{
strategyName
:
{
required
:
true
,
message
:
'请输入策略名称'
,
trigger
:
'blur'
},
storeType
:
{
required
:
true
,
validator
:
valiStoreType
,
trigger
:
'blur'
},
options
:
{
required
:
true
,
message
:
'请选择设置项'
,
trigger
:
'blur'
}
},
loading
:
false
};
},
methods
:
{
onOptionsChange
()
{
const
{
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
}
=
this
.
myCustomData
;
const
flag
=
mainStoreFlag
==
1
||
minorStoreFlag
==
1
||
openCardStoreFlag
==
1
||
clerkSeeOtherFlag
==
1
||
showFreezeFlag
==
1
||
isSeeAuthMember
==
1
;
this
.
myCustomData
.
options
=
flag
?
1
:
''
;
},
getSettingList
()
{
getRequest
(
'/haoban-app-customer-web/customer/find-member-manage-setting-list'
,
{}).
then
(
res
=>
{
const
{
code
,
result
}
=
res
.
data
||
{};
if
(
code
!=
0
)
{
errMsg
.
errorMsg
(
res
.
data
);
return
;
}
if
(
Array
.
isArray
(
result
))
{
this
.
selectedTypes
=
result
.
reduce
((
types
,
el
)
=>
{
if
(
typeof
el
.
storeType
==
'string'
&&
el
.
memberManageSettingId
!=
this
.
myCustomData
.
memberManageSettingId
)
{
let
storeTypes
=
el
.
storeType
.
split
(
','
);
storeTypes
=
storeTypes
.
filter
(
el
=>
!
types
.
includes
(
el
));
types
=
types
.
concat
(
storeTypes
);
}
return
types
;
},
[]);
this
.
myCustomData
.
storeType
=
this
.
myCustomData
.
storeType
.
concat
(
this
.
selectedTypes
);
setTimeout
(()
=>
{
this
.
rules
.
storeType
.
trigger
=
'change'
;
},
50
);
}
});
},
onSave
()
{
this
.
loading
=
true
;
this
.
$refs
.
myCustomData
.
validate
(
vali
=>
{
if
(
!
vali
)
{
this
.
loading
=
false
;
return
;
}
const
{
memberManageSettingId
,
strategyName
,
storeType
,
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
}
=
this
.
myCustomData
;
const
params
=
{
memberManageSettingId
,
strategyName
,
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
};
params
.
storeType
=
storeType
.
filter
(
el
=>
!
this
.
selectedTypes
.
includes
(
el
)).
join
(
','
);
postRequest
(
'/haoban-app-customer-web/customer/save-member-show-setting'
,
params
)
.
then
(
res
=>
{
const
{
errorCode
}
=
res
.
data
||
{};
if
(
errorCode
!=
1
)
{
errMsg
.
errorMsg
(
res
.
data
);
return
;
}
this
.
$message
.
success
(
'保存成功'
);
this
.
$router
.
go
(
-
1
);
})
.
finally
(()
=>
(
this
.
loading
=
false
));
});
},
getShowSet
()
{
postRequest
(
'/haoban-app-customer-web/customer/find-member-manage-setting-detail'
,
{
memberManageSettingId
:
this
.
myCustomData
.
memberManageSettingId
}).
then
(
res
=>
{
const
{
code
,
result
}
=
res
.
data
||
{};
if
(
code
!=
0
)
{
errMsg
.
errorMsg
(
res
.
data
);
return
;
}
const
{
strategyName
,
storeType
,
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
}
=
result
||
{};
Object
.
assign
(
this
.
myCustomData
,
{
strategyName
,
storeType
:
typeof
storeType
==
'string'
?
storeType
.
split
(
','
)
:
[],
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
});
setTimeout
(()
=>
{
this
.
rules
.
options
.
trigger
=
'change'
;
},
50
);
});
}
},
created
()
{
this
.
getSettingList
();
if
(
this
.
$route
.
query
.
id
)
{
this
.
myCustomData
.
memberManageSettingId
=
this
.
$route
.
query
.
id
;
this
.
getShowSet
();
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.add-rules
{
padding
:
20px
;
}
.setting-item
{
&
+
.setting-item
{
margin-top
:
16px
;
}
.set-tip-text
{
padding
:
0
0
0
25px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#909399
;
line-height
:
17px
;
}
}
</
style
>
src/views/apps/customerApp/memberShowSet.vue
View file @
bd209dc6
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-08-17 15:35:50
-->
<!--
我的客户应用:
<app-detail ></app-detail>
-->
<
template
>
<div
class=
"app-detail-wrap"
>
<div
class=
"app-detail-pane border-box p-20"
>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.mainStoreFlag"
>
展示服务门店客户
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店作为服务门店名下客户
</div>
</div>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.minorStoreFlag"
>
展示协管门店客户
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店作为协管门店名下客户
</div>
</div>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.openCardStoreFlag"
>
展示开卡门店客户
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店作为开卡门店名下客户
</div>
</div>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.showFreezeFlag"
>
展示冻结会员
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店冻结会员
</div>
</div>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.isSeeAuthMember"
>
展示已开卡会员
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店微信会员(不含未开卡会员)及POS会员,不勾选将展示微信会员(即微信总量,含未开卡会员)及POS会员
</div>
</div>
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.clerkSeeOtherFlag"
>
允许导购查看其他导购客户
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购可查看本门店其他导购名下客户
</div>
</div>
<!--
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.faceOpenFlag"
>
展示人脸识别模块
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,会员基础信息将展示人脸识别相关内容。消费订单取当天数据进行匹配。如果录单时间是隔天的,不会产生消费订单通知,即不会产生人脸匹配通知
</div>
</div>
-->
<div
class=
"m-b-20"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.handoverFlag"
>
离职继承
</el-checkbox>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,店长可以选择离职的导购名下的好友会员,选择离职继承
</div>
</div>
<div
class=
"m-b-20"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"注:开启后,可选择导购在 < 我的客户 > 中是否通过以下方式联系客户"
placement=
"top-start"
>
<span
style=
"cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;"
class=
"font-14 color-606266 m-r-20"
>
导购联系客户方式:
</span></el-tooltip>
<el-checkbox
v-model=
"myCustomData.allowGuideMobile"
@
change=
"changeContact"
>
电话
</el-checkbox>
<el-checkbox
v-model=
"myCustomData.allowGuideMessage"
@
change=
"changeContact"
>
短信
</el-checkbox>
<el-checkbox
v-model=
"myCustomData.allowGuideOnlineChat"
@
change=
"changeContact"
>
添加客户/发消息
</el-checkbox>
</div>
<div
class=
"m-t-46"
>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"submit('showFlag')"
:disabled=
"$store.state.wxEnterpriseType"
>
保 存
</el-button>
<div
class=
"show-set"
>
<div
class=
"show-set-header"
>
<el-alert
type=
"info"
show-icon
:closable=
"false"
class=
"show-set-tips"
>
<div
slot=
"title"
>
<div
class=
"tips-text"
>
1. 同一商户下,各子管理员新增的特殊策略的门店类型不能重复;
</div>
<div
class=
"tips-text"
>
2. 子管理员设置的门店类型和默认重复时,按子管理员设置的逻辑生效;
</div>
</div>
</el-alert>
<el-button
v-if=
"true || $getButtonLimit($buttonCode.addShowRules)"
:limit-code=
"$buttonCode.addShowRules"
@
click=
"$router.push('/addMemberShowRules')"
type=
"primary"
>
新增特殊策略
</el-button>
</div>
<el-table
:data=
"tableData"
>
<el-table-column
label=
"策略名称"
prop=
"strategyName"
min-width=
"185px"
show-overflow-tooltip
>
<template
slot-scope=
"
{ row, $index }">
<span
v-if=
"$index == 0"
class=
"default-store"
>
默认
</span>
{{
row
.
strategyName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"策略类型"
prop=
"storeType"
:formatter=
"(row, col, val) => (val == '-1' ? '通用策略' : '特殊策略')"
min-width=
"110px"
></el-table-column>
<el-table-column
label=
"门店类型"
prop=
"storeType"
:formatter=
"formatStoreType"
min-width=
"110px"
></el-table-column>
<el-table-column
label=
"设置内容"
min-width=
"310px"
>
<
template
slot-scope=
"{ row }"
>
{{
formatSetting
(
row
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
prop=
"creatorName"
min-width=
"90px"
></el-table-column>
<el-table-column
label=
"编辑人"
prop=
"modifierName"
min-width=
"90px"
></el-table-column>
<el-table-column
label=
"最近编辑时间"
prop=
"updateTime"
min-width=
"170px"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
updateTime
|
formatTimeStamp
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"120px"
v-if=
"true || $getButtonLimit($buttonCode.editShowRules) || $getButtonLimit($buttonCode.delShowRules)"
>
<
template
slot-scope=
"{ row, $index }"
>
<el-button
v-if=
"true || $getButtonLimit($buttonCode.editShowRules)"
:limit-code=
"$buttonCode.editShowRules"
@
click=
"$router.push('/editMemberShowRules?id=' + row.memberManageSettingId)"
type=
"text"
>
编辑
</el-button>
<dm-delete
tips=
"是否删除?"
v-if=
"true || ($index > 0 && $getButtonLimit($buttonCode.delShowRules))"
@
confirm=
"onDel(row)"
>
<el-button
:loading=
"row.loading"
:limit-code=
"$buttonCode.delShowRules"
type=
"text"
>
删除
</el-button>
</dm-delete>
</
template
>
</el-table-column>
</el-table>
</div>
</template>
<
script
>
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
postRequest
}
from
'@/api/api'
;
import
{
getRequest
}
from
'@/api/api.js'
;
import
errorMsg
from
'@/common/js/error.js'
;
export
default
{
name
:
'app-detail'
,
props
:
{
brandId
:
{
type
:
String
,
default
()
{
return
''
;
}
},
tabType
:
{
type
:
String
,
default
()
{
return
'1'
;
}
}
},
name
:
'MemberShowSet'
,
data
()
{
return
{
projectName
:
''
,
// 当前项目名
activeName
:
'first'
,
wxEnterpriseRelatedId
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
,
myCustomData
:
{
searchFlag
:
false
,
chatFlag
:
false
,
mainStoreFlag
:
false
,
// 服务门店显示,1显示0不现实
minorStoreFlag
:
false
,
// 协管门店显示,1显示0不显示
openCardStoreFlag
:
false
,
// 开卡门店显示,1显示0不显示
clerkSeeOtherFlag
:
false
,
// 导购查看其他导购,1显示0不显示
showFreezeFlag
:
false
,
isSeeAuthMember
:
false
,
allowGuideContact
:
false
,
allowGuideMobile
:
false
,
allowGuideMessage
:
false
,
allowGuideOnlineChat
:
false
,
faceOpenFlag
:
false
,
handoverFlag
:
false
},
loading
:
false
tableData
:
[]
};
},
created
()
{
this
.
getTableData
();
},
methods
:
{
/**
* 保存
*/
submit
:
_debounce
(
function
(
type
)
{
const
that
=
this
;
that
.
loading
=
true
;
that
.
setData
(
type
);
},
500
),
/**
* 保存-API
*/
setData
(
type
)
{
const
that
=
this
;
let
para
=
{
enterpriseId
:
that
.
brandId
,
wxEnterpriseRelatedId
:
that
.
wxEnterpriseRelatedId
// enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId
};
let
url
;
if
(
type
!=
'showFlag'
)
{
para
[
type
]
=
!!
that
.
myCustomData
[
type
]
?
1
:
0
;
url
=
'/haoban-app-customer-web/customer/save-online-chat-setting'
;
if
(
type
===
'searchFlag'
)
{
url
=
'/haoban-app-customer-web/customer/save-customer-setting'
;
formatStoreType
(
row
,
col
,
val
)
{
const
storeTypes
=
[
{
label
:
'自营'
,
value
:
'1'
},
{
label
:
'联营'
,
value
:
'2'
},
{
label
:
'代理'
,
value
:
'3'
},
{
label
:
'代销'
,
value
:
'4'
},
{
label
:
'托管'
,
value
:
'5'
}
];
let
result
=
[];
if
(
typeof
val
==
'string'
)
{
const
types
=
val
.
split
(
','
);
result
=
storeTypes
.
filter
(
el
=>
types
.
includes
(
el
.
value
)).
map
(
el
=>
el
.
label
);
}
return
result
.
join
(
'/'
);
},
formatSetting
(
row
)
{
const
result
=
[];
if
(
row
.
mainStoreFlag
==
1
)
{
result
.
push
(
'展示服务门店客户'
);
}
}
else
{
para
[
'mainStoreFlag'
]
=
!!
that
.
myCustomData
[
'mainStoreFlag'
]
?
1
:
0
;
para
[
'minorStoreFlag'
]
=
!!
that
.
myCustomData
[
'minorStoreFlag'
]
?
1
:
0
;
para
[
'openCardStoreFlag'
]
=
!!
that
.
myCustomData
[
'openCardStoreFlag'
]
?
1
:
0
;
para
[
'clerkSeeOtherFlag'
]
=
!!
that
.
myCustomData
[
'clerkSeeOtherFlag'
]
?
1
:
0
;
para
[
'allowGuideContact'
]
=
!!
that
.
myCustomData
[
'allowGuideContact'
]
?
1
:
0
;
para
[
'allowGuideMobile'
]
=
!!
that
.
myCustomData
[
'allowGuideMobile'
]
?
1
:
0
;
para
[
'allowGuideMessage'
]
=
!!
that
.
myCustomData
[
'allowGuideMessage'
]
?
1
:
0
;
para
[
'allowGuideOnlineChat'
]
=
!!
that
.
myCustomData
[
'allowGuideOnlineChat'
]
?
1
:
0
;
para
[
'showFreezeFlag'
]
=
!!
that
.
myCustomData
[
'showFreezeFlag'
]
?
1
:
0
;
para
[
'isSeeAuthMember'
]
=
!!
that
.
myCustomData
[
'isSeeAuthMember'
]
?
1
:
0
;
para
[
'faceOpenFlag'
]
=
!!
that
.
myCustomData
[
'faceOpenFlag'
]
?
1
:
0
;
para
[
'handoverFlag'
]
=
!!
that
.
myCustomData
[
'handoverFlag'
]
?
1
:
0
;
para
.
chatFlag
=
that
.
myCustomData
.
chatFlag
;
// 总的
para
.
isMessageRemind
=
that
.
myCustomData
.
isMessageRemind
;
// 短信
para
.
messageRemindTime
=
that
.
myCustomData
.
messageRemindTime
;
para
.
isTemplateMessage
=
that
.
myCustomData
.
isTemplateMessage
;
// 模板消息
para
.
isImgMessage
=
that
.
myCustomData
.
isImgMessage
;
// 图文
para
.
isGoodMessage
=
that
.
myCustomData
.
isGoodMessage
;
para
.
isIntegralGoodMessage
=
that
.
myCustomData
.
isIntegralGoodMessage
;
url
=
'/haoban-app-customer-web/customer/save-member-show-setting'
;
if
(
row
.
minorStoreFlag
==
1
)
{
result
.
push
(
'展示协管门店客户'
);
}
postRequest
(
url
,
para
)
.
then
(
res
=>
{
let
resData
=
res
.
data
;
that
.
loading
=
false
;
if
(
resData
.
errorCode
==
1
)
{
showMsg
.
showmsg
(
'保存成功'
,
'success'
);
that
.
getShowSet
();
return
;
if
(
row
.
openCardStoreFlag
==
1
)
{
result
.
push
(
'展示开卡门店客户'
);
}
errMsg
.
errorMsg
(
resData
);
})
.
catch
(
function
(
error
)
{
that
.
loading
=
false
;
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
},
/**
* 改变
*/
changeAllowGuide
(
e
)
{
const
that
=
this
;
that
.
myCustomData
.
allowGuideMobile
=
e
;
that
.
myCustomData
.
allowGuideMessage
=
e
;
that
.
myCustomData
.
allowGuideOnlineChat
=
e
;
if
(
row
.
showFreezeFlag
==
1
)
{
result
.
push
(
'展示冻结会员'
);
}
if
(
row
.
isSeeAuthMember
==
1
)
{
result
.
push
(
'展示已开卡会员'
);
}
if
(
row
.
clerkSeeOtherFlag
==
1
)
{
result
.
push
(
'允许导购查看其他导购客户'
);
}
return
result
.
join
(
';'
);
},
/**
* 改变联系
*/
changeContact
()
{
const
that
=
this
;
if
(
!
that
.
myCustomData
.
allowGuideMobile
&&
!
that
.
myCustomData
.
allowGuideMessage
&&
!
that
.
myCustomData
.
allowGuideOnlineChat
)
{
that
.
myCustomData
.
allowGuideContact
=
false
;
getTableData
()
{
getRequest
(
'/haoban-app-customer-web/customer/find-member-manage-setting-list'
,
{}).
then
(
res
=>
{
const
{
code
,
result
}
=
res
.
data
||
{};
if
(
code
!=
0
)
{
errorMsg
.
errorMsg
(
res
.
data
);
return
;
}
this
.
tableData
=
Array
.
isArray
(
result
)
?
result
:
[];
});
},
/**
* 获取会员展示设置数据
*/
getShowSet
(
brandId
)
{
const
that
=
this
;
let
para
=
{
enterpriseId
:
that
.
brandId
,
wxEnterpriseRelatedId
:
that
.
wxEnterpriseRelatedId
};
postRequest
(
'/haoban-app-customer-web/customer/find-member-show-setting'
,
para
)
onDel
(
row
)
{
this
.
$set
(
row
,
'loading'
,
true
);
getRequest
(
'/haoban-app-customer-web/customer/del-member-setting'
,
{
memberManageSettingId
:
row
.
memberManageSettingId
})
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
if
(
!!
resData
.
result
)
{
resData
.
result
.
mainStoreFlag
=
resData
.
result
.
mainStoreFlag
==
1
?
true
:
false
;
resData
.
result
.
minorStoreFlag
=
resData
.
result
.
minorStoreFlag
==
1
?
true
:
false
;
resData
.
result
.
openCardStoreFlag
=
resData
.
result
.
openCardStoreFlag
==
1
?
true
:
false
;
resData
.
result
.
clerkSeeOtherFlag
=
resData
.
result
.
clerkSeeOtherFlag
==
1
?
true
:
false
;
resData
.
result
.
allowGuideContact
=
resData
.
result
.
allowGuideContact
==
1
?
true
:
false
;
resData
.
result
.
allowGuideMobile
=
resData
.
result
.
allowGuideMobile
==
1
?
true
:
false
;
resData
.
result
.
allowGuideMessage
=
resData
.
result
.
allowGuideMessage
==
1
?
true
:
false
;
resData
.
result
.
allowGuideOnlineChat
=
resData
.
result
.
allowGuideOnlineChat
==
1
?
true
:
false
;
resData
.
result
.
showFreezeFlag
=
resData
.
result
.
showFreezeFlag
==
1
?
true
:
false
;
resData
.
result
.
isSeeAuthMember
=
resData
.
result
.
isSeeAuthMember
==
1
?
true
:
false
;
resData
.
result
.
faceOpenFlag
=
resData
.
result
.
faceOpenFlag
==
1
?
true
:
false
;
resData
.
result
.
searchFlag
=
resData
.
result
.
searchFlag
==
1
?
true
:
false
;
resData
.
result
.
handoverFlag
=
resData
.
result
.
handoverFlag
==
1
?
true
:
false
;
that
.
myCustomData
=
resData
.
result
;
}
const
{
code
}
=
res
.
data
||
{};
if
(
code
!=
0
)
{
errorMsg
.
errorMsg
(
res
.
data
);
this
.
$set
(
row
,
'loading'
,
false
);
return
;
}
errMsg
.
errorMsg
(
resData
);
this
.
$message
.
success
(
'删除成功'
);
this
.
getTableData
();
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
.
catch
(()
=>
this
.
$set
(
row
,
'loading'
,
false
));
}
},
watch
:
{
brandId
:
function
(
newData
,
oldData
)
{
const
that
=
this
;
that
.
getShowSet
(
that
.
brandId
);
}
},
mounted
()
{
const
that
=
this
;
that
.
$emit
(
'showTab'
,
'11'
);
that
.
getShowSet
(
that
.
brandId
);
},
components
:
{}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.w-500
{
width
:
500px
;
}
.w-195
{
width
:
195px
;
}
.color-1890ff
{
color
:
#2f54eb
;
}
.p-20
{
<
style
lang=
"scss"
scoped
>
.show-set
{
padding
:
20px
;
}
.p-l-38
{
padding-left
:
38px
;
}
.p-l-199
{
padding-left
:
199px
;
}
.set-tip-item
{
padding
:
5px
0
0
25px
;
}
.app-detail-wrap
{
height
:
100%
;
background
:
#fff
;
.el-tabs
{
background
:
#fff
;
>>>
.el-tabs__nav-wrap
{
/* height: 48px;
line-height: 48px; */
&::after
{
height
:
1px
;
.show-set-header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-bottom
:
20px
;
.show-set-tips
{
align-items
:
flex-start
;
width
:
485px
;
.tips-text
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#303133
;
line-height
:
17px
;
}
/* .el-tabs__nav-scroll {
padding-left: 20px;
} */
}
}
.condition-tip
{
width
:
740px
;
.el-alert--info
{
background
:
#e6f7ff
;
border
:
1px
solid
rgba
(
145
,
213
,
255
,
1
);
.el-alert__icon
{
.default-store
{
display
:
inline-flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
32px
;
height
:
18px
;
background
:
#dee3fc
;
border-radius
:
2px
;
font-size
:
12px
;
}
}
font-weight
:
400
;
color
:
#2f54eb
;
line-height
:
normal
;
}
}
</
style
>
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