mattersHandle.wxml
8.92 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
<navigation-bar showBack="{{ true }}"
bindback="onBack"
bindnavbarReady="navbarReady"
navStyle="background-color:#ffffff;box-shadow:none;">
<view class="nav-title">
专项任务
</view>
</navigation-bar>
<view class="handle-page {{ isReadonly ? 'handle-page--readonly' : '' }}"
style="padding-top: {{ navBarHeight }}px;">
<scroll-view scroll-y class="handle-scroll">
<view class="card task-card" wx:if="{{ task }}">
<view class="card-head">
<view class="card-head-title">
<text class="card-head-label">任务类型</text><text class="text-hide">{{ task.taskTypeText }}</text>
</view>
<view class="status text-center"
style="color:{{ task.statusStyle.color }};background-color:{{ task.statusStyle.background }};">
{{ task.statusName }}
</view>
</view>
<view class="info-list">
<view class="info-row flex"
wx:for="{{ detailFields }}"
wx:key="key"
wx:for-item="field">
<view class="info-label">
{{ field.label }}
</view>
<view class="info-value {{ field.multiline ? 'info-value--multiline' : '' }}">
{{ task[field.key] || '-' }}
</view>
</view>
</view>
</view>
<view class="card reply-card" wx:if="{{ task }}">
<block wx:if="{{ isReadonly }}">
<view class="info-list reply-info-list">
<view class="info-row flex">
<view class="info-label">
专项任务回复
</view>
<view class="info-value info-value--multiline reply-text">
{{ task.replyText || '-' }}
</view>
</view>
<view class="info-row flex">
<view class="info-label">
回复时间
</view>
<view class="info-value">
{{ task.replyTimeText || '-' }}
</view>
</view>
<!-- 任务执行结果 -->
<view class="info-row flex" wx:if="{{ showTaskExecutionResult }}">
<view class="info-label">
任务执行结果
</view>
<view class="info-value">
{{ task.executionResultCodeText || '-' }}
</view>
</view>
<!-- 人员更换评估 - 已关联招聘需求 -->
<view class="info-row flex" wx:if="{{ task.relatedRecruitDemandText }}">
<view class="info-label">
已关联招聘需求
</view>
<view class="info-value info-value--multiline">
{{ task.relatedRecruitDemandText }}
</view>
</view>
<!-- 人员更换评估 - 招聘负责人 -->
<view class="info-row flex"
wx:if="{{ task.staffReplaceResult && task.staffReplaceResult.recruitmentOwnerName }}">
<view class="info-label">
招聘负责人
</view>
<view class="info-value">
{{ task.staffReplaceResult.recruitmentOwnerName || '-' }}
</view>
</view>
<!-- 人员更换评估 - 已关联驻店 -->
<view class="info-row flex"
wx:if="{{ task.executionResultCode === 'LINK_REPLACEMENT_STAFF' && task.staffReplaceResult && task.staffReplaceResult.replacementStaffName }}">
<view class="info-label">
已关联驻店
</view>
<view class="info-value">
{{ task.staffReplaceResult.replacementStaffName || '-' }}
</view>
</view>
</view>
</block>
<block wx:else>
<view class="card-title">
专项任务回复<text class="required">*</text>
</view>
<view class="textarea-wrap">
<gl-textarea bindinput="onReplyInput"
maxlength="{{ 800 }}"
showWordLimit
value="{{ reply }}"
placeholder="请输入"
placeholderColor="#bbbbbb"
color="#222222"
textStyle="font-size:28rpx;line-height:40rpx;" />
</view>
</block>
</view>
<!-- 任务执行结果单独卡片 -->
<view class="card execution-result-card"
wx:if="{{ task && showTaskExecutionResult && !isReadonly }}">
<view class="card-title">
任务执行结果<text class="required">*</text>
</view>
<van-radio-group value="{{ executionResultCode }}"
disabled="{{ isReadonly }}"
class="radio-box"
direction="horizontal"
bindchange="handleRadio">
<van-radio wx:for="{{ executionResultCodeOptions }}"
class="radio-item"
wx:key="value"
name="{{ item.value }}"
shape="round"
checked-color="#2c66f7"
icon-class="radio-icon">
{{ item.label }}
</van-radio>
</van-radio-group>
<!-- 人员更换评估 - 更换选项 -->
<view wx:if="{{ showReplaceOptions }}" class="replace-options">
<!-- 选项按钮始终显示 -->
<view class="replace-options-list">
<view wx:for="{{ replaceOptions }}"
wx:key="value"
class="replace-option {{ replaceSelectedOption === item.value ? 'replace-option--active' : '' }}"
bindtap="onReplaceOptionTap"
data-value="{{ item.value }}">
{{ item.label }}
</view>
</view>
<!-- 已选择具体内容后显示回显和编辑 -->
<view wx:if="{{ selectedRecruitDemandText || selectedStaffText }}"
class="replace-result">
<view class="replace-result-header">
<text class="replace-result-title"> {{ replaceSelectedOption === 'LINK_REPLACEMENT_STAFF' ? '已关联驻店' : '已关联招聘需求' }} </text>
<text class="replace-result-edit" bindtap="onEditReplaceOption">{{ replaceSelectedOption == 'CREATE_RECRUITMENT_DEMAND' ? '新增' : '编辑' }}</text>
</view>
<view class="replace-result-text">
{{ selectedRecruitDemandText || selectedStaffText }}
</view>
</view>
</view>
</view>
</scroll-view>
<view class="footer-bar isFullSucreen" wx:if="{{ !isReadonly }}">
<view class="submit-btn" bindtap="submit">
提交
</view>
</view>
<!-- 发起招聘弹窗 -->
<recruit-popup show="{{ showRecruitPopup }}"
store-id="{{ task.storeId }}"
store-name="{{ task.storeName || task.merchantName }}"
business-type="{{ task.businessType }}"
business-type-name="{{ task.businessName }}"
recruit-type-name="人员更换评估"
task-center-id="{{ task.id || task.taskCenterId }}"
bind:close="closeRecruitPopup"
bind:success="onRecruitSuccess" />
<!-- 关联已有招聘弹窗 -->
<select-popup show="{{ showLinkRecruitPopup }}"
title="关联已有招聘"
options="{{ recruitDemandOptions }}"
value="{{ selectedRecruitDemandValues }}"
label-key="displayText"
value-key="recruitId"
height="60%"
allow-search="{{ true }}"
bind:confirm="onRecruitDemandConfirm"
bind:cancel="closeLinkRecruitPopup" />
<!-- 关联另一个驻店弹窗 -->
<van-popup show="{{ showLinkStaffPopup }}"
position="bottom"
round
bind:close="closeLinkStaffPopup"
custom-style="height: 70%">
<view class="staff-popup">
<view class="staff-popup-title">
员工选择
</view>
<!-- 搜索框 -->
<view class="staff-search">
<van-search model:value="{{ staffSearchKeyword }}"
shape="round"
placeholder="搜索员工姓名"
bind:search="onStaffSearchConfirm"
bind:clear="onStaffSearchClear" />
</view>
<!-- 员工列表 -->
<scroll-view scroll-y
class="staff-list"
bindscrolltolower="onStaffScrollToLower"
lower-threshold="50">
<view class="staff-list-content">
<block wx:for="{{ staffOptions }}" wx:key="staffUuid">
<view class="staff-item {{ currentSelectedStaff.staffUuid === item.staffUuid ? 'staff-item--active' : '' }}"
data-item="{{ item }}"
bindtap="onStaffItemTap">
<view class="staff-name">
{{ item.staffName }}
</view>
<view class="staff-check"
wx:if="{{ currentSelectedStaff.staffUuid === item.staffUuid }}">
<van-icon name="success"
color="#2c66f7"
size="18px" />
</view>
</view>
</block>
<!-- 加载状态 -->
<view class="staff-loading" wx:if="{{ staffLoading }}">
<van-loading size="20px" /><text>加载中...</text>
</view>
<!-- 没有更多 -->
<view class="staff-no-more"
wx:if="{{ !staffHasMore && staffOptions.length > 0 }}">
没有更多了
</view>
<!-- 空状态 -->
<view class="staff-empty"
wx:if="{{ !staffLoading && staffOptions.length === 0 }}">
<text>暂无数据</text>
</view>
</view>
</scroll-view>
<!-- 底部按钮 -->
<view class="staff-footer">
<view class="staff-footer-cancel" bindtap="closeLinkStaffPopup">
取消
</view>
<view class="staff-footer-confirm" bindtap="onStaffConfirm">
确定
</view>
</view>
</view>
</van-popup>
</view>