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 27891367
authored
Apr 07, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
技师
1 parent
3d5b7095
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
363 additions
and
29 deletions
api/mineApi/mineService.js
app.json
packageMine/pages/customerManagement/customerList/customerList.js
packageMine/pages/customerManagement/customerList/customerList.scss
packageMine/pages/customerManagement/customerList/customerList.wxml
packageMine/pages/customerManagement/technicianList/technicianList.js
packageMine/pages/customerManagement/technicianList/technicianList.json
packageMine/pages/customerManagement/technicianList/technicianList.scss
packageMine/pages/customerManagement/technicianList/technicianList.wxml
api/mineApi/mineService.js
View file @
2789136
...
@@ -42,9 +42,56 @@ const updateService = data => {
...
@@ -42,9 +42,56 @@ const updateService = data => {
)
)
}
}
// 分页查询技师列表
const
getTechnicianList
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.businessAssistant.technicianConfig.page'
,
...
data
}
)
}
// 新增技师信息
const
addTechnician
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.businessAssistant.technicianConfig.add'
,
...
data
},
true
)
}
// 修改技师信息
const
updateTechnician
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.businessAssistant.technicianConfig.update'
,
...
data
},
true
)
}
// 删除技师
const
deleteTechnician
=
data
=>
{
return
api
.
post
(
{
method
:
'scrm.api.businessAssistant.technicianConfig.delete'
,
...
data
},
true
)
}
export
default
{
export
default
{
getAllServiceList
,
getAllServiceList
,
getServiceList
,
getServiceList
,
saveService
,
saveService
,
updateService
updateService
,
getTechnicianList
,
addTechnician
,
updateTechnician
,
deleteTechnician
}
}
\ No newline at end of file
\ No newline at end of file
app.json
View file @
2789136
...
@@ -96,7 +96,8 @@
...
@@ -96,7 +96,8 @@
"serviceManage/editService/editService"
,
"serviceManage/editService/editService"
,
"customerManagement/customerList/customerList"
,
"customerManagement/customerList/customerList"
,
"customerManagement/editCustomer/editCustomer"
,
"customerManagement/editCustomer/editCustomer"
,
"customerManagement/saleList/saleList"
"customerManagement/saleList/saleList"
,
"customerManagement/technicianList/technicianList"
]
]
}
}
],
],
...
...
packageMine/pages/customerManagement/customerList/customerList.js
View file @
2789136
...
@@ -9,6 +9,7 @@ Page({
...
@@ -9,6 +9,7 @@ Page({
*/
*/
data
:
{
data
:
{
IMG_URL
,
IMG_URL
,
maxNum
:
99
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
selectInfo
:
{
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
yqMerchantName
:
'全部服务中心'
...
@@ -37,6 +38,11 @@ Page({
...
@@ -37,6 +38,11 @@ Page({
wx
.
$router
.
go
(
'packageMine.saleList'
,
target
)
wx
.
$router
.
go
(
'packageMine.saleList'
,
target
)
},
},
handleTechnician
(
e
)
{
let
{
target
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
go
(
'packageMine.technicianList'
,
target
)
},
handleEdit
(
e
)
{
handleEdit
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
let
{
type
}
=
e
.
currentTarget
.
dataset
let
params
=
{
let
params
=
{
...
...
packageMine/pages/customerManagement/customerList/customerList.scss
View file @
2789136
...
@@ -139,36 +139,34 @@
...
@@ -139,36 +139,34 @@
.avatar-box
{
.avatar-box
{
position
:
relative
;
position
:
relative
;
width
:
96
rpx
;
width
:
48
rpx
;
height
:
48rpx
;
height
:
48rpx
;
margin-right
:
14rpx
;
margin-right
:
14rpx
;
.employee-img
{
.avatar-img
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
48rpx
;
width
:
48rpx
;
height
:
48rpx
;
height
:
48rpx
;
z-index
:
3
;
}
}
.img-2
{
.num
{
left
:
12rpx
;
position
:
absolute
;
z-index
:
2
;
right
:
-50%
;
}
top
:
0
;
width
:
36rpx
;
.img-3
{
height
:
22rpx
;
left
:
24rpx
;
line-height
:
22rpx
;
z-index
:
1
;
font-size
:
20rpx
;
color
:
#FFFFFF
;
text-align
:
center
;
background
:
#F36261
;
border-radius
:
12rpx
;
}
}
}
}
.avatar-box-1
{
.line
{
width
:
48rpx
;
font-size
:
26rpx
;
}
color
:
#8A8C90
;
margin
:
0
20rpx
;
.avatar-box-2
{
width
:
72rpx
;
}
}
.look-btn
{
.look-btn
{
...
...
packageMine/pages/customerManagement/customerList/customerList.wxml
View file @
2789136
...
@@ -29,15 +29,20 @@
...
@@ -29,15 +29,20 @@
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
</view>
<view class="employee-box">
<view class="employee-box">
<view>
<view class="employee-list">
<!-- 技师 -->
<view class="employee-list">
<glsx-image class="avatar-box" src="personal/staff_defalut_avatar.png" />
<view class="look-btn" data-target="{{item}}" catchtap="handleTechnician">技师</view>
</view>
<view class="line">|</view>
<!-- 销售顾问 -->
<view class="employee-list" wx:if="{{item.employeeNum != '0'}}">
<view class="employee-list" wx:if="{{item.employeeNum != '0'}}">
<view class="avatar-box {{item.employeeNum == 1 ? 'avatar-box-1' : ''}} {{item.employeeNum == 2 ? 'avatar-box-2' : ''}}">
<view class="avatar-box">
<glsx-image class="employee-img" src="personal/staff_defalut_avatar.png" />
<glsx-image class="avatar-img" src="personal/staff_defalut_avatar.png" />
<glsx-image wx:if="{{item.employeeNum > 1}}" class="employee-img img-2" src="personal/staff_defalut_avatar.png" />
<view class="num">{{item.employeeNum > maxNum ? (maxNum + '+') : item.employeeNum}}</view>
<glsx-image wx:if="{{item.employeeNum > 2}}" class="employee-img img-3" src="personal/staff_defalut_avatar.png" />
</view>
</view>
<view wx:if="{{item.employeeNum > 3}}">+{{item.employeeNum}}</view>
<view class="look-btn" data-target="{{item}}" catchtap="handleSale">销售顾问</view>
<view class="look-btn" data-target="{{item}}" catchtap="handleSale">查看</view>
</view>
</view>
<view class="no-employee" wx:else>暂无销售顾问,去邀请</view>
<view class="no-employee" wx:else>暂无销售顾问,去邀请</view>
</view>
</view>
...
...
packageMine/pages/customerManagement/technicianList/technicianList.js
0 → 100644
View file @
2789136
// packageMine/pages/customerManagement/technicianList/technicianList.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
mineServiceApi
from
'~/api/mineApi/mineService'
Page
({
/**
* 页面的初始数据
*/
data
:
{
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
technicianList
:
[],
total
:
-
1
,
pageCof
:
{
pageNum
:
1
,
pageSize
:
10
}
},
handleEdit
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
let
params
=
{
addOrEdit
:
type
,
target
:
e
.
currentTarget
.
dataset
?.
target
||
{}
}
delete
params
.
target
?.
createdDate
// wx.$router.go('packageMine.edittechnician', params)
},
handleSearch
()
{
this
.
setData
({
[
'pageCof.pageNum'
]:
1
,
total
:
-
1
})
this
.
getList
(
true
)
},
scrollonReachBottom
()
{
this
.
getList
()
},
getList
(
isReset
=
false
)
{
let
{
technicianList
,
pageCof
,
total
}
=
this
.
data
if
(
total
==
technicianList
.
length
)
{
return
true
}
let
params
=
{
...
pageCof
}
mineServiceApi
.
getTechnicianList
(
params
).
then
(
res
=>
{
let
{
list
,
total
}
=
res
this
.
setData
({
technicianList
:
pageCof
.
pageNum
==
1
?
(
list
||
[])
:
technicianList
.
concat
(
list
),
[
'pageCof.pageNum'
]:
pageCof
.
pageNum
+
1
,
triggered
:
false
,
total
})
if
(
isReset
)
{
this
.
setData
({
scrollTop
:
0
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
this
.
getList
(
true
)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/technicianList/technicianList.json
0 → 100644
View file @
2789136
{
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageMine/pages/customerManagement/technicianList/technicianList.scss
0 → 100644
View file @
2789136
/* packageMine/pages/customerManagement/technicianList/technicianList.wxss */
.technician-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
;
margin-bottom
:
20rpx
;
.title
{
color
:
#323436
;
font-size
:
28rpx
;
font-weight
:
600
;
.number
{
color
:
var
(
--
btnColor
)
}
}
}
.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
;
}
.message-text
{
display
:
flex
;
flex-flow
:
column
;
justify-content
:
center
;
.merchant
{
color
:
#323436
;
font-size
:
28rpx
;
}
.contact
{
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
;
.technician_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
packageMine/pages/customerManagement/technicianList/technicianList.wxml
0 → 100644
View file @
2789136
<!--packageMine/pages/customerManagement/technicianList/technicianList.wxml-->
<view class="technician-list-page">
<view class="btn_box" bindtap="handleEdit" data-type="add">
<glsx-image src="index/apply.png" class="icon" />
<text>新增技师</text>
</view>
<view class="content-box" wx:if="{{technicianList.length}}">
<view class="title-box">
<view class="title">技师:<text class="number">{{total < 0 ? 0 : total}}</text>
</view>
</view>
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="handleSearch" bindscrolltolower="scrollonReachBottom" class="list" style="height:calc(100vh - 148rpx - 110rpx);" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
<view class="item-box" wx:for="{{technicianList}}" wx:key="index" bindtap="handleEdit" data-type="edit" data-target="{{item}}">
<view class="top">
<view class="message">
<glsx-image src="personal/service_head.png" class="avatar" />
<view class="message-text">
<view class="merchant">{{item.merchantName}}</view>
<view class="contact">{{item.contactName}} {{item.phone}}</view>
</view>
</view>
<glsx-image src="personal/arrow_right.png" class="arrow_right" />
</view>
<view class="bottom">
<view class="technician_name">
商户号:{{item.merchantId}}
</view>
<view class="time">{{item.createdDate}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view>
</scroll-view>
</view>
<view wx:else>
<nothing-tips tips="暂无技师~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
\ No newline at end of file
\ No newline at end of file
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