index.wxml
8.52 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!--pages/tab/index/index.wxml-->
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
navStyle="background-color:{{ isSticky ? '#FFFFFF' : 'transparent' }};box-shadow:none;">
<view class="page-title">
工作台
</view>
</navigation-bar>
<view class="bg" wx:if="{{ !isSticky }}"></view>
<scroll-view class="container"
scroll-y
enable-back-to-top
scroll-top="{{ setScrollTop }}"
bind:scroll="onScroll"
bind:refresherrefresh="search"
bind:scrolltolower="scrollonReachBottom"
enhanced="{{ true }}"
show-scrollbar="{{ false }}"
style="padding-top: {{ navBarHeight }}px;">
<view class="top-box">
<view class="user-info">
<image src="{{ IMG_URL }}default-avatar.png" />
<view>
督导{{ userInfo.name }}
</view>
</view>
<view class="static-info">
<view wx:for="{{ staticList }}"
wx:key="{{ item.key }}"
class="static-item"
style="flex: {{ item.width }}rpx 0 0;background: {{ item.background }};"
data-key="{{ item.key }}"
bind:tap="handleNavigatePerformance">
<view class="label">
{{ item.label }}
</view>
<view class="value">
{{ staticData[item.key] }}
</view>
</view>
</view>
</view>
<view class="data-container">
<view class="sticky-box {{ isSticky ? 'is-sticky' : '' }}">
<view class="tab-box">
<tab-bar tabList="{{ tabList }}"
badge="{{ true }}"
bind:click="tabClick"
activeIndex="{{ tabIndex }}" />
</view>
<view class="date">
<date-screen tabSelected="{{ tabIndex }}"
isSticky="{{ isSticky }}"
bind:search="search"></date-screen>
</view>
<view class="count-row">
<view class="number">
共{{ total || 0 }}条任务
</view>
<view class="sub-tab" wx:if="{{ tabIndex == 3 }}">
<view class="center-switch {{ subTabIndex == 0 ? 'active' : '' }}"
catchtap="switchSpecialCenter"
data-index="0">
<text class="center-switch__text {{ subTabIndex == 0 ? 'active' : '' }}">任务中心</text>
</view>
<text class="center-switch__icon">⇄</text>
<view class="center-switch {{ subTabIndex == 1 ? 'active' : '' }}"
catchtap="switchSpecialCenter"
data-index="1">
<text class="center-switch__text {{ subTabIndex == 1 ? 'active' : '' }}">策略中心</text>
</view>
</view>
</view>
</view>
<view class="content-box">
<view class="list">
<block wx:if="{{ list.length > 0 }}">
<block wx:for="{{ list }}"
wx:for-item="val"
wx:for-index="sIndex"
wx:key="sIndex">
<block wx:for="{{ val }}" wx:key="index">
<view class="item content">
<block wx:if="{{ tabIndex == 3 && subTabIndex == 0 }}">
<view class="item-top">
<view class="status text-center"
style="color: {{ statusMap[item.taskStatus].color }}; background-color: {{ statusMap[item.taskStatus].background }};">
{{ statusMap[item.taskStatus].name }}
</view>
<view class="name">
专项带教
</view>
</view>
<view class="list-item">
<image class="icon"
src="{{ IMG_URL }}special-task-merchant.png"
mode="" />
<view class="label">
归属门店:
</view>
<view class="text-hide">
{{ item.taskMerchantName || '-' }}
</view>
</view>
<view class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
完成时间:
</view>
<view wx:if="{{ item.taskStatus == 2 }}">
{{ item.completeTime || '-' }}
</view>
<view wx:else>
-
</view>
</view>
<view class="btn-box">
<view bindtap="jumpTaskCenter"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
</view>
</view>
</block>
<block wx:else>
<!-- 顶部状态和标题 -->
<view class="item-top">
<view class="status text-center"
style="color: {{ statusMap[item.taskStatus].color }}; background-color: {{ statusMap[item.taskStatus].background }};">
{{ statusMap[item.taskStatus].name }}
</view>
<view class="name" wx:if="{{ item.taskType != 4 }}">
{{ missionMap[item.taskType].name }}<text wx:if="{{ item.taskType == 5 }}"></text>
</view>
<view class="name" wx:else>
{{ item.merchantName || '-' }}
</view>
</view>
<block wx:if="{{ item.taskType == 4 }}">
<view class="list-item">
<image class="icon"
src="{{ IMG_URL }}matter-icon.png"
mode="" />
<view class="label">
事项描述:
</view>
<view class="text-hide">
{{ item.taskDesc || '-' }}
</view>
</view>
<view wx:if="{{ item.taskStatus == 2 }}" class="list-item">
<image class="icon"
src="{{ IMG_URL }}task-icon.png"
mode="" />
<view class="label">
专项任务:
</view>
<view class="text-hide">
{{ item.taskContext || '-' }}
</view>
</view>
<view wx:else class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
创建时间:
</view>
<view>
{{ item.createTime || '-' }}
</view>
</view>
</block>
<view wx:if="{{ item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2) }}"
class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
完成时间:
</view>
<view wx:if="{{ item.taskStatus == 2 }}">
{{ item.updatedDate || '-' }}
</view>
<view wx:else>
-
</view>
</view>
<!-- 录音复盘任务进度 -->
<view wx:if="{{ item.taskType == 3 }}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"></view>
<view class="num">
{{ item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount }}
</view>
</view>
</view>
<!-- 提报优秀案例录音/带教要求任务进度 -->
<view wx:if="{{ item.taskType == 6 || item.taskType == 7 }}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view class="progress-item"
style="width: {{ (item.weeklyTaskCompletedCount / item.weeklyTaskTotalCount * 100) + '%' }};"></view>
<view class="num">
{{ item.weeklyTaskCompletedCount + '/' + item.weeklyTaskTotalCount }}
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="btn-box">
<view bindtap="jump"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">
到底了~
</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</view>
</view>
</view>
</scroll-view>
<block wx:if="{{ tabIndex == 0 }}">
<block wx:if="{{ showIcon1 }}">
<view class="add-btn-box" bindtap="handleMentoring">
<view class="addBtn">
<van-icon name="plus" />
<view class="btn-text">
带教记录
</view>
</view>
</view>
</block>
<block wx:else>
<view class="arrowIcon">
<image class="image"
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/arrow-right.png" />
</view>
</block>
</block>