longz
2026-06-29 9d4cbff7464ebfd7803c2ce53ded49d0f73fe011
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
<script setup lang="ts">
import { fetchMyApprovalAll, fetchMyApprovalHistory, fetchMyApprovalTodos } from '@/api/appointment'
import type { MiniAppointmentListItem, MiniApprovalAllItem, MiniApprovalTodoItem } from '@/types/appointment'
import { normalizeVisitReasonText } from '@/utils/visitReason'
 
definePage({
  name: 'reviewList',
  layout: 'default',
  style: {
    navigationStyle: 'custom',
  },
})
 
type ReviewRecord = {
  key: string
  status: 'PENDING' | 'APPROVED' | 'REJECTED' | 'CANCELLED' | 'OTHER'
  statusText: string
  visitorText: string
  plateText: string
  nodeText: string
  orderNo: string
  time: string
  reasonText: string
  reasonOtherText: string
  createTime: string
  taskId?: number
  taskUuid?: string
  orderId: number
  orderUuid: string
}
 
const router = useRouter()
const sysInfo = uni.getSystemInfoSync()
const statusBarHeight = sysInfo.statusBarHeight || 0
const navBarHeight = 44
const fixedHeaderHeightPx = computed(() =>
  statusBarHeight + navBarHeight + uni.upx2px(36) + uni.upx2px(220) + uni.upx2px(24) + uni.upx2px(24),
)
 
const searchKeyword = ref('')
const dateValue = ref('')
const showDatePicker = ref(false)
const activeTab = ref(0)
const loading = ref(false)
const loadingMore = ref(false)
const records = ref<ReviewRecord[]>([])
const page = ref(1)
const pageSize = 20
const hasMore = ref(true)
const refreshing = ref(false)
const scrollIntoViewId = ref('')
const listRenderKey = ref(0)
const scrollLoadLocked = ref(false)
 
const tabs = [
  { title: '待审核' },
  { title: '已拒绝' },
  { title: '已同意' },
  { title: '全部' },
]
 
const dateColumns = ref<string[][]>([[], [], []])
const datePickerIndex = ref([0, 0, 0])
 
function handleBack() {
  router.back()
}
 
function getCurrentDate() {
  return new Date()
}
 
function getDaysInMonth(year: number, month: number) {
  return new Date(year, month, 0).getDate()
}
 
function updateDateColumns(selection?: { year?: number, month?: number, day?: number }) {
  const now = getCurrentDate()
  const currentYear = now.getFullYear()
  const currentMonth = now.getMonth() + 1
  const currentDay = now.getDate()
 
  const years = Array.from({ length: 11 }, (_, index) => (currentYear - 5 + index).toString())
  const selectedYear = selection?.year && years.includes(selection.year.toString()) ? selection.year : currentYear
  const months = Array.from({ length: 12 }, (_, index) => (1 + index).toString())
  const selectedMonth = selection?.month && months.includes(selection.month.toString()) ? selection.month : currentMonth
  const maxDay = getDaysInMonth(selectedYear, selectedMonth)
  const days = Array.from({ length: maxDay }, (_, index) => (1 + index).toString())
  const selectedDay = selection?.day && days.includes(selection.day.toString()) ? selection.day : currentDay
 
  dateColumns.value = [years, months, days]
  datePickerIndex.value = [
    years.findIndex(item => item === selectedYear.toString()),
    months.findIndex(item => item === selectedMonth.toString()),
    days.findIndex(item => item === selectedDay.toString()),
  ]
}
 
function handleDateChange(e: any) {
  const selectedIndex = e.detail.value as number[]
  updateDateColumns({
    year: Number(dateColumns.value[0][selectedIndex[0]]),
    month: Number(dateColumns.value[1][selectedIndex[1]]),
    day: Number(dateColumns.value[2][selectedIndex[2]]),
  })
}
 
