statistics.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030
  1. <template>
  2. <view class="container">
  3. <!-- 统计类型切换 -->
  4. <view class="stat-tabs">
  5. <view
  6. class="stat-tab"
  7. :class="{ active: currentStatType === 'task' }"
  8. @click="switchStatType('task')"
  9. >
  10. 任务统计
  11. </view>
  12. <view
  13. class="stat-tab"
  14. :class="{ active: currentStatType === 'service' }"
  15. @click="switchStatType('service')"
  16. >
  17. 服务单统计
  18. </view>
  19. </view>
  20. <!-- 日期范围和筛选 -->
  21. <view class="date-filter-bar mb16">
  22. <view class="date-range" @click="showDatePicker = true">
  23. <image class="w32 h32" src="@/static/image/icon_time.png" mode=""></image>
  24. <text class="date-text">{{ dateRangeText }}</text>
  25. <text class="arrow-down">▼</text>
  26. </view>
  27. <view class="filter-btn" @click="showFilter = true">
  28. <image class="w32 h32" src="@/static/image/icon_select.png" mode=""></image>
  29. <text>筛选</text>
  30. </view>
  31. </view>
  32. <!-- 内容区域 - 动态显示不同的统计表格 -->
  33. <template v-if="currentStatType === 'task'">
  34. <!-- 任务统计表格 -->
  35. <statistics-table
  36. :summary-title="summaryTitle.task[0]"
  37. :summary-stats="summaryStats.task"
  38. :columns="tableColumns.task"
  39. :table-data="tableData.task"
  40. :loading="loading.task"
  41. @load-more="loadMore('task')"
  42. >
  43. <!-- 状态列自定义插槽 -->
  44. <template #col-statusText="{ item }">
  45. <text class="status-tag" :class="item.status">{{ item.statusText }}</text>
  46. </template>
  47. </statistics-table>
  48. <statistics-table
  49. :summary-title="summaryTitle.task[1]"
  50. :summary-stats="summaryStats.task"
  51. :columns="tableColumns.task"
  52. :table-data="tableData.task"
  53. :loading="loading.task"
  54. @load-more="loadMore('task')"
  55. >
  56. <!-- 状态列自定义插槽 -->
  57. <template #col-statusText="{ item }">
  58. <text class="status-tag" :class="item.status">{{ item.statusText }}</text>
  59. </template>
  60. </statistics-table>
  61. </template>
  62. <template v-else-if="currentStatType === 'service'">
  63. <!-- 服务单统计表格 -->
  64. <statistics-table
  65. :summary-title="summaryTitle.service[0]"
  66. :summary-stats="summaryStats.service"
  67. :columns="tableColumns.service"
  68. :table-data="tableData.service"
  69. :loading="loading.service"
  70. @load-more="loadMore('service')"
  71. >
  72. <!-- 状态列自定义插槽 -->
  73. <template #col-statusText="{ item }">
  74. <text class="status-tag" :class="item.status">{{ item.statusText }}</text>
  75. </template>
  76. </statistics-table>
  77. <statistics-table
  78. :summary-title="summaryTitle.service[1]"
  79. :summary-stats="summaryStats.service"
  80. :columns="tableColumns.service"
  81. :table-data="tableData.service"
  82. :loading="loading.service"
  83. @load-more="loadMore('service')"
  84. >
  85. <!-- 状态列自定义插槽 -->
  86. <template #col-statusText="{ item }">
  87. <text class="status-tag" :class="item.status">{{ item.statusText }}</text>
  88. </template>
  89. </statistics-table>
  90. </template>
  91. <!-- 日期选择弹窗 -->
  92. <view class="date-picker-popup" v-if="showDatePicker" @click="showDatePicker = false">
  93. <view class="date-picker-content" @click.stop>
  94. <view class="picker-header">
  95. <view class="picker-cancel" @click="showDatePicker = false">取消</view>
  96. <view class="picker-title">选择日期范围</view>
  97. <view class="picker-confirm" @click="confirmDateRange">确定</view>
  98. </view>
  99. <view class="picker-body">
  100. <view class="date-item">
  101. <text class="date-label">开始日期</text>
  102. <picker mode="date" :value="tempDateRange.startDate" @change="onStartDateChange">
  103. <view class="date-value">{{ tempDateRange.startDate || '请选择' }}</view>
  104. </picker>
  105. </view>
  106. <view class="date-item">
  107. <text class="date-label">结束日期</text>
  108. <picker mode="date" :value="tempDateRange.endDate" @change="onEndDateChange">
  109. <view class="date-value">{{ tempDateRange.endDate || '请选择' }}</view>
  110. </picker>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 筛选弹窗 -->
  116. <view class="filter-popup" v-if="showFilter" @click="closeFilter">
  117. <view class="filter-content" @click.stop>
  118. <view class="filter-header">
  119. <view class="filter-title">筛选</view>
  120. <image class="filter-close-btn" src="/static/image/icon_cross.png" @click="closeFilter"></image>
  121. </view>
  122. <!-- 根据统计类型显示不同的筛选条件 -->
  123. <template v-if="currentStatType === 'task'">
  124. <!-- 任务类型筛选 -->
  125. <view class="filter-group">
  126. <view class="group-label">任务类型</view>
  127. <view class="filter-tags">
  128. <view class="filter-tag" :class="{ active: tempSelectedTaskType === item.value }"
  129. v-for="(item, index) in taskTypeOptions" :key="index" @click="selectTaskType(item.value)">
  130. {{ item.label }}
  131. </view>
  132. </view>
  133. </view>
  134. <!-- 任务状态筛选 -->
  135. <view class="filter-group">
  136. <view class="group-label">任务状态</view>
  137. <view class="filter-tags">
  138. <view class="filter-tag" :class="{ active: tempSelectedTaskStatus === item.value }"
  139. v-for="(item, index) in taskStatusOptions" :key="index"
  140. @click="selectTaskStatus(item.value)">
  141. {{ item.label }}
  142. </view>
  143. </view>
  144. </view>
  145. </template>
  146. <template v-else-if="currentStatType === 'service'">
  147. <!-- 服务单类型筛选 -->
  148. <view class="filter-group">
  149. <view class="group-label">服务单类型</view>
  150. <view class="filter-tags">
  151. <view class="filter-tag" :class="{ active: tempSelectedServiceType === item.value }"
  152. v-for="(item, index) in serviceTypeOptions" :key="index" @click="selectServiceType(item.value)">
  153. {{ item.label }}
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 服务单状态筛选 -->
  158. <view class="filter-group">
  159. <view class="group-label">服务单状态</view>
  160. <view class="filter-tags">
  161. <view class="filter-tag" :class="{ active: tempSelectedServiceStatus === item.value }"
  162. v-for="(item, index) in serviceStatusOptions" :key="index"
  163. @click="selectServiceStatus(item.value)">
  164. {{ item.label }}
  165. </view>
  166. </view>
  167. </view>
  168. </template>
  169. <!-- 操作按钮 -->
  170. <view class="filter-actions">
  171. <view class="reset-btn" @click="resetFilters">重置</view>
  172. <view class="confirm-btn" @click="confirmFilters">确定</view>
  173. </view>
  174. </view>
  175. </view>
  176. </view>
  177. </template>
  178. <script>
  179. import StatisticsTable from '@/components/StatisticsTable.vue'
  180. // import { getStatisticsData } from '@/api-js/statistics'
  181. export default {
  182. components: {
  183. StatisticsTable
  184. },
  185. data() {
  186. return {
  187. statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px',
  188. showDatePicker: false,
  189. showFilter: false,
  190. currentStatType: 'task', // 当前统计类型: task-任务统计, service-服务单统计
  191. // 日期范围
  192. dateRange: {
  193. startDate: '2025-12-01',
  194. endDate: '2025-12-25'
  195. },
  196. tempDateRange: {
  197. startDate: '2025-12-01',
  198. endDate: '2025-12-25'
  199. },
  200. // 任务统计筛选
  201. selectedTaskType: 'academicLecture',
  202. selectedTaskStatus: '',
  203. tempSelectedTaskType: 'academicLecture',
  204. tempSelectedTaskStatus: '',
  205. // 服务单统计筛选
  206. selectedServiceType: 'all',
  207. selectedServiceStatus: '',
  208. tempSelectedServiceType: 'all',
  209. tempSelectedServiceStatus: '',
  210. // 任务类型选项
  211. taskTypeOptions: [{
  212. label: '医生坐诊',
  213. value: 'doctorConsultation'
  214. },
  215. {
  216. label: '科普讲座',
  217. value: 'popularScienceLecture'
  218. },
  219. {
  220. label: '学术讲座',
  221. value: 'academicLecture'
  222. },
  223. {
  224. label: '科普文章',
  225. value: 'popularScienceArticle'
  226. },
  227. {
  228. label: '科普短视频',
  229. value: 'popularScienceShortVideo'
  230. },
  231. {
  232. label: '科普长视频',
  233. value: 'popularScienceLongVideo'
  234. },
  235. {
  236. label: '空中课堂',
  237. value: 'airClassroom'
  238. },
  239. {
  240. label: '用药调研',
  241. value: 'medicationSurvey'
  242. },
  243. {
  244. label: '问卷调研',
  245. value: 'questionnaireSurvey'
  246. },
  247. {
  248. label: '社群咨询',
  249. value: 'communityConsultation'
  250. },
  251. {
  252. label: '健康问答',
  253. value: 'healthQA'
  254. }
  255. ],
  256. // 任务状态选项
  257. taskStatusOptions: [{
  258. label: '未完成',
  259. value: 'uncompleted'
  260. },
  261. {
  262. label: '待审核',
  263. value: 'pendingReview'
  264. },
  265. {
  266. label: '已驳回',
  267. value: 'rejected'
  268. },
  269. {
  270. label: '已完成',
  271. value: 'completed'
  272. },
  273. {
  274. label: '已完结',
  275. value: 'finished'
  276. }
  277. ],
  278. // 服务单类型选项
  279. serviceTypeOptions: [{
  280. label: '全部类型',
  281. value: 'all'
  282. },
  283. {
  284. label: '技术咨询',
  285. value: 'techConsultation'
  286. },
  287. {
  288. label: '售后服务',
  289. value: 'afterSales'
  290. },
  291. {
  292. label: '安装服务',
  293. value: 'installation'
  294. },
  295. {
  296. label: '维修服务',
  297. value: 'repair'
  298. },
  299. {
  300. label: '投诉建议',
  301. value: 'complaint'
  302. }
  303. ],
  304. // 服务单状态选项
  305. serviceStatusOptions: [{
  306. label: '待处理',
  307. value: 'pending'
  308. },
  309. {
  310. label: '处理中',
  311. value: 'processing'
  312. },
  313. {
  314. label: '已完成',
  315. value: 'completed'
  316. },
  317. {
  318. label: '已关闭',
  319. value: 'closed'
  320. },
  321. {
  322. label: '已取消',
  323. value: 'cancelled'
  324. }
  325. ],
  326. // 统计标题(分开存储)
  327. summaryTitle: {
  328. service: [ '汇总统计', '明细统计'],
  329. task: ['服务单完成统计', '服务单创建统计']
  330. },
  331. // 统计数据
  332. summaryStats: {
  333. task: [{
  334. label: '总积分',
  335. value: 300
  336. }],
  337. service: [{
  338. label: '总服务单数',
  339. value: 45
  340. }]
  341. },
  342. // 表格列定义
  343. tableColumns: {
  344. task: [{
  345. title: '归属',
  346. key: 'taskType',
  347. width: '20%'
  348. },
  349. {
  350. title: '类型',
  351. key: 'points',
  352. width: '15%'
  353. },
  354. {
  355. title: '数量',
  356. key: 'applicant',
  357. width: '20%'
  358. },
  359. {
  360. title: '客户',
  361. key: 'statusText',
  362. width: '20%',
  363. slot: true
  364. },
  365. {
  366. title: '业务员',
  367. key: 'receiveTime',
  368. width: '25%'
  369. },{
  370. title: '积分',
  371. key: 'receiveTime',
  372. width: '25%'
  373. }
  374. ],
  375. service: [{
  376. title: '项目归属',
  377. key: 'serviceNo',
  378. width: '25%'
  379. },
  380. {
  381. title: '类型',
  382. key: 'serviceType',
  383. width: '20%'
  384. },
  385. {
  386. title: '数量',
  387. key: 'customerName',
  388. width: '20%'
  389. },
  390. {
  391. title: '客户',
  392. key: 'statusText',
  393. width: '20%',
  394. slot: true
  395. },
  396. {
  397. title: '业务员',
  398. key: 'createTime',
  399. width: '25%'
  400. },
  401. {
  402. title: '积分',
  403. key: 'createTime',
  404. width: '25%'
  405. }
  406. ]
  407. },
  408. // 表格数据
  409. tableData: {
  410. task: [{
  411. taskType: '用药调研',
  412. points: '20',
  413. applicant: '王*明',
  414. status: 'uncompleted',
  415. statusText: '未完成',
  416. receiveTime: '2025-09-25'
  417. },
  418. {
  419. taskType: '科普短视频',
  420. points: '20',
  421. applicant: '王*明',
  422. status: 'uncompleted',
  423. statusText: '未完成',
  424. receiveTime: '2025-09-25'
  425. },
  426. {
  427. taskType: '用药调研',
  428. points: '100',
  429. applicant: '王*明',
  430. status: 'uncompleted',
  431. statusText: '未完成',
  432. receiveTime: '2025-09-25'
  433. }
  434. ],
  435. service: [{
  436. serviceNo: '学术研究',
  437. serviceType: '技术咨询',
  438. customerName: '李*华',
  439. status: 'completed',
  440. statusText: '已完成',
  441. createTime: '2025-12-25'
  442. },
  443. {
  444. serviceNo: '学术研究',
  445. serviceType: '售后服务',
  446. customerName: '张*伟',
  447. status: 'processing',
  448. statusText: '处理中',
  449. createTime: '2025-12-24'
  450. },
  451. {
  452. serviceNo: '学术研究',
  453. serviceType: '安装服务',
  454. customerName: '王*芳',
  455. status: 'pending',
  456. statusText: '待处理',
  457. createTime: '2025-12-23'
  458. }
  459. ]
  460. },
  461. // 加载状态
  462. loading: {
  463. task: false,
  464. service: false
  465. }
  466. }
  467. },
  468. computed: {
  469. dateRangeText() {
  470. return `${this.dateRange.startDate} 至 ${this.dateRange.endDate}`
  471. }
  472. },
  473. watch: {
  474. showFilter(newVal) {
  475. if (newVal) {
  476. // 打开弹窗时,同步临时选择值
  477. if (this.currentStatType === 'task') {
  478. this.tempSelectedTaskType = this.selectedTaskType
  479. this.tempSelectedTaskStatus = this.selectedTaskStatus
  480. } else {
  481. this.tempSelectedServiceType = this.selectedServiceType
  482. this.tempSelectedServiceStatus = this.selectedServiceStatus
  483. }
  484. }
  485. },
  486. currentStatType(newVal) {
  487. // 切换统计类型时,重置筛选条件(可选)
  488. this.resetFilters()
  489. // 重新加载数据
  490. this.loadData()
  491. }
  492. },
  493. onLoad() {
  494. this.loadData()
  495. },
  496. onReachBottom() {
  497. this.loadMore(this.currentStatType)
  498. },
  499. methods: {
  500. // 切换统计类型
  501. switchStatType(type) {
  502. if (this.currentStatType !== type) {
  503. this.currentStatType = type
  504. }
  505. },
  506. goBack() {
  507. uni.navigateBack()
  508. },
  509. onStartDateChange(e) {
  510. this.tempDateRange.startDate = e.detail.value
  511. },
  512. onEndDateChange(e) {
  513. this.tempDateRange.endDate = e.detail.value
  514. },
  515. confirmDateRange() {
  516. if (!this.tempDateRange.startDate || !this.tempDateRange.endDate) {
  517. uni.showToast({
  518. icon: 'none',
  519. title: '请选择完整的日期范围'
  520. })
  521. return
  522. }
  523. if (new Date(this.tempDateRange.startDate) > new Date(this.tempDateRange.endDate)) {
  524. uni.showToast({
  525. icon: 'none',
  526. title: '开始日期不能大于结束日期'
  527. })
  528. return
  529. }
  530. this.dateRange = {
  531. ...this.tempDateRange
  532. }
  533. this.showDatePicker = false
  534. this.loadData()
  535. },
  536. closeFilter() {
  537. // 关闭弹窗时,恢复临时选择值为当前选择值
  538. if (this.currentStatType === 'task') {
  539. this.tempSelectedTaskType = this.selectedTaskType
  540. this.tempSelectedTaskStatus = this.selectedTaskStatus
  541. } else {
  542. this.tempSelectedServiceType = this.selectedServiceType
  543. this.tempSelectedServiceStatus = this.selectedServiceStatus
  544. }
  545. this.showFilter = false
  546. },
  547. // 任务筛选相关方法
  548. selectTaskType(value) {
  549. if (this.tempSelectedTaskType === value) {
  550. this.tempSelectedTaskType = ''
  551. } else {
  552. this.tempSelectedTaskType = value
  553. }
  554. },
  555. selectTaskStatus(value) {
  556. if (this.tempSelectedTaskStatus === value) {
  557. this.tempSelectedTaskStatus = ''
  558. } else {
  559. this.tempSelectedTaskStatus = value
  560. }
  561. },
  562. // 服务单筛选相关方法
  563. selectServiceType(value) {
  564. if (this.tempSelectedServiceType === value) {
  565. this.tempSelectedServiceType = ''
  566. } else {
  567. this.tempSelectedServiceType = value
  568. }
  569. },
  570. selectServiceStatus(value) {
  571. if (this.tempSelectedServiceStatus === value) {
  572. this.tempSelectedServiceStatus = ''
  573. } else {
  574. this.tempSelectedServiceStatus = value
  575. }
  576. },
  577. resetFilters() {
  578. if (this.currentStatType === 'task') {
  579. this.tempSelectedTaskType = ''
  580. this.tempSelectedTaskStatus = ''
  581. } else {
  582. this.tempSelectedServiceType = 'all'
  583. this.tempSelectedServiceStatus = ''
  584. }
  585. },
  586. confirmFilters() {
  587. if (this.currentStatType === 'task') {
  588. this.selectedTaskType = this.tempSelectedTaskType
  589. this.selectedTaskStatus = this.tempSelectedTaskStatus
  590. } else {
  591. this.selectedServiceType = this.tempSelectedServiceType
  592. this.selectedServiceStatus = this.tempSelectedServiceStatus
  593. }
  594. this.showFilter = false
  595. this.loadData()
  596. },
  597. async loadData() {
  598. try {
  599. uni.showLoading({
  600. title: '加载中...'
  601. })
  602. // 根据当前统计类型加载数据
  603. if (this.currentStatType === 'task') {
  604. // 加载任务统计数据
  605. // const res = await getTaskStatistics({
  606. // startDate: this.dateRange.startDate,
  607. // endDate: this.dateRange.endDate,
  608. // taskType: this.selectedTaskType,
  609. // taskStatus: this.selectedTaskStatus
  610. // })
  611. // 模拟数据
  612. setTimeout(() => {
  613. uni.hideLoading()
  614. // 这里可以更新数据
  615. }, 500)
  616. } else {
  617. // 加载服务单统计数据
  618. // const res = await getServiceStatistics({
  619. // startDate: this.dateRange.startDate,
  620. // endDate: this.dateRange.endDate,
  621. // serviceType: this.selectedServiceType,
  622. // serviceStatus: this.selectedServiceStatus
  623. // })
  624. // 模拟数据
  625. setTimeout(() => {
  626. uni.hideLoading()
  627. // 这里可以更新数据
  628. }, 500)
  629. }
  630. } catch (e) {
  631. uni.hideLoading()
  632. console.error('加载数据失败', e)
  633. }
  634. },
  635. async loadMore(type) {
  636. // 根据类型加载更多数据
  637. this.loading[type] = true
  638. // 模拟加载更多
  639. setTimeout(() => {
  640. if (type === 'task') {
  641. // 添加更多任务数据
  642. this.tableData.task.push(...this.getMoreTaskData())
  643. } else {
  644. // 添加更多服务单数据
  645. this.tableData.service.push(...this.getMoreServiceData())
  646. }
  647. this.loading[type] = false
  648. }, 1000)
  649. },
  650. getMoreTaskData() {
  651. // 返回更多任务数据
  652. return [{
  653. taskType: '更多任务',
  654. points: '30',
  655. applicant: '测试*员',
  656. status: 'completed',
  657. statusText: '已完成',
  658. receiveTime: '2025-09-26'
  659. },
  660. {
  661. taskType: '更多任务2',
  662. points: '50',
  663. applicant: '测试*员2',
  664. status: 'pendingReview',
  665. statusText: '待审核',
  666. receiveTime: '2025-09-27'
  667. }
  668. ]
  669. },
  670. getMoreServiceData() {
  671. // 返回更多服务单数据
  672. return [{
  673. serviceNo: 'FW20251222004',
  674. serviceType: '维修服务',
  675. customerName: '赵*强',
  676. status: 'closed',
  677. statusText: '已关闭',
  678. createTime: '2025-12-22'
  679. },
  680. {
  681. serviceNo: 'FW20251221005',
  682. serviceType: '投诉建议',
  683. customerName: '孙*丽',
  684. status: 'cancelled',
  685. statusText: '已取消',
  686. createTime: '2025-12-21'
  687. }
  688. ]
  689. }
  690. }
  691. }
  692. </script>
  693. <style lang="scss" scoped>
  694. .container {
  695. min-height: 100vh;
  696. background: #f7f8fa;
  697. padding-bottom: 20rpx;
  698. }
  699. /* 统计类型切换样式 */
  700. .stat-tabs {
  701. display: flex;
  702. background: #fff;
  703. padding: 24rpx;
  704. .stat-tab {
  705. flex: 1;
  706. text-align: center;
  707. padding: 20rpx 0;
  708. font-size: 32rpx;
  709. color: #999;
  710. position: relative;
  711. &.active {
  712. color: #333333;
  713. font-weight: bold;
  714. &::after {
  715. content: '';
  716. position: absolute;
  717. bottom: 0;
  718. left: 50%;
  719. transform: translateX(-50%);
  720. width: 60rpx;
  721. height: 6rpx;
  722. background: #388BFF;
  723. border-radius: 3rpx;
  724. }
  725. }
  726. }
  727. }
  728. .date-filter-bar {
  729. display: flex;
  730. align-items: center;
  731. justify-content: space-between;
  732. padding: 24rpx;
  733. background: #fff;
  734. .date-range {
  735. display: flex;
  736. align-items: center;
  737. gap: 8rpx;
  738. .date-text {
  739. font-family: PingFang SC, PingFang SC;
  740. font-weight: 500;
  741. font-size: 28rpx;
  742. color: #333333;
  743. }
  744. .arrow-down {
  745. font-size: 20rpx;
  746. color: #333333;
  747. }
  748. }
  749. .filter-btn {
  750. display: flex;
  751. align-items: center;
  752. gap: 8rpx;
  753. font-size: 28rpx;
  754. color: #999999;
  755. }
  756. }
  757. .w32 {
  758. width: 32rpx;
  759. }
  760. .h32 {
  761. height: 32rpx;
  762. }
  763. .mb16 {
  764. margin-bottom: 16rpx;
  765. }
  766. .status-tag {
  767. padding: 4rpx 12rpx;
  768. border-radius: 4rpx;
  769. font-size: 24rpx;
  770. &.uncompleted,
  771. &.pending {
  772. background: #FFF3E0;
  773. color: #FF9800;
  774. }
  775. &.completed {
  776. background: #E8F5E9;
  777. color: #4CAF50;
  778. }
  779. &.pendingReview {
  780. background: #E3F2FD;
  781. color: #2196F3;
  782. }
  783. &.rejected {
  784. background: #FFEBEE;
  785. color: #F44336;
  786. }
  787. &.processing {
  788. background: #E3F2FD;
  789. color: #2196F3;
  790. }
  791. &.closed,
  792. &.cancelled {
  793. background: #F5F5F5;
  794. color: #9E9E9E;
  795. }
  796. }
  797. /* 日期选择弹窗样式 */
  798. .date-picker-popup {
  799. position: fixed;
  800. top: 0;
  801. left: 0;
  802. right: 0;
  803. bottom: 0;
  804. background: rgba(0, 0, 0, 0.5);
  805. z-index: 999;
  806. display: flex;
  807. align-items: flex-end;
  808. }
  809. .date-picker-content {
  810. width: 100%;
  811. background: #fff;
  812. border-radius: 24rpx 24rpx 0 0;
  813. .picker-header {
  814. display: flex;
  815. align-items: center;
  816. justify-content: space-between;
  817. padding: 24rpx;
  818. .picker-cancel {
  819. font-size: 30rpx;
  820. color: #666;
  821. }
  822. .picker-title {
  823. font-size: 32rpx;
  824. font-weight: bold;
  825. color: #333;
  826. }
  827. .picker-confirm {
  828. font-size: 30rpx;
  829. color: #388BFF;
  830. }
  831. }
  832. .picker-body {
  833. padding: 24rpx;
  834. .date-item {
  835. display: flex;
  836. align-items: center;
  837. justify-content: space-between;
  838. padding: 24rpx 0;
  839. &:last-child {
  840. border-bottom: none;
  841. }
  842. .date-label {
  843. font-size: 30rpx;
  844. color: #333;
  845. }
  846. .date-value {
  847. font-size: 30rpx;
  848. color: #388BFF;
  849. }
  850. }
  851. }
  852. }
  853. /* 筛选弹窗样式 */
  854. .filter-popup {
  855. position: fixed;
  856. top: 0;
  857. left: 0;
  858. right: 0;
  859. bottom: 0;
  860. background: rgba(0, 0, 0, 0.5);
  861. z-index: 999;
  862. display: flex;
  863. align-items: flex-end;
  864. }
  865. .filter-content {
  866. width: 100%;
  867. background: #fff;
  868. border-radius: 24rpx 24rpx 0 0;
  869. padding: 24rpx;
  870. max-height: 80vh;
  871. overflow-y: auto;
  872. .filter-header {
  873. display: flex;
  874. align-items: center;
  875. justify-content: center;
  876. margin-bottom: 32rpx;
  877. position: relative;
  878. .filter-title {
  879. font-size: 32rpx;
  880. font-weight: bold;
  881. color: #333;
  882. }
  883. .filter-close-btn {
  884. width: 44rpx;
  885. height: 44rpx;
  886. position: absolute;
  887. right: 0;
  888. }
  889. }
  890. .filter-group {
  891. margin-bottom: 40rpx;
  892. .group-label {
  893. font-size: 28rpx;
  894. font-weight: bold;
  895. color: #333;
  896. margin-bottom: 20rpx;
  897. }
  898. .filter-tags {
  899. display: flex;
  900. flex-wrap: wrap;
  901. gap: 20rpx;
  902. .filter-tag {
  903. padding: 12rpx 24rpx;
  904. font-size: 28rpx;
  905. color: #333;
  906. background: #F7F8FA;
  907. border-radius: 70rpx;
  908. &.active {
  909. background: rgba(56, 139, 255, 0.15);
  910. color: #388BFF;
  911. }
  912. }
  913. }
  914. }
  915. .filter-actions {
  916. display: flex;
  917. gap: 24rpx;
  918. margin-top: 40rpx;
  919. padding-top: 24rpx;
  920. border-top: 1rpx solid #f0f0f0;
  921. .reset-btn,
  922. .confirm-btn {
  923. flex: 1;
  924. height: 88rpx;
  925. line-height: 88rpx;
  926. text-align: center;
  927. border-radius: 200rpx;
  928. font-size: 28rpx;
  929. }
  930. .reset-btn {
  931. background: #fff;
  932. color: #388BFF;
  933. border: 2rpx solid #388BFF;
  934. }
  935. .confirm-btn {
  936. background: #388BFF;
  937. color: #fff;
  938. }
  939. }
  940. }
  941. </style>