index.uvue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. <template>
  2. <uni-navbar-lite :showLeft=false title="工时"></uni-navbar-lite>
  3. <view class="list-page">
  4. <!-- 搜索栏 -->
  5. <view class="search-bar">
  6. <view class="search-box">
  7. <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
  8. <input
  9. class="search-input"
  10. placeholder="搜索工单编号、风机编号"
  11. v-model="searchKeyword"
  12. @confirm="handleSearch"
  13. />
  14. <text v-if="searchKeyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
  15. </view>
  16. </view>
  17. <!-- 工单分类筛选 -->
  18. <view class="status-bar">
  19. <view class="status-box">
  20. <text
  21. class="status-txt"
  22. :class="{ 'stauts-sel': orderTypeFilter === '' }"
  23. @click="filterByOrderType('')"
  24. >
  25. 全部
  26. </text>
  27. <text
  28. class="status-txt"
  29. :class="{ 'stauts-sel': orderTypeFilter === '1' }"
  30. @click="filterByOrderType('1')"
  31. >
  32. 维修工单
  33. </text>
  34. <text
  35. class="status-txt"
  36. :class="{ 'stauts-sel': orderTypeFilter === '2' }"
  37. @click="filterByOrderType('2')"
  38. >
  39. 维保工单
  40. </text>
  41. </view>
  42. </view>
  43. <!-- 工时统计 -->
  44. <view class="stats-section">
  45. <view class="stats-header">
  46. <text class="stats-title">{{ timeRangeTitle }}工时统计</text>
  47. <view class="time-filters">
  48. <text
  49. class="time-filter"
  50. :class="{ 'time-filter-sel': timeRange === 'week' }"
  51. @click="changeTimeRange('week')"
  52. >
  53. 本周
  54. </text>
  55. <text
  56. class="time-filter"
  57. :class="{ 'time-filter-sel': timeRange === 'month' }"
  58. @click="changeTimeRange('month')"
  59. >
  60. 本月
  61. </text>
  62. <text
  63. class="time-filter"
  64. :class="{ 'time-filter-sel': timeRange === 'custom' }"
  65. @click="showCustomDatePicker"
  66. >
  67. 自定义
  68. </text>
  69. </view>
  70. </view>
  71. <!-- 统计数据 -->
  72. <view class="stats-content">
  73. <view class="total-hours">
  74. <text class="hours-value">{{ totalHours }}小时</text>
  75. <text class="hours-label">{{ timeRangeTitle }}总工时</text>
  76. </view>
  77. <view class="hours-breakdown">
  78. <view v-if="orderTypeFilter !== '1'" class="breakdown-item">
  79. <text class="breakdown-label">维保工时</text>
  80. <text class="breakdown-value">{{ maintenanceHours }}小时</text>
  81. </view>
  82. <view v-if="orderTypeFilter !== '2'" class="breakdown-item">
  83. <text class="breakdown-label">维修工时</text>
  84. <text class="breakdown-value">{{ repairHours }}小时</text>
  85. </view>
  86. <view v-if="rank !== null && totalRankingUsers !== null" class="breakdown-item">
  87. <text class="breakdown-label">排名</text>
  88. <text class="breakdown-value">{{ rank }}/{{ totalRankingUsers }}</text>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 工单列表 -->
  94. <common-list
  95. :dataList="orderList"
  96. :loading="loading"
  97. :refreshing="refreshing"
  98. :hasMore="hasMore"
  99. @refresh="handleRefresh"
  100. @loadMore="loadMore"
  101. @itemClick="handleItemClick"
  102. class="list-with-padding"
  103. >
  104. <template #default="{ item, index }">
  105. <view class="list-item">
  106. <view class="item-container">
  107. <view class="item-header">
  108. <text class="item-title">{{ getPropertyValue(item, 'workOrderProjectNo') }}-风机编号{{ getPropertyValue(item, 'pcsDeviceName') }}的{{ getWorkOrderTypeText(getPropertyValue(item, 'orderType')) }}</text>
  109. <text class="info-value">{{ getWorkOrderStatus(item) }}</text>
  110. </view>
  111. <view class="info-row">
  112. <view class="info-label">
  113. <text class="text-gray">下发时间: {{ formatDate(getPropertyValue(item, 'assignTime')) }}</text>
  114. </view>
  115. <view class="info-value">
  116. <text class="text-gray">处理时长: {{ formatNumber(parseFloat(getPropertyValue(item, 'handleHour'))) }}小时</text>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. </template>
  122. </common-list>
  123. <!-- 自定义时间选择弹窗 -->
  124. <l-popup v-model="showDatePickerPopup" position="bottom">
  125. <view class="date-picker-popup">
  126. <view class="popup-header">
  127. <text class="popup-title">选择时间范围</text>
  128. <view class="popup-actions">
  129. <text class="confirm-btn" @click="confirmCustomDate">确定</text>
  130. <text class="cancel-btn" @click="closeDatePicker">取消</text>
  131. </view>
  132. </view>
  133. <view class="date-picker-container">
  134. <view class="date-picker-item">
  135. <text class="date-label">开始时间</text>
  136. <view class="date-display" @click="openStartDatePicker">
  137. {{ startDate != null && startDate != '' ? startDate : '请选择开始时间' }}
  138. </view>
  139. </view>
  140. <view class="date-picker-item">
  141. <text class="date-label">结束时间</text>
  142. <view class="date-display" @click="openEndDatePicker">
  143. {{ endDate != null && endDate != '' ? endDate : '请选择结束时间' }}
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </l-popup>
  149. <!-- Start Date Picker -->
  150. <l-popup v-model="showStartDatePicker" position="bottom">
  151. <l-date-time-picker
  152. :mode="7"
  153. format="YYYY-MM-DD"
  154. :modelValue="startDate"
  155. confirm-btn="确定"
  156. cancel-btn="取消"
  157. @confirm="onStartDateConfirm"
  158. @cancel="showStartDatePicker = false">
  159. </l-date-time-picker>
  160. </l-popup>
  161. <!-- End Date Picker -->
  162. <l-popup v-model="showEndDatePicker" position="bottom">
  163. <l-date-time-picker
  164. :mode="7"
  165. format="YYYY-MM-DD"
  166. :modelValue="endDate"
  167. confirm-btn="确定"
  168. cancel-btn="取消"
  169. @confirm="onEndDateConfirm"
  170. @cancel="showEndDatePicker = false">
  171. </l-date-time-picker>
  172. </l-popup>
  173. <!-- 底部 TabBar -->
  174. <custom-tabbar :current="2" />
  175. </view>
  176. </template>
  177. <script setup lang="uts">
  178. import { ref, computed, onMounted } from 'vue'
  179. import { listOrderHours, getOrderHourStatistics } from '@/api/worktime/index'
  180. import { getDictDataByType } from '@/api/dict/index'
  181. import type { SysDictData } from '@/types/dict'
  182. // 数据状态
  183. const searchKeyword = ref<string>('')
  184. const orderTypeFilter = ref<string>('')
  185. const timeRange = ref<string>('month')
  186. const loading = ref<boolean>(false)
  187. const refreshing = ref<boolean>(false)
  188. const hasMore = ref<boolean>(true)
  189. const orderList = ref<any[]>([])
  190. const currentPage = ref<number>(1)
  191. const totalHours = ref<number>(0)
  192. const maintenanceHours = ref<number>(0)
  193. const repairHours = ref<number>(0)
  194. const rank = ref<number | null>(null)
  195. const totalRankingUsers = ref<number | null>(null)
  196. // 弹窗显示状态
  197. const showDatePickerPopup = ref<boolean>(false)
  198. const showStartDatePicker = ref<boolean>(false)
  199. const showEndDatePicker = ref<boolean>(false)
  200. // 自定义日期表单
  201. const startDate = ref<string>('')
  202. const endDate = ref<string>('')
  203. // 工单状态字典列表
  204. const statusDictList = ref<SysDictData[]>([])
  205. const dictLoaded = ref<boolean>(false)
  206. // 计算属性
  207. const timeRangeTitle = computed(() => {
  208. switch (timeRange.value) {
  209. case 'week':
  210. return '本周'
  211. case 'month':
  212. return '本月'
  213. case 'custom':
  214. return '自定义'
  215. default:
  216. return '本月'
  217. }
  218. })
  219. // 获取工单状态字典列表
  220. const loadStatusDictList = async (): Promise<void> => {
  221. try {
  222. const result = await getDictDataByType('gxt_work_order_status')
  223. const resultObj = result as UTSJSONObject
  224. if (resultObj['code'] == 200) {
  225. const data = resultObj['data'] as any[]
  226. const dictData: SysDictData[] = []
  227. if (data != null && data.length > 0) {
  228. for (let i = 0; i < data.length; i++) {
  229. const item = data[i] as UTSJSONObject
  230. // 只提取需要的字段
  231. const dictItem: SysDictData = {
  232. dictValue: item['dictValue'] as string | null,
  233. dictLabel: item['dictLabel'] as string | null,
  234. dictCode: null,
  235. dictSort: null,
  236. dictType: null,
  237. cssClass: null,
  238. listClass: null,
  239. isDefault: null,
  240. status: null,
  241. default: null,
  242. createTime: null,
  243. remark: null
  244. }
  245. dictData.push(dictItem)
  246. }
  247. }
  248. statusDictList.value = dictData
  249. dictLoaded.value = true
  250. }
  251. } catch (e: any) {
  252. console.error('获取工单状态字典失败:', e.message)
  253. dictLoaded.value = true
  254. }
  255. }
  256. // Helper function to safely extract properties from item
  257. function getPropertyValue(item: any | null, propertyName: string): string {
  258. if (item == null) return ''
  259. const itemObj = item as UTSJSONObject
  260. const value = itemObj[propertyName]
  261. return value != null ? '' + value : ''
  262. }
  263. // 获取工单类型文本
  264. function getWorkOrderTypeText(orderType: string | null): string {
  265. if (orderType != null) {
  266. if (orderType == "1") {
  267. return "维修工单"
  268. } else if (orderType == "2") {
  269. return "维保工单"
  270. }
  271. }
  272. return ""
  273. }
  274. // 获取工单状态文本
  275. function getWorkOrderStatus(item: any | null): string | null {
  276. if (item == null) return ''
  277. const rawStatus = getPropertyValue(item, 'workOrderStatus')
  278. if (rawStatus == null || rawStatus == '') return ''
  279. // 如果字典尚未加载,返回原始值
  280. if (!dictLoaded.value) {
  281. return rawStatus
  282. }
  283. // 查找字典中对应的标签
  284. const dictItem = statusDictList.value.find(dict => dict.dictValue == rawStatus)
  285. return dictItem != null ? dictItem.dictLabel : rawStatus
  286. }
  287. // 获取统计数据
  288. function getStatistics() {
  289. const params: UTSJSONObject = {
  290. //keyword: searchKeyword.value,
  291. orderType: orderTypeFilter.value,
  292. timeRange: timeRange.value
  293. }
  294. if (timeRange.value === 'custom') {
  295. params.beginDate = startDate.value
  296. params.endDate = endDate.value
  297. }
  298. getOrderHourStatistics(params).then((response: any) => {
  299. const resultObj = response as UTSJSONObject
  300. const responseData = resultObj['data'] as UTSJSONObject
  301. if (responseData != null) {
  302. totalHours.value = (responseData['totalHours'] != null) ? parseFloat((responseData['totalHours'] as number).toFixed(1)) : 0
  303. maintenanceHours.value = (responseData['maintenanceHours'] != null) ? parseFloat((responseData['maintenanceHours'] as number).toFixed(1)) : 0
  304. repairHours.value = (responseData['repairHours'] != null) ? parseFloat((responseData['repairHours'] as number).toFixed(1)) : 0
  305. rank.value = (responseData['rank'] != null) ? responseData['rank'] as number : null
  306. totalRankingUsers.value = (responseData['totalRankingUsers'] != null) ? responseData['totalRankingUsers'] as number : null
  307. } else {
  308. totalHours.value = 0
  309. maintenanceHours.value = 0
  310. repairHours.value = 0
  311. rank.value = null
  312. totalRankingUsers.value = null
  313. }
  314. })
  315. }
  316. // 方法
  317. function loadData(isRefresh: boolean) {
  318. const shouldRefresh = isRefresh
  319. if (loading.value && !shouldRefresh) {
  320. return
  321. }
  322. loading.value = true
  323. if (shouldRefresh) {
  324. currentPage.value = 1
  325. refreshing.value = true
  326. }
  327. const params: UTSJSONObject = {
  328. pageNum: currentPage.value,
  329. pageSize: 5,
  330. keyword: searchKeyword.value,
  331. orderType: orderTypeFilter.value,
  332. timeRange: timeRange.value
  333. }
  334. if (timeRange.value === 'custom') {
  335. params.beginDate = startDate.value
  336. params.endDate = endDate.value
  337. }
  338. listOrderHours(params).then((response: any) => {
  339. // 提取响应数据
  340. const resultObj = response as UTSJSONObject
  341. console.log('API响应数据:', resultObj)
  342. const responseData = resultObj['rows'] as any[]
  343. const responseTotal = resultObj['total'] as number
  344. if (shouldRefresh) {
  345. orderList.value = Array.isArray(responseData) ? responseData : []
  346. } else {
  347. const currentRows = Array.isArray(responseData) ? responseData : []
  348. orderList.value = [...orderList.value, ...currentRows]
  349. }
  350. hasMore.value = orderList.value.length < responseTotal
  351. loading.value = false
  352. refreshing.value = false
  353. }).catch(() => {
  354. loading.value = false
  355. refreshing.value = false
  356. })
  357. }
  358. function handleSearch() {
  359. loadData(true)
  360. //getStatistics()
  361. }
  362. function clearSearch() {
  363. searchKeyword.value = ""
  364. loadData(true)
  365. //getStatistics()
  366. }
  367. function filterByOrderType(type: string) {
  368. orderTypeFilter.value = type
  369. loadData(true)
  370. getStatistics()
  371. }
  372. function changeTimeRange(range: string) {
  373. timeRange.value = range
  374. loadData(true)
  375. getStatistics()
  376. }
  377. function loadMore() {
  378. if (!hasMore.value || loading.value) return
  379. currentPage.value++
  380. loadData(false)
  381. }
  382. function handleRefresh() {
  383. loadData(true)
  384. }
  385. function showCustomDatePicker() {
  386. // 初始化日期值
  387. if (startDate.value == '' || endDate.value == '') {
  388. const now = new Date()
  389. const year = now.getFullYear()
  390. const month = (now.getMonth() + 1).toString().padStart(2, '0')
  391. const day = now.getDate().toString().padStart(2, '0')
  392. endDate.value = `${year}-${month}-${day}`
  393. // 默认开始日期为7天前
  394. const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000)
  395. const weekAgoYear = weekAgo.getFullYear()
  396. const weekAgoMonth = (weekAgo.getMonth() + 1).toString().padStart(2, '0')
  397. const weekAgoDay = weekAgo.getDate().toString().padStart(2, '0')
  398. startDate.value = `${weekAgoYear}-${weekAgoMonth}-${weekAgoDay}`
  399. }
  400. showDatePickerPopup.value = true
  401. }
  402. function closeDatePicker() {
  403. showStartDatePicker.value = false
  404. showEndDatePicker.value = false
  405. showDatePickerPopup.value = false
  406. }
  407. function confirmCustomDate() {
  408. if (startDate.value == null || startDate.value == '' || endDate.value == null || endDate.value == '') {
  409. uni.showToast({ title: '请选择开始时间和结束时间', icon: 'none' })
  410. return
  411. }
  412. if (startDate.value != null && endDate.value != null && new Date(startDate.value as string) > new Date(endDate.value as string)) {
  413. uni.showToast({ title: '开始时间不能大于结束时间', icon: 'none' })
  414. return
  415. }
  416. closeDatePicker()
  417. timeRange.value = 'custom'
  418. loadData(true)
  419. getStatistics()
  420. }
  421. // 打开开始日期选择器
  422. function openStartDatePicker() {
  423. showStartDatePicker.value = true
  424. }
  425. // 打开结束日期选择器
  426. function openEndDatePicker() {
  427. showEndDatePicker.value = true
  428. }
  429. function onStartDateConfirm(value: string) {
  430. // 检查结束时间是否小于新的开始时间
  431. if (endDate.value != null && endDate.value != '' && new Date(value) > new Date(endDate.value as string)) {
  432. uni.showToast({ title: '开始时间不能大于结束时间', icon: 'none' })
  433. return
  434. }
  435. startDate.value = value
  436. showStartDatePicker.value = false
  437. }
  438. function onEndDateConfirm(value: string) {
  439. // 检查新的结束时间是否小于开始时间
  440. if (startDate.value != null && startDate.value != '' && new Date(startDate.value as string) > new Date(value)) {
  441. uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
  442. return
  443. }
  444. endDate.value = value
  445. showEndDatePicker.value = false
  446. }
  447. // 点击列表项
  448. function handleItemClick(item: any | null, index: number): void {
  449. if (item == null) return
  450. const itemObj = item as UTSJSONObject
  451. const id = itemObj.get('id')
  452. const orderType = itemObj.get('orderType')
  453. if (id != null && orderType != null) {
  454. // 转换为字符串
  455. const idStr = '' + id
  456. const orderTypeStr = '' + orderType
  457. uni.navigateTo({
  458. url: `/pages/worktime/detail/index?id=${idStr}&orderType=${orderTypeStr}`
  459. })
  460. }
  461. }
  462. function getOrderStatusText(status: string): string {
  463. const statusMap: UTSJSONObject = {
  464. '1': '待接单',
  465. '2': '进行中',
  466. '3': '已完成',
  467. '4': '已关闭'
  468. }
  469. const result = statusMap[status]
  470. return result != null ? result as string : '未知状态'
  471. }
  472. function formatDate(dateString: string) {
  473. if (dateString == '' || dateString == null) return ''
  474. const date = new Date(dateString)
  475. const year = date.getFullYear()
  476. const month = (date.getMonth() + 1).toString().padStart(2, '0')
  477. const day = date.getDate().toString().padStart(2, '0')
  478. const hours = date.getHours().toString().padStart(2, '0')
  479. const minutes = date.getMinutes().toString().padStart(2, '0')
  480. return `${year}-${month}-${day} ${hours}:${minutes}`
  481. }
  482. function formatNumber(value: number | null) {
  483. if (value === null) return '0.0'
  484. return value.toFixed(1)
  485. }
  486. // 生命周期
  487. onMounted(() => {
  488. loadStatusDictList()
  489. loadData(false)
  490. getStatistics()
  491. })
  492. </script>
  493. <style lang="scss">
  494. .list-page {
  495. flex: 1;
  496. background-color: #e8f0f9;
  497. padding-bottom: 150rpx; // 为底部 TabBar 留出空间
  498. }
  499. /* 搜索栏样式 */
  500. .search-bar {
  501. padding: 20rpx 30rpx;
  502. background-color: #d7eafe;
  503. }
  504. .search-box {
  505. flex-direction: row;
  506. align-items: center;
  507. height: 72rpx;
  508. padding: 0 24rpx;
  509. background-color: #f5f5f5;
  510. border-radius: 36rpx;
  511. .search-icon {
  512. width: 32rpx;
  513. height: 32rpx;
  514. margin-right: 12rpx;
  515. }
  516. .search-input {
  517. flex: 1;
  518. font-size: 28rpx;
  519. color: #333333;
  520. }
  521. .clear-icon {
  522. margin-left: 12rpx;
  523. font-size: 28rpx;
  524. color: #999999;
  525. }
  526. }
  527. /* 工单分类筛选 */
  528. .status-bar {
  529. padding-bottom: 10px;
  530. padding-left: 30rpx;
  531. background-color: #d7eafe;
  532. }
  533. .status-box {
  534. flex-direction: row;
  535. align-items: center;
  536. height: 72rpx;
  537. flex: 1;
  538. .status-txt {
  539. padding: 8px 12px;
  540. text-align: center;
  541. margin-right: 12rpx;
  542. border-radius: 36rpx;
  543. background-color: #fff;
  544. font-size: 28rpx;
  545. }
  546. .stauts-sel {
  547. background-color: #007AFF;
  548. color: #fff;
  549. }
  550. }
  551. /* 工时统计 */
  552. .stats-section {
  553. margin: 15rpx 30rpx;
  554. background-color: #ffffff;
  555. border-radius: 16rpx;
  556. padding: 20rpx;
  557. }
  558. .stats-header {
  559. flex-direction: row;
  560. justify-content: space-between;
  561. align-items: center;
  562. margin-bottom: 20rpx;
  563. }
  564. .stats-title {
  565. font-size: 32rpx;
  566. font-weight: bold;
  567. flex: 1;
  568. }
  569. .time-filters {
  570. flex-direction: row;
  571. justify-content: flex-end;
  572. }
  573. .time-filter {
  574. padding: 6rpx 16rpx;
  575. margin-left: 12rpx;
  576. font-size: 24rpx;
  577. border-radius: 24rpx;
  578. background-color: #f2f3f5;
  579. color: #666;
  580. white-space: nowrap;
  581. }
  582. .time-filter-sel {
  583. background-color: #165dff;
  584. color: white;
  585. }
  586. .stats-content {
  587. margin-top: 20rpx;
  588. flex-direction: column;
  589. }
  590. .total-hours {
  591. margin-bottom: 30rpx;
  592. flex-direction: column;
  593. align-items: center;
  594. }
  595. .hours-label {
  596. font-size: 28rpx;
  597. color: #666;
  598. display: flex;
  599. margin-bottom: 8rpx;
  600. }
  601. .hours-value {
  602. display: flex;
  603. font-size: 48rpx;
  604. font-weight: bold;
  605. color: #165dff;
  606. line-height: 1.2;
  607. }
  608. .hours-breakdown {
  609. flex-direction: row;
  610. justify-content: space-between;
  611. }
  612. .breakdown-item {
  613. flex: 1;
  614. flex-direction: column;
  615. align-items: center;
  616. }
  617. .breakdown-label {
  618. display: flex;
  619. font-size: 32rpx;
  620. font-weight: bold;
  621. color: #333;
  622. line-height: 1.4;
  623. }
  624. .breakdown-value {
  625. font-size: 28rpx;
  626. color: #666;
  627. display: flex;
  628. margin-bottom: 8rpx;
  629. }
  630. /* 列表项样式 */
  631. .list-item {
  632. margin: 12rpx 30rpx;
  633. background-color: #ffffff;
  634. border-radius: 16rpx;
  635. }
  636. .item-container {
  637. padding: 30rpx;
  638. }
  639. .item-header {
  640. flex-direction: row;
  641. align-items: flex-start;
  642. margin-bottom: 16rpx;
  643. .item-title {
  644. font-size: 30rpx;
  645. color: #333333;
  646. font-weight: bold;
  647. flex-wrap: wrap;
  648. flex: 0 1 70%;
  649. min-width: 0;
  650. }
  651. .info-value {
  652. font-size: 28rpx;
  653. color: #999999;
  654. margin-left: auto;
  655. flex: 0 0 auto;
  656. white-space: nowrap;
  657. }
  658. }
  659. .info-row {
  660. flex-direction: row;
  661. justify-content: space-between;
  662. align-items: center;
  663. .info-label {
  664. font-size: 26rpx;
  665. color: #666;
  666. }
  667. .info-value {
  668. font-size: 26rpx;
  669. color: #666;
  670. }
  671. }
  672. .text-gray{
  673. font-size: 26rpx;
  674. color: #666;
  675. }
  676. /* 日期选择弹窗 */
  677. .date-picker-popup {
  678. background-color: white;
  679. border-top-left-radius: 30rpx;
  680. border-top-right-radius: 30rpx;
  681. padding: 40rpx;
  682. padding-bottom: 40rpx;
  683. margin-bottom: 0;
  684. }
  685. .popup-header {
  686. display: flex;
  687. justify-content: space-between;
  688. align-items: center;
  689. margin-bottom: 40rpx;
  690. }
  691. .popup-title {
  692. font-size: 34rpx;
  693. font-weight: bold;
  694. }
  695. .popup-actions {
  696. display: flex;
  697. flex-direction: row;
  698. }
  699. .cancel-btn {
  700. color: #999;
  701. padding: 10rpx 20rpx;
  702. }
  703. .confirm-btn {
  704. color: #165dff;
  705. padding: 10rpx 20rpx;
  706. font-weight: bold;
  707. }
  708. .date-picker-container {
  709. padding: 20rpx 0;
  710. padding-bottom: env(safe-area-inset-bottom); // 适配安全区域
  711. }
  712. .date-picker-item {
  713. margin-bottom: 40rpx;
  714. }
  715. .date-label {
  716. display: flex;
  717. margin-bottom: 20rpx;
  718. font-size: 30rpx;
  719. color: #333;
  720. }
  721. .date-display {
  722. width: 100%;
  723. padding: 20rpx;
  724. border: 2rpx solid #ddd;
  725. border-radius: 8rpx;
  726. font-size: 32rpx;
  727. color: #333;
  728. }
  729. // 添加底部填充的类
  730. .list-with-padding {
  731. padding-bottom: 40rpx;
  732. }
  733. </style>