function handleDateConfirm() {
  const year = dateColumns.value[0][datePickerIndex.value[0]]
  const month = dateColumns.value[1][datePickerIndex.value[1]]
  const day = dateColumns.value[2][datePickerIndex.value[2]]
  dateValue.value = `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
  showDatePicker.value = false
  void loadRecords()
}
 
function openDatePicker() {
  if (dateValue.value) {
    const [year, month, day] = dateValue.value.split('-').map(Number)
    updateDateColumns({ year, month, day })
  }
  else {
    updateDateColumns()
  }
  showDatePicker.value = true
}
 
function mapTodo(item: MiniApprovalTodoItem): ReviewRecord {
  return {
    key: `todo-${item.taskId}`,
    status: 'PENDING',
    statusText: '待审核',
    visitorText: item.visitorDisplayText || '-',
    plateText: item.plateNoText || '',
    nodeText: item.nodeName || '待审核',
    orderNo: item.orderNo,
    time: normalizeVisitTimeText(item.visitTimeText || `${item.visitStartDate || '-'}${item.visitEndDate && item.visitEndDate !== item.visitStartDate ? ` 至 ${item.visitEndDate}` : ''}`),
    reasonText: normalizeVisitReasonText(item.visitReasonText) || item.visitReasonCode || '-',
    reasonOtherText: (item.visitReasonOther || '').trim() || '-',
    createTime: item.createTime,
    taskId: item.taskId,
    taskUuid: item.taskUuid,
    orderId: item.orderId,
    orderUuid: item.orderUuid,
  }
}
 
function mapHistory(item: MiniAppointmentListItem): ReviewRecord {
  let status: ReviewRecord['status'] = 'OTHER'
  let statusText = item.status || '已处理'
  let nodeText = statusText
  if (item.status === 'APPROVED') {
    status = 'APPROVED'
    statusText = '已同意'
    nodeText = '已同意'
  }
  else if (item.status === 'REJECTED') {
    status = 'REJECTED'
    statusText = '已拒绝'
    nodeText = '已拒绝'
  }
  else if (item.status === 'CANCELLED') {
    status = 'CANCELLED'
    statusText = '已取消'
    nodeText = '已取消'
  }
 
  return {
    key: `history-${item.id}`,
    status,
    statusText,
    visitorText: item.visitorDisplayText || '-',
    plateText: item.plateNoText || '',
    nodeText,
    orderNo: item.orderNo,
    time: normalizeVisitTimeText(item.visitTimeText),
    reasonText: normalizeVisitReasonText(item.visitReasonText) || item.visitReasonCode || '-',
    reasonOtherText: (item.visitReasonOther || '').trim() || '-',
    createTime: item.createTime,
    orderId: item.id,
    orderUuid: item.uuid,
  }
}
 
function mapAll(item: MiniApprovalAllItem): ReviewRecord {
  return {
    key: item.taskId ? `todo-${item.taskId}` : `history-${item.orderId}`,
    status: (item.status as ReviewRecord['status']) || 'OTHER',
    statusText: item.statusText || '已处理',
    visitorText: item.visitorDisplayText || '-',
    plateText: item.plateNoText || '',
    nodeText: item.nodeText || (item.statusText || '已处理'),
    orderNo: item.orderNo,
    time: normalizeVisitTimeText(item.visitTimeText || '-'),
    reasonText: normalizeVisitReasonText(item.visitReasonText) || item.visitReasonCode || '-',
    reasonOtherText: (item.visitReasonOther || '').trim() || '-',
    createTime: item.createTime,
    taskId: item.taskId || undefined,
    taskUuid: item.taskUuid || undefined,
    orderId: item.orderId,
    orderUuid: item.orderUuid,
  }
}
 
function sortRecords(rows: ReviewRecord[]) {
  return [...rows].sort((a, b) => (b.createTime || '').localeCompare(a.createTime || ''))
}
 
function formatDateTime(value?: string | null) {
  if (!value) {
    return '-'
  }
  return value.replace('T', ' ').slice(0, 16)
}
 
function normalizeVisitTimeText(value?: string | null) {
  const text = (value || '').trim()
  if (!text) {
    return '-'
  }
  return text
    .replace(' 全天', ' 00:00-23:59')
    .replace(' 上午', ' 00:00-11:59')
    .replace(' 下午', ' 12:00-23:59')
}
 
async function loadRecords() {
  if (loading.value || loadingMore.value) {
    return
  }
  loading.value = true
  try {
    const targetPage = 1
    const params = {
      page: targetPage,
      size: pageSize,
      visitorNameKeyword: searchKeyword.value.trim() || undefined,
      visitDate: dateValue.value || undefined,
    }
 
    if (activeTab.value === 0) {
      const todoResult = await fetchMyApprovalTodos(params)
      records.value = todoResult.records.map(mapTodo)
      page.value = targetPage
      hasMore.value = todoResult.page < todoResult.pages
    }
    else if (activeTab.value === 1) {
      const historyResult = await fetchMyApprovalHistory({
        ...params,
        status: 'REJECTED',
      })
      records.value = historyResult.records.map(mapHistory)
      page.value = targetPage
      hasMore.value = historyResult.page < historyResult.pages
    }
    else if (activeTab.value === 2) {
      const historyResult = await fetchMyApprovalHistory({
        ...params,
        status: 'APPROVED',
      })
      records.value = historyResult.records.map(mapHistory)
      page.value = targetPage
      hasMore.value = historyResult.page < historyResult.pages
    }
    else {
      const allResult = await fetchMyApprovalAll(params)
      records.value = allResult.records.map(mapAll)
      page.value = targetPage
      hasMore.value = allResult.page < allResult.pages
    }
  }
  catch (error) {
    uni.showToast({
      title: error instanceof Error ? error.message : '加载审批列表失败',
      icon: 'none',
    })
  }
  finally {
    loading.value = false
  }
}
 
async function loadMoreRecords() {
  if (loading.value || loadingMore.value || !hasMore.value) {
    return
  }
  loadingMore.value = true
  const nextPage = page.value + 1
  try {
    const params = {
      page: nextPage,
      size: pageSize,
      visitorNameKeyword: searchKeyword.value.trim() || undefined,
      visitDate: dateValue.value || undefined,
    }
 
    if (activeTab.value === 0) {
      const todoResult = await fetchMyApprovalTodos(params)
      records.value = [...records.value, ...todoResult.records.map(mapTodo)]
      page.value = nextPage
      hasMore.value = todoResult.page < todoResult.pages
      return
    }
 
    if (activeTab.value === 1) {
      const historyResult = await fetchMyApprovalHistory({
        ...params,
        status: 'REJECTED',
      })
      records.value = [...records.value, ...historyResult.records.map(mapHistory)]
      page.value = nextPage
      hasMore.value = historyResult.page < historyResult.pages
      return
    }
 
    if (activeTab.value === 2) {
      const historyResult = await fetchMyApprovalHistory({
        ...params,
        status: 'APPROVED',
      })
      records.value = [...records.value, ...historyResult.records.map(mapHistory)]
      page.value = nextPage
      hasMore.value = historyResult.page < historyResult.pages
      return
    }
 
    const allResult = await fetchMyApprovalAll(params)
    records.value = [...records.value, ...allResult.records.map(mapAll)]
    page.value = nextPage
    hasMore.value = allResult.page < allResult.pages
  }
  catch (error) {
    uni.showToast({
      title: error instanceof Error ? error.message : '加载更多失败',
      icon: 'none',
    })
  }
  finally {
    loadingMore.value = false
    scrollLoadLocked.value = false
  }
}
 
function handleListScroll(e: any) {
  const detail = e?.detail
  if (!detail || scrollLoadLocked.value || loading.value || loadingMore.value || !hasMore.value) {
    return
  }
  const scrollTop = Number(detail.scrollTop || 0)
  const clientHeight = Number(detail.clientHeight || 0)
  const scrollHeight = Number(detail.scrollHeight || 0)
  if (scrollHeight <= 0 || clientHeight <= 0) {
    return
  }
  const remain = scrollHeight - (scrollTop + clientHeight)
  if (remain <= 120) {
    scrollLoadLocked.value = true
    void loadMoreRecords()
  }
}
 
function handleTabClick(index: number) {
  activeTab.value = index
  listRenderKey.value += 1
  scrollIntoViewId.value = ''
  nextTick(() => {
    scrollIntoViewId.value = 'review-list-top-anchor'
  })
  void loadRecords()
}
 
function handleSearch() {
  void loadRecords()
}
 
function handleRecordClick(item: ReviewRecord) {
  const query = item.taskId && item.taskUuid
    ? `taskId=${item.taskId}&taskUuid=${item.taskUuid}`
    : `orderId=${item.orderId}&orderUuid=${item.orderUuid}`
 
  uni.navigateTo({
    url: `/pages/reviewDetail/index?${query}`,
  })
}
 
updateDateColumns()
 
onShow(() => {
  void loadRecords()
})
 
function handleScrollRefresh() {
  if (refreshing.value) {
    return
  }
  refreshing.value = true
  void loadRecords().finally(() => {
    refreshing.value = false
  })
}
</script>
 
<template>
  <view class="h-screen bg-[#F6FBFF] w-full relative box-border flex flex-col overflow-hidden">
    <view class="fixed left-0 top-0 z-0 h-[500rpx] w-full" style="background: linear-gradient(180deg, #5398FF 0%, #A9D0FF 50%, #F6FBFF 100%);" />
 
    <view class="fixed top-0 left-0 w-full z-50 flex flex-col pointer-events-none">
      <view class="absolute left-0 top-0 z-[-1] w-full overflow-hidden" :style="{ height: `${fixedHeaderHeightPx}px` }">
        <view class="w-full h-[500rpx] absolute top-0 left-0" style="background: linear-gradient(180deg, #5398FF 0%, #A9D0FF 50%, #F6FBFF 100%);" />
      </view>
 
      <view class="relative w-full shrink-0 pointer-events-auto" :style="{ height: (statusBarHeight + navBarHeight) + 'px' }">
        <view class="flex items-center justify-between w-full absolute left-0" :style="{ top: statusBarHeight + 'px', height: navBarHeight + 'px' }">
          <view class="flex h-full w-[88rpx] items-center justify-center relative z-10" @click="handleBack">
            <wd-icon name="arrow-left" size="40rpx" color="#ffffff" />
          </view>
          <view class="absolute left-0 w-full text-center text-[34rpx] font-medium text-white z-0">
            待办
          </view>
          <view class="w-[88rpx]" />
        </view>
      </view>
 
      <view class="px-[24rpx] pt-[36rpx] pb-[24rpx] w-full box-border pointer-events-auto">
        <view class="bg-white rounded-[16rpx] search-card shadow-[0_4rpx_8rpx_rgba(6,47,108,0.1608)] w-full shrink-0 flex flex-col">
          <view class="flex h-[88rpx] px-[16rpx] mt-[16rpx]">
            <view v-for="(tab, index) in tabs" :key="tab.title" class="flex-1 flex flex-col items-center justify-center relative" @click="handleTabClick(index)">
              <view class="flex items-center relative">
                <text class="text-[28rpx] transition-colors duration-200" :class="activeTab === index ? 'text-[#0068FF] font-medium' : 'text-[#999999]'">
                  {{ tab.title }}
                </text>
              </view>
              <view class="absolute bottom-[0rpx] w-[40rpx] h-[4rpx] rounded-[2rpx] transition-all duration-200" :class="activeTab === index ? 'bg-[#0068FF]' : 'bg-transparent'" />
            </view>
          </view>
 
          <view class="px-[24rpx] pt-[24rpx] pb-[24rpx] flex items-center justify-between w-full box-border">
            <view class="bg-[#F5F5F5] w-[200rpx] px-[32rpx] h-[64rpx] rounded-[44rpx] flex items-center">
              <input
                v-model="searchKeyword"
                type="text"
                placeholder="搜索访客姓名"
                placeholder-class="text-[#B3B3B3] text-[26rpx]"
                class="w-full text-[26rpx] text-[#333333] h-full"
                confirm-type="search"
                @confirm="handleSearch"
              />
            </view>
            <view class="flex items-center bg-[#F5F5F5] w-[220rpx] h-[64rpx] rounded-[44rpx]" @click="openDatePicker">
              <view class="flex items-center w-full justify-center">
                <text class="text-[26rpx] mr-[10rpx]" :class="dateValue ? 'text-[#0068FF] font-medium' : 'text-[#B3B3B3]'">{{ dateValue || '来访日期' }}</text>
                <wd-icon name="arrow-down" size="28rpx" :color="dateValue ? '#0068FF' : '#B3B3B3'" />
              </view>
            </view>
            <view class="w-[140rpx] h-[64rpx] rounded-[32rpx] border-[2rpx] border-solid border-[#0068FF] flex items-center justify-center box-border bg-white" @click="handleSearch">
              <wd-icon name="search" size="28rpx" color="#0068FF" class="mr-[8rpx]" />
              <text class="text-[#0068FF] text-[26rpx] font-medium">查询</text>
            </view>
          </view>
        </view>
      </view>
    </view>
 
    <view :style="{ height: `${fixedHeaderHeightPx}px` }" class="shrink-0" />
 
    <view class="relative z-10 px-[24rpx] flex-1 flex flex-col min-h-0 box-border">
      <scroll-view
        :key="listRenderKey"
        scroll-y
        class="flex-1 min-h-0"
        :show-scrollbar="false"
        :scroll-into-view="scrollIntoViewId"
        :lower-threshold="120"
        refresher-enabled
        :refresher-triggered="refreshing"
        @refresherrefresh="handleScrollRefresh"
        @scroll="handleListScroll"
        @scrolltolower="loadMoreRecords"
      >
        <view class="pb-[24rpx]">
          <view id="review-list-top-anchor" class="h-[2rpx]" />
          <view
            v-for="item in records"
            :key="item.key"
            class="bg-white rounded-[16rpx] shadow-[0_4rpx_8rpx_rgba(6,47,108,0.1608)] mb-[24rpx] overflow-hidden"
            @click="handleRecordClick(item)"
          >
            <view class="w-full h-[12rpx]" :class="{
              'bg-[#0068FF]': item.status === 'PENDING',
              'bg-[#52C41A]': item.status === 'APPROVED',
              'bg-[#FF4D4F]': item.status === 'REJECTED',
              'bg-[#D8D8D8]': item.status === 'CANCELLED' || item.status === 'OTHER'
            }" />
 
            <view class="pt-[28rpx] pb-[16rpx]">
              <view class="flex justify-between items-center pb-[24rpx] px-[40rpx] status-border">
                <view class="px-[16rpx] py-[4rpx] rounded-[4rpx]" :class="{
                  'bg-[#E6F0FF] text-[#0068FF]': item.status === 'PENDING',
                  'bg-[#E8F8E3] text-[#52C41A]': item.status === 'APPROVED',
                  'bg-[#FFEBEB] text-[#FF4D4F]': item.status === 'REJECTED',
                  'bg-[#F5F5F5] text-[#999999]': item.status === 'CANCELLED' || item.status === 'OTHER'
                }">
                  <text class="text-[24rpx] font-medium">{{ item.statusText }}</text>
                </view>
                <wd-icon name="arrow-right" size="32rpx" color="#999999" />
              </view>
 
              <view class="flex flex-col px-[40rpx] pt-[8rpx]">
                <view class="flex items-center h-[80rpx]">
                  <text class="text-[#333333] text-[28rpx] font-bold shrink-0 w-[140rpx]">访客姓名:</text>
                  <view class="flex-1 h-full flex items-center border-b1">
                    <text class="text-[#666666] text-[28rpx]">{{ item.visitorText || '-' }}</text>
                  </view>
                </view>
                <view v-if="item.plateText" class="flex items-center h-[80rpx]">
                  <text class="text-[#333333] text-[28rpx] font-bold shrink-0 w-[140rpx]">访客车辆:</text>
                  <view class="flex-1 h-full flex items-center border-b1">
                    <text class="text-[#666666] text-[28rpx]">{{ item.plateText }}</text>
                  </view>
                </view>
                <view class="flex items-center h-[80rpx]">
                  <text class="text-[#333333] text-[28rpx] font-bold shrink-0 w-[140rpx]">来访时间:</text>
                  <view class="flex-1 h-full flex items-center border-b1">
                    <text class="text-[#666666] text-[28rpx]">{{ item.time }}</text>
                  </view>
                </view>
                <view class="flex items-center h-[80rpx]">
                  <text class="text-[#333333] text-[28rpx] font-bold shrink-0 w-[140rpx]">来访事由:</text>
                  <view class="flex-1 h-full flex items-center border-b1">
                    <text class="text-[#666666] text-[28rpx]">{{ item.reasonText }}</text>
                  </view>
                </view>
                <view class="flex items-center min-h-[80rpx]">
                  <text class="text-[#333333] text-[28rpx] font-bold shrink-0 w-[140rpx]">事由说明:</text>
                  <view class="flex-1 min-h-[80rpx] flex items-center border-b1 py-[16rpx] box-border">
                    <text class="text-[#666666] text-[28rpx] line-clamp-2 break-all">{{ item.reasonOtherText }}</text>
                  </view>
                </view>
              </view>
            </view>
          </view>
 
          <view v-if="loading" class="text-center text-[#999999] text-[24rpx] mt-[32rpx] mb-[32rpx]">
            加载中...
          </view>
          <view v-else-if="records.length === 0" class="text-center text-[#999999] text-[24rpx] mt-[32rpx] mb-[32rpx]">
            暂无待办记录
          </view>
          <view v-else-if="loadingMore" class="text-center text-[#999999] text-[24rpx] mt-[32rpx] mb-[32rpx]">
            加载更多中...
          </view>
          <view v-else-if="hasMore" class="text-center text-[#999999] text-[24rpx] mt-[32rpx] mb-[32rpx]">
            上拉加载更多
          </view>
          <view v-else class="text-center text-[#999999] text-[24rpx] mt-[32rpx] mb-[32rpx]">
            -最多显示3个月数据-
          </view>
        </view>
      </scroll-view>
    </view>
 
    <wd-popup v-model="showDatePicker" position="bottom" custom-class="date-popup" z-index="100">
      <view class="flex flex-col bg-white rounded-t-[32rpx] overflow-hidden h-[830rpx]">
        <view class="relative flex items-center justify-center shrink-0 h-[96rpx] border-b border-[#F5F5F5] border-solid">
          <view class="absolute left-[32rpx] flex items-center justify-center w-[48rpx] h-[48rpx]" @click="showDatePicker = false">
            <wd-icon name="close-outline" size="40rpx" color="#333333" />
          </view>
          <text class="text-[32rpx] text-[#333333] font-medium">选择来访日期</text>
        </view>
 
        <view class="px-[32rpx] flex-1 flex flex-col justify-center relative">
          <view class="flex items-center absolute top-[40rpx] left-[32rpx] right-[32rpx] z-10 text-[24rpx] text-[#333333] font-medium">
            <view class="flex-1 flex justify-center"><text class="bg-[#F5F5F5] rounded-[8rpx] px-[24rpx] py-[8rpx]">年</text></view>
            <view class="flex-1 flex justify-center"><text class="bg-[#F5F5F5] rounded-[8rpx] px-[24rpx] py-[8rpx]">月</text></view>
            <view class="flex-1 flex justify-center"><text class="bg-[#F5F5F5] rounded-[8rpx] px-[24rpx] py-[8rpx]">日</text></view>
          </view>
          <picker-view class="custom-picker-view date-picker-view mt-[60rpx]" :value="datePickerIndex" indicator-style="height: 48px;" style="width: 100%; height: 192px;" @change="handleDateChange">
            <picker-view-column v-for="(col, index) in dateColumns" :key="index">
              <view v-for="(item, itemIndex) in col" :key="itemIndex" class="flex items-center justify-center h-[48px]" :class="{ 'wd-picker-view-column__item--active': datePickerIndex[index] === itemIndex, 'wd-picker-view-column__item': true }">
                {{ item }}
              </view>
            </picker-view-column>
          </picker-view>
        </view>
 
        <view class="px-[32rpx] pb-[48rpx] shrink-0">
          <wd-button type="primary" size="large" block custom-class="popup-submit-btn" @click="handleDateConfirm">
            确认
          </wd-button>
        </view>
      </view>
    </wd-popup>
  </view>
</template>
 
<style scoped>
.search-card {
  width: 702rpx;
  height: 220rpx;
  border-radius: 8rpx;
  opacity: 1;
  background: linear-gradient(180deg, #DEF4FF 0%, #FFFFFF 37%);
  box-sizing: border-box;
  border: 2rpx solid;
  border-image: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%) 2;
  box-shadow: 0px 4px 8px 0px rgba(6, 47, 108, 0.1608);
  overflow: hidden;
}
 
.status-border {
  border-bottom: 2rpx solid #F5F5F5;
}
 
.border-b1 {
  border-bottom: 2rpx solid #F5F5F5;
}
 
::-webkit-scrollbar {
  display: none;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none;
  background: transparent;
}
 
:deep(.date-popup) {
  border-top-left-radius: 32rpx;
  border-top-right-radius: 32rpx;
  overflow: hidden;
  background-color: transparent !important;
}
 
.wd-picker-view-column__item {
  color: #B3B3B3 !important;
  font-size: 28rpx !important;
  background-color: transparent !important;
  transition: all 0.3s;
  z-index: 10;
  position: relative;
}
 
:deep(picker-view-column) {
  background-color: transparent !important;
}
 
.custom-picker-view .wd-picker-view-column__item {
  font-size: 28rpx;
  color: #999999;
  transition: all 0.3s;
  position: relative;
  z-index: 10;
}
 
.wd-picker-view-column__item--active {
  color: #0068FF !important;
  font-weight: 500;
  font-size: 28rpx !important;
  background-color: #F4F8FF !important;
  z-index: 10;
}
 
:deep(.custom-picker-view .wx-picker-view-indicator) {
  border-top: none !important;
  border-bottom: none !important;
  background-color: #F4F8FF !important;
  border-radius: 8rpx;
  z-index: 1 !important;
}
 
:deep(.custom-picker-view .wx-picker-view-indicator::before),
:deep(.custom-picker-view .wx-picker-view-indicator::after) {
  display: none !important;
}
 
:deep(.date-picker-view picker-view-column:nth-child(1)),
:deep(.date-picker-view picker-view-column:nth-child(2)),
:deep(.date-picker-view picker-view-column:nth-child(3)) {
  flex: 1 !important;
  width: auto;
  padding: 0 !important;
  z-index: 10;
}
 
:deep(.date-picker-view picker-view-column:nth-child(1) .wd-picker-view-column__item),
:deep(.date-picker-view picker-view-column:nth-child(2) .wd-picker-view-column__item),
:deep(.date-picker-view picker-view-column:nth-child(3) .wd-picker-view-column__item) {
  width: 100% !important;
  text-align: center;
  padding: 0 !important;
}
 
:deep(.popup-submit-btn) {
  height: 96rpx !important;
  border-radius: 48rpx !important;
  font-size: 32rpx !important;
  font-weight: 500 !important;
  background: #0068FF !important;
}
</style>