index.wxml
5.56 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
<!--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 class="static-item"
style="flex: {{ item.width }}rpx 0 0;background: {{ item.background }};"
wx:for="{{ staticList }}"
wx:key="index">
<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 }}"
bindclick="tabClick"
activeIndex="{{ tabIndex }}" />
</view>
<view class="date">
<date-screen tabSelected="{{ tabIndex }}"
isSticky="{{ isSticky }}"
bind:search="search"></date-screen>
</view>
<view class="number">
共{{ total || 0 }}条任务
</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">
<!-- 顶部状态和标题 -->
<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 }}">-{{ item.storeManagerName || '-' }}</text>
</view>
<view class="name" wx:else>
{{ item.merchantName || '-' }}
</view>
</view>
<view wx:if="{{ (item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2 }}"
class="list-item">
<image class="icon"
src="{{ IMG_URL }}task-icon.png"
mode="" />
<view class="label">
{{ ['日报内容:', '复盘内容:', '月度计划:'][item.taskType] }}
</view>
<view class="text-hide">
{{ item.taskContext || '-' }}
</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>
{{ item.updatedDate || '-' }}
</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 class="btn-box">
<view bindtap="jump"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
</view>
</view>
</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>