Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7a112769
authored
Mar 20, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
员工管理需求开发
1 parent
44f92a07
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1855 additions
and
7 deletions
app.json
components/NavigationBar/NavigationBar.js
components/Nothing-tips/nothingTips.wxml
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.js
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.json
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.scss
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.wxml
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.js
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.json
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.scss
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.wxml
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.js
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.json
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.scss
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.wxml
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.js
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.json
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.scss
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.wxml
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.js
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.json
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.scss
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.wxml
packagesList/mineDetail/pages/staffManage/staffList/staffList.js
packagesList/mineDetail/pages/staffManage/staffList/staffList.json
packagesList/mineDetail/pages/staffManage/staffList/staffList.scss
packagesList/mineDetail/pages/staffManage/staffList/staffList.wxml
packagesList/mineDetail/pages/successPage/successPage.js
packagesList/mineDetail/pages/successPage/successPage.json
packagesList/mineDetail/pages/successPage/successPage.scss
packagesList/mineDetail/pages/successPage/successPage.wxml
app.json
View file @
7a11276
...
@@ -75,7 +75,10 @@
...
@@ -75,7 +75,10 @@
"pages/customerManagement"
,
"pages/customerManagement"
,
"pages/clue"
,
"pages/clue"
,
"pages/staffManage/staffList/staffList"
,
"pages/staffManage/staffList/staffList"
,
"pages/serviceManage/serviceList/serviceList"
"pages/serviceManage/serviceList/serviceList"
,
"pages/staffManage/createStaff/createStaff"
,
"pages/staffManage/selectConnectionPage/selectConnectionPage"
,
"pages/successPage/successPage"
]
]
},
},
{
{
...
...
components/NavigationBar/NavigationBar.js
View file @
7a11276
...
@@ -7,6 +7,7 @@ Component({
...
@@ -7,6 +7,7 @@ Component({
navStyle
:
String
,
navStyle
:
String
,
custom
:
Boolean
,
custom
:
Boolean
,
showBack
:
Boolean
,
showBack
:
Boolean
,
customBack
:
Boolean
,
pageTitle
:
{
pageTitle
:
{
type
:
String
,
type
:
String
,
value
:
''
,
value
:
''
,
...
@@ -88,7 +89,9 @@ Component({
...
@@ -88,7 +89,9 @@ Component({
})
})
},
},
back
()
{
back
()
{
wx
.
$router
.
back
()
let
{
customBack
}
=
this
.
data
if
(
customBack
)
this
.
triggerEvent
(
'back'
)
else
wx
.
$router
.
back
()
}
}
},
},
lifetimes
:
{
lifetimes
:
{
...
...
components/Nothing-tips/nothingTips.wxml
View file @
7a11276
<!-- components/Nothing-tips/nothingTips.wxml -->
<!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon" style="background-color: {{}};">
<view class="nothingCon" style="background-color: {{
bgColor
}};">
<image
<image
wx:if="{{bg}}"
wx:if="{{bg}}"
class="bg"
class="bg"
...
...
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.js
0 → 100644
View file @
7a11276
// packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
Boolean
,
connectionList
:
Array
,
tabBarStyle
:
String
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
select
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
let
{
connectionList
}
=
this
.
data
// 不可操作选项
if
(
item
.
disabled
)
return
connectionList
.
forEach
(
v
=>
{
if
(
v
.
serviceCode
==
item
.
serviceCode
)
v
.
checked
=
!
v
.
checked
})
this
.
setData
({
connectionList
})
},
// 确定
handleConfirm
()
{
// 处理选中的数据
let
{
connectionList
}
=
this
.
data
let
filterArr
=
connectionList
.
filter
(
v
=>
v
.
checked
)
this
.
triggerEvent
(
'selectConfirm'
,
filterArr
)
}
}
})
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.json
0 → 100644
View file @
7a11276
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.wxss */
.select-connection-page
{
position
:
fixed
;
top
:
0
;
z-index
:
10
;
height
:
100vh
;
width
:
100%
;
box-sizing
:
border-box
;
background-color
:
#F2F3F7
;
animation
:
show-confirm-box
.5s
forwards
;
.search-content
{
height
:
108rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
8rpx
20rpx
0
#b4bacc
26
;
position
:
relative
;
z-index
:
inherit
;
.search-box
{
width
:
100%
;
height
:
104rpx
;
padding-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
background-color
:
#fff
;
position
:
sticky
;
top
:
0
;
left
:
0
;
z-index
:
9
;
box-sizing
:
border-box
;
.search
{
width
:
144rpx
;
height
:
100%
;
color
:
#666
;
box-sizing
:
border-box
;
padding
:
0
24rpx
;
.text-center
{
font-size
:
24rpx
;
border-radius
:
12rpx
;
width
:
100%
;
font-size
:
32rpx
;
color
:
#858A94
;
.search-filter
{
margin-left
:
6rpx
;
width
:
24rpx
;
height
:
24rpx
;
}
}
}
.search-input
{
background
:
#F7F8FA
;
border-radius
:
38rpx
;
width
:
606rpx
;
height
:
72rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
26rpx
;
.input-placeholder
{
color
:
rgba
(
200
,
201
,
204
,
.89
);
}
.search-icon
{
width
:
28rpx
;
height
:
28rpx
;
}
.search-clear
{
width
:
36rpx
;
height
:
36rpx
;
margin
:
0
26rpx
0
10rpx
;
}
.input
{
font-size
:
28rpx
;
width
:
calc
(
100%
-
136rpx
);
margin-left
:
10rpx
;
}
}
}
}
.service-items
{
width
:
100%
;
height
:
88rpx
;
line-height
:
88rpx
;
background-color
:
#FFFFFF
;
padding
:
0
32rpx
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
color
:
#323233
;
display
:
flex
;
align-items
:
center
;
.item-radio
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin-right
:
16rpx
;
}
.radio_class
{
width
:
36rpx
;
height
:
36rpx
;
}
.radio_disabled
{
transform
:
scale
(
1
.06
);
}
.radio
{
width
:
32rpx
;
height
:
32rpx
;
border
:
2rpx
solid
#ADADAD
;
border-radius
:
50%
;
}
.item-text
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.disabled_text
{
color
:
#C8C9CC
;
}
}
.isFullSucreen
{
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!
important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!
important
;
}
.btn
{
position
:
fixed
;
bottom
:
16rpx
;
left
:
0
;
width
:
calc
(
100%
-
64rpx
);
height
:
88rpx
;
line-height
:
88rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
margin
:
16rpx
32rpx
0
32rpx
;
}
.btn-blue
{
background
:
var
(
--
btnColor
);
border-radius
:
8rpx
;
}
}
@keyframes
show-confirm-box
{
0
%
{
right
:
-100%
;
}
100
%
{
right
:
0
;
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/components/selectConnectionConfirm/selectConnectionConfirm.wxml-->
<view class="select-connection-page" hidden="{{!show}}" style="margin-top:{{tabBarStyle}}px;">
<view class="search-content">
<view class="search-box">
<view class="search-input">
<glsx-image src="output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索客户"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
</view>
</view>
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height: calc(100% - {{tabBarStyle}}px - 192rpx - env(safe-area-inset-bottom) - 32rpx);"
data-type="message"
refresher-triggered="{{triggered}}">
<view>
<block wx:for="{{connectionList}}" wx:key="index">
<view
class="service-items text-hide"
data-item="{{item}}"
bindtap="select">
<view class="item-radio">
<view wx:if="{{!item.checked}}" class="radio_class radio {{item.disabled?'disabled': ''}}"></view>
<block wx:if="{{item.disabled && item.checked}}">
<glsx-image src="personal/checked_disabled.png" class="radio_class radio_disabled" />
</block>
<block wx:if="{{item.checked && !item.disabled}}">
<glsx-image src="login/radio.png" class="radio_class" />
</block>
</view>
<view class="item-text {{item.disabled?'disabled_text':''}}">{{item.serviceName}}</view>
</view>
</block>
</view>
</scroll-view>
<view class="isFullSucreen btn">
<view class="btn-blue" bindtap="handleConfirm">确定</view>
</view>
</view>
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.js
0 → 100644
View file @
7a11276
// packagesList/mineDetail/pages/staffManage/selectServicePage.js
Component
({
options
:
{
addGlobalClass
:
true
},
/**
* 组件的属性列表
*/
properties
:
{
show
:
Boolean
,
serviceList
:
Array
,
selectInfo
:
Object
,
tabBarStyle
:
String
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
select
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
serviceList
}
=
this
.
data
serviceList
.
forEach
((
item
,
ind
)
=>
{
if
(
index
==
ind
)
{
item
.
act
=
true
}
else
{
item
.
act
=
false
}
})
this
.
setData
({
serviceList
,
selectInfo
:
serviceList
[
index
]
||
{}
})
this
.
triggerEvent
(
'hiddenSelectConfirm'
,
serviceList
[
index
])
},
input
(
e
)
{
let
{
serviceList
}
=
this
.
data
let
{
value
}
=
e
.
detail
serviceList
.
forEach
(
item
=>
{
item
.
act
=
false
item
.
show
=
item
.
serviceCode
?.
includes
(
value
)
})
this
.
setData
({
serviceList
})
}
}
})
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.json
0 → 100644
View file @
7a11276
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/pages/staffManage/selectServicePage.wxss */
.select-service-page
{
position
:
fixed
;
top
:
0
;
z-index
:
10
;
height
:
100vh
;
width
:
100%
;
box-sizing
:
border-box
;
background-color
:
#F2F3F7
;
animation
:
show-confirm-box
.5s
forwards
;
.search-content
{
height
:
108rpx
;
background
:
#FFFFFF
;
box-shadow
:
0
8rpx
20rpx
0
#b4bacc
26
;
position
:
relative
;
z-index
:
inherit
;
.search-box
{
width
:
100%
;
height
:
104rpx
;
padding-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
background-color
:
#fff
;
position
:
sticky
;
top
:
0
;
left
:
0
;
z-index
:
9
;
box-sizing
:
border-box
;
.search
{
width
:
144rpx
;
height
:
100%
;
color
:
#666
;
box-sizing
:
border-box
;
padding
:
0
24rpx
;
.text-center
{
font-size
:
24rpx
;
border-radius
:
12rpx
;
width
:
100%
;
font-size
:
32rpx
;
color
:
#858A94
;
.search-filter
{
margin-left
:
6rpx
;
width
:
24rpx
;
height
:
24rpx
;
}
}
}
.search-input
{
background
:
#F7F8FA
;
border-radius
:
38rpx
;
width
:
606rpx
;
height
:
72rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
26rpx
;
.input-placeholder
{
color
:
rgba
(
200
,
201
,
204
,
.89
);
}
.search-icon
{
width
:
28rpx
;
height
:
28rpx
;
}
.search-clear
{
width
:
36rpx
;
height
:
36rpx
;
margin
:
0
26rpx
0
10rpx
;
}
.input
{
font-size
:
28rpx
;
width
:
calc
(
100%
-
136rpx
);
margin-left
:
10rpx
;
}
}
}
}
.service-items
{
width
:
100%
;
height
:
88rpx
;
line-height
:
88rpx
;
background-color
:
#FFFFFF
;
padding
:
0
32rpx
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
color
:
#323233
;
}
.service-items.active
{
background
:
#F0F7FF
;
color
:
#3666FE
;
}
}
@keyframes
show-confirm-box
{
0
%
{
right
:
-100%
;
}
100
%
{
right
:
0
;
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectServiceConfirm/selectServiceConfirm.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/pages/staffManage/selectServicePage.wxml-->
<view class="select-service-page" hidden="{{!show}}" style="margin-top:{{tabBarStyle}}px;">
<view class="search-content">
<view class="search-box">
<view class="search-input">
<glsx-image src="output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索服务中心"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
</view>
</view>
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{serviceList}}" wx:key="index">
<view
class="service-items text-hide {{item.act?'active':''}}"
data-index="{{index}}"
bindtap="select">
{{item.serviceName}}
</view>
</block>
</scroll-view>
</view>
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.js
0 → 100644
View file @
7a11276
// pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.js
import
{
IMG_URL
}
from
'~/utils/constantData.js'
import
USERAPI
from
'~/api/usersApi/index'
import
{
setUserInfo
}
from
'~/utils/cache/storageApi'
Component
({
options
:
{
addGlobalClass
:
true
},
/**
* 组件的属性列表
*/
properties
:
{
popShow
:
{
type
:
Boolean
,
value
:
false
,
observer
:
function
(
n
)
{
if
(
n
)
{
let
{
merchantRange
,
selectInfo
}
=
this
.
data
let
activeIndex
=
merchantRange
.
findIndex
(
v
=>
v
.
serviceCode
==
selectInfo
.
serviceCode
)
merchantRange
.
forEach
((
item
,
ind
)
=>
{
if
(
activeIndex
==
ind
)
{
item
.
act
=
true
}
else
{
item
.
act
=
false
}
this
.
setData
({
merchantRange
})
})
}
}
},
merchantRange
:
Object
,
selectInfo
:
Object
},
/**
* 组件的初始数据
*/
data
:
{
IMG_URL
,
merchantList
:
[]
},
observers
:
{
merchantRange
:
function
(
e
)
{
this
.
setData
({
merchantList
:
e
})
}
},
/**
* 组件的方法列表
*/
methods
:
{
hidePopup
()
{
this
.
triggerEvent
(
'hidePopup'
)
},
confirm
()
{
let
{
merchantRange
,
subIndex
}
=
this
.
data
let
actObj
=
merchantRange
.
find
((
item
,
index
)
=>
{
if
(
item
.
act
)
{
subIndex
=
index
}
return
item
.
act
})
if
(
!
actObj
)
{
return
wx
.
$api
.
showToast
({
title
:
'请选择服务中心'
,
icon
:
'error'
})
}
else
{
this
.
changePicker
(
actObj
)
}
},
changePicker
(
actObj
)
{
// 修改对应下标显示
wx
.
$api
.
showLoading
(
'加载中...'
)
this
.
triggerEvent
(
'getStaffList'
,
{...
actObj
})
this
.
hidePopup
()
},
select
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
merchantRange
}
=
this
.
data
merchantRange
.
forEach
((
item
,
ind
)
=>
{
if
(
index
==
ind
)
{
item
.
act
=
true
}
else
{
item
.
act
=
false
}
this
.
setData
({
merchantRange
})
})
},
input
(
e
)
{
let
{
merchantRange
}
=
this
.
data
let
{
value
}
=
e
.
detail
merchantRange
.
forEach
(
item
=>
{
item
.
act
=
false
item
.
show
=
item
.
serviceCode
?.
includes
(
value
)
// = show
})
this
.
setData
({
merchantRange
})
}
}
})
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.json
0 → 100644
View file @
7a11276
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/components/selectService/selectService.wxss */
.search-box
{
width
:
100%
;
height
:
104rpx
;
padding-left
:
32rpx
;
display
:
flex
;
align-items
:
center
;
background-color
:
#fff
;
position
:
sticky
;
top
:
0
;
left
:
0
;
z-index
:
9
;
box-sizing
:
border-box
;
.search
{
width
:
144rpx
;
height
:
100%
;
color
:
#666
;
box-sizing
:
border-box
;
padding
:
0
24rpx
;
.text-center
{
font-size
:
24rpx
;
border-radius
:
12rpx
;
width
:
100%
;
font-size
:
32rpx
;
color
:
#858A94
;
.search-filter
{
margin-left
:
6rpx
;
width
:
24rpx
;
height
:
24rpx
;
}
}
}
.search-input
{
background
:
#F7F8FA
;
border-radius
:
38rpx
;
width
:
606rpx
;
height
:
72rpx
;
display
:
flex
;
align-items
:
center
;
padding-left
:
26rpx
;
.input-placeholder
{
color
:
rgba
(
200
,
201
,
204
,
.89
);
}
.search-icon
{
width
:
28rpx
;
height
:
28rpx
;
}
.search-clear
{
width
:
36rpx
;
height
:
36rpx
;
margin
:
0
26rpx
0
10rpx
;
}
.input
{
font-size
:
28rpx
;
width
:
calc
(
100%
-
136rpx
);
margin-left
:
10rpx
;
}
}
}
.list
{
height
:
calc
(
100%
-
100rpx
)
!
important
;
}
.itemCon
{
box-sizing
:
border-box
;
width
:
100%
;
height
:
80rpx
;
color
:
#323436
;
line-height
:
80rpx
;
padding
:
0
32rpx
;
}
.active
{
background
:
#F0F7FF
;
font-size
:
28rpx
;
color
:
#3666FE
;
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/components/selectServicePopup/selectServicePopup.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/components/selectService/selectService.wxml-->
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
height="60%">
<view class="search-box">
<view class="search-input">
<glsx-image src="output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索服务中心"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
</view>
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{merchantList}}" wx:key="index">
<view
class="itemCon text-hide {{item.act?'active':''}}"
data-index="{{index}}"
bindtap="select">
{{item.serviceName}}
</view>
</block>
</scroll-view>
</popup>
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.js
0 → 100644
View file @
7a11276
// packagesList/mineDetail/pages/staffManage/createStaff/createStaff.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
addOrEdit
:
'add'
,
formItems
:
[{
label
:
'所属服务中心'
,
props
:
'selectServiceInfo'
,
valueFn
:
'serviceValue'
,
type
:
'select'
,
placeholder
:
'请选择服务中心'
,
pageType
:
1
},
{
label
:
'员工姓名'
,
props
:
'staffName'
,
type
:
'input'
,
placeholder
:
'请输入员工姓名'
},
{
label
:
'手机号码'
,
tips
:
'(登录凭证)'
,
props
:
'mobile'
,
type
:
'input'
,
placeholder
:
'请输入手机号码'
},
{
label
:
'可见客户'
,
props
:
'connectionIds'
,
type
:
'select'
,
valueFn
:
'connectionValue'
,
placeholder
:
'请选择可见客户'
,
pageType
:
2
}],
serviceList
:
[{
serviceCode
:
1
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
2
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
3
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
4
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
5
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
6
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
7
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
8
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
9
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
10
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
11
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
}],
formData
:
{},
showServiceConfirm
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onRoute
(
options
)
{
this
.
setData
({
addOrEdit
:
options
?.
type
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
},
back
()
{
let
{
showServiceConfirm
}
=
this
.
data
if
(
showServiceConfirm
){
this
.
setData
({
showServiceConfirm
:
false
})
}
else
wx
.
$router
.
back
()
},
// 选择服务中心/客户
jump
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
switch
(
type
)
{
// 选择服务中心
case
1
:
this
.
hiddenSelectConfirm
()
break
case
2
:
wx
.
$router
.
go
(
'packagesList.selectConnectionPage'
)
}
},
hiddenSelectConfirm
(
e
)
{
let
selectServiceInfo
=
e
?.
detail
console
.
log
(
selectServiceInfo
)
this
.
setData
({
showServiceConfirm
:
!
this
.
data
.
showServiceConfirm
,
'formData.selectServiceInfo'
:
selectServiceInfo
,
'formData.serviceValue'
:
selectServiceInfo
?.
serviceName
})
},
// 提交
handleConfirm
()
{
let
{
addOrEdit
}
=
this
.
data
let
message
=
addOrEdit
==
'add'
?
'是否确定创建员工?'
:
'是否确定修改员工信息?'
wx
.
showModal
({
title
:
'提示'
,
content
:
message
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
confirmColor
:
'#3666FE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// 创建/编辑接口
if
(
addOrEdit
==
'add'
)
{
wx
.
$router
.
reLaunch
(
''
)
}
}
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.json
0 → 100644
View file @
7a11276
{
"usingComponents"
:
{
"select-service-confirm"
:
"../../../components/selectServiceConfirm/selectServiceConfirm"
},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/pages/staffManage/createStaff/createStaff.wxss */
.create-staff-page
{
margin
:
20rpx
;
.tips
{
padding
:
12rpx
;
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
}
.form-content
{
background
:
#FFFFFF
;
border-radius
:
16rpx
;
padding
:
44rpx
40rpx
;
.label
{
font-size
:
28rpx
;
font-weight
:
600
;
color
:
#323436
;
margin-bottom
:
12rpx
;
.tips
{
font-size
:
24rpx
;
font-weight
:
400
;
color
:
#F35251
;
}
}
.input-box
,
.select-box
{
height
:
40rpx
;
background
:
#F8F9FC
;
border-radius
:
12rpx
;
padding
:
32rpx
24rpx
;
margin-bottom
:
16rpx
;
color
:
#323436
;
}
.select-box
{
display
:
flex
;
justify-content
:
space-between
;
.arrow_right
{
width
:
36rpx
;
height
:
36rpx
;
}
.name
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
}
}
.btn
{
position
:
fixed
;
bottom
:
16rpx
;
left
:
0
;
width
:
calc
(
100%
-
64rpx
);
height
:
88rpx
;
line-height
:
88rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
margin
:
0
32rpx
;
}
.btn-blue
{
background
:
var
(
--
btnColor
);
border-radius
:
8rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/createStaff/createStaff.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/pages/staffManage/createStaff/createStaff.wxml-->
<navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back" customBack="{{true}}">
{{!showServiceConfirm ? (addOrEdit == 'add' ? '创建员工' : '编辑员工') : '选择服务中心'}}
</navigation-bar>
<view class="create-staff-page" style="padding-top:{{tabBarStyle}}px;">
<view class="tips" wx:if="{{addOrEdit == 'add'}}">请完善员工资料完成创建:</view>
<view class="form-content">
<block wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<view class="input-box" wx:if="{{item.type == 'input'}}">
<input
type="text"
placeholder="{{item.placeholder}}"
class="input"
value="{{formData[item.props]}}"
placeholder-class="input-placeholder" />
</view>
<view class="select-box" wx:if="{{item.type == 'select'}}" bindtap="jump" data-type="{{item.pageType}}">
<view class="name" wx:if="{{formData[item.valueFn]}}">{{formData[item.valueFn]}}</view>
<view class="placeholder-text" wx:else>{{item.placeholder}}</view>
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
</block>
</view>
<view class="isFullSucreen btn">
<view class="btn-blue" bindtap="handleConfirm">{{addOrEdit == 'add' ? '提交' : '保存'}}</view>
</view>
</view>
<select-service-confirm show="{{showServiceConfirm}}" tabBarStyle="{{tabBarStyle}}" serviceList="{{serviceList}}" bind:hiddenSelectConfirm="hiddenSelectConfirm"></select-service-confirm>
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.js
0 → 100644
View file @
7a11276
// packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
showConnectionConfirm
:
false
,
connectionList
:
[{
serviceCode
:
1
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加1号服务中心'
,
time
:
'2022.10.03'
,
checked
:
true
,
disabled
:
true
},
{
serviceCode
:
2
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加2号服务'
,
time
:
'2022.10.03'
},
{
serviceCode
:
3
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加3号服务'
,
time
:
'2022.10.03'
},
{
serviceCode
:
4
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加4号服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
5
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加5号服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
6
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
7
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
8
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
9
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
10
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
11
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
12
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
13
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'123456'
,
time
:
'2022.10.03'
,
disabled
:
true
},
{
serviceCode
:
14
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
15
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
16
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
17
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
18
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'789'
,
time
:
'2022.10.03'
}],
selectType
:
[{
label
:
'全部'
,
tips
:
'所有客户可见'
,
type
:
0
,
active
:
false
},
{
label
:
'指定客户可见'
,
type
:
1
,
active
:
false
}],
showConnectionList
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
},
changeType
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
selectType
,
showConnectionList
}
=
this
.
data
selectType
.
forEach
((
v
,
ind
)
=>
{
if
(
index
==
ind
&&
v
.
active
)
return
showConnectionList
=
!
showConnectionList
if
(
index
==
ind
&&
!
v
.
active
)
{
v
.
active
=
true
if
(
index
==
1
)
showConnectionList
=
true
else
showConnectionList
=
false
}
else
v
.
active
=
false
})
this
.
setData
({
selectType
,
showConnectionList
})
},
// 显示选择指定客户
showConfirm
()
{
let
{
showConnectionConfirm
}
=
this
.
data
this
.
setData
({
showConnectionConfirm
:
!
showConnectionConfirm
})
},
// 选择指定客户确定
selectConfirm
(
e
)
{
let
selectedConnectionList
=
e
?.
detail
||
[]
this
.
setData
({
selectedConnectionList
,
showConnectionConfirm
:
false
})
},
// 确定
handleConfirm
()
{
let
{
selectType
,
selectedConnectionList
}
=
this
.
data
let
arr
=
selectType
.
filter
(
v
=>
v
.
active
)
||
[]
if
(
!
arr
.
length
||
(
arr
.
find
(
v
=>
v
.
active
&&
v
.
type
==
1
)
&&
!
selectedConnectionList
?.
length
))
return
wx
.
showToast
({
title
:
'请选择可见客户'
,
icon
:
'none'
,
duration
:
2000
})
const
currentPages
=
getCurrentPages
()
let
prevPage
=
currentPages
[
currentPages
.
length
-
2
]
prevPage
.
setData
({
'formData.connectionValue'
:
arr
.
find
(
v
=>
v
.
active
&&
v
.
type
==
0
)
?
'全部'
:
`已选择
${
selectedConnectionList
?.
length
}
位客户
`,
'formData.selectedIds': selectedConnectionList
})
this.back()
},
// 返回
back() {
let { showConnectionConfirm } = this.data
if (showConnectionConfirm){
this.setData({
showConnectionConfirm: false
})
} else wx.$router.back()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.json
0 → 100644
View file @
7a11276
{
"usingComponents"
:
{
"select-connection-confirm"
:
"../../../components/selectConnectionConfirm/selectConnectionConfirm"
},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.wxss */
.select-connection-page
{
.select-content
{
background-color
:
#FFFFFF
;
padding-left
:
48rpx
;
.flex_class
{
display
:
flex
;
align-items
:
center
;
.flex1
{
flex
:
1
;
}
.checked_class
{
flex-shrink
:
0
;
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
28rpx
;
}
.label
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
28rpx
;
color
:
#323436
;
margin-top
:
30rpx
;
.arrow_up
{
width
:
36rpx
;
height
:
36rpx
;
transform
:
rotate
(
45deg
);
transition
:
all
0
.5s
;
margin-right
:
32rpx
;
}
.arrow_down
{
transform
:
rotate
(
135deg
);
transition
:
all
0
.5s
;
}
}
.lable_border
{
margin-top
:
0
;
height
:
88rpx
;
border-top
:
1rpx
solid
#F5F5F5
;
border-bottom
:
1rpx
solid
#F5F5F5
;
}
.tips
{
font-size
:
26rpx
;
color
:
#858A94
;
margin
:
10rpx
0
30rpx
0
;
}
}
.connection_box
{
padding
:
0
40rpx
0
68rpx
;
.select_btn
{
color
:
#5C7097
;
font-size
:
26rpx
;
height
:
88rpx
;
line-height
:
88rpx
;
}
.list-items
{
padding-bottom
:
28rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
flex-flow
:
wrap
;
.item
{
height
:
54rpx
;
line-height
:
54rpx
;
background
:
#F0F7FF
;
border-radius
:
8rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
margin-bottom
:
12rpx
;
padding
:
0
20rpx
;
}
}
}
}
.btn
{
position
:
fixed
;
bottom
:
16rpx
;
left
:
0
;
width
:
calc
(
100%
-
64rpx
);
height
:
196rpx
;
line-height
:
88rpx
;
text-align
:
center
;
font-size
:
28rpx
;
color
:
#FFFFFF
;
margin
:
0
32rpx
;
}
.btn-blue
{
background
:
var
(
--
btnColor
);
border-radius
:
8rpx
;
}
.btn-cancel
{
background-color
:
#FFFFFF
;
color
:
var
(
--
btnColor
);
margin-top
:
20rpx
;
border-radius
:
8rpx
;
}
}
packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/pages/staffManage/selectConnectionPage/selectConnectionPage.wxml-->
<navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back" customBack="{{true}}">
{{!showConnectionConfirm ? '可见客户' : '选择客户'}}
</navigation-bar>
<view class="select-connection-page" style="padding-top:{{tabBarStyle}}px;">
<view class="select-content">
<view class="flex_class" wx:for="{{selectType}}" wx:key="index" bindtap="changeType" data-index="{{index}}">
<view class="checked_class">
<view hidden="{{!item.active}}">
<glsx-image src="personal/checked.png" class="checked_class" />
</view>
</view>
<view class="flex1">
<view class="label {{index == 1?'lable_border':''}}">{{item.label}}<glsx-image wx:if="{{index == 1}}" src="personal/arrow_right.png" class="arrow_up {{showConnectionList ? 'arrow_down' : ''}}" /></view>
<view class="tips" wx:if="{{item.tips}}">{{item.tips}}</view>
</view>
</view>
<view class="connection_box" hidden="{{!showConnectionList}}">
<view class="select_btn" bindtap="showConfirm">请选择指定客户</view>
<view class="list-items" wx:if="{{selectedConnectionList.length}}">
<view class="item" wx:for="{{selectedConnectionList}}" wx:key="index">{{item.serviceName}}</view>
</view>
</view>
</view>
<view class="isFullSucreen btn">
<view class="btn-blue" bindtap="handleConfirm">确定</view>
<view class="btn-cancel" bindtap="handleConfirm" bindtap="back">取消</view>
</view>
</view>
<select-connection-confirm show="{{showConnectionConfirm}}" bind:selectConfirm="selectConfirm" connectionList="{{connectionList}}" tabBarStyle="{{tabBarStyle}}"></select-connection-confirm>
packagesList/mineDetail/pages/staffManage/staffList/staffList.js
View file @
7a11276
...
@@ -6,8 +6,78 @@ Page({
...
@@ -6,8 +6,78 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
staffList
:
[]
popupShow
:
false
,
staffList
:
[{
serviceCode
:
1
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
2
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
3
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
4
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
5
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
6
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
7
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
8
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
9
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
10
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
},
{
serviceCode
:
11
,
staffName
:
'马保国'
,
staffMobile
:
'13645674567'
,
serviceName
:
'广东嘀加八号快乐酷爱咖哩鸡服务中心咖哩鸡服务中心咖哩鸡服务中心'
,
time
:
'2022.10.03'
}],
selectInfo
:
{
serviceName
:
'全部服务中心'
},
total
:
15
},
},
/**
/**
...
@@ -31,6 +101,40 @@ Page({
...
@@ -31,6 +101,40 @@ Page({
},
},
// 筛选服务中心
filterTypeFn
()
{
this
.
setData
({
popupShow
:
!
this
.
data
.
popupShow
})
},
// 获取员工列表
getStaffList
(
e
)
{
wx
.
$api
.
hideLoading
()
this
.
setData
({
selectInfo
:
e
.
detail
})
},
// 创建/编辑员工
jump
(
e
)
{
// 校验是否有配置服务中心
// return wx.showModal({
// title: '提示',
// content: '您尚无服务中心,请先创建服务中心',
// confirmText: '去创建',
// cancelText: '取消',
// confirmColor: '#3666FE',
// success(res) {
// if (res.confirm) {
// wx.$router.reLaunch('')
// }
// }
// })
let
type
=
e
.
currentTarget
.
dataset
wx
.
$router
.
go
(
'packagesList.createStaff'
,
type
)
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
...
...
packagesList/mineDetail/pages/staffManage/staffList/staffList.json
View file @
7a11276
{
{
"navigationBarTitleText"
:
"员工管理"
,
"navigationBarTitleText"
:
"员工管理"
,
"usingComponents"
:
{}
"usingComponents"
:
{
"select-service-popup"
:
"../../../components/selectServicePopup/selectServicePopup"
}
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/staffList/staffList.scss
View file @
7a11276
/* packagesList/mineDetail/pages/staffManage/staffManage.wxss */
/* packagesList/mineDetail/pages/staffManage/staffManage.wxss */
.staff-list-page
{
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20rpx
;
background-color
:
#F2F3F7
;
.btn_box
{
width
:
100%
;
height
:
96rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#FFFFFF
;
border-radius
:
16rpx
;
color
:
var
(
--
btnColor
);
font-size
:
28rpx
;
font-weight
:
600
;
margin-bottom
:
32rpx
;
.icon
{
width
:
40rpx
;
height
:
40rpx
;
margin-right
:
16rpx
;
vertical-align
:
-12rpx
}
}
.title-box
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
.title
{
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
.number
{
color
:
var
(
--
btnColor
)
}
}
.select-btn
{
box-sizing
:
border-box
;
padding
:
16rpx
0
;
display
:
flex
;
align-items
:
center
;
z-index
:
2
;
background-color
:
#f2f3f7
;
.type
{
margin-left
:
8px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
padding
:
0
16rpx
;
height
:
24px
;
line-height
:
24px
;
background
:
#ffffff
;
border-radius
:
14px
;
font-size
:
12px
;
color
:
#8a8c90
;
text
{
max-width
:
360rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.point
{
margin-left
:
2px
;
width
:
12px
;
height
:
12px
;
}
}
}
}
.item-box
{
width
:
100%
;
background
:
#FFFFFF
;
border-radius
:
12rpx
;
margin-bottom
:
20rpx
;
.top
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
24rpx
32rpx
;
.message
{
display
:
flex
;
.avatar
{
flex-shrink
:
0
;
width
:
72rpx
;
height
:
72rpx
;
margin-right
:
12rpx
;
border-radius
:
50%
;
}
.message-text
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
center
;
.name
{
color
:
#323436
;
font-size
:
28rpx
;
}
.mobile
{
color
:
#858A94
;
font-size
:
26rpx
;
}
}
}
.arrow_right
{
width
:
36rpx
;
height
:
36rpx
;
}
}
.bottom
{
padding
:
0
32rpx
;
height
:
72rpx
;
background-color
:
#FFF9F2
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
24rpx
;
color
:
#8A8C90
;
.service_name
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
}
}
.bottomTips
{
text-align
:
center
;
color
:
#393b3e
;
font-size
:
26rpx
;
height
:
60rpx
;
line-height
:
40rpx
;
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/staffManage/staffList/staffList.wxml
View file @
7a11276
<!--packagesList/mineDetail/pages/staffManage/staffManage.wxml-->
<!--packagesList/mineDetail/pages/staffManage/staffManage.wxml-->
<view class="staff-list-page">
<view class="staff-list-page">
<view class="btn_box">
<view class="btn_box" bindtap="jump" data-type="add">
<glsx-image src="index/apply.png" class="icon" />
<text>创建新员工</text>
</view>
<view class="content-box" wx:if="{{!staffList.length}}">
<view class="title-box">
<view class="title">员工数量:<text class="number">{{total}}</text></view>
<view class="select-btn">
<view class="type" bindtap="filterTypeFn">
<text>{{selectInfo.serviceName}}</text>
<glsx-image class="point" src="index/point.png" />
</view>
</view>
</view>
<scroll-view scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
class="list"
style="height:calc(100vh - 148rpx - 110rpx);"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{staffList}}" wx:key="index" bindtap="jump" data-type="edit">
<view class="top">
<view class="message">
<glsx-image wx:if="{{!item.avatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<image wx:else src="{{item.avatarUrl}}" class="avatar"></image>
<view class="message-text">
<view class="name">{{item.staffName}}</view>
<view class="mobile">{{item.staffMobile}}</view>
</view>
</view>
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
<view class="bottom">
<view class="service_name">
所属:{{item.serviceName}}
</view>
<view class="time">{{item.time}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{staffList.length>10}}">到底啦!</view>
</scroll-view>
</view>
</view>
<view class="content-box" wx:if="{{staffList.length}}"></view>
<view wx:else>
<view wx:else>
<nothing-tips tips="暂无员工~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
<nothing-tips tips="暂无员工~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="getStaffList" selectInfo="{{selectInfo}}" popShow="{{popupShow}}" merchantRange="{{staffList}}" />
packagesList/mineDetail/pages/successPage/successPage.js
0 → 100644
View file @
7a11276
// packagesList/mineDetail/pages/successPage/successPage.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
paramsObj
:
{
navigationTitle
:
'创建员工'
,
primaryBtn
:
'继续创建员工'
,
primaryCallback
:
'packagesList.createStaff'
,
cancelBtn
:
'S后自动跳转我的员工'
,
cancelCallback
:
'packagesList.staffList'
},
count
:
5
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
// this.setData({
// paramsObj: options
// })
let
{
count
,
paramsObj
}
=
this
.
data
this
.
countDownTime
=
setInterval
(()
=>
{
this
.
setData
({
count
:
--
count
})
if
(
this
.
data
.
count
==
0
)
wx
.
$router
.
reLaunch
(
paramsObj
.
cancelCallback
)
},
1
*
1000
)
},
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
tabBarStyle
:
height
/
2
+
statusBarHeight
})
},
jump
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
let
{
paramsObj
}
=
this
.
data
let
jumpUrl
=
type
==
'primary'
?
paramsObj
?.
primaryCallback
:
paramsObj
?.
cancelCallback
wx
.
$router
.
reLaunch
(
jumpUrl
)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
clearInterval
(
this
.
countDownTime
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/successPage/successPage.json
0 → 100644
View file @
7a11276
{
"usingComponents"
:
{},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/successPage/successPage.scss
0 → 100644
View file @
7a11276
/* packagesList/mineDetail/pages/successPage/successPage.wxss */
.success-page
{
box-sizing
:
border-box
;
width
:
100%
;
background-color
:
#ffffff
;
display
:
flex
;
flex-flow
:
column
;
align-items
:
center
;
justify-content
:
space-between
;
padding-bottom
:
160rpx
;
.success_icon
{
width
:
160rpx
;
height
:
160rpx
;
}
.success_text
{
font-family
:
PingFangSC-Medium
;
font-weight
:
500
;
font-size
:
42rpx
;
color
:
#323436
;
margin-top
:
52rpx
;
}
.btn-box
{
view
{
width
:
440rpx
;
height
:
88rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.btn-blue
{
background
:
var
(
--
btnColor
);
border-radius
:
8rpx
;
color
:
#FFFFFF
;
font-size
:
28rpx
;
}
.btn-cancel
{
width
:
436rpx
;
height
:
84rpx
;
background
:
#FFFFFF
;
border-radius
:
8rpx
;
border
:
2rpx
dashed
#AFB0B2
;
font-size
:
24rpx
;
color
:
#5A6066
;
margin-top
:
20rpx
;
}
}
}
\ No newline at end of file
\ No newline at end of file
packagesList/mineDetail/pages/successPage/successPage.wxml
0 → 100644
View file @
7a11276
<!--packagesList/mineDetail/pages/successPage/successPage.wxml-->
<navigation-bar bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">{{paramsObj.navigationTitle}}</navigation-bar>
<view class="success-page" style="height: 100vh;padding:calc({{tabBarStyle}}px + 160rpx) 0 calc(160rpx + env(safe-area-inset-bottom)) 0;">
<view>
<glsx-image src="personal/success.png" class="success_icon" />
<view class="success_text">创建成功</view>
</view>
<view class="btn-box">
<view class="btn-blue" bindtap="jump" data-type="primary">{{paramsObj.primaryBtn}}</view>
<view class="btn-cancel" bindtap="jump" data-type="cancel">{{count}}{{paramsObj.cancelBtn}}</view>
</view>
</view>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment