index.uvue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  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 class="search-input" type="text" placeholder="搜索工单编码、风机编号" v-model="keyword" @confirm="handleSearch" @blur="handleSearch" />
  9. <text v-if="keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
  10. </view>
  11. </view>
  12. <view class="status-bar">
  13. <scroll-view class="scroll-view_H" direction="horizontal" show-scrollbar="false">
  14. <view class="scroll-view-item_H uni-bg-red" v-if="checkPermi(['gxt:order:all']) && !dealLoad">
  15. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'all'}" @click="switchStatus('all')">全部</text>
  16. </view>
  17. <view class="scroll-view-item_H uni-bg-green" v-if="checkPermi(['gxt:maintenance:order:accept','gxt:repairOrder:accept']) && !dealLoad">
  18. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'assigned'}" @click="switchStatus('assigned')">待接单</text>
  19. </view>
  20. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:suspend','gxt:repairOrder:suspend']) && !dealLoad">
  21. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'to_finish'}" @click="switchStatus('to_finish')">待结单</text>
  22. </view>
  23. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:approve','gxt:repairOrder:approve']) && !dealLoad">
  24. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'to_approve'}" @click="switchStatus('to_approve')">待审批</text>
  25. </view>
  26. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:resume','gxt:repairOrder:resume']) && !dealLoad">
  27. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'suspended'}" @click="switchStatus('suspended')">已挂起</text>
  28. </view>
  29. <view class="scroll-view-item_H" v-if="checkPermi(['gxt:maintenance:order:restart','gxt:repairOrder:restart']) && !dealLoad">
  30. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'completed'}" @click="switchStatus('completed')">已完成</text>
  31. </view>
  32. <view class="scroll-view-item_H" v-if="dealLoad">
  33. <text class="status-txt" :class="{'stauts-sel': currentStatus === 'pending'}" @click="switchStatus('pending')">待处理</text>
  34. </view>
  35. </scroll-view>
  36. </view>
  37. <!-- 列表内容 -->
  38. <common-list
  39. :dataList="dataList"
  40. :loading="loading"
  41. :refreshing="refreshing"
  42. :hasMore="hasMore"
  43. @refresh="handleRefresh"
  44. @loadMore="loadMore"
  45. @itemClick="handleItemClick"
  46. >
  47. <template #default="{ item, index }">
  48. <view class="list-item">
  49. <view class="item-container">
  50. <view class="item-header">
  51. <!-- <image class="location-icon" src="/static/images/workbench/list/2.png" mode="aspectFit"></image>
  52. <text class="item-title">{{ getOrderType(item) }}</text>
  53. <text class="detail-link">类型 ›</text> -->
  54. <text class="item-title">{{ getWorkOrderProjectNo(item) }}-{{ getPcsDeviceName(item) }}{{ getOrderType(item) }}</text>
  55. <text class="status-tag" :class="getStatusClass(item)">{{ getWorkOrderStatus(item) }}</text>
  56. </view>
  57. <view class="info-row">
  58. <view class="info-label">
  59. <text class="text-gray">{{ getDisplayTime(item) }}</text>
  60. </view>
  61. <view class="info-value">
  62. <button
  63. v-if="currentStatus === 'assigned' && canHandleOrder(item)"
  64. class="btn-primary info-value"
  65. @click.stop="handleItemClick(item)"
  66. >
  67. 接单
  68. </button>
  69. <button
  70. v-else-if="currentStatus === 'to_approve' && canHandleOrder(item)"
  71. class="btn-primary info-value"
  72. @click.stop="handleItemClick(item)"
  73. >
  74. 审批
  75. </button>
  76. <button
  77. v-else-if="currentStatus === 'to_finish' && canHandleOrder(item)"
  78. class="btn-primary info-value"
  79. @click.stop="handleItemClick(item)"
  80. >
  81. 挂起
  82. </button>
  83. <button
  84. v-else-if="currentStatus === 'suspended' && canHandleOrder(item)"
  85. class="btn-primary info-value"
  86. @click.stop="handleItemClick(item)"
  87. >
  88. 恢复
  89. </button>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. </template>
  95. </common-list>
  96. <custom-tabbar :current="1" />
  97. </view>
  98. </template>
  99. <script setup lang="uts">
  100. import { ref, onBeforeUnmount, onMounted } from 'vue'
  101. import type { acceptOrderInfo } from '../../types/order'
  102. import type { SysDictData, DictDataResponse } from '../../types/dict'
  103. import { getOrderList } from '../../api/order/list'
  104. import { getDictDataByType } from '../../api/dict/index'
  105. import {checkPermi} from '../../utils/storage'
  106. // 列表数据
  107. const dataList = ref<acceptOrderInfo[]>([])
  108. let keyword = ref<string>("")
  109. const page = ref<number>(1)
  110. const pageSize: number = 10
  111. const hasMore = ref<boolean>(true)
  112. const loading = ref<boolean>(false)
  113. const refreshing = ref<boolean>(false)
  114. const total = ref<number>(0)
  115. let currentStatus = ref<string>('') // 添加状态管理
  116. const statusDictList = ref<SysDictData[]>([]) // 工单状态字典列表
  117. // 添加字典加载状态
  118. const dictLoaded = ref<boolean>(false)
  119. // 待处理工单加载
  120. const dealLoad = ref<boolean>(false)
  121. type StatusItem = {
  122. key: string,
  123. permis: string[],
  124. condition: () => boolean
  125. }
  126. const statusConfig: StatusItem[] = [
  127. { key: 'all', permis: ['gxt:order:all'], condition: () => !dealLoad.value },
  128. { key: 'assigned', permis: ['gxt:maintenance:order:accept','gxt:repairOrder:accept'], condition: () => !dealLoad.value },
  129. { key: 'to_finish', permis: ['gxt:maintenance:order:suspend','gxt:repairOrder:suspend'], condition: () => !dealLoad.value },
  130. { key: 'to_approve', permis: ['gxt:maintenance:order:approve','gxt:repairOrder:approve'], condition: () => !dealLoad.value },
  131. { key: 'suspended', permis: ['gxt:maintenance:order:resume','gxt:repairOrder:resume'], condition: () => !dealLoad.value },
  132. { key: 'completed', permis: ['gxt:maintenance:order:restart','gxt:repairOrder:restart'], condition: () => !dealLoad.value }
  133. ]
  134. // 获取工单状态字典列表
  135. const loadStatusDictList = async (): Promise<void> => {
  136. try {
  137. const result = await getDictDataByType('gxt_work_order_status')
  138. const resultObj = result as UTSJSONObject
  139. if (resultObj['code'] == 200) {
  140. const data = resultObj['data'] as any[]
  141. const dictData: SysDictData[] = []
  142. if (data.length > 0) {
  143. for (let i = 0; i < data.length; i++) {
  144. const item = data[i] as UTSJSONObject
  145. // 只提取需要的字段
  146. const dictItem: SysDictData = {
  147. dictValue: item['dictValue'] as string | null,
  148. dictLabel: item['dictLabel'] as string | null,
  149. dictCode: null,
  150. dictSort: null,
  151. dictType: null,
  152. cssClass: null,
  153. listClass: null,
  154. isDefault: null,
  155. status: null,
  156. default: null,
  157. createTime: null,
  158. remark: null
  159. }
  160. dictData.push(dictItem)
  161. }
  162. }
  163. statusDictList.value = dictData
  164. dictLoaded.value = true
  165. }
  166. } catch (e: any) {
  167. console.error('获取工单状态字典失败:', e.message)
  168. dictLoaded.value = true
  169. }
  170. }
  171. const getFirstVisibleStatus = (): string => {
  172. for (const item of statusConfig) {
  173. const hasPerm = item.permis.length === 0 || checkPermi(item.permis)
  174. const meetsCondition = item.condition()
  175. if (hasPerm && meetsCondition) {
  176. // if (hasPerm) {
  177. return item.key as string
  178. }
  179. }
  180. return 'all' // fallback,理论上不会走到这里
  181. }
  182. // 加载列表数据
  183. const loadData = async (isRefresh: boolean | null): Promise<void> => {
  184. if (loading.value) {
  185. // 如果正在加载,直接重置刷新状态
  186. refreshing.value = false
  187. return
  188. }
  189. try {
  190. loading.value = true
  191. // 处理默认值
  192. const shouldRefresh = isRefresh != null ? isRefresh : false
  193. if (shouldRefresh) {
  194. page.value = 1
  195. }
  196. console.log("searchKeyword===" + keyword.value)
  197. // 调用 API,传递关键字参数
  198. const searchKeyword = keyword.value.length > 0 ? keyword.value : null
  199. const result = await getOrderList(page.value, pageSize, searchKeyword, currentStatus.value)
  200. // 提取响应数据
  201. const resultObj = result as UTSJSONObject
  202. const code = resultObj['code'] as number
  203. const responseData = resultObj['rows'] as any[]
  204. const responseTotal = resultObj['total'] as number
  205. if (code == 200) {
  206. // 将 any[] 转换为 acceptOrderInfo[]
  207. const newData: acceptOrderInfo[] = []
  208. for (let i = 0; i < responseData.length; i++) {
  209. const item = responseData[i] as UTSJSONObject
  210. const orderItem: acceptOrderInfo = {
  211. orderType: item['orderType'] as Number,
  212. id: item['id'] as Number,
  213. teamLeaderId: item['teamLeaderId'] != null ? (item['teamLeaderId'] as Number) : 0,
  214. acceptUserId: item['acceptUserId'] != null ? (item['acceptUserId'] as Number) : 0,
  215. teamLeaderName: item['teamLeaderName'] as string | null,
  216. acceptUserName: item['acceptUserName'] as string | null,
  217. acceptTime: item['acceptTime'] as string | null,
  218. assignTime: item['assignTime'] as string | null,
  219. assignUserName: item['assignUserName'] as string | null,
  220. status: (item['status']==null)?0:item['status'] as Number,
  221. workOrderProjectNo: item['workOrderProjectNo'] as string | null,
  222. workOrderStatus: item['workOrderStatus'] as string | null,
  223. gxtCenterId: item['gxtCenterId'] as Number | 0,
  224. gxtCenter: item['gxtCenter'] as string | null,
  225. pcsStationId: item['pcsStationId'] as Number | 0,
  226. pcsStationName: item['pcsStationName'] as string | null,
  227. pcsDeviceId: item['pcsDeviceId'] as Number | 0,
  228. pcsDeviceName: item['pcsDeviceName'] as string | null,
  229. brand: item['brand'] as string | null,
  230. model: item['model'] as string | null,
  231. createTime: item['createTime'] as string | null,
  232. suspendReason: item['suspendReason'] as string | null,
  233. rejectionReason: item['rejectionReason'] as string | null,
  234. updateTime: item['updateTime'] as string | null, // 新增字段
  235. workEndTime: item['workEndTime'] as string | null // 新增字段
  236. }
  237. newData.push(orderItem)
  238. }
  239. // 不再在前端过滤,直接使用API返回的数据
  240. if (shouldRefresh) {
  241. dataList.value = newData
  242. } else {
  243. dataList.value = [...dataList.value, ...newData]
  244. }
  245. total.value = responseTotal
  246. hasMore.value = dataList.value.length < responseTotal
  247. // 通知首页更新待接单数量
  248. if (currentStatus.value === 'assigned') {
  249. uni.$emit('refreshAssignedCount')
  250. }
  251. } else {
  252. const msg = resultObj['msg'] as string | null
  253. uni.showToast({
  254. title: msg ?? '加载失败',
  255. icon: 'none'
  256. })
  257. }
  258. } catch (e: any) {
  259. uni.showToast({
  260. title: e.message ?? '加载失败',
  261. icon: 'none'
  262. })
  263. } finally {
  264. loading.value = false
  265. // #ifdef WEB
  266. // Web 平台立即重置
  267. refreshing.value = false
  268. // #endif
  269. // #ifndef WEB
  270. // App 平台延迟重置刷新状态,确保 UI 更新
  271. setTimeout(() => {
  272. refreshing.value = false
  273. }, 100)
  274. // #endif
  275. }
  276. // #ifdef WEB
  277. // Web 平台额外确保重置
  278. refreshing.value = false
  279. // #endif
  280. }
  281. // 辅助函数:从 any 类型提取属性
  282. const getOrderType = (item: any | null): string => {
  283. if (item == null) return ''
  284. const orderInfoItem = item as acceptOrderInfo
  285. return orderInfoItem.orderType == 1?"维修工单":"维保工单";
  286. }
  287. const getWorkOrderProjectNo = (item: any | null): string | null => {
  288. if (item == null) return ''
  289. const orderInfoItem = item as acceptOrderInfo
  290. return orderInfoItem.workOrderProjectNo
  291. }
  292. const getPcsStationName = (item: any | null): string | null=> {
  293. if (item == null) return ''
  294. const orderInfoItem = item as acceptOrderInfo
  295. return orderInfoItem.pcsStationName
  296. }
  297. const getPcsDeviceName = (item: any | null): string | null=> {
  298. if (item == null) return ''
  299. const orderInfoItem = item as acceptOrderInfo
  300. return orderInfoItem.pcsDeviceName
  301. }
  302. const getAssignTime = (item: any | null): string|null => {
  303. if (item == null) return null
  304. const orderInfoItem = item as acceptOrderInfo
  305. return orderInfoItem.assignTime
  306. }
  307. const getAcceptTime = (item: any | null): string|null => {
  308. if (item == null) return null
  309. const orderInfoItem = item as acceptOrderInfo
  310. return orderInfoItem.acceptTime
  311. }
  312. const getCreateTime = (item: any | null): string|null => {
  313. if (item == null) return null
  314. const orderInfoItem = item as acceptOrderInfo
  315. return orderInfoItem.createTime
  316. }
  317. // 根据状态显示不同的时间
  318. const getDisplayTime = (item: any | null): string|null => {
  319. if (item == null) return null
  320. const orderInfoItem = item as acceptOrderInfo
  321. // 如果是"待接单"状态,显示派单时间
  322. if (orderInfoItem.workOrderStatus == 'assigned') {
  323. return '下发时间:' + orderInfoItem.assignTime
  324. } else if(orderInfoItem.workOrderStatus == 'to_finish') {
  325. if(orderInfoItem.workEndTime != null) {
  326. return '结束时间:' + orderInfoItem.workEndTime
  327. }
  328. return '接单时间:' + orderInfoItem.acceptTime
  329. } else if(orderInfoItem.workOrderStatus == 'to_approve') {
  330. return '申请挂起时间:' + orderInfoItem.updateTime
  331. } else if(orderInfoItem.workOrderStatus == 'suspended') {
  332. return '审批通过时间:' + orderInfoItem.updateTime
  333. } else if(orderInfoItem.workOrderStatus == 'return' || orderInfoItem.workOrderStatus == 'accept_return') {
  334. return '退回时间:' + orderInfoItem.updateTime
  335. } else if(orderInfoItem.workOrderStatus == 'completed') {
  336. return '结单时间:' + orderInfoItem.updateTime
  337. }
  338. // 默认显示创建时间
  339. return '创建时间:' + orderInfoItem.createTime
  340. }
  341. const getWorkOrderStatus = (item: any | null): string | null => {
  342. if (item == null) return ''
  343. const orderInfoItem = item as acceptOrderInfo
  344. const rawStatus = orderInfoItem.workOrderStatus
  345. if (rawStatus==null) return ''
  346. // 如果字典尚未加载,返回原始值
  347. if (!dictLoaded.value) {
  348. return rawStatus
  349. }
  350. // 查找字典中对应的标签
  351. const dictItem = statusDictList.value.find(dict => dict.dictValue == rawStatus)
  352. return dictItem!=null ? dictItem.dictLabel : rawStatus
  353. }
  354. const getStatusClass = (item: any | null): string => {
  355. if (item == null) return ''
  356. const orderInfoItem = item as acceptOrderInfo
  357. const rawStatus = orderInfoItem.workOrderStatus
  358. if (rawStatus==null) return ''
  359. // const status = rawStatus
  360. // 返回对应的状态类名
  361. return `status-${rawStatus}`
  362. }
  363. // 切换状态
  364. const switchStatus = (status: string): void => {
  365. currentStatus.value = status
  366. page.value = 1
  367. loadData(true)
  368. }
  369. // 下拉刷新
  370. const handleRefresh = async (): Promise<void> => {
  371. refreshing.value = true
  372. await loadData(true as boolean | null)
  373. }
  374. // 加载更多
  375. const loadMore = (): void => {
  376. if (!hasMore.value || loading.value) {
  377. return
  378. }
  379. page.value++
  380. loadData(false as boolean | null)
  381. }
  382. // 搜索
  383. const handleSearch = (): void => {
  384. page.value = 1
  385. console.log("======搜索=====" + keyword.value)
  386. loadData(true as boolean | null)
  387. }
  388. const handleSearchOnBlur = (): void => {
  389. handleSearch()
  390. }
  391. // 方法:判断当前工单是否显示操作按钮(基于 orderType)
  392. const canHandleOrder = (item: any | null): boolean => {
  393. if (item == null) return false
  394. let permit: string[] = []
  395. const orderItem = item as acceptOrderInfo
  396. if(currentStatus.value === '' || currentStatus.value === 'completed' || currentStatus.value === 'all') {
  397. // 传递orderType参数以便详情页决定调用哪个API
  398. } else if(orderItem.workOrderStatus == 'assigned') {
  399. // 接单
  400. permit = orderItem.orderType == 2 ? ['gxt:maintenance:order:accept'] : ['gxt:repairOrder:accept']
  401. } else if(orderItem.workOrderStatus == 'to_finish') {
  402. // 挂起
  403. permit = orderItem.orderType == 2 ? ['gxt:maintenance:order:suspend'] : ['gxt:repairOrder:suspend']
  404. } else if(orderItem.workOrderStatus == 'to_approve') {
  405. // 审批
  406. permit = orderItem.orderType == 2 ? ['gxt:maintenance:order:approve'] : ['gxt:repairOrder:approve']
  407. } else if(orderItem.workOrderStatus == 'suspended') {
  408. // 恢复
  409. permit = orderItem.orderType == 2 ? ['gxt:maintenance:order:resume'] : ['gxt:repairOrder:resume']
  410. }
  411. // const orderType = (item as acceptOrderInfo).orderType
  412. return checkPermi(permit)
  413. }
  414. // 点击列表项
  415. const handleItemClick = (item: any | null): void => {
  416. if (item == null) return
  417. const orderItem = item as acceptOrderInfo
  418. if(currentStatus.value === '' || currentStatus.value === 'completed' || currentStatus.value === 'all') {
  419. // 传递orderType参数以便详情页决定调用哪个API
  420. uni.navigateTo({
  421. url: `/pages/order/detail/index?id=${orderItem.id}&orderType=${orderItem.orderType}`
  422. })
  423. } else if(currentStatus.value === 'assigned') {
  424. // 跳转到接单页面
  425. uni.navigateTo({
  426. url: `/pages/order/detail/acceptIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  427. })
  428. } else if(currentStatus.value === 'to_finish') {
  429. // 跳转到待结单页面
  430. uni.navigateTo({
  431. url: `/pages/order/detail/suspendIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  432. })
  433. } else if(currentStatus.value === 'to_approve') {
  434. // 跳转到待审批页面
  435. uni.navigateTo({
  436. url: `/pages/order/detail/approveIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  437. })
  438. } else if(currentStatus.value === 'suspended') {
  439. // 跳转到恢复页面
  440. uni.navigateTo({
  441. url: `/pages/order/detail/resumeIndex?id=${orderItem.id}&orderType=${orderItem.orderType}`
  442. })
  443. }
  444. }
  445. // 查看工单详情
  446. const showWorkOrderDetail = (item: any | null): void => {
  447. if (item == null) return
  448. const orderItem = item as acceptOrderInfo
  449. uni.navigateTo({
  450. url: `/pages/workbench/detail/index?id=${orderItem.id}`
  451. })
  452. }
  453. // 清空搜索
  454. const clearSearch = (): void => {
  455. keyword.value = ""
  456. page.value = 1
  457. loadData(true)
  458. }
  459. // 初始化
  460. // onMounted(() => {
  461. onLoad((options: any) => {
  462. const params = options as UTSJSONObject
  463. const isDeal = params['isDeal'] as string | null
  464. if(isDeal != null) {
  465. dealLoad.value = true;
  466. }
  467. loadStatusDictList()
  468. // ✅ 自动选中第一个可显示的状态
  469. currentStatus.value = getFirstVisibleStatus()
  470. loadData(true as boolean | null)
  471. // 监听首页切换状态事件
  472. uni.$on('switchOrderStatus', (status: string) => {
  473. switchStatus(status)
  474. })
  475. // 监听接单成功的事件,刷新列表
  476. uni.$on('refreshOrderList', () => {
  477. page.value = 1
  478. loadData(true)
  479. })
  480. })
  481. // 组件卸载前清理事件监听
  482. onBeforeUnmount(() => {
  483. refreshing.value = false
  484. loading.value = false
  485. // 移除事件监听
  486. uni.$off('refreshOrderList',{})
  487. uni.$off('switchOrderStatus',{})
  488. })
  489. </script>
  490. <style lang="scss">
  491. .list-page {
  492. flex: 1;
  493. background-color: #e8f0f9;
  494. }
  495. .search-bar {
  496. padding: 20rpx 30rpx;
  497. background-color: #d7eafe;
  498. }
  499. .search-box {
  500. flex-direction: row;
  501. align-items: center;
  502. height: 72rpx;
  503. padding: 0 24rpx;
  504. background-color: #f5f5f5;
  505. border-radius: 36rpx;
  506. .search-icon {
  507. width: 32rpx;
  508. height: 32rpx;
  509. margin-right: 12rpx;
  510. }
  511. .search-input {
  512. flex: 1;
  513. font-size: 28rpx;
  514. color: #333333;
  515. }
  516. .clear-icon {
  517. margin-left: 12rpx;
  518. font-size: 28rpx;
  519. color: #999999;
  520. }
  521. }
  522. .status-bar{
  523. padding-bottom: 10px;
  524. padding-left:30rpx;
  525. background-color: #d7eafe;
  526. }
  527. .status-box {
  528. flex-direction: row;
  529. align-items: center;
  530. height: 72rpx;
  531. flex: 1;
  532. .status-txt{
  533. padding: 8px 12px;
  534. text-align: center;
  535. margin-right: 12rpx;
  536. border-radius: 36rpx;
  537. background-color: #fff;
  538. font-size: 28rpx;
  539. // cursor: pointer;
  540. }
  541. .stauts-sel{
  542. background-color: #007AFF;
  543. color: #fff;
  544. }
  545. }
  546. .list-item {
  547. margin: 24rpx 30rpx;
  548. background-color: #ffffff;
  549. border-radius: 16rpx;
  550. }
  551. .item-container {
  552. padding: 30rpx;
  553. }
  554. .item-header {
  555. flex-direction: row;
  556. align-items: center;
  557. margin-bottom: 16rpx;
  558. .location-icon {
  559. width: 32rpx;
  560. height: 32rpx;
  561. margin-right: 8rpx;
  562. }
  563. .item-title {
  564. flex: 1;
  565. font-size: 32rpx;
  566. color: #333333;
  567. font-weight: bold;
  568. }
  569. .detail-link {
  570. font-size: 28rpx;
  571. color: #999999;
  572. }
  573. }
  574. .item-address {
  575. font-size: 26rpx;
  576. color: #999999;
  577. margin-bottom: 20rpx;
  578. line-height: 40rpx;
  579. }
  580. .btn-primary {
  581. z-index: 999;
  582. border-radius: 10rpx;
  583. font-size: 24rpx;
  584. white-space: nowrap;
  585. margin-left: 20rpx;
  586. background-color: #165DFF;
  587. line-height: 45rpx;
  588. color: #ffffff;
  589. }
  590. .item-header {
  591. flex-direction: row;
  592. align-items: flex-start;
  593. margin-bottom: 16rpx;
  594. .item-title {
  595. font-size: 30rpx;
  596. color: #333333;
  597. font-weight: bold;
  598. flex-wrap: wrap;
  599. flex: 0 1 80%;
  600. min-width: 0;
  601. }
  602. .info-value {
  603. font-size: 28rpx;
  604. color: #999999;
  605. margin-left: auto;
  606. flex: 0 0 auto;
  607. white-space: nowrap;
  608. }
  609. }
  610. .info-row {
  611. flex-direction: row;
  612. justify-content: space-between;
  613. align-items: center;
  614. .info-label {
  615. font-size: 26rpx;
  616. color: #666;
  617. }
  618. .info-value {
  619. font-size: 26rpx;
  620. // color: #666;
  621. }
  622. }
  623. .text-gray{
  624. font-size: 26rpx;
  625. color: #666;
  626. }
  627. .status-tag {
  628. padding: 8rpx 20rpx;
  629. border-radius: 20rpx;
  630. font-size: 24rpx;
  631. // font-weight: 50rpx;
  632. white-space: nowrap;
  633. margin-left: 20rpx;
  634. border: 1rpx solid;
  635. }
  636. /* 待接单 */
  637. .status-assigned {
  638. background-color: #ebf5ff;
  639. color: #409eff;
  640. border-color: #d8ebff;
  641. }
  642. /* 待结单 */
  643. .status-to_finish {
  644. background-color: #fff7e6;
  645. color: #fa8c16;
  646. border-color: #ffd591;
  647. }
  648. /* 待审批 */
  649. .status-to_approve {
  650. background-color: #fff7e6;
  651. color: #fa8c16;
  652. border-color: #ffd591;
  653. }
  654. /* 已挂起 */
  655. .status-suspended {
  656. background-color: #fff2f0;
  657. color: #ff4d4f;
  658. border-color: #ffccc7;
  659. }
  660. /* 已完成 */
  661. .status-completed {
  662. background-color: #f0f9eb;
  663. color: #5cb87a;
  664. border-color: #c2e7b0;
  665. }
  666. /* 待下发 */
  667. .status-to_issue {
  668. background-color: #f4f4f5;
  669. color: #909399;
  670. border-color: #e9e9eb;
  671. }
  672. /* 已归档 */
  673. .status-archived {
  674. background-color: #f0f9eb;
  675. color: #5cb87a;
  676. border-color: #c2e7b0;
  677. }
  678. /* 退回 */
  679. .status-return {
  680. background-color: #fff2f0;
  681. color: #ff4d4f;
  682. border-color: #ffccc7;
  683. }
  684. /* 退回 */
  685. .status-accept_return {
  686. background-color: #fff2f0;
  687. color: #ff4d4f;
  688. border-color: #ffccc7;
  689. }
  690. .scroll-view_H {
  691. width: 100%;
  692. flex-direction: row;
  693. }
  694. .scroll-view-item_H {
  695. justify-content: center;
  696. align-items: center;
  697. .status-txt{
  698. padding: 8px 12px;
  699. text-align: center;
  700. margin-right: 12rpx;
  701. border-radius: 36rpx;
  702. background-color: #fff;
  703. font-size: 28rpx;
  704. }
  705. .stauts-sel{
  706. background-color: #007AFF;
  707. color: #fff;
  708. }
  709. }
  710. </style>