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
d90e7296
Commit
d90e7296
authored
May 25, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/4月-菜单和权限' into dev
parents
b549b277
6715887e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
383 additions
and
302 deletions
+383
-302
button-code.js
menu-data/button-code.js
+10
-4
menu-data.js
menu-data/menu-data.js
+7
-7
api.js
src/api/api.js
+6
-4
error.js
src/common/js/error.js
+4
-6
user-info.vue
src/components/layout/components/user-info.vue
+3
-1
index.js
src/router/index.js
+10
-0
add-member-show-rules.vue
src/views/apps/customerApp/add-member-show-rules.vue
+212
-0
memberShowSet.vue
src/views/apps/customerApp/memberShowSet.vue
+124
-276
contacts.vue
src/views/business/contacts.vue
+2
-2
gic-error.vue
src/views/errorPage/gic-error.vue
+5
-2
No files found.
menu-data/button-code.js
View file @
d90e7296
...
@@ -16,10 +16,16 @@ module.exports = {
...
@@ -16,10 +16,16 @@ module.exports = {
// 2.待开启同步标签 (按钮,控制“待开启同步标签”所有操作权限)
// 2.待开启同步标签 (按钮,控制“待开启同步标签”所有操作权限)
willSyncTag
:
[
'待开启同步标签'
,
1
,
2
]
willSyncTag
:
[
'待开启同步标签'
,
1
,
2
]
},
},
// TODO 客户展示设置
// 客户展示设置
// TODO 1.特殊策略配置 (按钮,控制“新增特殊策略配置”弹窗内所有操作权限)
memberShowSet
:
{
// TODO 2.编辑 (按钮,控制“修改特殊策略配置”弹窗内所有操作权限)
// 按钮名称、是否受权限控制0否1是、是否增删改0跳转1是2其他、按钮跳转路径
// TODO 3.删除 (按钮)
// 1.特殊策略配置 (按钮,控制“新增特殊策略配置”弹窗内所有操作权限)
addShowRules
:
[
'新增特殊策略'
,
1
,
0
,
'addMemberShowRules'
],
// 2.编辑 (按钮,控制“修改特殊策略配置”弹窗内所有操作权限)
editShowRules
:
[
'编辑'
,
1
,
0
,
'editMemberShowRules'
],
// 3.删除 (按钮)
delShowRules
:
[
'删除'
,
1
,
1
]
},
memberGroupSet
:
{
memberGroupSet
:
{
// 1.会员分组失效后不展示(按钮)
// 1.会员分组失效后不展示(按钮)
groupExpire
:
[
'分组失效后不展示'
,
1
,
2
],
groupExpire
:
[
'分组失效后不展示'
,
1
,
2
],
...
...
menu-data/menu-data.js
View file @
d90e7296
...
@@ -20,13 +20,13 @@ module.exports = [
...
@@ -20,13 +20,13 @@ module.exports = [
{
{
menu
:
[
'客户基础设置'
,
''
,
1
,
'iconkehushezhi'
],
menu
:
[
'客户基础设置'
,
''
,
1
,
'iconkehushezhi'
],
children
:
[
children
:
[
//
{
{
// menu: ['客户展示设置', '', 1],// TODO 本次新增页面
menu
:
[
'客户展示设置'
,
'memberShowSet'
,
1
],
//
children: [
children
:
[
// { menu: ['新增特殊策略', '', 1] },// TODO 本次新增页面
{
menu
:
[
'新增特殊策略'
,
'addMemberShowRules'
,
1
]
},
// { menu: ['编辑特殊策略', '', 1] },// TODO 本次新增页面
{
menu
:
[
'编辑特殊策略'
,
'editMemberShowRules'
,
1
]
},
//
]
]
//
},
},
{
{
menu
:
[
'客户分组设置'
,
'memberGroupSet'
,
1
],
menu
:
[
'客户分组设置'
,
'memberGroupSet'
,
1
],
children
:
[
children
:
[
...
...
src/api/api.js
View file @
d90e7296
...
@@ -19,6 +19,8 @@ Vue.axios.defaults.headers.common['platform'] = 'haoban';
...
@@ -19,6 +19,8 @@ Vue.axios.defaults.headers.common['platform'] = 'haoban';
Vue
.
axios
.
defaults
.
timeout
=
500000
;
Vue
.
axios
.
defaults
.
timeout
=
500000
;
let
local
=
window
.
location
.
origin
;
let
local
=
window
.
location
.
origin
;
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
// let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com' : '';
// let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com' : '';
...
@@ -75,11 +77,11 @@ Vue.axios.interceptors.response.use(
...
@@ -75,11 +77,11 @@ Vue.axios.interceptors.response.use(
if
(
window
.
location
.
href
.
indexOf
(
'gic-error'
)
!=
-
1
)
{
if
(
window
.
location
.
href
.
indexOf
(
'gic-error'
)
!=
-
1
)
{
return
false
;
return
false
;
}
}
window
.
location
.
href
=
local
+
'/gic-web/#/login?ishb=1'
;
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
}
}
if
(
data
.
data
.
errorCode
==
10
||
data
.
data
.
errorCode
==
7
)
{
if
(
data
.
data
.
errorCode
==
10
||
data
.
data
.
errorCode
==
7
)
{
window
.
location
.
href
=
local
+
'/haoban-3/#/index'
;
window
.
location
.
href
=
gicHost
+
'/haoban-3/#/index'
;
}
}
return
data
;
return
data
;
}
}
...
@@ -87,11 +89,11 @@ Vue.axios.interceptors.response.use(
...
@@ -87,11 +89,11 @@ Vue.axios.interceptors.response.use(
},
},
err
=>
{
err
=>
{
if
(
err
.
response
.
status
==
502
)
{
if
(
err
.
response
.
status
==
502
)
{
window
.
location
.
href
=
local
+
'/gic-web/#/login?ishb=1'
;
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
Message
.
error
({
message
:
'服务异常⊙﹏⊙∥'
});
Message
.
error
({
message
:
'服务异常⊙﹏⊙∥'
});
}
}
if
(
err
.
response
.
status
!=
403
)
{
if
(
err
.
response
.
status
!=
403
)
{
window
.
location
.
href
=
local
+
'/gic-web/#/login?ishb=1'
;
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
Message
.
error
({
message
:
'登录失效!'
});
Message
.
error
({
message
:
'登录失效!'
});
}
}
return
Promise
.
resolve
(
err
);
return
Promise
.
resolve
(
err
);
...
...
src/common/js/error.js
View file @
d90e7296
...
@@ -8,21 +8,19 @@
...
@@ -8,21 +8,19 @@
*/
*/
/* 后台返回消息提示 */
/* 后台返回消息提示 */
import
{
Message
}
from
'element-ui'
;
import
{
Message
}
from
'element-ui'
;
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
// 后台返回异常提示
// 后台返回异常提示
export
default
{
export
default
{
errorMsg
:
function
(
response
)
{
errorMsg
:
function
(
response
)
{
let
local
=
window
.
location
.
origin
;
/* if (local.indexOf('localhost') != -1) {
local = 'http://www.gicdev.com';
} */
if
(
response
.
errorCode
!=
1
)
{
if
(
response
.
errorCode
!=
1
)
{
if
(
response
.
errorCode
==
4
)
{
if
(
response
.
errorCode
==
4
)
{
window
.
location
.
href
=
local
+
'/gic-web/#/login?ishb=1'
;
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
return
false
;
return
false
;
}
}
if
(
response
.
errorCode
==
10
)
{
if
(
response
.
errorCode
==
10
)
{
window
.
location
.
href
=
local
+
'/haoban-3/#/index'
;
window
.
location
.
href
=
gicHost
+
'/haoban-3/#/index'
;
return
false
;
return
false
;
}
}
Message
.
error
({
Message
.
error
({
...
...
src/components/layout/components/user-info.vue
View file @
d90e7296
...
@@ -58,7 +58,9 @@ export default {
...
@@ -58,7 +58,9 @@ export default {
return
;
return
;
}
}
this
.
$message
.
success
(
'退出成功'
);
this
.
$message
.
success
(
'退出成功'
);
window
.
location
.
href
=
location
.
origin
+
'/gic-web/#/login?ishb=1'
;
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
window
.
location
.
href
=
gicHost
+
'/gic-web/#/login?ishb=1'
;
})
})
.
finally
(()
=>
this
.
$emit
(
'showLoading'
,
false
));
.
finally
(()
=>
this
.
$emit
(
'showLoading'
,
false
));
}
}
...
...
src/router/index.js
View file @
d90e7296
...
@@ -217,6 +217,16 @@ export const constantRouterMap = [
...
@@ -217,6 +217,16 @@ export const constantRouterMap = [
component
:
_import
(
'apps/customerApp'
,
'memberShowSet'
)
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'
,
path
:
'/memberGroupSet'
,
name
:
'客户分组设置'
,
name
:
'客户分组设置'
,
component
:
_import
(
'apps/customerApp'
,
'memberGroupSet'
)
component
:
_import
(
'apps/customerApp'
,
'memberGroupSet'
)
...
...
src/views/apps/customerApp/add-member-show-rules.vue
0 → 100644
View file @
d90e7296
<
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
;
}
this
.
$nextTick
(()
=>
{
this
.
rules
.
storeType
.
trigger
=
'change'
;
});
// storeType = -1时为通用策略
// 通用策略不能修改门店类型
if
(
this
.
myCustomData
.
storeType
.
includes
(
'-1'
))
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
);
}
});
},
onSave
()
{
this
.
loading
=
true
;
this
.
onOptionsChange
();
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
:
this
.
selectedTypes
.
concat
(
typeof
storeType
==
'string'
?
storeType
.
split
(
','
)
:
[]),
mainStoreFlag
,
minorStoreFlag
,
openCardStoreFlag
,
clerkSeeOtherFlag
,
showFreezeFlag
,
isSeeAuthMember
});
// storeType = -1时为通用策略
// 通用策略不能修改门店类型
if
(
storeType
==
-
'1'
)
{
this
.
selectedTypes
=
this
.
storeTypes
.
map
(
el
=>
el
.
value
);
this
.
myCustomData
.
storeType
=
this
.
storeTypes
.
map
(
el
=>
el
.
value
);
this
.
myCustomData
.
storeType
.
push
(
'-1'
);
}
this
.
$nextTick
(()
=>
{
this
.
rules
.
options
.
trigger
=
'change'
;
});
});
}
},
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 @
d90e7296
<!--
* @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
>
<
template
>
<div
class=
"app-detail-wrap"
>
<div
class=
"show-set"
>
<div
class=
"app-detail-pane border-box p-20"
>
<div
class=
"show-set-header"
>
<div
class=
"m-b-20"
>
<el-alert
type=
"info"
show-icon
:closable=
"false"
class=
"show-set-tips"
>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.mainStoreFlag"
>
展示服务门店客户
</el-checkbox>
<div
slot=
"title"
>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店作为服务门店名下客户
</div>
<div
class=
"tips-text"
>
1. 同一商户下,各子管理员新增的特殊策略的门店类型不能重复;
</div>
</div>
<div
class=
"tips-text"
>
2. 子管理员设置的门店类型和默认重复时,按子管理员设置的逻辑生效;
</div>
<div
class=
"m-b-20"
>
</div>
<el-checkbox
class=
"w-195"
v-model=
"myCustomData.minorStoreFlag"
>
展示协管门店客户
</el-checkbox>
</el-alert>
<div
class=
"font-14 color-909399 set-tip-item"
>
注:保存勾选项后,门店导购和店长可查看本门店作为协管门店名下客户
</div>
<el-button
v-if=
"true || $getButtonLimit($buttonCode.addShowRules)"
:limit-code=
"$buttonCode.addShowRules"
@
click=
"$router.push('/addMemberShowRules')"
type=
"primary"
>
新增特殊策略
</el-button>
</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>
</div>
</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>
</div>
</template>
</template>
<
script
>
<
script
>
import
showMsg
from
'@/common/js/showmsg'
;
import
{
getRequest
}
from
'@/api/api.js'
;
import
errMsg
from
'@/common/js/error'
;
import
errorMsg
from
'@/common/js/error.js'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
postRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
name
:
'app-detail'
,
name
:
'MemberShowSet'
,
props
:
{
brandId
:
{
type
:
String
,
default
()
{
return
''
;
}
},
tabType
:
{
type
:
String
,
default
()
{
return
'1'
;
}
}
},
data
()
{
data
()
{
return
{
return
{
projectName
:
''
,
// 当前项目名
tableData
:
[]
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
};
};
},
},
created
()
{
this
.
getTableData
();
},
methods
:
{
methods
:
{
/**
formatStoreType
(
row
,
col
,
val
)
{
* 保存
const
storeTypes
=
[
*/
{
label
:
'自营'
,
value
:
'1'
},
submit
:
_debounce
(
function
(
type
)
{
{
label
:
'联营'
,
value
:
'2'
},
const
that
=
this
;
{
label
:
'代理'
,
value
:
'3'
},
that
.
loading
=
true
;
{
label
:
'代销'
,
value
:
'4'
},
that
.
setData
(
type
);
{
label
:
'托管'
,
value
:
'5'
}
},
500
),
];
let
result
=
[];
/**
if
(
typeof
val
==
'string'
)
{
* 保存-API
const
types
=
val
.
split
(
','
);
*/
result
=
storeTypes
.
filter
(
el
=>
types
.
includes
(
el
.
value
)).
map
(
el
=>
el
.
label
);
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'
;
}
}
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'
;
}
}
postRequest
(
url
,
para
)
return
result
.
join
(
'/'
);
.
then
(
res
=>
{
let
resData
=
res
.
data
;
that
.
loading
=
false
;
if
(
resData
.
errorCode
==
1
)
{
showMsg
.
showmsg
(
'保存成功'
,
'success'
);
that
.
getShowSet
();
return
;
}
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
;
},
},
formatSetting
(
row
)
{
/**
const
result
=
[];
* 改变联系
if
(
row
.
mainStoreFlag
==
1
)
{
*/
result
.
push
(
'展示服务门店客户'
);
changeContact
()
{
}
const
that
=
this
;
if
(
row
.
minorStoreFlag
==
1
)
{
if
(
!
that
.
myCustomData
.
allowGuideMobile
&&
!
that
.
myCustomData
.
allowGuideMessage
&&
!
that
.
myCustomData
.
allowGuideOnlineChat
)
{
result
.
push
(
'展示协管门店客户'
);
that
.
myCustomData
.
allowGuideContact
=
false
;
}
if
(
row
.
openCardStoreFlag
==
1
)
{
result
.
push
(
'展示开卡门店客户'
);
}
}
if
(
row
.
showFreezeFlag
==
1
)
{
result
.
push
(
'展示冻结会员'
);
}
if
(
row
.
isSeeAuthMember
==
1
)
{
result
.
push
(
'展示已开卡会员'
);
}
if
(
row
.
clerkSeeOtherFlag
==
1
)
{
result
.
push
(
'允许导购查看其他导购客户'
);
}
return
result
.
join
(
';'
);
},
},
getTableData
()
{
/**
getRequest
(
'/haoban-app-customer-web/customer/find-member-manage-setting-list'
,
{}).
then
(
res
=>
{
* 获取会员展示设置数据
const
{
code
,
result
}
=
res
.
data
||
{};
*/
if
(
code
!=
0
)
{
getShowSet
(
brandId
)
{
errorMsg
.
errorMsg
(
res
.
data
);
const
that
=
this
;
return
;
let
para
=
{
}
enterpriseId
:
that
.
brandId
,
this
.
tableData
=
Array
.
isArray
(
result
)
?
result
:
[];
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
=>
{
.
then
(
res
=>
{
let
resData
=
res
.
data
;
const
{
code
}
=
res
.
data
||
{};
if
(
resData
.
errorCode
==
1
)
{
if
(
code
!=
0
)
{
if
(
!!
resData
.
result
)
{
errorMsg
.
errorMsg
(
res
.
data
);
resData
.
result
.
mainStoreFlag
=
resData
.
result
.
mainStoreFlag
==
1
?
true
:
false
;
this
.
$set
(
row
,
'loading'
,
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
;
}
return
;
return
;
}
}
errMsg
.
errorMsg
(
resData
);
this
.
$message
.
success
(
'删除成功'
);
this
.
getTableData
();
})
})
.
catch
(
function
(
error
)
{
.
catch
(()
=>
this
.
$set
(
row
,
'loading'
,
false
));
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
}
}
},
}
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
>
</
script
>
<
style
lang=
"scss"
scoped
>
.w-500
{
width
:
500px
;
}
.w-195
{
width
:
195px
;
}
.color-1890ff
{
<
style
lang=
"scss"
scoped
>
color
:
#2f54eb
;
.show-set
{
}
.p-20
{
padding
:
20px
;
padding
:
20px
;
}
.show-set-header
{
display
:
flex
;
.p-l-38
{
justify-content
:
space-between
;
padding-left
:
38px
;
align-items
:
center
;
}
margin-bottom
:
20px
;
.show-set-tips
{
.p-l-199
{
align-items
:
flex-start
;
padding-left
:
199px
;
width
:
485px
;
}
.tips-text
{
.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
;
}
/* .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
{
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
400
;
color
:
#303133
;
line-height
:
17px
;
}
}
}
}
}
}
.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
>
</
style
>
src/views/business/contacts.vue
View file @
d90e7296
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
<div
class=
"apps-content-left border-box"
>
<div
class=
"apps-content-left border-box"
>
<div
class=
"left-tree-body border-box"
>
<div
class=
"left-tree-body border-box"
>
<div
class=
"left-tree-search"
>
<div
class=
"left-tree-search"
>
<el-input
placeholder=
"搜索部门"
maxlength=
"50"
v-model=
"searchInput"
class=
"w-225"
@
keyup
.
native=
"value => toInput(value, searchInput)"
clearable
@
clear=
"clearInput"
></el-input>
<el-input
placeholder=
"搜索部门"
maxlength=
"50"
v-model=
"searchInput"
@
keyup
.
native=
"value => toInput(value, searchInput)"
clearable
@
clear=
"clearInput"
></el-input>
<
span
class=
"iconfont-hb3 iconshouquanyanzheng m-l-10 cursor-pointer"
@
click=
"toManage"
></span
>
<
!--
<span
class=
"iconfont-hb3 iconshouquanyanzheng m-l-10 cursor-pointer"
@
click=
"toManage"
></span>
--
>
</div>
</div>
<div
v-if=
"$getButtonLimit($buttonCode.refreshStoreMember)"
:limit-code=
"$buttonCode.refreshStoreMember"
class=
"help-body flex flex-space-between"
@
click=
"toRefreshMember"
><span
class=
"font-12 color-2f54eb"
>
刷新企业成员
</span><span
class=
"font-12 color-2f54eb iconfont-hb3 iconshuaxin1"
></span></div>
<div
v-if=
"$getButtonLimit($buttonCode.refreshStoreMember)"
:limit-code=
"$buttonCode.refreshStoreMember"
class=
"help-body flex flex-space-between"
@
click=
"toRefreshMember"
><span
class=
"font-12 color-2f54eb"
>
刷新企业成员
</span><span
class=
"font-12 color-2f54eb iconfont-hb3 iconshuaxin1"
></span></div>
<!--
<div
class=
"p-t-14"
>
<!--
<div
class=
"p-t-14"
>
...
...
src/views/errorPage/gic-error.vue
View file @
d90e7296
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"bullshit"
>
<div
class=
"bullshit"
>
<!--
<div
class=
"bullshit__oops"
>
404
</div>
-->
<!--
<div
class=
"bullshit__oops"
>
404
</div>
-->
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<div
class=
"bullshit__headline"
>
{{
message
}}
</div>
<a
href=
"/gic-web/#/login?ishb=1
"
class=
"bullshit__return-home"
rel=
"noopener noreferrer"
>
返回好办登录页
</a>
<a
:href=
"gicHost + '/gic-web/#/login?ishb=1'
"
class=
"bullshit__return-home"
rel=
"noopener noreferrer"
>
返回好办登录页
</a>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -29,7 +29,8 @@ export default {
...
@@ -29,7 +29,8 @@ export default {
inject
:
[
'layoutVm'
],
inject
:
[
'layoutVm'
],
data
()
{
data
()
{
return
{
return
{
img_404
img_404
,
gicHost
:
''
};
};
},
},
computed
:
{
computed
:
{
...
@@ -43,6 +44,8 @@ export default {
...
@@ -43,6 +44,8 @@ export default {
/* eslint-disable */
/* eslint-disable */
mounted
()
{
mounted
()
{
this
.
layoutVm
.
$emit
(
'command'
,
'hideAside'
);
this
.
layoutVm
.
$emit
(
'command'
,
'hideAside'
);
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
this
.
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
}
}
};
};
</
script
>
</
script
>
...
...
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