technicianList.wxml
3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!--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">
<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>
</view>
<view wx:else>
<nothing-tips tips="暂无技师~" bgColor="{{'#F2F3F7'}}" bg="{{bgUrl}}" />
</view>
</view>
<!-- 新增技师 -->
<view wx:if="{{isDialogShow}}" class="layout">
<view class="bg" bindtap="handleDialogShow" />
<view class="content">
<view class="title">新增技师</view>
<view class="form-box">
<view class="form" wx:for="{{formItems}}" wx:key="index">
<view class="label">{{item.label}}<text class="tips">{{item.tips}}</text></view>
<input type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{formData[item.props]}}" type="{{item.inputType || 'text'}}" password="{{item.password}}" placeholder-class="input-placeholder" data-attr="{{item.props}}" bindinput="handleInput" />
</view>
</view>
<view class="dialog-btn">
<view class="cancel-btn" bindtap="handleCancel">取消</view>
<view class="default-btn" bindtap="handleConfirm">确定</view>
</view>
</view>
</view>