acceptIndex.uvue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894
  1. <template>
  2. <view class="detail-page">
  3. <scroll-view class="detail-content" :scroll-y="true">
  4. <!-- 工单信息 -->
  5. <view class="info-section">
  6. <view class="section-title">
  7. <text class="section-title-text">工单信息</text>
  8. </view>
  9. <view class="info-card">
  10. <view class="info-item">
  11. <text class="info-label">工单编码</text>
  12. <text class="info-value">{{ detailData.workOrderProjectNo ?? '' }}</text>
  13. </view>
  14. <view class="info-item">
  15. <text class="info-label">工单类型</text>
  16. <text class="info-value">{{ detailData.orderType == 1 ? '维修工单' : '维保工单' }}</text>
  17. </view>
  18. <view class="info-item">
  19. <text class="info-label">风机编号</text>
  20. <text class="info-value">{{ detailData.pcsDeviceName ?? '' }}</text>
  21. </view>
  22. <view class="info-item">
  23. <text class="info-label">维保中心</text>
  24. <text class="info-value">{{ detailData.gxtCenter ?? '' }}</text>
  25. </view>
  26. <view class="info-item">
  27. <text class="info-label">场站</text>
  28. <text class="info-value">{{ detailData.pcsStationName ?? '' }}</text>
  29. </view>
  30. <!-- <view class="info-item">
  31. <text class="info-label">品牌</text>
  32. <text class="info-value">{{ detailData.model ?? '' }}</text>
  33. </view> -->
  34. <view class="info-item">
  35. <text class="info-label">机型</text>
  36. <text class="info-value">{{ detailData.brand ?? '' }} {{ detailData.model ?? '' }}</text>
  37. </view>
  38. <view class="info-item">
  39. <text class="info-label">下发时间</text>
  40. <text class="info-value">{{ detailData.assignTime ?? '' }}</text>
  41. </view>
  42. <view class="info-item" v-if="detailData.orderType == 2 && detailData.misNo != null">
  43. <text class="info-label">MIS工单编码</text>
  44. <text class="info-value">{{ detailData.misNo ?? '' }}</text>
  45. </view>
  46. <view class="info-item" v-if="detailData.orderType == 2">
  47. <text class="info-label">维保类型</text>
  48. <text class="info-value">{{ inspectionTypeLabel }}</text>
  49. </view>
  50. <view class="info-item" v-if="detailData.orderType == 2">
  51. <text class="info-label">维保内容</text>
  52. <text class="info-value">{{ detailData.content ?? '' }}</text>
  53. </view>
  54. <view class="info-item" v-if="detailData.orderType == 1">
  55. <text class="info-label">故障代码</text>
  56. <text class="info-value">{{ detailData.faultCode ?? '' }}</text>
  57. </view>
  58. <view class="info-item" v-if="detailData.orderType == 1">
  59. <text class="info-label">故障条纹</text>
  60. <text class="info-value">{{ detailData.faultBarcode ?? '' }}</text>
  61. </view>
  62. <view class="info-item" v-if="detailData.orderType == 1 && faultDesc != ''">
  63. <text class="info-label">故障描述</text>
  64. <text class="info-value">{{ faultDesc }}</text>
  65. </view>
  66. <!-- <view class="info-item" v-if="detailData.orderType == 1">
  67. <text class="info-label">工作负责人</text>
  68. <view class="form-picker" @click="showLeaderPicker = true">
  69. <view class="picker-display">
  70. <text v-if="selectedTeamLeaderName" class="selected-value">{{ selectedTeamLeaderName }}</text>
  71. <text v-else class="placeholder">请选择工作负责人</text>
  72. <text class="arrow">▼</text>
  73. </view>
  74. </view>
  75. </view> -->
  76. </view>
  77. </view>
  78. <!-- <view class="info-section">
  79. <view class="section-title">
  80. <text class="section-title-text">工作负责人</text>
  81. </view>
  82. <view class="info-card">
  83. <view class="info-item">
  84. <input class="input" type="text" placeholder="请输入工作负责人" v-model="teamLeaderName" />
  85. </view>
  86. </view>
  87. </view> -->
  88. <!-- 工作负责人选择 -->
  89. <view class="info-section">
  90. <view class="section-title">
  91. <text class="section-title-text">工作负责人</text>
  92. </view>
  93. <view class="info-card">
  94. <view class="form-item">
  95. <!-- <text class="form-label required">工作负责人</text> -->
  96. <view class="form-picker" @click="showLeaderPicker = true">
  97. <view class="picker-display">
  98. <text v-if="selectedTeamLeaderName" class="selected-value">{{ selectedTeamLeaderName }}</text>
  99. <text v-else class="placeholder">
  100. 请选择工作负责人
  101. </text>
  102. <text class="arrow">▼</text>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. <!-- 自定义选择器弹窗 -->
  109. <view v-if="showLeaderPicker && overStopStatus != 2" class="picker-modal">
  110. <view class="modal-mask" @click="showLeaderPicker = false"></view>
  111. <view class="modal-content">
  112. <view class="modal-header">
  113. <text class="modal-title">选择工作负责人</text>
  114. <text class="modal-close" @click="showLeaderPicker = false">取消</text>
  115. </view>
  116. <view class="search-bar">
  117. <view class="search-box">
  118. <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
  119. <input class="search-input" type="text" placeholder="搜索姓名" v-model="keyword" @input="handleSearch" />
  120. <text v-if="keyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
  121. </view>
  122. </view>
  123. <scroll-view class="modal-body" scroll-y="true">
  124. <!-- 有数据时显示列表 -->
  125. <view v-if="teamLeaderList.length > 0">
  126. <view
  127. v-for="(option, index) in teamLeaderList"
  128. :key="index"
  129. class="picker-option"
  130. :class="{ 'selected': index === selectedTeamLeaderIndex }"
  131. @click="selectLeaderManually(index)"
  132. >
  133. <!-- <text class="option-text">{{ option.label }}</text>
  134. <text class="option-text">{{ option.value }}</text> -->
  135. <text class="option-text">{{ option.nickName }}</text>
  136. <text class="option-text">{{ option.deptName }}</text>
  137. <text v-if="index === selectedTeamLeaderIndex" class="option-check">✓</text>
  138. </view>
  139. </view>
  140. <!-- 无数据时显示提示 -->
  141. <view v-else class="empty-tip">
  142. <text>未找到匹配的人员</text>
  143. </view>
  144. </scroll-view>
  145. </view>
  146. </view>
  147. </scroll-view>
  148. <!-- 接单按钮 -->
  149. <view class="accept-button-container" v-if="checkPermi(detailData.orderType == 2 ? ['gxt:maintenance:order:accept'] : ['gxt:repairOrder:accept'] )">
  150. <button class="accept-button" @click.stop="handleAcceptOrder">{{ isDealing ? '接单中...' : '接 单' }}</button>
  151. </view>
  152. <!-- 加载中状态 -->
  153. <view v-if="loading" class="loading-mask">
  154. <text class="loading-text">加载中...</text>
  155. </view>
  156. </view>
  157. </template>
  158. <script setup lang="uts">
  159. import { ref } from 'vue'
  160. import type { acceptOrderInfo2 } from '../../../types/order'
  161. import type { WorkOrderFlow } from '../../../types/flow'
  162. import { getOrderInfoById, getRepairOrderInfoById, acceptOrder } from '../../../api/order/detail'
  163. import type { SysDictData } from '../../../types/dict'
  164. import { getDictDataByType } from '../../../api/dict/index'
  165. import { getLeaderList } from '../../../api/user/list'
  166. import type { UserInfo } from '../../../types/user'
  167. import {checkPermi} from '../../../utils/storage'
  168. const teamLeaderName = ref<string>("")
  169. const statusDictList = ref<SysDictData[]>([]) // 工单状态字典列表
  170. // 添加字典加载状态
  171. const dictLoaded = ref<boolean>(false)
  172. let keyword = ref<string>("")
  173. const inspectionTypeLabel = ref<string>("") //维保类型
  174. const faultDesc = ref<string>("") //故障描述
  175. // 详情数据
  176. const detailData = ref<acceptOrderInfo2>({
  177. orderType: 0,
  178. id: 0,
  179. teamLeaderId: 0,
  180. acceptUserId: 0,
  181. teamLeaderName: null,
  182. acceptUserName: null,
  183. acceptTime: null,
  184. assignTime: null,
  185. assignUserName: null,
  186. status: 0,
  187. workOrderProjectNo: null,
  188. workOrderStatus: null,
  189. gxtCenterId: 0,
  190. gxtCenter: null,
  191. pcsStationId: 0,
  192. pcsStationName: null,
  193. pcsDeviceId: 0,
  194. pcsDeviceName: null,
  195. brand: null,
  196. model: null,
  197. createTime: null,
  198. workOrderFlowList: null,
  199. suspendReason: null,
  200. rejectionReason: null,
  201. misNo: null,
  202. content: null,
  203. faultCode: null,
  204. faultBarcode: null,
  205. updateTime: null, // 新增字段
  206. workEndTime: null // 新增字段
  207. })
  208. // 选择器选项类型
  209. type PickerOption = {
  210. label: string
  211. value: string
  212. }
  213. // 选中的负责人信息
  214. const selectedTeamLeaderName = ref<string>('')
  215. const selectedTeamLeaderIndex = ref<number>(-1)
  216. const showLeaderPicker = ref<boolean>(false)
  217. const teamLeaderList = ref<UserInfo[]>([])
  218. const teamAllLeaderList = ref<UserInfo[]>([])
  219. const overStopStatus = ref<Number | null>(null)
  220. // 获取负责人列表(使用用户列表接口)
  221. const loadTeamLeaderList = async (): Promise<void> => {
  222. try {
  223. const deptId = detailData.value.gxtCenterId
  224. const result = await getLeaderList(-1)
  225. const resultObj = result as UTSJSONObject
  226. if (resultObj['code'] == 200) {
  227. const data = resultObj['data'] as any[]
  228. const leaders: UserInfo[] = []
  229. if (data.length > 0) {
  230. for (let i = 0; i < data.length; i++) {
  231. const item = data[i] as UTSJSONObject
  232. const deptObj = item['dept'] as UTSJSONObject
  233. let leader: UserInfo = {
  234. userName: item['userName'] as string,
  235. nickName: item['nickName'] as string,
  236. userId: new Int32Array([item['userId'] != null ? (item['userId'] as number) : 0]),
  237. phone: item['phonenumber'] as string,
  238. deptName : (deptObj['deptName'] != null) ? (deptObj['deptName'] as string) : ''
  239. }
  240. leaders.push(leader)
  241. }
  242. }
  243. teamLeaderList.value = leaders
  244. teamAllLeaderList.value = teamLeaderList.value
  245. }
  246. } catch (e: any) {
  247. console.error('获取负责人列表失败:', e.message)
  248. }
  249. }
  250. // 手动选择负责人
  251. const selectLeaderManually = (index: number): void => {
  252. selectedTeamLeaderIndex.value = index
  253. if (index >= 0 && index < teamLeaderList.value.length) {
  254. const selectedOption = teamLeaderList.value[index]
  255. selectedTeamLeaderName.value = selectedOption.nickName
  256. detailData.value.teamLeaderId = selectedOption.userId[0] as number
  257. detailData.value.teamLeaderName = selectedOption.nickName
  258. }
  259. showLeaderPicker.value = false
  260. }
  261. // 获取工单状态字典列表
  262. const loadStatusDictList = async (): Promise<void> => {
  263. try {
  264. const result = await getDictDataByType('gxt_repair_order_flow_action_type')
  265. const resultObj = result as UTSJSONObject
  266. if (resultObj['code'] == 200) {
  267. const data = resultObj['data'] as any[]
  268. const dictData: SysDictData[] = []
  269. if (data.length > 0) {
  270. for (let i = 0; i < data.length; i++) {
  271. const item = data[i] as UTSJSONObject
  272. // 只提取需要的字段
  273. const dictItem: SysDictData = {
  274. dictValue: item['dictValue'] as string | null,
  275. dictLabel: item['dictLabel'] as string | null,
  276. dictCode: null,
  277. dictSort: null,
  278. dictType: null,
  279. cssClass: null,
  280. listClass: null,
  281. isDefault: null,
  282. status: null,
  283. default: null,
  284. createTime: null,
  285. remark: null
  286. }
  287. dictData.push(dictItem)
  288. }
  289. }
  290. statusDictList.value = dictData
  291. dictLoaded.value = true
  292. }
  293. } catch (e: any) {
  294. console.error('获取工单状态字典失败:', e.message)
  295. dictLoaded.value = true
  296. }
  297. }
  298. const isDealing = ref(false)
  299. const hasDealed = ref(false)
  300. // 处理接单操作
  301. const handleAcceptOrder = async (): Promise<void> => {
  302. // if (selectedTeamLeaderName.value.trim() === '') {
  303. // uni.showToast({
  304. // title: '请选择工作负责人',
  305. // icon: 'none'
  306. // })
  307. // return
  308. // }
  309. if (isDealing.value || hasDealed.value) return // 双重保险
  310. isDealing.value = true
  311. // const subOrder = {
  312. // id: detailData.value.id,
  313. // orderType: detailData.value.orderType,
  314. // teamLeaderId: (selectedTeamLeaderId.value != null && selectedTeamLeaderId.value.length > 0) ? parseInt(selectedTeamLeaderId.value) : 0,
  315. // teamLeaderName: selectedTeamLeaderName.value,
  316. // workOrderProjectNo: detailData.value.workOrderProjectNo,
  317. // // gxtRepairOrder:
  318. // } as UTSJSONObject
  319. detailData.value.workOrderStatus = 'to_finish'
  320. try {
  321. const result = await acceptOrder(detailData.value)
  322. const resultObj = result as UTSJSONObject
  323. const code = resultObj['code'] as number
  324. if (code == 200) {
  325. uni.showToast({
  326. title: '接单成功',
  327. icon: 'success'
  328. })
  329. hasDealed.value = true
  330. // 使用事件总线通知列表页面刷新
  331. uni.$emit('refreshOrderList', {})
  332. // 通知首页刷新待处理工单数量
  333. uni.$emit('refreshAssignedCount')
  334. // 通知首页刷新超时工单数量
  335. uni.$emit('refreshOverdueCount')
  336. // 接单成功后返回上一页
  337. setTimeout(() => {
  338. uni.navigateBack()
  339. }, 800)
  340. } else {
  341. // 处理业务错误
  342. uni.showToast({
  343. title: resultObj['msg'] as string,
  344. icon: 'none'
  345. })
  346. }
  347. } catch (error: any) {
  348. console.error('请求失败:', error);
  349. uni.showToast({
  350. title: error.message ?? '接单失败',
  351. icon: 'none'
  352. })
  353. } finally {
  354. isDealing.value = false // 无论成功失败都解锁
  355. }
  356. }
  357. const loading = ref<boolean>(false)
  358. // 获取操作类型名称
  359. const getActionTypeName = (item: string | null): string | null => {
  360. if (item == null) return ''
  361. // const orderInfoItem = item as orderInfo
  362. const rawStatus = item
  363. if (rawStatus==null) return ''
  364. // 如果字典尚未加载,返回原始值
  365. if (!dictLoaded.value) {
  366. return rawStatus
  367. }
  368. // 查找字典中对应的标签
  369. const dictItem = statusDictList.value.find(dict => dict.dictValue == rawStatus)
  370. return dictItem!=null ? dictItem.dictLabel : rawStatus
  371. }
  372. // 加载详情数据
  373. const loadDetail = async (id: string, orderType?: number): Promise<void> => {
  374. try {
  375. loading.value = true
  376. let result: any;
  377. // 根据orderType决定调用哪个API
  378. if (orderType == 1) {
  379. // 维修工单
  380. result = await getRepairOrderInfoById(id)
  381. } else {
  382. // 维保工单
  383. result = await getOrderInfoById(id)
  384. }
  385. // 提取响应数据
  386. const resultObj = result as UTSJSONObject
  387. const code = resultObj['code'] as number
  388. const data = resultObj['data'] as UTSJSONObject | null
  389. if (code == 200 && data != null) {
  390. // 处理工单流转列表
  391. let workOrderFlowList: WorkOrderFlow[] | null = null
  392. let flowList: UTSJSONObject[] = []
  393. if (orderType == 1) {
  394. // 维修工单
  395. flowList = data['repairOrderFlowList'] as UTSJSONObject[]
  396. } else {
  397. // 维保工单
  398. flowList = data['workOrderFlowList'] as UTSJSONObject[]
  399. }
  400. if (flowList.length > 0) {
  401. workOrderFlowList = []
  402. for (let i = 0; i < flowList.length; i++) {
  403. const flowItem = flowList[i]
  404. const flow: WorkOrderFlow = {
  405. id: flowItem['id'] as Number,
  406. orderId: flowItem['orderId'] as Number,
  407. orderCode: flowItem['orderCode'] as string,
  408. actionType: flowItem['actionType'] as string,
  409. fromStatus: flowItem['fromStatus'] as string | null,
  410. toStatus: flowItem['toStatus'] as string,
  411. operatorId: flowItem['operatorId'] as Number | null,
  412. operatorName: flowItem['operatorName'] as string | null,
  413. actionTime: flowItem['actionTime'] as string,
  414. actionRemark: flowItem['actionRemark'] as string | null,
  415. createBy: flowItem['createBy'] as string | null,
  416. createTime: flowItem['createTime'] as string | null
  417. }
  418. workOrderFlowList.push(flow)
  419. }
  420. }
  421. // 转换数据
  422. const orderDtail: acceptOrderInfo2 = {
  423. orderType: data['orderType'] as Number,
  424. id: data['id'] as Number,
  425. teamLeaderId: data['teamLeaderId'] != null ? (data['teamLeaderId'] as Number) : 0,
  426. acceptUserId: data['acceptUserId'] != null ? (data['acceptUserId'] as Number) : 0,
  427. teamLeaderName: data['teamLeaderName'] as string | null,
  428. acceptUserName: data['acceptUserName'] as string | null,
  429. acceptTime: data['acceptTime'] as string | null,
  430. assignTime: data['assignTime'] as string | null,
  431. assignUserName: data['assignUserName'] as string | null,
  432. status: (data['status']==null)?0:data['status'] as Number,
  433. workOrderProjectNo: data['workOrderProjectNo'] as string | null,
  434. workOrderStatus: data['workOrderStatus'] as string | null,
  435. gxtCenterId: data['gxtCenterId'] as Number | 0,
  436. gxtCenter: data['gxtCenter'] as string | null,
  437. pcsStationId: data['pcsStationId'] as Number | 0,
  438. pcsStationName: data['pcsStationName'] as string | null,
  439. pcsDeviceId: data['pcsDeviceId'] as Number | 0,
  440. pcsDeviceName: data['pcsDeviceName'] as string | null,
  441. brand: data['brand'] as string | null,
  442. model: data['model'] as string | null,
  443. createTime: data['createTime'] as string | null,
  444. workOrderFlowList: workOrderFlowList,
  445. suspendReason: data['suspendReason'] as string | null,
  446. rejectionReason: data['rejectionReason'] as string | null,
  447. misNo: data['misNo'] as string | null,
  448. content: data['content'] as string | null,
  449. faultCode: data['faultCode'] as string | null,
  450. faultBarcode: data['faultBarcode'] as string | null,
  451. updateTime: data['updateTime'] as string | null, // 新增字段
  452. workEndTime: data['workEndTime'] as string | null // 新增字段
  453. }
  454. detailData.value = orderDtail
  455. faultDesc.value = (data['faultDesc'] as string | null) ?? ''
  456. selectedTeamLeaderName.value = (data['teamLeaderName'] as string | null) ?? ''
  457. overStopStatus.value = (data['overStopStatus'] as Number | null) ?? null
  458. // 如果工单数据中已有负责人信息,设置到输入框中
  459. if (orderDtail.teamLeaderName != null && orderDtail.teamLeaderName.length > 0) {
  460. teamLeaderName.value = orderDtail.teamLeaderName as string
  461. }
  462. loadTeamLeaderList()
  463. if(data['orderType'] == 2 && data['inspectionType'] != null) {
  464. const result = await getDictDataByType("gxt_inspection_type")
  465. const resultObj = result as UTSJSONObject
  466. const dictList = resultObj['data'] as any[]
  467. if (dictList.length > 0) {
  468. const targetValueStr = data['inspectionType'] as string;
  469. const targetValueArray = targetValueStr
  470. .split(',') // 分割逗号,转为数组(单值分割后仍为长度1的数组)
  471. .map(item => item.trim());
  472. const matchedLabels = dictList.filter(dictItem => {
  473. // 统一转换为字符串匹配,避免数字/字符串类型不匹配问题
  474. const dictItemObj = dictItem as UTSJSONObject;
  475. const dictValueStr = dictItemObj['dictValue'] as string | null;
  476. // 判断当前字典项的value是否在目标值数组中
  477. if (dictValueStr == null) return false;
  478. return targetValueArray.includes(dictValueStr);
  479. }).map(dictItem => {
  480. const dictItemObj = dictItem as UTSJSONObject;
  481. const label = dictItemObj['dictLabel'] as string | null;
  482. return label ?? '';
  483. }); // 提取匹配项的label,形成label数组
  484. // 步骤4:将label数组用逗号分隔拼接,赋值给inspectionTypeLabel
  485. inspectionTypeLabel.value = matchedLabels.join(',');
  486. }
  487. }
  488. } else {
  489. const msg = resultObj['msg'] as string | null
  490. uni.showToast({
  491. title: msg ?? '加载失败',
  492. icon: 'none'
  493. })
  494. }
  495. } catch (e: any) {
  496. uni.showToast({
  497. title: e.message ?? '加载失败',
  498. icon: 'none'
  499. })
  500. } finally {
  501. loading.value = false
  502. }
  503. }
  504. // 搜索
  505. const handleSearch = (): void => {
  506. teamLeaderList.value = teamAllLeaderList.value.filter(leader =>
  507. leader.nickName.includes(keyword.value)
  508. )
  509. }
  510. // 清空搜索
  511. const clearSearch = (): void => {
  512. keyword.value = ""
  513. teamLeaderList.value = teamAllLeaderList.value
  514. }
  515. // 页面加载
  516. onLoad((options: any) => {
  517. const params = options as UTSJSONObject
  518. const id = params['id'] as string | null
  519. const orderTypeParam = params['orderType'] as string | null
  520. if (id != null && orderTypeParam != null) {
  521. // 先尝试从参数中获取orderType
  522. const orderTypeNumber = parseInt(orderTypeParam)
  523. loadDetail(id, orderTypeNumber)
  524. }
  525. })
  526. // 初始化
  527. onMounted(() => {
  528. loadStatusDictList()
  529. })
  530. </script>
  531. <style lang="scss">
  532. .detail-page {
  533. flex: 1;
  534. background-color: #e8f0f9;
  535. }
  536. .detail-content {
  537. flex: 1;
  538. padding: 20rpx 0;
  539. }
  540. .info-section {
  541. margin: 0 30rpx 24rpx;
  542. .section-title {
  543. position: relative;
  544. padding-left: 20rpx;
  545. margin-bottom: 20rpx;
  546. &::before {
  547. // content: '';
  548. position: absolute;
  549. left: 0;
  550. top: 50%;
  551. transform: translateY(-50%);
  552. width: 8rpx;
  553. height: 32rpx;
  554. background-color: #007aff;
  555. border-radius: 4rpx;
  556. }
  557. &-text {
  558. font-size: 32rpx;
  559. font-weight: bold;
  560. color: #333333;
  561. }
  562. }
  563. .info-card {
  564. background-color: #ffffff;
  565. border-radius: 16rpx;
  566. padding: 30rpx;
  567. .info-item {
  568. flex-direction: row;
  569. padding: 20rpx 0;
  570. border-bottom: 1rpx solid #f0f0f0;
  571. &:last-child {
  572. border-bottom: none;
  573. }
  574. &.full-width {
  575. flex-direction: column;
  576. .info-label {
  577. margin-bottom: 12rpx;
  578. }
  579. .info-value {
  580. line-height: 44rpx;
  581. }
  582. }
  583. .info-label {
  584. width: 240rpx;
  585. font-size: 28rpx;
  586. color: #666666;
  587. white-space: nowrap;
  588. }
  589. .info-value {
  590. flex: 1;
  591. font-size: 28rpx;
  592. color: #333333;
  593. text-align: left;
  594. &.highlight {
  595. color: #007aff;
  596. font-weight: bold;
  597. }
  598. &.input {
  599. text-align: left;
  600. border: 1rpx solid #e0e0e0;
  601. border-radius: 8rpx;
  602. padding: 10rpx;
  603. }
  604. }
  605. }
  606. .flow-item {
  607. padding: 20rpx 0;
  608. border-bottom: 1rpx solid #f0f0f0;
  609. &:last-child {
  610. border-bottom: none;
  611. }
  612. .flow-header {
  613. flex-direction: row;
  614. justify-content: space-between;
  615. margin-bottom: 10rpx;
  616. .flow-operator {
  617. font-size: 28rpx;
  618. color: #333333;
  619. font-weight: bold;
  620. }
  621. .flow-time {
  622. font-size: 24rpx;
  623. color: #999999;
  624. }
  625. }
  626. .flow-content {
  627. flex-direction: column;
  628. .flow-action {
  629. font-size: 26rpx;
  630. color: #666666;
  631. margin-bottom: 8rpx;
  632. }
  633. .flow-remark {
  634. font-size: 24rpx;
  635. color: #999999;
  636. background-color: #f5f5f5;
  637. padding: 10rpx;
  638. border-radius: 8rpx;
  639. }
  640. }
  641. }
  642. .no-data {
  643. text-align: center;
  644. padding: 40rpx 0;
  645. font-size: 28rpx;
  646. color: #999999;
  647. }
  648. }
  649. }
  650. .accept-button-container {
  651. padding: 30rpx 30rpx 50rpx;
  652. background-color: #ffffff;
  653. .accept-button {
  654. width: 100%;
  655. height: 80rpx;
  656. background-color: #007aff;
  657. color: #ffffff;
  658. font-size: 32rpx;
  659. border-radius: 16rpx;
  660. border: none;
  661. &:active {
  662. background-color: #0062cc;
  663. }
  664. }
  665. }
  666. .loading-mask {
  667. position: absolute;
  668. top: 0;
  669. left: 0;
  670. right: 0;
  671. bottom: 0;
  672. justify-content: center;
  673. align-items: center;
  674. background-color: rgba(0, 0, 0, 0.3);
  675. .loading-text {
  676. padding: 30rpx 60rpx;
  677. background-color: rgba(0, 0, 0, 0.7);
  678. color: #ffffff;
  679. font-size: 28rpx;
  680. border-radius: 12rpx;
  681. }
  682. }
  683. .picker-modal {
  684. position: fixed;
  685. top: 0;
  686. left: 0;
  687. right: 0;
  688. bottom: 0;
  689. z-index: 1000;
  690. }
  691. .modal-mask {
  692. position: absolute;
  693. top: 0;
  694. left: 0;
  695. right: 0;
  696. bottom: 0;
  697. background-color: rgba(0, 0, 0, 0.5);
  698. }
  699. .modal-content {
  700. position: absolute;
  701. bottom: 0;
  702. left: 0;
  703. right: 0;
  704. background-color: #ffffff;
  705. border-top-left-radius: 16rpx;
  706. border-top-right-radius: 16rpx;
  707. max-height: 1000rpx;
  708. }
  709. .modal-header {
  710. flex-direction: row;
  711. justify-content: space-between;
  712. align-items: center;
  713. padding: 30rpx;
  714. border-bottom: 1rpx solid #f0f0f0;
  715. }
  716. .modal-title {
  717. font-size: 32rpx;
  718. font-weight: bold;
  719. color: #333333;
  720. }
  721. .modal-close {
  722. font-size: 28rpx;
  723. color: #007aff;
  724. }
  725. .modal-body {
  726. max-height: 800rpx;
  727. min-height: 800rpx;
  728. }
  729. .picker-option {
  730. flex-direction: row;
  731. justify-content: space-between;
  732. align-items: center;
  733. padding: 24rpx 30rpx;
  734. border-bottom: 1rpx solid #f0f0f0;
  735. }
  736. .picker-option.selected {
  737. background-color: #f8f9fa;
  738. }
  739. .option-text {
  740. font-size: 28rpx;
  741. color: #333333;
  742. }
  743. .option-check {
  744. font-size: 28rpx;
  745. color: #007aff;
  746. }
  747. .form-picker {
  748. flex: 1;
  749. }
  750. .picker-display {
  751. flex-direction: row;
  752. justify-content: space-between;
  753. align-items: center;
  754. min-height: 40rpx;
  755. }
  756. .selected-value {
  757. font-size: 28rpx;
  758. color: #333333;
  759. }
  760. .placeholder {
  761. font-size: 28rpx;
  762. color: #999999;
  763. }
  764. .arrow {
  765. font-size: 24rpx;
  766. color: #999999;
  767. margin-left: 12rpx;
  768. }
  769. .search-bar {
  770. padding: 20rpx 30rpx;
  771. background-color: #d7eafe;
  772. }
  773. .search-box {
  774. flex-direction: row;
  775. align-items: center;
  776. height: 72rpx;
  777. padding: 0 24rpx;
  778. background-color: #f5f5f5;
  779. border-radius: 36rpx;
  780. .search-icon {
  781. width: 32rpx;
  782. height: 32rpx;
  783. margin-right: 12rpx;
  784. }
  785. .search-input {
  786. flex: 1;
  787. font-size: 28rpx;
  788. color: #333333;
  789. }
  790. .clear-icon {
  791. margin-left: 12rpx;
  792. font-size: 28rpx;
  793. color: #999999;
  794. }
  795. }
  796. .empty-tip {
  797. justify-content: space-between;
  798. // text-align: center;
  799. padding: 24rpx 30rpx;
  800. display: flex;
  801. align-items: center;
  802. justify-content: center;
  803. color: #999;
  804. }
  805. </style>