Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a9b826e3
authored
Nov 13, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
技师设置
1 parent
bccc3261
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
115 additions
and
20 deletions
app.json
tabMine/api.js
tabMine/pages/technicianSetup/technicianSetup.js
tabMine/pages/technicianSetup/technicianSetup.wxml
app.json
View file @
a9b826e
...
...
@@ -31,29 +31,25 @@
"pagePath"
:
"tabIndex/pages/index/index"
,
"text"
:
"首页"
,
"iconPath"
:
"images/tab-home.png"
,
"selectedIconPath"
:
"images/tab-home-active.png"
,
"iconSize"
:
"24"
"selectedIconPath"
:
"images/tab-home-active.png"
},
{
"pagePath"
:
"pages/tabWorkOrder/pages/index/index"
,
"text"
:
"工单管理"
,
"iconPath"
:
"images/tab-order.png"
,
"selectedIconPath"
:
"images/tab-order-active.png"
,
"iconSize"
:
"24"
"selectedIconPath"
:
"images/tab-order-active.png"
},
{
"pagePath"
:
"pages/tabDateIndex/pages/tabDateIndex"
,
"text"
:
"预约管理"
,
"iconPath"
:
"images/tab-date.png"
,
"selectedIconPath"
:
"images/tab-date-active.png"
,
"iconSize"
:
"24"
"selectedIconPath"
:
"images/tab-date-active.png"
},
{
"pagePath"
:
"pages/tabMine/pages/index/index"
,
"text"
:
"个人中心"
,
"iconPath"
:
"images/tab-mine.png"
,
"selectedIconPath"
:
"images/tab-mine-active.png"
,
"iconSize"
:
"24"
"selectedIconPath"
:
"images/tab-mine-active.png"
}
]
},
...
...
tabMine/api.js
View file @
a9b826e
...
...
@@ -15,13 +15,45 @@ module.exports = {
return
api
.
post
(
'dj.api.smartcarlife.inviteStationSet.update'
,
data
)
},
/** 获取我的种草总数 */
GETGRASSTOTAL
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.orderShareRecord.own.count'
,
data
)
},
// /** 获取我的种草总数 */
// GETGRASSTOTAL(data) {
// return api.post('dj.api.smartcarlife.orderShareRecord.own.count', data)
// },
// /** 分页查询我的种草 */
// GETGRASSLIST(data) {
// return api.post('dj.api.smartcarlife.orderShareRecord.own.page', data)
// },
// 分页查询技师列表
getTechnicianList
(
data
)
{
return
api
.
post
(
'scrm.api.busassistant.staff.findStaffByPage'
,
data
)
},
/** 分页查询我的种草 */
GETGRASSLIST
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.orderShareRecord.own.page'
,
data
)
}
// 新增技师信息
addTechnician
(
data
)
{
return
api
.
post
(
'scrm.api.busassistant.technicianConfig.add'
,
data
)
},
// 修改技师信息
updateTechnician
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.technicianConfig.update'
,
...
data
},
true
)
},
// 删除技师
deleteTechnician
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.busassistant.technicianConfig.delete'
,
...
data
},
true
)
}
}
tabMine/pages/technicianSetup/technicianSetup.js
View file @
a9b826e
// tabMine/pages/technicianSetup/technicianSetup.js
import
api
from
'../../api.js'
Page
({
/**
* 页面的初始数据
*/
data
:
{
total
:
-
1
,
pageCof
:
{
pageNum
:
1
,
pageSize
:
1000
},
isAsk
:
false
,
technicianList
:[]
},
init
()
{
this
.
getList
(
true
)
},
getList
(
isReset
=
false
)
{
// let user
let
{
technicianList
,
pageCof
,
total
,
userInfo
,
isAsk
}
=
this
.
data
console
.
log
(
userInfo
,
'userInfo'
);
let
_this
=
this
if
(
total
==
technicianList
.
length
||
isAsk
)
{
return
true
}
let
params
=
{
...
pageCof
,
status
:
0
,
merchantNoList
:
[
userInfo
.
merchantId
],
// roleName: '技师'
staffBusinessType
:
1
}
this
.
setData
({
isAsk
:
true
})
api
.
getTechnicianList
(
params
).
then
(
res
=>
{
let
{
data
,
count
}
=
res
this
.
setData
({
technicianList
:
pageCof
.
pageNum
==
1
?
(
data
||
[])
:
technicianList
.
concat
(
data
),
[
'pageCof.pageNum'
]:
pageCof
.
pageNum
+
1
,
triggered
:
false
,
total
:
count
})
if
(
isReset
)
{
this
.
setData
({
scrollTop
:
0
})
}
}).
finally
(
function
()
{
_this
.
setData
({
isAsk
:
false
})
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
/**
...
...
tabMine/pages/technicianSetup/technicianSetup.wxml
View file @
a9b826e
<!--tabMine/pages/technicianSetup/technicianSetup.wxml-->
<text>tabMine/pages/technicianSetup/technicianSetup.wxml</text>
<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">
<view class="top">
<view class="message">
<glsx-image src="personal/tech_defalut_avatar.png" class="avatar" />
<view class="message-text">
<input wx:if="{{item.isEdit}}" type="text" placeholder="{{formItems[0].placeholder}}" maxlength="{{formItems[0].maxlength}}" class="input" value="{{formData.staffName}}" focus="{{item.isEdit}}" placeholder-class="input-placeholder" data-attr="{{formItems[0].props}}" confirm-type="done" bindinput="handleInput" bindblur="handleConfirm" />
<view wx:else class="merchant">{{item.staffName}}</view>
</view>
<glsx-image wx:if="{{!item.isEdit}}" src="personal/icon-edit.png" class="icon-edit" bindtap="handleEdit" data-type="edit" data-target="{{item}}" data-idx="{{index}}" />
</view>
<view class="delete" bindtap="handleDelete" data-target="{{item}}">删除</view>
</view>
<view class="bottom">
<view class="technician_name">
所属:{{item.merchantName}}
</view>
<view class="time">{{item.createdTime}}</view>
</view>
</view>
<view class="bottomTips" wx:if="{{technicianList.length == total}}">到底啦!</view>
</scroll-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