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
66cbfcb4
Commit
66cbfcb4
authored
May 25, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 客户管理设置
parent
6715887e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
137 deletions
+44
-137
api.js
src/api/api.js
+5
-1
error.js
src/common/js/error.js
+4
-1
add-member-show-rules.vue
src/views/apps/customerApp/add-member-show-rules.vue
+1
-1
memberSearchSet.vue
src/views/apps/customerApp/memberSearchSet.vue
+34
-134
No files found.
src/api/api.js
View file @
66cbfcb4
...
@@ -20,7 +20,11 @@ Vue.axios.defaults.headers.common['platform'] = 'haoban';
...
@@ -20,7 +20,11 @@ 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
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
let
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
if
(
local
.
indexOf
(
'localhost'
)
>=
0
)
{
gicHost
=
local
;
}
gicHost
=
local
;
// let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com' : '';
// let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com' : '';
...
...
src/common/js/error.js
View file @
66cbfcb4
...
@@ -9,7 +9,10 @@
...
@@ -9,7 +9,10 @@
/* 后台返回消息提示 */
/* 后台返回消息提示 */
import
{
Message
}
from
'element-ui'
;
import
{
Message
}
from
'element-ui'
;
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
userInfos
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)
||
'{}'
);
const
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
let
gicHost
=
typeof
userInfos
.
gicHost
==
'string'
?
userInfos
.
gicHost
.
replace
(
/
\/
$/
,
''
)
:
''
;
if
(
location
.
origin
.
indexOf
(
'localhost'
)
>=
0
)
{
gicHost
=
location
.
origin
;
}
// 后台返回异常提示
// 后台返回异常提示
export
default
{
export
default
{
...
...
src/views/apps/customerApp/add-member-show-rules.vue
View file @
66cbfcb4
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<hb-form-bottom>
<hb-form-bottom>
<el-button
@
click=
"$router.go(-1)"
>
取消
</el-button>
<el-button
@
click=
"$router.go(-1)"
>
返回
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"onSave"
>
保 存
</el-button>
<el-button
type=
"primary"
:loading=
"loading"
@
click=
"onSave"
>
保 存
</el-button>
</hb-form-bottom>
</hb-form-bottom>
</div>
</div>
...
...
src/views/apps/customerApp/memberSearchSet.vue
View file @
66cbfcb4
...
@@ -13,18 +13,23 @@
...
@@ -13,18 +13,23 @@
-->
-->
<
template
>
<
template
>
<div
class=
"app-detail-wrap"
>
<div
class=
"app-detail-wrap"
>
<div
class=
"app-detail-pane border-box p-20"
>
<el-form>
<el-checkbox
v-model=
"myCustomData.searchFlag"
>
允许全品牌搜索
</el-checkbox>
<el-form-item>
<el-checkbox
v-model=
"myCustomData.searchFlag"
:true-label=
"1"
:false-label=
"0"
>
允许全品牌搜索
</el-checkbox>
</el-form-item>
<el-form-item>
<el-checkbox>
离职继承
</el-checkbox>
<div
class=
"set-tip-text"
>
保存勾选项后,店长可以选择离职的导购名下的好友会员,选择离职继承
</div>
</el-form-item>
</el-form>
<div
class=
"m-t-46"
>
<div
class=
"m-t-46"
>
<el-button
v-if=
"$getButtonLimit($buttonCode.searchSetSave)"
:limit-code=
"$buttonCode.searchSetSave"
type=
"primary"
:loading=
"loading"
@
click=
"submit('searchFlag')"
:disabled=
"$store.state.wxEnterpriseType"
>
保 存
</el-button>
<el-button
v-if=
"$getButtonLimit($buttonCode.searchSetSave)"
:limit-code=
"$buttonCode.searchSetSave"
type=
"primary"
:loading=
"loading"
@
click=
"setData"
>
保 存
</el-button>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
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
{
postRequest
}
from
'@/api/api'
;
import
{
postRequest
}
from
'@/api/api'
;
export
default
{
export
default
{
name
:
'app-detail'
,
name
:
'app-detail'
,
...
@@ -38,173 +43,68 @@ export default {
...
@@ -38,173 +43,68 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
projectName
:
''
,
// 当前项目名
wxEnterpriseRelatedId
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
,
wxEnterpriseRelatedId
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'userInfos'
)).
wxEnterpriseId
,
myCustomData
:
{
myCustomData
:
{
searchFlag
:
false
searchFlag
:
0
},
},
activeId
:
'1'
,
loading
:
false
loading
:
false
};
};
},
},
methods
:
{
methods
:
{
/**
/**
* 保存
*/
submit
:
_debounce
(
function
(
type
)
{
const
that
=
this
;
that
.
loading
=
true
;
that
.
setData
(
type
);
},
500
),
/**
* 保存-API
* 保存-API
*/
*/
setData
(
type
)
{
setData
()
{
const
that
=
this
;
let
para
=
{
let
para
=
{
enterpriseId
:
th
at
.
brandId
,
enterpriseId
:
th
is
.
brandId
,
wxEnterpriseRelatedId
:
th
at
.
wxEnterpriseRelatedId
wxEnterpriseRelatedId
:
th
is
.
wxEnterpriseRelatedId
// enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId
// enterpriseId: JSON.parse(localStorage.getItem('userInfos')).enterpriseId
};
};
let
url
;
para
.
searchFlag
=
this
.
myCustomData
.
searchFlag
;
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'
;
}
}
postRequest
(
url
,
para
)
postRequest
(
'/haoban-app-customer-web/customer/save-customer-setting'
,
para
).
then
(
res
=>
{
.
then
(
res
=>
{
let
resData
=
res
.
data
;
let
resData
=
res
.
data
;
that
.
loading
=
false
;
if
(
resData
.
errorCode
==
1
)
{
if
(
resData
.
errorCode
==
1
)
{
showMsg
.
showmsg
(
'保存成功'
,
'success'
);
showMsg
.
showmsg
(
'保存成功'
,
'success'
);
return
;
return
;
}
}
errMsg
.
errorMsg
(
resData
);
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
;
},
/**
* 改变联系
*/
changeContact
()
{
const
that
=
this
;
if
(
!
that
.
myCustomData
.
allowGuideMobile
&&
!
that
.
myCustomData
.
allowGuideMessage
&&
!
that
.
myCustomData
.
allowGuideOnlineChat
)
{
that
.
myCustomData
.
allowGuideContact
=
false
;
}
},
},
/**
/**
* 获取全品牌搜索设置数据
* 获取全品牌搜索设置数据
*/
*/
getCustomerSet
(
brandId
)
{
getCustomerSet
()
{
const
that
=
this
;
const
para
=
{
let
para
=
{
enterpriseId
:
this
.
brandId
,
enterpriseId
:
that
.
brandId
,
wxEnterpriseRelatedId
:
this
.
wxEnterpriseRelatedId
wxEnterpriseRelatedId
:
that
.
wxEnterpriseRelatedId
};
};
postRequest
(
'/haoban-app-customer-web/customer/find-customer-setting'
,
para
)
postRequest
(
'/haoban-app-customer-web/customer/find-customer-setting'
,
para
).
then
(
res
=>
{
.
then
(
res
=>
{
const
{
errorCode
,
result
}
=
res
.
data
||
{};
let
resData
=
res
.
data
;
if
(
errorCode
==
1
)
{
if
(
resData
.
errorCode
==
1
)
{
if
(
result
)
{
if
(
!!
resData
.
result
)
{
this
.
myCustomData
.
searchFlag
=
result
.
searchFlag
;
that
.
myCustomData
.
searchFlag
=
!!
resData
.
result
.
searchFlag
?
true
:
false
;
}
}
return
;
return
;
}
}
errMsg
.
errorMsg
(
resData
);
errMsg
.
errorMsg
(
res
.
data
);
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
});
}
},
watch
:
{
brandId
:
function
(
newData
,
oldData
)
{
const
that
=
this
;
that
.
getCustomerSet
(
that
.
brandId
);
}
}
},
},
mounted
()
{
mounted
()
{
const
that
=
this
;
this
.
getCustomerSet
();
that
.
getCustomerSet
(
that
.
brandId
);
}
},
components
:
{}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.w-500
{
.app-detail-wrap
{
width
:
500px
;
}
.w-195
{
width
:
195px
;
}
.color-1890ff
{
color
:
#2f54eb
;
}
.p-20
{
padding
:
20px
;
padding
:
20px
;
}
}
.set-tip-text
{
.p-l-38
{
padding
:
0
0
0
25px
;
padding-left
:
38px
;
}
.p-l-199
{
padding-left
:
199px
;
}
.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
:
#909399
;
}
line-height
:
17px
;
}
}
</
style
>
</
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