wbFinalize.uvue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669
  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">{{ workOrderProjectNo ?? '' }}</text>
  13. </view>
  14. <view class="info-item">
  15. <text class="info-label">工单类型</text>
  16. <text class="info-value">{{ orderType == '1' ? '维修工单' : '维保工单' }}</text>
  17. </view>
  18. <view class="info-item">
  19. <text class="info-label">风机编号</text>
  20. <text class="info-value">{{ pcsDeviceName ?? '' }}</text>
  21. </view>
  22. <view class="info-item">
  23. <text class="info-label">维保中心</text>
  24. <text class="info-value">{{ gxtCenter ?? '' }}</text>
  25. </view>
  26. <view class="info-item">
  27. <text class="info-label">场站</text>
  28. <text class="info-value">{{ 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">{{ brand ?? '' }} {{ model ?? '' }}</text>
  37. </view>
  38. <view class="info-item">
  39. <text class="info-label">接单时间</text>
  40. <text class="info-value">{{ acceptTime ?? '' }}</text>
  41. </view>
  42. </view>
  43. </view>
  44. <!-- 结单表单 -->
  45. <view class="info-section">
  46. <view class="section-title">
  47. <text class="section-title-text">结单信息</text>
  48. </view>
  49. <view class="info-card">
  50. <!-- 信息录入 -->
  51. <view class="info-item">
  52. <view class="info-label">
  53. <text class="form-label required">信息录入<text style="color: red;">*</text></text>
  54. </view>
  55. <view class="info-value">
  56. <radio-group @change="handleInfoEntryChange" :disabled="infoEntryDisabled" class="uni-flex uni-row radio-group">
  57. <view v-for="(option, index) in infoEntryOptions" :key="index" class="radio-label">
  58. <radio :value="option.dictValue" :checked="infoEntry == option.dictValue">{{ option.dictLabel }}</radio>
  59. <!-- <text></text> -->
  60. </view>
  61. </radio-group>
  62. </view>
  63. </view>
  64. <!-- MIS工单编码选择(当信息录入为1时显示) -->
  65. <view class="info-item" v-if="infoEntry == '1'">
  66. <view class="info-label">
  67. <text class="form-label required">MIS工单编码<text style="color: red;">*</text></text>
  68. </view>
  69. <view class="info-value">
  70. <view class="input-with-select">
  71. <input
  72. class="input-field"
  73. placeholder="请输入或选择MIS工单编码"
  74. v-model="misNo"
  75. @focus="handleMisNoInputFocus"
  76. @blur="handleMisNoInputBlur"
  77. @input="handleMisNoInput"
  78. :readonly="infoEntry == '1'"
  79. :style="{ paddingRight: '120rpx' }" />
  80. <text class="select-mis-btn" @click="openMisListModal">选择</text>
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 工作票编号(当信息录入为2时可编辑) -->
  85. <view class="info-item">
  86. <view class="info-label">
  87. <text class="form-label required">工作票编号<text style="color: red;">*</text></text>
  88. </view>
  89. <view class="info-value">
  90. <input
  91. class="input-field"
  92. placeholder="请输入工作票编号"
  93. v-model="workPermitNum"
  94. maxlength="20"
  95. :disabled="infoEntry == '1'"
  96. />
  97. </view>
  98. </view>
  99. <!-- 开始时间 -->
  100. <view class="info-item">
  101. <view class="info-label">
  102. <text class="form-label required">开始时间<text style="color: red;">*</text></text>
  103. </view>
  104. <view class="info-value">
  105. <view class="form-picker" @click="showStartTimePicker = true">
  106. <input
  107. class="input-field"
  108. placeholder="请选择开始时间"
  109. v-model="realStartTime"
  110. />
  111. </view>
  112. </view>
  113. </view>
  114. <!-- 结束时间 -->
  115. <view class="info-item">
  116. <view class="info-label">
  117. <text class="form-label required">结束时间<text style="color: red;">*</text></text>
  118. </view>
  119. <view class="info-value">
  120. <view class="form-picker" @click="showEndTimePicker = true">
  121. <input
  122. class="input-field"
  123. placeholder="请选择结束时间"
  124. v-model="realEndTime"
  125. />
  126. </view>
  127. </view>
  128. </view>
  129. <!-- 外委人员数 -->
  130. <view class="info-item">
  131. <view class="info-label">
  132. <text class="form-label required">外委人员数(人)</text>
  133. </view>
  134. <view class="info-value">
  135. <input
  136. type="number"
  137. class="input-field"
  138. placeholder="请输入外委人员数"
  139. v-model="wwryNum"
  140. />
  141. </view>
  142. </view>
  143. <!-- 外来人员数 -->
  144. <view class="info-item">
  145. <view class="info-label">
  146. <text class="form-label required">外来人员数(人)</text>
  147. </view>
  148. <view class="info-value">
  149. <input
  150. type="number"
  151. class="input-field"
  152. placeholder="请输入外来人员数"
  153. v-model="wlryNum"
  154. />
  155. </view>
  156. </view>
  157. <!-- 工作负责人 -->
  158. <view class="info-item">
  159. <view class="info-label">
  160. <text class="form-label required">工作负责人</text>
  161. </view>
  162. <view class="info-value">
  163. <input
  164. class="input-field"
  165. placeholder="请输入工作负责人"
  166. v-model="teamLeaderName"
  167. :disabled="true"
  168. />
  169. </view>
  170. </view>
  171. <!-- 工作班成员选择(当信息录入为2时可编辑) -->
  172. <view class="info-item">
  173. <view class="info-label">
  174. <text class="form-label required">工作班成员</text>
  175. </view>
  176. <view class="info-value">
  177. <view class="input-with-clear">
  178. <input
  179. class="input-field"
  180. placeholder="请选择工作班成员"
  181. v-model="workGroupMemberName"
  182. @click="showUserSelect = true"
  183. :disabled="infoEntry == '1'"
  184. />
  185. <text class="select-users-count" v-if="selectedUserIds.length > 0" :style="{ marginRight: selectedUserIds.length > 0 ? '60rpx' : '0' }">({{ selectedUserIds.length }}人)</text>
  186. <text class="select-clear" v-if="selectedUserIds.length > 0" @click="clearSelectedUsers">×</text>
  187. </view>
  188. </view>
  189. </view>
  190. <!-- 维保内容 -->
  191. <view class="info-item full-width">
  192. <view class="info-label">
  193. <text class="form-label required">维保内容<text style="color: red;">*</text></text>
  194. </view>
  195. <view class="info-value">
  196. <textarea
  197. class="textarea-field"
  198. placeholder="请输入维保内容"
  199. v-model="content"
  200. maxlength="500"
  201. :disabled="infoEntry == '1'"
  202. :show-confirm-bar="false"
  203. auto-height
  204. ></textarea>
  205. </view>
  206. </view>
  207. <!-- 附件上传 -->
  208. <view class="info-item full-width">
  209. <view class="info-label">
  210. <text class="form-label">附件(可选)</text>
  211. </view>
  212. <view class="info-value">
  213. <upload-image
  214. :limit="8"
  215. :modelValue="uploadedFiles"
  216. :businessType="'workOrder'"
  217. @update:modelValue="uploadedFiles = $event as UTSArray<UploadResponse>"
  218. />
  219. </view>
  220. </view>
  221. </view>
  222. </view>
  223. <!-- 时间选择器弹窗 -->
  224. <!-- Start Date Picker -->
  225. <l-popup v-model="showStartTimePicker" position="bottom">
  226. <l-date-time-picker
  227. title="选择开始时间"
  228. :mode="1 | 2 | 4 | 8 | 16"
  229. format="YYYY-MM-DD HH:mm"
  230. :modelValue="realStartTime"
  231. confirm-btn="确定"
  232. cancel-btn="取消"
  233. @confirm="onStartDateConfirm"
  234. @cancel="showStartTimePicker = false">
  235. </l-date-time-picker>
  236. </l-popup>
  237. <!-- End Date Picker -->
  238. <l-popup v-model="showEndTimePicker" position="bottom">
  239. <l-date-time-picker
  240. title="选择结束时间"
  241. :mode="31"
  242. format="YYYY-MM-DD HH:mm"
  243. :modelValue="realStartTime"
  244. confirm-btn="确定"
  245. cancel-btn="取消"
  246. @confirm="onEndDateConfirm"
  247. @cancel="showEndTimePicker = false">
  248. </l-date-time-picker>
  249. </l-popup>
  250. <!-- 人员选择弹窗 -->
  251. <view v-if="showUserSelect" class="picker-modal">
  252. <view class="modal-mask" @click="showUserSelect = false"></view>
  253. <view class="modal-content">
  254. <view class="modal-header">
  255. <text class="modal-title">选择工作班成员</text>
  256. <text class="modal-close" @click="confirmSelectedUsers">确定</text>
  257. </view>
  258. <view class="search-bar">
  259. <view class="search-box">
  260. <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
  261. <input class="search-input" type="text" placeholder="搜索姓名" v-model="userKeyword" @input="handleSearch" />
  262. <text v-if="userKeyword.length > 0" class="clear-icon" @click="clearSearch">✕</text>
  263. </view>
  264. </view>
  265. <scroll-view class="modal-body" scroll-y="true">
  266. <view
  267. v-for="(user, index) in userList"
  268. :key="index"
  269. class="picker-option"
  270. @click="toggleUserSelection(user)"
  271. >
  272. <text class="option-text">{{ (user['nickName'] as string | null) ?? '' }}</text>
  273. <text class="option-text">{{ ((user['dept'] as UTSJSONObject | null)?.['deptName'] as string | null) ?? '' }}</text>
  274. <text class="option-check" v-if="isSelected(user)">✓</text>
  275. </view>
  276. </scroll-view>
  277. </view>
  278. </view>
  279. <!-- MIS工单列表弹窗 -->
  280. <view v-if="showMisListModal" class="picker-modal">
  281. <view class="modal-mask" @click="closeMisListModal"></view>
  282. <view class="modal-content">
  283. <view class="modal-header">
  284. <text class="modal-title">选择MIS工单</text>
  285. <text class="modal-close" @click="closeMisListModal">取消</text>
  286. </view>
  287. <!-- 搜索栏 -->
  288. <view class="search-bar">
  289. <view class="search-box">
  290. <image class="search-icon" src="/static/images/workbench/list/1.png" mode="aspectFit"></image>
  291. <input class="search-input" type="text" placeholder="搜索 MIS工单编码" v-model="misListKeyword" @input="searchMisList" />
  292. <text v-if="misListKeyword.length > 0" class="clear-icon" @click="clearMisListSearch">✕</text>
  293. </view>
  294. </view>
  295. <!-- 列表内容 -->
  296. <scroll-view class="modal-body" scroll-y="true">
  297. <!-- 有数据时显示列表 -->
  298. <view v-if="misList.length > 0">
  299. <view
  300. v-for="(item, index) in misList"
  301. :key="index"
  302. class="picker-option"
  303. @click="selectMisItem(item, index)"
  304. >
  305. <!-- <text class="option-text">{{ option.label }}</text>
  306. <text class="option-text">{{ option.value }}</text> -->
  307. <text class="option-text">{{ ((item['misNo'] as string | null) ?? '-')}}</text>
  308. <text class="option-text">{{ item['workPermitNum'] as string | null ?? '-' }}</text>
  309. <text v-if="index === selectedMisInfoIndex" class="option-check">✓</text>
  310. </view>
  311. </view>
  312. <!-- 无数据时显示提示 -->
  313. <view v-else class="empty-tip">
  314. <text>未找到匹配的MIS工单</text>
  315. </view>
  316. </scroll-view>
  317. </view>
  318. </view>
  319. </scroll-view>
  320. <!-- 确认结单按钮 -->
  321. <view class="accept-button-container">
  322. <button class="accept-button" @click="handleSubmit" :loading="submitLoading">{{ submitLoading ? '提交中...' : '确认结单' }}</button>
  323. </view>
  324. <!-- 加载中状态 -->
  325. <view v-if="loading" class="loading-mask">
  326. <text class="loading-text">加载中...</text>
  327. </view>
  328. </view>
  329. </template>
  330. <script setup lang="uts">
  331. import { ref } from 'vue'
  332. import type { acceptOrderInfo } from '../../../types/order'
  333. import type { WorkOrderFlow } from '../../../types/flow'
  334. import { getOrderInfoById, getRepairOrderInfoById, returnRepairOrder, finishOrder } from '../../../api/order/detail'
  335. import { getMisInfoList, listWorkPerson, getOrderList, listAutoMisInfo } from '../../../api/order/list'
  336. import type { SysDictData } from '../../../types/dict'
  337. import { getDictDataByType } from '../../../api/dict/index'
  338. import type { UserInfo } from '../../../types/user'
  339. import type { UploadResponse } from '../../../types/workbench'
  340. import {checkPermi} from '../../../utils/storage'
  341. import { getUserList, getLeaderList } from '../../../api/user/list'
  342. import uploadImage from '../../../components/upload-image/upload-image.uvue'
  343. // 工单信息
  344. const orderId = ref<string>('')
  345. const workOrderProjectNo = ref<string>('')
  346. const workOrderStatus = ref<string>('')
  347. const orderType = ref<string>('')
  348. const pcsDeviceName = ref<string>('')
  349. const gxtCenter = ref<string>('')
  350. const pcsStationName = ref<string>('')
  351. const brand = ref<string>('')
  352. const model = ref<string>('')
  353. const acceptTime = ref<string>('')
  354. const returnType = ref<string>('')
  355. const returnReason = ref<string>("")
  356. const returnTypeLabel = ref<string>("")
  357. const acceptReturnType = ref<string>('')
  358. const acceptReturnReason = ref<string>("")
  359. const teamLeaderId = ref<Number | null>(null)
  360. const teamLeaderName = ref<string>('')
  361. const pauseTime = ref<string>('')
  362. const restartTime = ref<string>('')
  363. // 添加字典加载状态
  364. const dictLoaded = ref<boolean>(false)
  365. // 结单表单相关变量
  366. const infoEntry = ref<string>('') // 信息录入
  367. const misNo = ref<string>('') // MIS工单编码
  368. const workPermitNum = ref<string>('') // 工作票编号
  369. const realStartTime = ref<string>('') // 开始时间
  370. const realEndTime = ref<string>('') // 结束时间
  371. const wwryNum = ref<string>('') // 外委人员数
  372. const wlryNum = ref<string>('') // 外来人员数
  373. const workGroupMemberName = ref<string>('') // 工作班成员
  374. const content = ref<string>('') // 维保内容
  375. const attachmentUrls = ref<string>('') // 附件URLs(逗号分隔的字符串格式)
  376. const uploadedFiles = ref<UploadResponse[]>([]) // 上传的文件对象数组
  377. const workOrderPersonList = ref<UTSJSONObject[]>([]) // 工作班成员数组
  378. const selectedUserIds = ref<string[]>([]) // 选中的用户ID数组
  379. const selectedUsers = ref<UTSJSONObject[]>([]) // 选中的用户对象数组
  380. // 时间选择器相关变量
  381. const showStartTimePicker = ref<boolean>(false)
  382. const showEndTimePicker = ref<boolean>(false)
  383. const startTimeDate = ref<string>('')
  384. const startTimeTime = ref<string>('')
  385. const endTimeDate = ref<string>('')
  386. const endTimeTime = ref<string>('')
  387. // MIS工单选择相关变量
  388. const showMisNoQuickSelect = ref<boolean>(false)
  389. const quickMisNoList = ref<UTSJSONObject[]>([])
  390. // 添加MIS工单列表弹窗显示状态
  391. const showMisListModal = ref<boolean>(false)
  392. // MIS工单列表数据
  393. const misList = ref<UTSJSONObject[]>([])
  394. const allMisList = ref<UTSJSONObject[]>([])
  395. // 分页信息
  396. const misListPage = ref<number>(1)
  397. const misListPageSize = ref<number>(999)
  398. const misListTotal = ref<number>(0)
  399. // 搜索关键词
  400. const misListKeyword = ref<string>('')
  401. const userKeyword = ref<string>('')
  402. // 人员选择相关变量
  403. const showUserSelect = ref<boolean>(false)
  404. const userList = ref<UTSJSONObject[]>([])
  405. const userAllList = ref<UTSJSONObject[]>([])
  406. // 信息录入选项
  407. const infoEntryOptions = ref<SysDictData[]>([])
  408. const selectedMisInfoIndex = ref<number>(-1)
  409. // 获取信息录入字典列表
  410. const loadInfoEntryDictList = async (): Promise<void> => {
  411. try {
  412. const result = await getDictDataByType('gxt_info_entry') // 假设信息录入类型字典类型为gxt_info_entry
  413. const resultObj = result as UTSJSONObject
  414. if (resultObj['code'] == 200) {
  415. const data = resultObj['data'] as any[]
  416. const dictData: SysDictData[] = []
  417. if (data.length > 0) {
  418. for (let i = 0; i < data.length; i++) {
  419. const item = data[i] as UTSJSONObject
  420. // 只提取需要的字段
  421. const dictItem: SysDictData = {
  422. dictValue: item['dictValue'] as string | null,
  423. dictLabel: item['dictLabel'] as string | null,
  424. dictCode: null,
  425. dictSort: null,
  426. dictType: null,
  427. cssClass: null,
  428. listClass: null,
  429. isDefault: null,
  430. status: null,
  431. default: null,
  432. createTime: null,
  433. remark: null
  434. }
  435. dictData.push(dictItem)
  436. }
  437. }
  438. infoEntryOptions.value = dictData
  439. }
  440. } catch (e: any) {
  441. console.error('获取信息录入类型字典失败:', e.message)
  442. // 设置默认值
  443. infoEntryOptions.value = [
  444. { dictValue: '1', dictLabel: 'MIS工单', dictCode: null, dictSort: null, dictType: null, cssClass: null, listClass: null, isDefault: null, status: null, default: null, createTime: null, remark: null },
  445. { dictValue: '2', dictLabel: '手工录入', dictCode: null, dictSort: null, dictType: null, cssClass: null, listClass: null, isDefault: null, status: null, default: null, createTime: null, remark: null }
  446. ];
  447. }
  448. }
  449. // 获取用户列表
  450. const getUserAllList = async (): Promise<void> => {
  451. try {
  452. // 这里应该调用获取用户列表的API
  453. const result = await getLeaderList(-1); // 空参数调用
  454. const resultObj = result as UTSJSONObject;
  455. const code = resultObj['code'] as number
  456. const users = resultObj['data'] as UTSJSONObject[] | null
  457. if (code == 200 && users != null ) {
  458. // 解析列表数据
  459. // const rows = resultObj['rows'] as UTSJSONObject[]
  460. userList.value = users;
  461. userAllList.value = users
  462. // userList.value = result.data || [];
  463. }
  464. } catch (error) {
  465. console.error('获取用户列表失败:', error);
  466. uni.showToast({
  467. title: '获取用户列表失败',
  468. icon: 'none'
  469. });
  470. }
  471. };
  472. // 验证和提交
  473. const submitLoading = ref<boolean>(false)
  474. // 信息录入禁用状态
  475. const infoEntryDisabled = ref<boolean>(false)
  476. // 接受用户名
  477. const acceptUserName = ref<string>('')
  478. // 选择器选项类型
  479. type PickerOption = {
  480. label: string
  481. value: string
  482. }
  483. // 选中的挂起原因
  484. const selectedReasonIndex = ref<number>(-1)
  485. const returnTypeOptions = ref<PickerOption[]>([])
  486. const showReasonPicker = ref<boolean>(false)
  487. // 获取负责人列表(使用用户列表接口)
  488. const dictList = async (): Promise<void> => {
  489. try {
  490. const dictString = ref("")
  491. if(workOrderStatus.value != 'to_finish') {
  492. dictString.value = "gxt_accept_return_type"
  493. } else {
  494. dictString.value = "gxt_return_type"
  495. }
  496. const result = await getDictDataByType(dictString.value)
  497. const resultObj = result as UTSJSONObject
  498. if (resultObj['code'] == 200) {
  499. const data = resultObj['data'] as any[]
  500. const options: PickerOption[] = []
  501. if (data.length > 0) {
  502. for (let i = 0; i < data.length; i++) {
  503. const item = data[i] as UTSJSONObject
  504. let dictItem: SysDictData = {
  505. dictValue: item['dictValue'] as string | null,
  506. dictLabel: item['dictLabel'] as string | null,
  507. dictCode: null,
  508. dictSort: null,
  509. dictType: null,
  510. cssClass: null,
  511. listClass: null,
  512. isDefault: null,
  513. status: null,
  514. default: null,
  515. createTime: null,
  516. remark: null
  517. }
  518. // 构建选择器选项
  519. options.push({
  520. label: dictItem.dictLabel ?? '',
  521. value: dictItem.dictValue ?? ''
  522. })
  523. }
  524. }
  525. returnTypeOptions.value = options
  526. }
  527. } catch (e: any) {
  528. console.error('获取挂起原因失败:', e.message)
  529. }
  530. }
  531. // 手动选择负责人
  532. const selectLeaderManually = (index: number): void => {
  533. selectedReasonIndex.value = index
  534. if (index >= 0 && index < returnTypeOptions.value.length) {
  535. const selectedOption = returnTypeOptions.value[index]
  536. returnTypeLabel.value = selectedOption.label
  537. returnType.value = selectedOption.value
  538. }
  539. showReasonPicker.value = false
  540. }
  541. // 信息录入变化处理
  542. const handleInfoEntryChange = (e: UniRadioGroupChangeEvent): void => {
  543. // 兼容 radio-group 事件:detail 可能不存在,直接取 e.value
  544. const val = e.detail?.value as string | null
  545. infoEntry.value = val ?? ''
  546. if (infoEntry.value == '1') {
  547. // 当选择MIS工单时,清空手工录入的字段
  548. workPermitNum.value = '';
  549. realStartTime.value = '';
  550. realEndTime.value = '';
  551. workGroupMemberName.value = '';
  552. }
  553. };
  554. // MIS工单编码输入处理
  555. const handleMisNoInputFocus = (): void => {
  556. showMisNoQuickSelect.value = true;
  557. };
  558. const handleMisNoInputBlur = (): void => {
  559. setTimeout(() => {
  560. showMisNoQuickSelect.value = false;
  561. }, 200);
  562. };
  563. const handleMisNoInput = (e: SysDictData): void => {
  564. // misNo.value = (e['detail'] as string | null) ?? '';
  565. // 这里可以添加实时搜索MIS工单的逻辑
  566. };
  567. const handleMisNoClear = (): void => {
  568. misNo.value = '';
  569. showMisNoQuickSelect.value = false;
  570. };
  571. const handleMisNoQuickSelect = (item: UTSJSONObject): void => {
  572. misNo.value = (item['misNo'] as string | null) ?? '';
  573. showMisNoQuickSelect.value = false;
  574. };
  575. // 获取MIS工单列表
  576. const getMisList = async (): Promise<void> => {
  577. try {
  578. const queryParams = {
  579. pcsDeviceName: pcsDeviceName.value,
  580. pcsStationName: pcsStationName.value,
  581. workOrderStatus: '结束'
  582. } as UTSJSONObject;
  583. // 调用获取MIS工单列表的API
  584. const result = await getMisInfoList(queryParams);
  585. const resultObj = result as UTSJSONObject;
  586. if (resultObj['code'] == 200) {
  587. // 解析列表数据
  588. const rows = resultObj['rows'] as UTSJSONObject[]
  589. misList.value = rows;
  590. allMisList.value = rows
  591. // 解析总数
  592. misListTotal.value = resultObj['total'] as number;
  593. } else {
  594. const msg = resultObj['msg'] as string | null
  595. uni.showToast({
  596. title: msg ?? '获取MIS工单列表失败',
  597. icon: 'none'
  598. })
  599. }
  600. } catch (error: any) {
  601. console.error('获取MIS工单列表失败:', error);
  602. uni.showToast({
  603. title: error.message ?? '获取MIS工单列表失败',
  604. icon: 'none'
  605. });
  606. }
  607. };
  608. // 打开MIS工单选择弹窗
  609. const openMisListModal = (): void => {
  610. showMisListModal.value = true;
  611. misListPage.value = 1; // 重置为第一页
  612. getMisList(); // 获取列表数据
  613. };
  614. // 选择MIS工单
  615. const selectMisItem = async (item: UTSJSONObject, index: number): Promise<void> => {
  616. selectedMisInfoIndex.value = index
  617. // 回填MIS工单相关信息
  618. misNo.value = item['misNo'] as string | '';
  619. // 查询MIS工单是否已存在
  620. const response = await getOrderList(1, 10, misNo.value, '')
  621. const responseObj = response as UTSJSONObject
  622. const rows = responseObj['rows'] as UTSJSONObject[] | null
  623. if (rows != null && rows.length > 0) {
  624. uni.showToast({ title: 'MIS工单:' + misNo.value + '已存在', icon: 'none' })
  625. misNo.value = ''
  626. return
  627. }
  628. // 查询相关工作班成员
  629. await listWorkPerson(misNo.value).then(response => {
  630. const responseObj = response as UTSJSONObject
  631. const rows = responseObj['rows'] as UTSJSONObject[] | null
  632. workOrderPersonList.value = rows ?? []
  633. if (rows != null && rows.length > 0) {
  634. const nickNames = rows
  635. .map((person: UTSJSONObject) => (person['nickName'] as string | null) ?? '')
  636. .join(',');
  637. workGroupMemberName.value = nickNames;
  638. }
  639. })
  640. workPermitNum.value = item['workPermitNum'] as string | '';
  641. realStartTime.value = item['realStartTime'] as string | '';
  642. realEndTime.value = item['realEndTime'] as string | '';
  643. // 关闭弹窗
  644. showMisListModal.value = false;
  645. };
  646. // 搜索
  647. const handleSearch = (): void => {
  648. const keyword = userKeyword.value
  649. userList.value = userAllList.value.filter(leader => {
  650. const nickName = leader['nickName'] as string | null
  651. return nickName != null && nickName.indexOf(keyword) >= 0
  652. })
  653. }
  654. // 关闭MIS工单选择弹窗
  655. const closeMisListModal = (): void => {
  656. showMisListModal.value = false;
  657. };
  658. // 搜索
  659. const searchMisList = (): void => {
  660. const keyword = misListKeyword.value
  661. misList.value = allMisList.value.filter(misInfo => {
  662. const misNo = misInfo['misNo'] as string | null
  663. // return misNo != null && misNo.indexOf(keyword) >= 0
  664. const workPermitNum = misInfo['workPermitNum'] as string | null
  665. // 逻辑或(||)连接两个条件,满足其一即可
  666. const misNoMatch = misNo != null && misNo.indexOf(keyword) >= 0
  667. const workPermitNumMatch = workPermitNum != null && workPermitNum.indexOf(keyword) >= 0
  668. return misNoMatch || workPermitNumMatch
  669. })
  670. }
  671. // 清除MIS工单搜索
  672. const clearMisListSearch = (): void => {
  673. misListKeyword.value = "";
  674. misList.value = allMisList.value
  675. };
  676. // 清除用户搜索
  677. const clearSearch = (): void => {
  678. userKeyword.value = "";
  679. userList.value = userAllList.value
  680. };
  681. function onStartDateConfirm(value: string) {
  682. // 检查结束时间是否小于新的开始时间
  683. if (realEndTime.value != '' && new Date(value) > new Date(realEndTime.value as string)) {
  684. uni.showToast({ title: '开始时间不能大于结束时间', icon: 'none' })
  685. return
  686. }
  687. realStartTime.value = value
  688. showStartTimePicker.value = false
  689. }
  690. function onEndDateConfirm(value: string) {
  691. // 检查新的结束时间是否小于开始时间
  692. if (realStartTime.value != '' && new Date(realStartTime.value as string) > new Date(value)) {
  693. uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
  694. return
  695. }
  696. realEndTime.value = value
  697. showEndTimePicker.value = false
  698. }
  699. // 检查用户是否已被选中
  700. const isSelected = (user: UTSJSONObject): boolean => {
  701. const userId = user['userId'] as string | number | null;
  702. if (userId !== null) {
  703. return selectedUserIds.value.includes(userId.toString());
  704. }
  705. // 如果没有userId,则比较nickName
  706. const nickName = user['nickName'] as string | null;
  707. if (nickName !== null) {
  708. return selectedUsers.value.some(selected =>
  709. (selected['nickName'] as string | null) === nickName
  710. );
  711. }
  712. return false;
  713. };
  714. // 切换用户选择状态
  715. const toggleUserSelection = (user: UTSJSONObject): void => {
  716. const userId = user['userId'] as string | number | null;
  717. const nickName = user['nickName'] as string | null;
  718. if (userId !== null) {
  719. const userIdStr = userId.toString();
  720. const index = selectedUserIds.value.indexOf(userIdStr);
  721. if (index > -1) {
  722. // 取消选择
  723. selectedUserIds.value.splice(index, 1);
  724. selectedUsers.value = selectedUsers.value.filter(selected =>
  725. (selected['userId'] as string | number | null)?.toString() !== userIdStr
  726. );
  727. } else {
  728. // 添加选择
  729. selectedUserIds.value.push(userIdStr);
  730. selectedUsers.value.push(user);
  731. }
  732. } else if (nickName !== null) {
  733. // 如果没有userId,通过nickName来识别
  734. const index = selectedUsers.value.findIndex(selected =>
  735. (selected['nickName'] as string | null) === nickName
  736. );
  737. if (index > -1) {
  738. // 取消选择
  739. selectedUsers.value.splice(index, 1);
  740. // 同时移除对应的userId(如果有的话)
  741. const userToRemoveId = user['userId'] as string | number | null;
  742. if (userToRemoveId !== null) {
  743. const idIndex = selectedUserIds.value.indexOf(userToRemoveId.toString());
  744. if (idIndex > -1) {
  745. selectedUserIds.value.splice(idIndex, 1);
  746. }
  747. }
  748. } else {
  749. // 添加选择
  750. selectedUsers.value.push(user);
  751. const userToAddId = user['userId'] as string | number | null;
  752. if (userToAddId !== null) {
  753. selectedUserIds.value.push(userToAddId.toString());
  754. }
  755. }
  756. }
  757. };
  758. // 确认选择的用户
  759. const confirmSelectedUsers = (): void => {
  760. // 将选中的用户姓名拼接成字符串
  761. const nickNames = selectedUsers.value
  762. .map(user => (user['nickName'] as string | null) ?? '')
  763. .filter(name => name !== '')
  764. .join(',');
  765. workGroupMemberName.value = nickNames;
  766. // 更新workOrderPersonList为选中的用户
  767. workOrderPersonList.value = [...selectedUsers.value];
  768. showUserSelect.value = false;
  769. };
  770. // 清空已选择的用户
  771. const clearSelectedUsers = (): void => {
  772. // 清空选中的用户数组
  773. selectedUsers.value = [];
  774. selectedUserIds.value = [];
  775. // 清空显示的用户名
  776. workGroupMemberName.value = '';
  777. // 清空工作班成员列表
  778. workOrderPersonList.value = [];
  779. };
  780. // 表单验证
  781. const validateForm = (): boolean => {
  782. if (infoEntry.value == '') {
  783. uni.showToast({
  784. title: '请选择信息录入方式',
  785. icon: 'none'
  786. });
  787. return false;
  788. }
  789. if (infoEntry.value == '1' && (misNo.value == '')) {
  790. uni.showToast({
  791. title: '请输入MIS工单编码',
  792. icon: 'none'
  793. });
  794. return false;
  795. }
  796. if (workPermitNum.value == '') {
  797. uni.showToast({
  798. title: '请输入工作票编号',
  799. icon: 'none'
  800. });
  801. return false;
  802. }
  803. if (realStartTime.value == '') {
  804. uni.showToast({
  805. title: '请选择开始时间',
  806. icon: 'none'
  807. });
  808. return false;
  809. }
  810. if (realEndTime.value == '') {
  811. uni.showToast({
  812. title: '请选择结束时间',
  813. icon: 'none'
  814. });
  815. return false;
  816. }
  817. if (new Date(realEndTime.value) <= new Date(realStartTime.value)) {
  818. uni.showToast({
  819. title: '结束时间必须大于开始时间',
  820. icon: 'none'
  821. });
  822. return false;
  823. }
  824. // if (infoEntry.value == '2' && (workGroupMemberName.value == '' || selectedUsers.value.length == 0)) {
  825. // uni.showToast({
  826. // title: '请选择工作班成员',
  827. // icon: 'none'
  828. // });
  829. // return false;
  830. // }
  831. return true;
  832. };
  833. const isDealing = ref(false)
  834. const hasDealed = ref(false)
  835. // 提交表单
  836. const handleSubmit = async (): Promise<void> => {
  837. if (!validateForm()) {
  838. return;
  839. }
  840. submitLoading.value = true;
  841. try {
  842. if (isDealing.value || hasDealed.value) return // 双重保险
  843. isDealing.value = true
  844. // 确保附件URLs是最新的逗号分隔格式
  845. attachmentUrls.value = uploadedFiles.value.map(file => file.fileName).join(',');
  846. const finishData = {
  847. id: orderId.value,
  848. orderType: orderType.value,
  849. workOrderProjectNo: workOrderProjectNo.value,
  850. infoEntry: infoEntry.value,
  851. misNo: infoEntry.value == '1' ? misNo.value : null,
  852. workPermitNum: workPermitNum.value,
  853. realStartTime: realStartTime.value,
  854. realEndTime: realEndTime.value,
  855. wwryNum: wwryNum.value,
  856. wlryNum: wlryNum.value,
  857. workGroupMemberName: workGroupMemberName.value,
  858. content: content.value,
  859. attachmentUrls: attachmentUrls.value,
  860. workOrderPersonList: workOrderPersonList.value,
  861. teamLeaderId: teamLeaderId.value,
  862. teamLeaderName: teamLeaderName.value,
  863. finalizeMethod: '2',
  864. workOrderStatus: 'completed'
  865. } as UTSJSONObject;
  866. const result = await finishOrder(finishData);
  867. const resultObj = result as UTSJSONObject;
  868. const code = resultObj['code'] as number;
  869. if (code == 200) {
  870. uni.showToast({
  871. title: '结单成功',
  872. icon: 'success'
  873. });
  874. hasDealed.value = true
  875. // 使用事件总线通知列表页面刷新
  876. uni.$emit('refreshOrderList', {});
  877. uni.$emit('refreshAssignedCount');
  878. uni.$emit('refreshOverdueCount');
  879. setTimeout(() => {
  880. uni.navigateBack();
  881. }, 800);
  882. } else {
  883. const msg = resultObj['msg'] as string;
  884. uni.showToast({
  885. title: msg.length > 0 ? msg : '结单失败',
  886. icon: 'none'
  887. });
  888. }
  889. } catch (error: any) {
  890. console.error('结单失败:', error);
  891. uni.showToast({
  892. title: '结单失败',
  893. icon: 'none'
  894. });
  895. } finally {
  896. submitLoading.value = false;
  897. isDealing.value = false // 无论成功失败都解锁
  898. }
  899. };
  900. const loading = ref<boolean>(false)
  901. // 加载详情数据
  902. const loadDetail = async (id: string, orderType?: string): Promise<void> => {
  903. try {
  904. loading.value = true
  905. let result: any;
  906. // 根据orderType决定调用哪个API
  907. if (orderType == '1') {
  908. // 维修工单
  909. result = await getRepairOrderInfoById(id)
  910. } else {
  911. // 维保工单
  912. result = await getOrderInfoById(id)
  913. }
  914. // 提取响应数据
  915. const resultObj = result as UTSJSONObject
  916. const code = resultObj['code'] as number
  917. const data = resultObj['data'] as UTSJSONObject | null
  918. if (code == 200 && data != null) {
  919. workOrderStatus.value = (data['workOrderStatus'] as string | null) ?? ''
  920. workOrderProjectNo.value = (data['workOrderProjectNo'] as string | null) ?? ''
  921. pcsDeviceName.value = (data['pcsDeviceName'] as string | null) ?? ''
  922. gxtCenter.value = (data['gxtCenter'] as string | null) ?? ''
  923. pcsStationName.value = (data['pcsStationName'] as string | null) ?? ''
  924. brand.value = (data['brand'] as string | null) ?? ''
  925. model.value = (data['model'] as string | null) ?? ''
  926. acceptTime.value = (data['acceptTime'] as string | null) ?? ''
  927. acceptUserName.value = (data['acceptUserName'] as string | null) ?? ''
  928. // 初始化结单表单默认值
  929. infoEntry.value = '1' // 默认为手工录入
  930. teamLeaderId.value = (data['teamLeaderId'] as Number | null) ?? null
  931. teamLeaderName.value = (data['teamLeaderName'] as string | null) ?? ''
  932. returnType.value = workOrderStatus.value == 'to_finish' ? '1' : ''
  933. content.value = (data['content'] as string | null) ?? ''
  934. // 初始化附件数据
  935. const attachmentUrlsFromServer = (data['attachmentUrls'] as string | null) ?? ''
  936. if (attachmentUrlsFromServer.length > 0) {
  937. attachmentUrls.value = attachmentUrlsFromServer
  938. // 将逗号分隔的URL字符串转换为UploadResponse对象数组
  939. const urls = attachmentUrlsFromServer.split(',')
  940. const fileArr : UploadResponse[] = []
  941. for (let i = 0; i < urls.length; i++) {
  942. const url = urls[i]
  943. const item : UploadResponse = {
  944. url: url,
  945. fileId: '',
  946. fileName: url.substring(url.lastIndexOf('/') + 1),
  947. filePath: url,
  948. fileSize: 0,
  949. fileExt: url.substring(url.lastIndexOf('.') + 1),
  950. businessType: 'workOrder'
  951. }
  952. fileArr.push(item)
  953. }
  954. uploadedFiles.value = fileArr
  955. }
  956. pauseTime.value = (data['pauseTime'] as string | null) ?? ''
  957. restartTime.value = (data['restartTime'] as string | null) ?? ''
  958. if(pauseTime.value != '' && restartTime.value != '') {
  959. const queryParams = {
  960. pauseTime: pauseTime.value,
  961. restartTime: restartTime.value,
  962. pcsDeviceName: pcsDeviceName.value,
  963. pcsStationName: pcsStationName.value,
  964. workOrderStatus: '结束'
  965. } as UTSJSONObject;
  966. const result = await listAutoMisInfo(queryParams)
  967. // 提取响应数据
  968. const resultObj = result as UTSJSONObject
  969. const code = resultObj['code'] as number
  970. const misInfo = resultObj['rows'] as UTSJSONObject[] | null
  971. if (code == 200 && misInfo != null) {
  972. if(misInfo.length > 0 && misInfo.length == 1) {
  973. // 有工作票号提示
  974. const workPermitNum2 = misInfo[0]['workPermitNum'] as string | null
  975. const misNo2 = misInfo[0]['misNo'] as string | null
  976. if (workPermitNum2 != null && workPermitNum2.length > 0) {
  977. const response = await getOrderList(1, 10, misNo2 ?? '', '')
  978. const responseObj = response as UTSJSONObject
  979. const rows = responseObj['rows'] as UTSJSONObject[] | null
  980. if (rows != null && rows.length > 0) {
  981. misNo.value = ''
  982. infoEntry.value = '2'
  983. uni.showToast({
  984. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  985. icon: 'none'
  986. });
  987. return
  988. } else {
  989. misNo.value = (misInfo[0]['misNo'] as string | null) ?? ''
  990. realStartTime.value = (misInfo[0]['realStartTime'] as string | null) ?? ''
  991. realEndTime.value = (misInfo[0]['realEndTime'] as string | null) ?? ''
  992. workPermitNum.value = (misInfo[0]['workPermitNum'] as string | null) ?? ''
  993. // 查询相关工作班成员
  994. await listWorkPerson(misNo.value).then(response => {
  995. const responseObj = response as UTSJSONObject
  996. const rows = responseObj['rows'] as UTSJSONObject[] | null
  997. workOrderPersonList.value = rows ?? []
  998. if (rows != null && rows.length > 0) {
  999. // 查询负责人信息并回填
  1000. for (const person of workOrderPersonList.value) {
  1001. // 严格判断isLeader为1(兼容数字/字符串类型)
  1002. if (person.isLeader == 1) {
  1003. teamLeaderName.value = (person.nickName as string | null) ?? '';
  1004. break; // 找到后立即停止循环
  1005. }
  1006. }
  1007. const nickNames = rows
  1008. .map((person: UTSJSONObject) => (person['nickName'] as string | null) ?? '')
  1009. .join(',');
  1010. workGroupMemberName.value = nickNames;
  1011. }
  1012. })
  1013. }
  1014. } else {
  1015. misNo.value = ''
  1016. infoEntry.value = '2'
  1017. uni.showToast({
  1018. title: '已匹配到MIS工单,但未关联工作票号,系统无法自动结单,请进入工作票录入方式。',
  1019. icon: 'none'
  1020. });
  1021. return
  1022. }
  1023. } else if(misInfo.length == 0) {
  1024. misNo.value = ''
  1025. infoEntry.value = '2'
  1026. uni.showToast({
  1027. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  1028. icon: 'none'
  1029. });
  1030. return
  1031. } else if(misInfo.length > 1) {
  1032. infoEntryDisabled.value = false
  1033. }
  1034. }
  1035. } else {
  1036. infoEntryDisabled.value = true
  1037. misNo.value = ''
  1038. infoEntry.value = '2'
  1039. uni.showToast({
  1040. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  1041. icon: 'none'
  1042. });
  1043. }
  1044. // await dictList()
  1045. if (returnTypeOptions.value.length > 0 && workOrderStatus.value == 'to_finish') {
  1046. // returnTypeLabel.value = returnTypeOptions.value[0].label
  1047. // 循环匹配
  1048. for (const option of returnTypeOptions.value) {
  1049. // 严格匹配value
  1050. if (returnType.value == option.value) {
  1051. returnTypeLabel.value = option.label;
  1052. break; // 匹配成功后跳出循环,提升性能
  1053. }
  1054. }
  1055. }
  1056. } else {
  1057. const msg = resultObj['msg'] as string | null
  1058. uni.showToast({
  1059. title: msg ?? '加载失败',
  1060. icon: 'none'
  1061. })
  1062. }
  1063. } catch (e: any) {
  1064. uni.showToast({
  1065. title: e.message ?? '加载失败',
  1066. icon: 'none'
  1067. })
  1068. } finally {
  1069. loading.value = false
  1070. }
  1071. }
  1072. // 页面加载
  1073. onLoad((options: any) => {
  1074. const params = options as UTSJSONObject
  1075. const id = params['id'] as string | null
  1076. const orderTypeParam = params['orderType'] as string | null
  1077. if (id != null && orderTypeParam != null) {
  1078. // 先尝试从参数中获取orderType
  1079. // const orderTypeNumber = parseInt(orderTypeParam)
  1080. orderType.value = orderTypeParam
  1081. orderId.value = id
  1082. loadDetail(id, orderTypeParam)
  1083. }
  1084. })
  1085. // 初始化
  1086. onMounted(() => {
  1087. getUserAllList();
  1088. loadInfoEntryDictList();
  1089. })
  1090. </script>
  1091. <style lang="scss">
  1092. .detail-page {
  1093. flex: 1;
  1094. background-color: #e8f0f9;
  1095. }
  1096. .detail-content {
  1097. flex: 1;
  1098. padding: 20rpx 0;
  1099. }
  1100. .info-section {
  1101. margin: 0 30rpx 24rpx;
  1102. .section-title {
  1103. position: relative;
  1104. padding-left: 20rpx;
  1105. margin-bottom: 20rpx;
  1106. &::before {
  1107. // content: '';
  1108. position: absolute;
  1109. left: 0;
  1110. top: 50%;
  1111. transform: translateY(-50%);
  1112. width: 8rpx;
  1113. height: 32rpx;
  1114. background-color: #007aff;
  1115. border-radius: 4rpx;
  1116. }
  1117. &-text {
  1118. font-size: 32rpx;
  1119. font-weight: bold;
  1120. color: #333333;
  1121. }
  1122. }
  1123. .info-card {
  1124. background-color: #ffffff;
  1125. border-radius: 16rpx;
  1126. padding: 30rpx;
  1127. .info-item {
  1128. flex-direction: row;
  1129. padding: 20rpx 0;
  1130. border-bottom: 1rpx solid #f0f0f0;
  1131. &:last-child {
  1132. border-bottom: none;
  1133. }
  1134. &.full-width {
  1135. flex-direction: column;
  1136. .info-label {
  1137. margin-bottom: 12rpx;
  1138. }
  1139. .info-value {
  1140. line-height: 44rpx;
  1141. }
  1142. }
  1143. .info-label {
  1144. width: 240rpx;
  1145. font-size: 28rpx;
  1146. color: #666666;
  1147. white-space: nowrap;
  1148. }
  1149. .info-value {
  1150. flex: 1;
  1151. font-size: 28rpx;
  1152. color: #333333;
  1153. text-align: right;
  1154. &.highlight {
  1155. color: #007aff;
  1156. font-weight: bold;
  1157. }
  1158. &.input {
  1159. text-align: left;
  1160. border: 1rpx solid #e0e0e0;
  1161. border-radius: 8rpx;
  1162. padding: 10rpx;
  1163. }
  1164. .input-with-clear {
  1165. position: relative;
  1166. display: flex;
  1167. align-items: center;
  1168. }
  1169. .select-clear {
  1170. position: absolute;
  1171. right: 20rpx;
  1172. color: #ccc;
  1173. text-align: center;
  1174. font-size: 40rpx;
  1175. font-weight: bold;
  1176. z-index: 1;
  1177. }
  1178. .input-with-select {
  1179. position: relative;
  1180. display: flex;
  1181. align-items: center;
  1182. }
  1183. .select-mis-btn {
  1184. line-height: 50rpx;
  1185. text-align: center;
  1186. position: absolute;
  1187. right: 0rpx;
  1188. padding: 6rpx 12rpx;
  1189. background-color: #007aff;
  1190. color: #fff;
  1191. border-radius: 6rpx;
  1192. font-size: 26rpx;
  1193. z-index: 1;
  1194. max-width: 100rpx;
  1195. overflow: hidden;
  1196. text-overflow: ellipsis;
  1197. white-space: nowrap;
  1198. }
  1199. }
  1200. }
  1201. .flow-item {
  1202. padding: 20rpx 0;
  1203. border-bottom: 1rpx solid #f0f0f0;
  1204. &:last-child {
  1205. border-bottom: none;
  1206. }
  1207. .flow-header {
  1208. flex-direction: row;
  1209. justify-content: space-between;
  1210. margin-bottom: 10rpx;
  1211. .flow-operator {
  1212. font-size: 28rpx;
  1213. color: #333333;
  1214. font-weight: bold;
  1215. }
  1216. .flow-time {
  1217. font-size: 24rpx;
  1218. color: #999999;
  1219. }
  1220. }
  1221. .flow-content {
  1222. flex-direction: column;
  1223. .flow-action {
  1224. font-size: 26rpx;
  1225. color: #666666;
  1226. margin-bottom: 8rpx;
  1227. }
  1228. .flow-remark {
  1229. font-size: 24rpx;
  1230. color: #999999;
  1231. background-color: #f5f5f5;
  1232. padding: 10rpx;
  1233. border-radius: 8rpx;
  1234. }
  1235. }
  1236. }
  1237. .no-data {
  1238. text-align: center;
  1239. padding: 40rpx 0;
  1240. font-size: 28rpx;
  1241. color: #999999;
  1242. }
  1243. }
  1244. }
  1245. .accept-button-container {
  1246. padding: 30rpx 30rpx 50rpx;
  1247. background-color: #ffffff;
  1248. .accept-button {
  1249. width: 100%;
  1250. height: 80rpx;
  1251. background-color: #007aff;
  1252. color: #ffffff;
  1253. font-size: 32rpx;
  1254. border-radius: 16rpx;
  1255. border: none;
  1256. &:active {
  1257. background-color: #0062cc;
  1258. }
  1259. }
  1260. }
  1261. .loading-mask {
  1262. position: absolute;
  1263. top: 0;
  1264. left: 0;
  1265. right: 0;
  1266. bottom: 0;
  1267. justify-content: center;
  1268. align-items: center;
  1269. background-color: rgba(0, 0, 0, 0.3);
  1270. .loading-text {
  1271. padding: 30rpx 60rpx;
  1272. background-color: rgba(0, 0, 0, 0.7);
  1273. color: #ffffff;
  1274. font-size: 28rpx;
  1275. border-radius: 12rpx;
  1276. }
  1277. }
  1278. .picker-modal {
  1279. position: fixed;
  1280. top: 0;
  1281. left: 0;
  1282. right: 0;
  1283. bottom: 0;
  1284. z-index: 1000;
  1285. }
  1286. .modal-mask {
  1287. position: absolute;
  1288. top: 0;
  1289. left: 0;
  1290. right: 0;
  1291. bottom: 0;
  1292. background-color: rgba(0, 0, 0, 0.5);
  1293. }
  1294. .modal-content {
  1295. position: absolute;
  1296. bottom: 0;
  1297. left: 0;
  1298. right: 0;
  1299. background-color: #ffffff;
  1300. border-top-left-radius: 16rpx;
  1301. border-top-right-radius: 16rpx;
  1302. min-height: 700rpx;
  1303. }
  1304. .modal-header {
  1305. flex-direction: row;
  1306. justify-content: space-between;
  1307. align-items: center;
  1308. padding: 30rpx;
  1309. border-bottom: 1rpx solid #f0f0f0;
  1310. }
  1311. .modal-title {
  1312. font-size: 32rpx;
  1313. font-weight: bold;
  1314. color: #333333;
  1315. }
  1316. .modal-close {
  1317. font-size: 28rpx;
  1318. color: #007aff;
  1319. }
  1320. .modal-body {
  1321. max-height: 800rpx;
  1322. min-height: 800rpx;
  1323. }
  1324. .picker-option {
  1325. flex-direction: row;
  1326. justify-content: space-between;
  1327. align-items: center;
  1328. padding: 24rpx 30rpx;
  1329. border-bottom: 1rpx solid #f0f0f0;
  1330. }
  1331. .picker-option.selected {
  1332. background-color: #f8f9fa;
  1333. }
  1334. .picker-option:last-child {
  1335. border-bottom: none;
  1336. }
  1337. .option-text {
  1338. font-size: 28rpx;
  1339. color: #333333;
  1340. margin-bottom: 10rpx;
  1341. }
  1342. .option-text:last-child {
  1343. margin-bottom: 0;
  1344. }
  1345. .option-check {
  1346. font-size: 28rpx;
  1347. color: #007aff;
  1348. }
  1349. .empty-tip {
  1350. justify-content: space-between;
  1351. padding: 24rpx 30rpx;
  1352. display: flex;
  1353. align-items: center;
  1354. justify-content: center;
  1355. color: #999;
  1356. }
  1357. .picker-option {
  1358. flex-direction: row;
  1359. justify-content: space-between;
  1360. align-items: center;
  1361. padding: 24rpx 30rpx;
  1362. border-bottom: 1rpx solid #f0f0f0;
  1363. }
  1364. .picker-option:last-child {
  1365. border-bottom: none;
  1366. }
  1367. .picker-option.selected {
  1368. background-color: #f8f9fa;
  1369. }
  1370. .option-text {
  1371. font-size: 28rpx;
  1372. color: #333333;
  1373. }
  1374. .mis-list {
  1375. flex: 1;
  1376. height: 100%;
  1377. display: flex;
  1378. flex-direction: column;
  1379. }
  1380. .empty-tip {
  1381. text-align: center;
  1382. padding: 40rpx;
  1383. color: #999;
  1384. font-size: 28rpx;
  1385. }
  1386. .form-item {
  1387. flex-direction: row;
  1388. padding: 20rpx 0;
  1389. border-bottom: 1rpx solid #f0f0f0;
  1390. }
  1391. .reject-reason-textarea {
  1392. width: 100%;
  1393. min-height: 100rpx;
  1394. line-height: 1.5;
  1395. }
  1396. .input-field {
  1397. width: 100%;
  1398. height: 60rpx;
  1399. padding: 0 20rpx;
  1400. border: 1rpx solid #e0e0e0;
  1401. border-radius: 8rpx;
  1402. font-size: 28rpx;
  1403. background-color: #f8f9fa;
  1404. }
  1405. .select-mis-btn {
  1406. width: 150rpx;
  1407. height: 60rpx;
  1408. margin-left: 10rpx;
  1409. background-color: #007aff;
  1410. color: #fff;
  1411. border: none;
  1412. border-radius: 8rpx;
  1413. font-size: 24rpx;
  1414. }
  1415. .textarea-field {
  1416. width: 100%;
  1417. min-height: 120rpx;
  1418. padding: 20rpx;
  1419. border: 1rpx solid #e0e0e0;
  1420. border-radius: 8rpx;
  1421. font-size: 28rpx;
  1422. background-color: #f8f9fa;
  1423. }
  1424. .radio-label {
  1425. display: flex;
  1426. align-items: center;
  1427. margin-right: 30rpx;
  1428. }
  1429. .quick-select-dropdown {
  1430. position: absolute;
  1431. top: 100%;
  1432. left: 0;
  1433. right: 0;
  1434. background: #fff;
  1435. border: 1rpx solid #ddd;
  1436. border-top: none;
  1437. z-index: 1000;
  1438. max-height: 300rpx;
  1439. }
  1440. .quick-select-item {
  1441. padding: 20rpx;
  1442. border-bottom: 1rpx solid #eee;
  1443. }
  1444. .mis-no {
  1445. font-size: 28rpx;
  1446. color: #333;
  1447. }
  1448. .search-bar {
  1449. padding: 20rpx 30rpx;
  1450. background-color: #d7eafe;
  1451. }
  1452. .search-box {
  1453. flex-direction: row;
  1454. align-items: center;
  1455. height: 72rpx;
  1456. padding: 0 24rpx;
  1457. background-color: #f5f5f5;
  1458. border-radius: 36rpx;
  1459. .search-icon {
  1460. width: 32rpx;
  1461. height: 32rpx;
  1462. margin-right: 12rpx;
  1463. }
  1464. .search-input {
  1465. flex: 1;
  1466. font-size: 28rpx;
  1467. color: #333333;
  1468. }
  1469. .clear-icon {
  1470. margin-left: 12rpx;
  1471. font-size: 28rpx;
  1472. color: #999999;
  1473. }
  1474. }
  1475. .mis-list {
  1476. flex: 1;
  1477. height: 100%;
  1478. display: flex;
  1479. flex-direction: column;
  1480. }
  1481. .select-users-count {
  1482. margin-left: 10rpx;
  1483. font-size: 24rpx;
  1484. color: #666;
  1485. }
  1486. </style>