Commit a9b826e3 by 张立顺

技师设置

1 parent bccc3261
...@@ -31,29 +31,25 @@ ...@@ -31,29 +31,25 @@
"pagePath": "tabIndex/pages/index/index", "pagePath": "tabIndex/pages/index/index",
"text": "首页", "text": "首页",
"iconPath": "images/tab-home.png", "iconPath": "images/tab-home.png",
"selectedIconPath": "images/tab-home-active.png", "selectedIconPath": "images/tab-home-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabWorkOrder/pages/index/index", "pagePath": "pages/tabWorkOrder/pages/index/index",
"text": "工单管理", "text": "工单管理",
"iconPath": "images/tab-order.png", "iconPath": "images/tab-order.png",
"selectedIconPath": "images/tab-order-active.png", "selectedIconPath": "images/tab-order-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabDateIndex/pages/tabDateIndex", "pagePath": "pages/tabDateIndex/pages/tabDateIndex",
"text": "预约管理", "text": "预约管理",
"iconPath": "images/tab-date.png", "iconPath": "images/tab-date.png",
"selectedIconPath": "images/tab-date-active.png", "selectedIconPath": "images/tab-date-active.png"
"iconSize": "24"
}, },
{ {
"pagePath": "pages/tabMine/pages/index/index", "pagePath": "pages/tabMine/pages/index/index",
"text": "个人中心", "text": "个人中心",
"iconPath": "images/tab-mine.png", "iconPath": "images/tab-mine.png",
"selectedIconPath": "images/tab-mine-active.png", "selectedIconPath": "images/tab-mine-active.png"
"iconSize": "24"
} }
] ]
}, },
......
...@@ -15,13 +15,45 @@ module.exports = { ...@@ -15,13 +15,45 @@ module.exports = {
return api.post('dj.api.smartcarlife.inviteStationSet.update', data) return api.post('dj.api.smartcarlife.inviteStationSet.update', data)
}, },
/** 获取我的种草总数 */ // /** 获取我的种草总数 */
GETGRASSTOTAL(data) { // GETGRASSTOTAL(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.count', 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) { addTechnician (data) {
return api.post('dj.api.smartcarlife.orderShareRecord.own.page', 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 // tabMine/pages/technicianSetup/technicianSetup.js
import api from '../../api.js'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { 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) { onLoad(options) {
}, },
/** /**
......
<!--tabMine/pages/technicianSetup/technicianSetup.wxml--> <!--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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!