wbFinalize.uvue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671
  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. pauseTime: pauseTime.value,
  580. restartTime: restartTime.value,
  581. pcsDeviceName: pcsDeviceName.value,
  582. pcsStationName: pcsStationName.value,
  583. workOrderStatus: '结束'
  584. } as UTSJSONObject;
  585. // 调用获取MIS工单列表的API
  586. const result = await listAutoMisInfo(queryParams);
  587. const resultObj = result as UTSJSONObject;
  588. if (resultObj['code'] == 200) {
  589. // 解析列表数据
  590. const rows = resultObj['rows'] as UTSJSONObject[]
  591. misList.value = rows;
  592. allMisList.value = rows
  593. // 解析总数
  594. misListTotal.value = resultObj['total'] as number;
  595. } else {
  596. const msg = resultObj['msg'] as string | null
  597. uni.showToast({
  598. title: msg ?? '获取MIS工单列表失败',
  599. icon: 'none'
  600. })
  601. }
  602. } catch (error: any) {
  603. console.error('获取MIS工单列表失败:', error);
  604. uni.showToast({
  605. title: error.message ?? '获取MIS工单列表失败',
  606. icon: 'none'
  607. });
  608. }
  609. };
  610. // 打开MIS工单选择弹窗
  611. const openMisListModal = (): void => {
  612. showMisListModal.value = true;
  613. misListPage.value = 1; // 重置为第一页
  614. getMisList(); // 获取列表数据
  615. };
  616. // 选择MIS工单
  617. const selectMisItem = async (item: UTSJSONObject, index: number): Promise<void> => {
  618. selectedMisInfoIndex.value = index
  619. // 回填MIS工单相关信息
  620. misNo.value = item['misNo'] as string | '';
  621. // 查询MIS工单是否已存在
  622. const response = await getOrderList(1, 10, misNo.value, '')
  623. const responseObj = response as UTSJSONObject
  624. const rows = responseObj['rows'] as UTSJSONObject[] | null
  625. if (rows != null && rows.length > 0) {
  626. uni.showToast({ title: 'MIS工单:' + misNo.value + '已存在', icon: 'none' })
  627. misNo.value = ''
  628. return
  629. }
  630. // 查询相关检修人员
  631. await listWorkPerson(misNo.value).then(response => {
  632. const responseObj = response as UTSJSONObject
  633. const rows = responseObj['rows'] as UTSJSONObject[] | null
  634. workOrderPersonList.value = rows ?? []
  635. if (rows != null && rows.length > 0) {
  636. const nickNames = rows
  637. .map((person: UTSJSONObject) => (person['nickName'] as string | null) ?? '')
  638. .join(',');
  639. workGroupMemberName.value = nickNames;
  640. }
  641. })
  642. workPermitNum.value = item['workPermitNum'] as string | '';
  643. realStartTime.value = item['realStartTime'] as string | '';
  644. realEndTime.value = item['realEndTime'] as string | '';
  645. // 关闭弹窗
  646. showMisListModal.value = false;
  647. };
  648. // 搜索
  649. const handleSearch = (): void => {
  650. const keyword = userKeyword.value
  651. userList.value = userAllList.value.filter(leader => {
  652. const nickName = leader['nickName'] as string | null
  653. return nickName != null && nickName.indexOf(keyword) >= 0
  654. })
  655. }
  656. // 关闭MIS工单选择弹窗
  657. const closeMisListModal = (): void => {
  658. showMisListModal.value = false;
  659. };
  660. // 搜索
  661. const searchMisList = (): void => {
  662. const keyword = misListKeyword.value
  663. misList.value = allMisList.value.filter(misInfo => {
  664. const misNo = misInfo['misNo'] as string | null
  665. // return misNo != null && misNo.indexOf(keyword) >= 0
  666. const workPermitNum = misInfo['workPermitNum'] as string | null
  667. // 逻辑或(||)连接两个条件,满足其一即可
  668. const misNoMatch = misNo != null && misNo.indexOf(keyword) >= 0
  669. const workPermitNumMatch = workPermitNum != null && workPermitNum.indexOf(keyword) >= 0
  670. return misNoMatch || workPermitNumMatch
  671. })
  672. }
  673. // 清除MIS工单搜索
  674. const clearMisListSearch = (): void => {
  675. misListKeyword.value = "";
  676. misList.value = allMisList.value
  677. };
  678. // 清除用户搜索
  679. const clearSearch = (): void => {
  680. userKeyword.value = "";
  681. userList.value = userAllList.value
  682. };
  683. function onStartDateConfirm(value: string) {
  684. // 检查结束时间是否小于新的开始时间
  685. if (realEndTime.value != '' && new Date(value) > new Date(realEndTime.value as string)) {
  686. uni.showToast({ title: '开始时间不能大于结束时间', icon: 'none' })
  687. return
  688. }
  689. realStartTime.value = value
  690. showStartTimePicker.value = false
  691. }
  692. function onEndDateConfirm(value: string) {
  693. // 检查新的结束时间是否小于开始时间
  694. if (realStartTime.value != '' && new Date(realStartTime.value as string) > new Date(value)) {
  695. uni.showToast({ title: '结束时间不能小于开始时间', icon: 'none' })
  696. return
  697. }
  698. realEndTime.value = value
  699. showEndTimePicker.value = false
  700. }
  701. // 检查用户是否已被选中
  702. const isSelected = (user: UTSJSONObject): boolean => {
  703. const userId = user['userId'] as string | number | null;
  704. if (userId !== null) {
  705. return selectedUserIds.value.includes(userId.toString());
  706. }
  707. // 如果没有userId,则比较nickName
  708. const nickName = user['nickName'] as string | null;
  709. if (nickName !== null) {
  710. return selectedUsers.value.some(selected =>
  711. (selected['nickName'] as string | null) === nickName
  712. );
  713. }
  714. return false;
  715. };
  716. // 切换用户选择状态
  717. const toggleUserSelection = (user: UTSJSONObject): void => {
  718. const userId = user['userId'] as string | number | null;
  719. const nickName = user['nickName'] as string | null;
  720. if (userId !== null) {
  721. const userIdStr = userId.toString();
  722. const index = selectedUserIds.value.indexOf(userIdStr);
  723. if (index > -1) {
  724. // 取消选择
  725. selectedUserIds.value.splice(index, 1);
  726. selectedUsers.value = selectedUsers.value.filter(selected =>
  727. (selected['userId'] as string | number | null)?.toString() !== userIdStr
  728. );
  729. } else {
  730. // 添加选择
  731. selectedUserIds.value.push(userIdStr);
  732. selectedUsers.value.push(user);
  733. }
  734. } else if (nickName !== null) {
  735. // 如果没有userId,通过nickName来识别
  736. const index = selectedUsers.value.findIndex(selected =>
  737. (selected['nickName'] as string | null) === nickName
  738. );
  739. if (index > -1) {
  740. // 取消选择
  741. selectedUsers.value.splice(index, 1);
  742. // 同时移除对应的userId(如果有的话)
  743. const userToRemoveId = user['userId'] as string | number | null;
  744. if (userToRemoveId !== null) {
  745. const idIndex = selectedUserIds.value.indexOf(userToRemoveId.toString());
  746. if (idIndex > -1) {
  747. selectedUserIds.value.splice(idIndex, 1);
  748. }
  749. }
  750. } else {
  751. // 添加选择
  752. selectedUsers.value.push(user);
  753. const userToAddId = user['userId'] as string | number | null;
  754. if (userToAddId !== null) {
  755. selectedUserIds.value.push(userToAddId.toString());
  756. }
  757. }
  758. }
  759. };
  760. // 确认选择的用户
  761. const confirmSelectedUsers = (): void => {
  762. // 将选中的用户姓名拼接成字符串
  763. const nickNames = selectedUsers.value
  764. .map(user => (user['nickName'] as string | null) ?? '')
  765. .filter(name => name !== '')
  766. .join(',');
  767. workGroupMemberName.value = nickNames;
  768. // 更新workOrderPersonList为选中的用户
  769. workOrderPersonList.value = [...selectedUsers.value];
  770. showUserSelect.value = false;
  771. };
  772. // 清空已选择的用户
  773. const clearSelectedUsers = (): void => {
  774. // 清空选中的用户数组
  775. selectedUsers.value = [];
  776. selectedUserIds.value = [];
  777. // 清空显示的用户名
  778. workGroupMemberName.value = '';
  779. // 清空检修人员列表
  780. workOrderPersonList.value = [];
  781. };
  782. // 表单验证
  783. const validateForm = (): boolean => {
  784. if (infoEntry.value == '') {
  785. uni.showToast({
  786. title: '请选择信息录入方式',
  787. icon: 'none'
  788. });
  789. return false;
  790. }
  791. if (infoEntry.value == '1' && (misNo.value == '')) {
  792. uni.showToast({
  793. title: '请输入MIS工单编码',
  794. icon: 'none'
  795. });
  796. return false;
  797. }
  798. if (workPermitNum.value == '') {
  799. uni.showToast({
  800. title: '请输入工作票编号',
  801. icon: 'none'
  802. });
  803. return false;
  804. }
  805. if (realStartTime.value == '') {
  806. uni.showToast({
  807. title: '请选择开始时间',
  808. icon: 'none'
  809. });
  810. return false;
  811. }
  812. if (realEndTime.value == '') {
  813. uni.showToast({
  814. title: '请选择结束时间',
  815. icon: 'none'
  816. });
  817. return false;
  818. }
  819. if (new Date(realEndTime.value) <= new Date(realStartTime.value)) {
  820. uni.showToast({
  821. title: '结束时间必须大于开始时间',
  822. icon: 'none'
  823. });
  824. return false;
  825. }
  826. // if (infoEntry.value == '2' && (workGroupMemberName.value == '' || selectedUsers.value.length == 0)) {
  827. // uni.showToast({
  828. // title: '请选择检修人员',
  829. // icon: 'none'
  830. // });
  831. // return false;
  832. // }
  833. return true;
  834. };
  835. const isDealing = ref(false)
  836. const hasDealed = ref(false)
  837. // 提交表单
  838. const handleSubmit = async (): Promise<void> => {
  839. if (!validateForm()) {
  840. return;
  841. }
  842. submitLoading.value = true;
  843. try {
  844. if (isDealing.value || hasDealed.value) return // 双重保险
  845. isDealing.value = true
  846. // 确保附件URLs是最新的逗号分隔格式
  847. attachmentUrls.value = uploadedFiles.value.map(file => file.fileName).join(',');
  848. const finishData = {
  849. id: orderId.value,
  850. orderType: orderType.value,
  851. workOrderProjectNo: workOrderProjectNo.value,
  852. infoEntry: infoEntry.value,
  853. misNo: infoEntry.value == '1' ? misNo.value : null,
  854. workPermitNum: workPermitNum.value,
  855. realStartTime: realStartTime.value,
  856. realEndTime: realEndTime.value,
  857. wwryNum: wwryNum.value,
  858. wlryNum: wlryNum.value,
  859. workGroupMemberName: workGroupMemberName.value,
  860. content: content.value,
  861. attachmentUrls: attachmentUrls.value,
  862. workOrderPersonList: workOrderPersonList.value,
  863. teamLeaderId: teamLeaderId.value,
  864. teamLeaderName: teamLeaderName.value,
  865. finalizeMethod: '2',
  866. workOrderStatus: 'completed'
  867. } as UTSJSONObject;
  868. const result = await finishOrder(finishData);
  869. const resultObj = result as UTSJSONObject;
  870. const code = resultObj['code'] as number;
  871. if (code == 200) {
  872. uni.showToast({
  873. title: '结单成功',
  874. icon: 'success'
  875. });
  876. hasDealed.value = true
  877. // 使用事件总线通知列表页面刷新
  878. uni.$emit('refreshOrderList', {});
  879. uni.$emit('refreshAssignedCount');
  880. uni.$emit('refreshOverdueCount');
  881. setTimeout(() => {
  882. uni.navigateBack();
  883. }, 800);
  884. } else {
  885. const msg = resultObj['msg'] as string;
  886. uni.showToast({
  887. title: msg.length > 0 ? msg : '结单失败',
  888. icon: 'none'
  889. });
  890. }
  891. } catch (error: any) {
  892. console.error('结单失败:', error);
  893. uni.showToast({
  894. title: '结单失败',
  895. icon: 'none'
  896. });
  897. } finally {
  898. submitLoading.value = false;
  899. isDealing.value = false // 无论成功失败都解锁
  900. }
  901. };
  902. const loading = ref<boolean>(false)
  903. // 加载详情数据
  904. const loadDetail = async (id: string, orderType?: string): Promise<void> => {
  905. try {
  906. loading.value = true
  907. let result: any;
  908. // 根据orderType决定调用哪个API
  909. if (orderType == '1') {
  910. // 维修工单
  911. result = await getRepairOrderInfoById(id)
  912. } else {
  913. // 维保工单
  914. result = await getOrderInfoById(id)
  915. }
  916. // 提取响应数据
  917. const resultObj = result as UTSJSONObject
  918. const code = resultObj['code'] as number
  919. const data = resultObj['data'] as UTSJSONObject | null
  920. if (code == 200 && data != null) {
  921. workOrderStatus.value = (data['workOrderStatus'] as string | null) ?? ''
  922. workOrderProjectNo.value = (data['workOrderProjectNo'] as string | null) ?? ''
  923. pcsDeviceName.value = (data['pcsDeviceName'] as string | null) ?? ''
  924. gxtCenter.value = (data['gxtCenter'] as string | null) ?? ''
  925. pcsStationName.value = (data['pcsStationName'] as string | null) ?? ''
  926. brand.value = (data['brand'] as string | null) ?? ''
  927. model.value = (data['model'] as string | null) ?? ''
  928. acceptTime.value = (data['acceptTime'] as string | null) ?? ''
  929. acceptUserName.value = (data['acceptUserName'] as string | null) ?? ''
  930. // 初始化结单表单默认值
  931. infoEntry.value = '1' // 默认为手工录入
  932. teamLeaderId.value = (data['teamLeaderId'] as Number | null) ?? null
  933. teamLeaderName.value = (data['teamLeaderName'] as string | null) ?? ''
  934. returnType.value = workOrderStatus.value == 'to_finish' ? '1' : ''
  935. content.value = (data['content'] as string | null) ?? ''
  936. // 初始化附件数据
  937. const attachmentUrlsFromServer = (data['attachmentUrls'] as string | null) ?? ''
  938. if (attachmentUrlsFromServer.length > 0) {
  939. attachmentUrls.value = attachmentUrlsFromServer
  940. // 将逗号分隔的URL字符串转换为UploadResponse对象数组
  941. const urls = attachmentUrlsFromServer.split(',')
  942. const fileArr : UploadResponse[] = []
  943. for (let i = 0; i < urls.length; i++) {
  944. const url = urls[i]
  945. const item : UploadResponse = {
  946. url: url,
  947. fileId: '',
  948. fileName: url.substring(url.lastIndexOf('/') + 1),
  949. filePath: url,
  950. fileSize: 0,
  951. fileExt: url.substring(url.lastIndexOf('.') + 1),
  952. businessType: 'workOrder'
  953. }
  954. fileArr.push(item)
  955. }
  956. uploadedFiles.value = fileArr
  957. }
  958. pauseTime.value = (data['pauseTime'] as string | null) ?? ''
  959. restartTime.value = (data['restartTime'] as string | null) ?? ''
  960. if(pauseTime.value != '' && restartTime.value != '') {
  961. const queryParams = {
  962. pauseTime: pauseTime.value,
  963. restartTime: restartTime.value,
  964. pcsDeviceName: pcsDeviceName.value,
  965. pcsStationName: pcsStationName.value,
  966. workOrderStatus: '结束'
  967. } as UTSJSONObject;
  968. const result = await listAutoMisInfo(queryParams)
  969. // 提取响应数据
  970. const resultObj = result as UTSJSONObject
  971. const code = resultObj['code'] as number
  972. const misInfo = resultObj['rows'] as UTSJSONObject[] | null
  973. if (code == 200 && misInfo != null) {
  974. if(misInfo.length > 0 && misInfo.length == 1) {
  975. // 有工作票号提示
  976. const workPermitNum2 = misInfo[0]['workPermitNum'] as string | null
  977. const misNo2 = misInfo[0]['misNo'] as string | null
  978. if (workPermitNum2 != null && workPermitNum2.length > 0) {
  979. const response = await getOrderList(1, 10, misNo2 ?? '', '')
  980. const responseObj = response as UTSJSONObject
  981. const rows = responseObj['rows'] as UTSJSONObject[] | null
  982. if (rows != null && rows.length > 0) {
  983. misNo.value = ''
  984. infoEntry.value = '2'
  985. uni.showToast({
  986. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  987. icon: 'none'
  988. });
  989. return
  990. } else {
  991. misNo.value = (misInfo[0]['misNo'] as string | null) ?? ''
  992. realStartTime.value = (misInfo[0]['realStartTime'] as string | null) ?? ''
  993. realEndTime.value = (misInfo[0]['realEndTime'] as string | null) ?? ''
  994. workPermitNum.value = (misInfo[0]['workPermitNum'] as string | null) ?? ''
  995. // 查询相关检修人员
  996. await listWorkPerson(misNo.value).then(response => {
  997. const responseObj = response as UTSJSONObject
  998. const rows = responseObj['rows'] as UTSJSONObject[] | null
  999. workOrderPersonList.value = rows ?? []
  1000. if (rows != null && rows.length > 0) {
  1001. // 查询负责人信息并回填
  1002. for (const person of workOrderPersonList.value) {
  1003. // 严格判断isLeader为1(兼容数字/字符串类型)
  1004. if (person.isLeader == 1) {
  1005. teamLeaderName.value = (person.nickName as string | null) ?? '';
  1006. break; // 找到后立即停止循环
  1007. }
  1008. }
  1009. const nickNames = rows
  1010. .map((person: UTSJSONObject) => (person['nickName'] as string | null) ?? '')
  1011. .join(',');
  1012. workGroupMemberName.value = nickNames;
  1013. }
  1014. })
  1015. }
  1016. } else {
  1017. misNo.value = ''
  1018. infoEntry.value = '2'
  1019. uni.showToast({
  1020. title: '已匹配到MIS工单,但未关联工作票号,系统无法自动结单,请进入工作票录入方式。',
  1021. icon: 'none'
  1022. });
  1023. return
  1024. }
  1025. } else if(misInfo.length == 0) {
  1026. misNo.value = ''
  1027. infoEntry.value = '2'
  1028. uni.showToast({
  1029. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  1030. icon: 'none'
  1031. });
  1032. return
  1033. } else if(misInfo.length > 1) {
  1034. infoEntryDisabled.value = false
  1035. }
  1036. }
  1037. } else {
  1038. infoEntryDisabled.value = true
  1039. misNo.value = ''
  1040. infoEntry.value = '2'
  1041. uni.showToast({
  1042. title: '未找到匹配的MIS工单,请确认风机停复机时间是否已录入工效通系统或请进入工作票录入方式',
  1043. icon: 'none'
  1044. });
  1045. }
  1046. // await dictList()
  1047. if (returnTypeOptions.value.length > 0 && workOrderStatus.value == 'to_finish') {
  1048. // returnTypeLabel.value = returnTypeOptions.value[0].label
  1049. // 循环匹配
  1050. for (const option of returnTypeOptions.value) {
  1051. // 严格匹配value
  1052. if (returnType.value == option.value) {
  1053. returnTypeLabel.value = option.label;
  1054. break; // 匹配成功后跳出循环,提升性能
  1055. }
  1056. }
  1057. }
  1058. } else {
  1059. const msg = resultObj['msg'] as string | null
  1060. uni.showToast({
  1061. title: msg ?? '加载失败',
  1062. icon: 'none'
  1063. })
  1064. }
  1065. } catch (e: any) {
  1066. uni.showToast({
  1067. title: e.message ?? '加载失败',
  1068. icon: 'none'
  1069. })
  1070. } finally {
  1071. loading.value = false
  1072. }
  1073. }
  1074. // 页面加载
  1075. onLoad((options: any) => {
  1076. const params = options as UTSJSONObject
  1077. const id = params['id'] as string | null
  1078. const orderTypeParam = params['orderType'] as string | null
  1079. if (id != null && orderTypeParam != null) {
  1080. // 先尝试从参数中获取orderType
  1081. // const orderTypeNumber = parseInt(orderTypeParam)
  1082. orderType.value = orderTypeParam
  1083. orderId.value = id
  1084. loadDetail(id, orderTypeParam)
  1085. }
  1086. })
  1087. // 初始化
  1088. onMounted(() => {
  1089. getUserAllList();
  1090. loadInfoEntryDictList();
  1091. })
  1092. </script>
  1093. <style lang="scss">
  1094. .detail-page {
  1095. flex: 1;
  1096. background-color: #e8f0f9;
  1097. }
  1098. .detail-content {
  1099. flex: 1;
  1100. padding: 20rpx 0;
  1101. }
  1102. .info-section {
  1103. margin: 0 30rpx 24rpx;
  1104. .section-title {
  1105. position: relative;
  1106. padding-left: 20rpx;
  1107. margin-bottom: 20rpx;
  1108. &::before {
  1109. // content: '';
  1110. position: absolute;
  1111. left: 0;
  1112. top: 50%;
  1113. transform: translateY(-50%);
  1114. width: 8rpx;
  1115. height: 32rpx;
  1116. background-color: #007aff;
  1117. border-radius: 4rpx;
  1118. }
  1119. &-text {
  1120. font-size: 32rpx;
  1121. font-weight: bold;
  1122. color: #333333;
  1123. }
  1124. }
  1125. .info-card {
  1126. background-color: #ffffff;
  1127. border-radius: 16rpx;
  1128. padding: 30rpx;
  1129. .info-item {
  1130. flex-direction: row;
  1131. padding: 20rpx 0;
  1132. border-bottom: 1rpx solid #f0f0f0;
  1133. &:last-child {
  1134. border-bottom: none;
  1135. }
  1136. &.full-width {
  1137. flex-direction: column;
  1138. .info-label {
  1139. margin-bottom: 12rpx;
  1140. }
  1141. .info-value {
  1142. line-height: 44rpx;
  1143. }
  1144. }
  1145. .info-label {
  1146. width: 240rpx;
  1147. font-size: 28rpx;
  1148. color: #666666;
  1149. white-space: nowrap;
  1150. }
  1151. .info-value {
  1152. flex: 1;
  1153. font-size: 28rpx;
  1154. color: #333333;
  1155. text-align: right;
  1156. &.highlight {
  1157. color: #007aff;
  1158. font-weight: bold;
  1159. }
  1160. &.input {
  1161. text-align: left;
  1162. border: 1rpx solid #e0e0e0;
  1163. border-radius: 8rpx;
  1164. padding: 10rpx;
  1165. }
  1166. .input-with-clear {
  1167. position: relative;
  1168. display: flex;
  1169. align-items: center;
  1170. }
  1171. .select-clear {
  1172. position: absolute;
  1173. right: 20rpx;
  1174. color: #ccc;
  1175. text-align: center;
  1176. font-size: 40rpx;
  1177. font-weight: bold;
  1178. z-index: 1;
  1179. }
  1180. .input-with-select {
  1181. position: relative;
  1182. display: flex;
  1183. align-items: center;
  1184. }
  1185. .select-mis-btn {
  1186. line-height: 50rpx;
  1187. text-align: center;
  1188. position: absolute;
  1189. right: 0rpx;
  1190. padding: 6rpx 12rpx;
  1191. background-color: #007aff;
  1192. color: #fff;
  1193. border-radius: 6rpx;
  1194. font-size: 26rpx;
  1195. z-index: 1;
  1196. max-width: 100rpx;
  1197. overflow: hidden;
  1198. text-overflow: ellipsis;
  1199. white-space: nowrap;
  1200. }
  1201. }
  1202. }
  1203. .flow-item {
  1204. padding: 20rpx 0;
  1205. border-bottom: 1rpx solid #f0f0f0;
  1206. &:last-child {
  1207. border-bottom: none;
  1208. }
  1209. .flow-header {
  1210. flex-direction: row;
  1211. justify-content: space-between;
  1212. margin-bottom: 10rpx;
  1213. .flow-operator {
  1214. font-size: 28rpx;
  1215. color: #333333;
  1216. font-weight: bold;
  1217. }
  1218. .flow-time {
  1219. font-size: 24rpx;
  1220. color: #999999;
  1221. }
  1222. }
  1223. .flow-content {
  1224. flex-direction: column;
  1225. .flow-action {
  1226. font-size: 26rpx;
  1227. color: #666666;
  1228. margin-bottom: 8rpx;
  1229. }
  1230. .flow-remark {
  1231. font-size: 24rpx;
  1232. color: #999999;
  1233. background-color: #f5f5f5;
  1234. padding: 10rpx;
  1235. border-radius: 8rpx;
  1236. }
  1237. }
  1238. }
  1239. .no-data {
  1240. text-align: center;
  1241. padding: 40rpx 0;
  1242. font-size: 28rpx;
  1243. color: #999999;
  1244. }
  1245. }
  1246. }
  1247. .accept-button-container {
  1248. padding: 30rpx 30rpx 50rpx;
  1249. background-color: #ffffff;
  1250. .accept-button {
  1251. width: 100%;
  1252. height: 80rpx;
  1253. background-color: #007aff;
  1254. color: #ffffff;
  1255. font-size: 32rpx;
  1256. border-radius: 16rpx;
  1257. border: none;
  1258. &:active {
  1259. background-color: #0062cc;
  1260. }
  1261. }
  1262. }
  1263. .loading-mask {
  1264. position: absolute;
  1265. top: 0;
  1266. left: 0;
  1267. right: 0;
  1268. bottom: 0;
  1269. justify-content: center;
  1270. align-items: center;
  1271. background-color: rgba(0, 0, 0, 0.3);
  1272. .loading-text {
  1273. padding: 30rpx 60rpx;
  1274. background-color: rgba(0, 0, 0, 0.7);
  1275. color: #ffffff;
  1276. font-size: 28rpx;
  1277. border-radius: 12rpx;
  1278. }
  1279. }
  1280. .picker-modal {
  1281. position: fixed;
  1282. top: 0;
  1283. left: 0;
  1284. right: 0;
  1285. bottom: 0;
  1286. z-index: 1000;
  1287. }
  1288. .modal-mask {
  1289. position: absolute;
  1290. top: 0;
  1291. left: 0;
  1292. right: 0;
  1293. bottom: 0;
  1294. background-color: rgba(0, 0, 0, 0.5);
  1295. }
  1296. .modal-content {
  1297. position: absolute;
  1298. bottom: 0;
  1299. left: 0;
  1300. right: 0;
  1301. background-color: #ffffff;
  1302. border-top-left-radius: 16rpx;
  1303. border-top-right-radius: 16rpx;
  1304. min-height: 700rpx;
  1305. }
  1306. .modal-header {
  1307. flex-direction: row;
  1308. justify-content: space-between;
  1309. align-items: center;
  1310. padding: 30rpx;
  1311. border-bottom: 1rpx solid #f0f0f0;
  1312. }
  1313. .modal-title {
  1314. font-size: 32rpx;
  1315. font-weight: bold;
  1316. color: #333333;
  1317. }
  1318. .modal-close {
  1319. font-size: 28rpx;
  1320. color: #007aff;
  1321. }
  1322. .modal-body {
  1323. max-height: 800rpx;
  1324. min-height: 800rpx;
  1325. }
  1326. .picker-option {
  1327. flex-direction: row;
  1328. justify-content: space-between;
  1329. align-items: center;
  1330. padding: 24rpx 30rpx;
  1331. border-bottom: 1rpx solid #f0f0f0;
  1332. }
  1333. .picker-option.selected {
  1334. background-color: #f8f9fa;
  1335. }
  1336. .picker-option:last-child {
  1337. border-bottom: none;
  1338. }
  1339. .option-text {
  1340. font-size: 28rpx;
  1341. color: #333333;
  1342. margin-bottom: 10rpx;
  1343. }
  1344. .option-text:last-child {
  1345. margin-bottom: 0;
  1346. }
  1347. .option-check {
  1348. font-size: 28rpx;
  1349. color: #007aff;
  1350. }
  1351. .empty-tip {
  1352. justify-content: space-between;
  1353. padding: 24rpx 30rpx;
  1354. display: flex;
  1355. align-items: center;
  1356. justify-content: center;
  1357. color: #999;
  1358. }
  1359. .picker-option {
  1360. flex-direction: row;
  1361. justify-content: space-between;
  1362. align-items: center;
  1363. padding: 24rpx 30rpx;
  1364. border-bottom: 1rpx solid #f0f0f0;
  1365. }
  1366. .picker-option:last-child {
  1367. border-bottom: none;
  1368. }
  1369. .picker-option.selected {
  1370. background-color: #f8f9fa;
  1371. }
  1372. .option-text {
  1373. font-size: 28rpx;
  1374. color: #333333;
  1375. }
  1376. .mis-list {
  1377. flex: 1;
  1378. height: 100%;
  1379. display: flex;
  1380. flex-direction: column;
  1381. }
  1382. .empty-tip {
  1383. text-align: center;
  1384. padding: 40rpx;
  1385. color: #999;
  1386. font-size: 28rpx;
  1387. }
  1388. .form-item {
  1389. flex-direction: row;
  1390. padding: 20rpx 0;
  1391. border-bottom: 1rpx solid #f0f0f0;
  1392. }
  1393. .reject-reason-textarea {
  1394. width: 100%;
  1395. min-height: 100rpx;
  1396. line-height: 1.5;
  1397. }
  1398. .input-field {
  1399. width: 100%;
  1400. height: 60rpx;
  1401. padding: 0 20rpx;
  1402. border: 1rpx solid #e0e0e0;
  1403. border-radius: 8rpx;
  1404. font-size: 28rpx;
  1405. background-color: #f8f9fa;
  1406. }
  1407. .select-mis-btn {
  1408. width: 150rpx;
  1409. height: 60rpx;
  1410. margin-left: 10rpx;
  1411. background-color: #007aff;
  1412. color: #fff;
  1413. border: none;
  1414. border-radius: 8rpx;
  1415. font-size: 24rpx;
  1416. }
  1417. .textarea-field {
  1418. width: 100%;
  1419. min-height: 120rpx;
  1420. padding: 20rpx;
  1421. border: 1rpx solid #e0e0e0;
  1422. border-radius: 8rpx;
  1423. font-size: 28rpx;
  1424. background-color: #f8f9fa;
  1425. }
  1426. .radio-label {
  1427. display: flex;
  1428. align-items: center;
  1429. margin-right: 30rpx;
  1430. }
  1431. .quick-select-dropdown {
  1432. position: absolute;
  1433. top: 100%;
  1434. left: 0;
  1435. right: 0;
  1436. background: #fff;
  1437. border: 1rpx solid #ddd;
  1438. border-top: none;
  1439. z-index: 1000;
  1440. max-height: 300rpx;
  1441. }
  1442. .quick-select-item {
  1443. padding: 20rpx;
  1444. border-bottom: 1rpx solid #eee;
  1445. }
  1446. .mis-no {
  1447. font-size: 28rpx;
  1448. color: #333;
  1449. }
  1450. .search-bar {
  1451. padding: 20rpx 30rpx;
  1452. background-color: #d7eafe;
  1453. }
  1454. .search-box {
  1455. flex-direction: row;
  1456. align-items: center;
  1457. height: 72rpx;
  1458. padding: 0 24rpx;
  1459. background-color: #f5f5f5;
  1460. border-radius: 36rpx;
  1461. .search-icon {
  1462. width: 32rpx;
  1463. height: 32rpx;
  1464. margin-right: 12rpx;
  1465. }
  1466. .search-input {
  1467. flex: 1;
  1468. font-size: 28rpx;
  1469. color: #333333;
  1470. }
  1471. .clear-icon {
  1472. margin-left: 12rpx;
  1473. font-size: 28rpx;
  1474. color: #999999;
  1475. }
  1476. }
  1477. .mis-list {
  1478. flex: 1;
  1479. height: 100%;
  1480. display: flex;
  1481. flex-direction: column;
  1482. }
  1483. .select-users-count {
  1484. margin-left: 10rpx;
  1485. font-size: 24rpx;
  1486. color: #666;
  1487. }
  1488. </style>