detail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815
  1. <template>
  2. <view class="maintenance-container">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="保养工单详情" @clickLeft="back" @clickRight="HandlScanCode"></uni-nav-bar>
  4. <view class="maintenance-wrapper">
  5. <view class="maintenance-content">
  6. <KdTabs v-model="active" @change="handleTabChange" :list="['基本信息', '保养设备', '备品备件']" />
  7. <view class="kd-baseInfo" v-show="active === 0">
  8. <view class="kd-cell">
  9. <text class="kd-label">工单编号</text>
  10. <text class="kd-content">{{ worksheetInfo.code }}</text>
  11. </view>
  12. <view class="kd-cell">
  13. <text class="kd-label">计划名称</text>
  14. <text class="kd-content">{{ worksheetInfo.planName }}</text>
  15. </view>
  16. <view class="kd-cell">
  17. <text class="kd-label">设备分类</text>
  18. <text class="kd-content">{{ worksheetInfo.categoryName }}</text>
  19. </view>
  20. <view class="kd-cell">
  21. <text class="kd-label">保养设备总数</text>
  22. <text class="kd-content text-warning">{{ worksheetInfo.finishNum }}/{{ worksheetInfo.total }}</text>
  23. </view>
  24. <view class="kd-cell">
  25. <text class="kd-label">计划完成时长</text>
  26. <text class="kd-content">{{ worksheetInfo.duration }}分钟</text>
  27. </view>
  28. <view class="kd-cell">
  29. <text class="kd-label">实际完成时长</text>
  30. <text class="kd-content">{{ finishTime(worksheetInfo.acceptTime, worksheetInfo.finishTime) }}</text>
  31. </view>
  32. <view class="kd-cell">
  33. <text class="kd-label">实际开始时间</text>
  34. <text class="kd-content">{{ worksheetInfo.acceptTime }}</text>
  35. </view>
  36. <view class="kd-cell">
  37. <text class="kd-label">实际完成时间</text>
  38. <text class="kd-content">{{ worksheetInfo.finishTime }}</text>
  39. </view>
  40. <!-- <u-button type="primary" size="large" text="开始执行"></u-button> -->
  41. <template>
  42. <template v-if="worksheetInfo.orderStatus === 0">
  43. <button class="btn-execute" type="primary" @click="handleExecute">开始执行</button>
  44. <button class="btn-sparepart" type="warning" @click="handlbpbj">申请备品备件</button>
  45. <button class="btn-reassignment" type="primary" @click="handleAssign">转派</button>
  46. <!-- <div class="apply-box">
  47. <button
  48. class="btn-reassignment"
  49. type="primary"
  50. @click="sparepartApply"
  51. >
  52. 申请备品备件
  53. </button>
  54. </div> -->
  55. </template>
  56. <template v-else-if="worksheetInfo.orderStatus === 2">
  57. <button class="btn-execute" type="primary" @click="handleReport">报工</button>
  58. <button class="btn-sparepart" type="warning" @click="handlbpbj">申请备品备件</button>
  59. </template>
  60. <button v-else-if="worksheetInfo.orderStatus === 3" :disabled="true" class="btn-execute" type="primary">已报工</button>
  61. <!-- <div class="apply-box">
  62. <button
  63. v-if="worksheetInfo.status.code !== 3"
  64. class="btn-reassignment"
  65. type="primary"
  66. @click="sparepartApply"
  67. >
  68. 申请备品备件
  69. </button>
  70. <button
  71. v-if="worksheetInfo.status.code === 0"
  72. class="btn-reassignment"
  73. type="primary"
  74. @click="handleAssign"
  75. >
  76. 转派
  77. </button>
  78. </div> -->
  79. </template>
  80. </view>
  81. <view class="kd-equipment" v-show="active === 1">
  82. <view class="kd-type-box">
  83. <view :class="{ 'type—active': typeActive === index }" v-for="(item, index) in equpStatus" :key="index" @click="typeChange(index)">
  84. {{ item.name }}
  85. <text v-if="item.count > 0" class="count">{{ item.count }}</text>
  86. </view>
  87. </view>
  88. <view class="kd-list-container">
  89. <u-list @scrolltolower="scrolltolower">
  90. <u-list-item v-for="(item, index) in euqiList" :key="index">
  91. <view class="kd-card">
  92. <view class="kd-card-wrapper">
  93. <view class="kd-cell">
  94. <text class="kd-label">设备编码</text>
  95. <text class="kd-content">{{ item.code }}</text>
  96. </view>
  97. <view class="kd-cell">
  98. <text class="kd-label">设备名称</text>
  99. <text class="kd-content">{{ item.name }}</text>
  100. </view>
  101. <view class="kd-cell">
  102. <text class="kd-label">设备型号</text>
  103. <text class="kd-content">{{ item.model }}</text>
  104. </view>
  105. <view class="kd-cell">
  106. <text class="kd-label">设备位置</text>
  107. <text class="kd-content">{{ item.deviceLocationName.pathName }}</text>
  108. </view>
  109. <view class="kd-cell">
  110. <text class="kd-label">执行结果</text>
  111. <text class="kd-content">
  112. <text class="status-box text-warning" v-if="item.executeStatus === 0">待检</text>
  113. <text class="status-box text-primary" v-else-if="item.executeStatus === 1">已检</text>
  114. <text class="status-box text-danger" v-else-if="item.executeStatus === 2">异常</text>
  115. <text class="status-box text-primary" v-else-if="item.executeStatus === 3">已报修</text>
  116. </text>
  117. </view>
  118. </view>
  119. <view class="card-footer">
  120. <button v-if="item.orderStatus == 2 && item.executeStatus == 0" type="primary" class="primary-btn" @click="handleCheck(item)">检查</button>
  121. <!-- <button type="primary" class="primary-btn" @click="handleExecute" v-if="item.orderStatus == 2 && item.executeStatus == 0">开始执行</button> -->
  122. <template v-if="item.orderStatus && item.orderStatus === 3">
  123. <button type="default" v-if="item.resultStatus === 2" @click="handLbx(item)">报修</button>
  124. <button type="default" v-else-if="item.resultStatus === 3" @click="handLbxDetail(item)">报修详情</button>
  125. </template>
  126. <button type="default" v-if="[0, 2, 3].includes(item.orderStatus) && item.executeStatus != 0" @click="checkDetail(item)">保养详情</button>
  127. </view>
  128. </view>
  129. </u-list-item>
  130. </u-list>
  131. </view>
  132. </view>
  133. <view class="spare-parts" v-show="active === 2">
  134. <Step>
  135. <StepItem v-for="(item, index) in repairInfoLogList" :key="index" :active="index == 0" :hideContent="Boolean(item.content)">
  136. <template v-slot:header>
  137. <view class="step-title">
  138. <view class="s1">{{ typeOptions[item.type] }}</view>
  139. <view class="s2">
  140. {{ item.createTime }}
  141. </view>
  142. </view>
  143. </template>
  144. <template v-slot:content v-if="item.content">
  145. <view class="list-xs" v-if="item.type == 'CREATE'">
  146. <view class="list-xs-item">
  147. <view class="label">报修人</view>
  148. <view class="value">
  149. {{ logs[item.id] ? logs[item.id].content.requestUserName : '' }}
  150. </view>
  151. </view>
  152. <view class="list-xs-item">
  153. <view class="label">故障描述</view>
  154. <view class="value">
  155. {{ logs[item.id] ? logs[item.id].content.remark : '' }}
  156. </view>
  157. </view>
  158. </view>
  159. <view class="list-xs" v-else-if="item.type == 'SPARE_PARTS_APPLY'">
  160. <view class="list-xs-item">
  161. <view class="label">申领清单</view>
  162. <view class="value bjsymx" @click="handlbjsymx('备件明细', item.content.infoList)">备件使用明细</view>
  163. </view>
  164. </view>
  165. <view class="list-xs" v-else-if="item.type == 'ACCEPTANCE_CHEK'">
  166. <view class="list-xs-item">
  167. <view class="label">验收人</view>
  168. <view class="value">
  169. {{ logs[item.id] ? logs[item.id].content.userName : '' }}
  170. </view>
  171. </view>
  172. <view class="list-xs-item">
  173. <view class="label">验收结果</view>
  174. <view class="value">
  175. {{ logs[item.id] ? (logs[item.id].content.orderStatus == 4 ? '通过' : '驳回') : '' }}
  176. </view>
  177. </view>
  178. </view>
  179. <view class="list-xs" v-else-if="item.type == 'WORK_REPORT'">
  180. <view class="list-xs-item">
  181. <view class="label">处理说明</view>
  182. <view class="value">
  183. {{ logs[item.id] ? logs[item.id].content.reason : '' }}
  184. </view>
  185. </view>
  186. </view>
  187. </template>
  188. </StepItem>
  189. </Step>
  190. <PopSparePart ref="PopSparePart" :workOrderCode="workOrderCode" :noRequest="true"></PopSparePart>
  191. </view>
  192. </view>
  193. </view>
  194. <uni-popup ref="inputDialog" type="dialog">
  195. <uni-popup-dialog
  196. ref="inputClose"
  197. mode="input"
  198. title="您当前已超出计划完成时间,请填写原因"
  199. placeholder="请输入内容"
  200. :before-close="true"
  201. @close="handleClose"
  202. @confirm="timeoutCauseConfirm"></uni-popup-dialog>
  203. </uni-popup>
  204. <u-modal :show="modalShow" title="提示" @confirm="modalShow = false">
  205. <view>
  206. 您还有
  207. <text class="text-warning">{{ worksheetInfo.awaitInspectSum }}</text>
  208. 台设备待检,不可报工
  209. </view>
  210. </u-modal>
  211. <Assign ref="assignRef" @success="assignSuccess" />
  212. <!-- <ScanCode @scancodedate="scancodedate" :model="'uni'"></ScanCode> -->
  213. </view>
  214. </template>
  215. <script>
  216. import Step from '@/components/Step/Step.vue'
  217. import StepItem from '@/components/Step/StepItem.vue'
  218. import PopSparePart from '../../maintenanceWorkorder/components/PopSparePart.vue'
  219. import { getWorkOrderDetail, getDeviceList, startExecuting, signingWork, devicestatistics } from '@/api/myTicket/index.js'
  220. import { getSpareParts } from '@/api/repair'
  221. import { get, post, postJ } from '@/utils/api.js'
  222. import Assign from '@/components/Assign.vue'
  223. import CellInfo from '@/components/CellInfo.vue'
  224. import KdTabs from '@/components/KdTabs.vue'
  225. import dayjs from 'dayjs'
  226. import ScanCode from '@/components/ScanCode.vue'
  227. export default {
  228. components: {
  229. CellInfo,
  230. KdTabs,
  231. Assign,
  232. ScanCode,
  233. Step,
  234. StepItem,
  235. PopSparePart
  236. },
  237. data() {
  238. return {
  239. typeOptions: {
  240. CREATE: '生成工单',
  241. SPARE_PARTS_APPLY: '备品备件申请',
  242. ACCEPTANCE_CHEK: '验收',
  243. WORK_REPORT: '报工'
  244. },
  245. logs: {},
  246. modalShow: false,
  247. active: 0,
  248. typeActive: 0,
  249. statusList: {
  250. 0: '待接收',
  251. 1: '执行中',
  252. 3: '已完成'
  253. },
  254. pageId: '',
  255. workOrderCode: '',
  256. worksheetInfo: {
  257. equiList: [],
  258. workOrder: {}
  259. },
  260. repairInfoLogList: [],
  261. equpStatus: [
  262. // {
  263. // name: '全部',
  264. // value: []
  265. // },
  266. {
  267. name: '全部',
  268. value: -1
  269. },
  270. {
  271. name: '待检',
  272. value: 0
  273. },
  274. {
  275. name: '已检',
  276. value: 1
  277. },
  278. {
  279. name: '异常',
  280. value: 2
  281. }
  282. ],
  283. euqiList: [],
  284. equipPage: 1,
  285. isEnd: false,
  286. barType: 0,
  287. qrContent: null
  288. }
  289. },
  290. async onLoad(options) {
  291. this.pageId = options.id
  292. this.planId = options.planId
  293. // 设备台账跳转详情
  294. this.getInfo()
  295. },
  296. onShow() {
  297. this.getInfo()
  298. this.getCount()
  299. if (this.chooseTab) {
  300. this.active = 1
  301. this.typeChange(2)
  302. } else {
  303. this.typeChange(0)
  304. }
  305. },
  306. onHide() {
  307. uni.$off('scancodedate')
  308. },
  309. onUnload() {
  310. uni.$off('scancodedate')
  311. },
  312. methods: {
  313. // 备件使用明细
  314. handlbjsymx(title, list) {
  315. this.$refs.PopSparePart.open(title, list)
  316. },
  317. // 跳转备品备件
  318. handlbpbj() {
  319. uni.navigateTo({
  320. url: `/pages/maintenanceWorkorder/sparepart/sparepartList?id=${this.pageId}`
  321. })
  322. },
  323. getCount() {
  324. devicestatistics({ planId: this.planId }).then(data => {
  325. this.equpStatus = this.equpStatus.map(item => {
  326. switch (item.name) {
  327. case '全部':
  328. return { ...item, count: data.total }
  329. case '待检':
  330. return { ...item, count: data.isInspectedNum }
  331. case '已检':
  332. return { ...item, count: data.checkedNum }
  333. case '异常':
  334. return { ...item, count: data.abnormalNum }
  335. }
  336. })
  337. })
  338. },
  339. // 扫码枪扫码
  340. cbScancodedate(data) {
  341. this.Scancodedate(data.code)
  342. },
  343. // 相机扫码
  344. HandlScanCode() {
  345. let _this = this
  346. uni.scanCode({
  347. onlyFromCamera: true,
  348. success: function (res) {
  349. _this.Scancodedate(res.result)
  350. }
  351. })
  352. },
  353. Scancodedate(code) {
  354. let _this = this
  355. if (this.worksheetInfo.status.code === 0) {
  356. uni.showModal({
  357. title: '提示',
  358. content: '工单未开启执行,不可进行保养操作,请先点击“开始执行”!',
  359. confirmText: '开始执行', //这块是确定按钮的文字
  360. cancelText: '取消', //这块是取消的文字
  361. success: function (res) {
  362. if (res.confirm) {
  363. _this.handleExecute() // 执行确认后的操作
  364. } else {
  365. // 执行取消后的操作
  366. }
  367. }
  368. })
  369. return
  370. }
  371. this.qrContent = code.trim()
  372. this.barType = this.setBarType(this.qrContent)
  373. _this.getData()
  374. },
  375. // 设置barType
  376. setBarType(val) {
  377. let index = val.indexOf('@_@')
  378. let result = 0
  379. if (index !== -1) {
  380. let item = val.substr(index + 3, 1)
  381. if (item) {
  382. result = Number(item)
  383. }
  384. }
  385. return result
  386. },
  387. // 根据条码请求设备数据
  388. getData() {
  389. let par = {
  390. barType: this.barType,
  391. qrContent: this.qrContent
  392. }
  393. uni.showLoading({
  394. title: '加载中',
  395. mask: true
  396. })
  397. postJ(this.apiUrl + '/scan/getAssetInfo', par)
  398. .then(res => {
  399. console.log('扫码接口返回', res)
  400. let data = res.data
  401. this.matchEquipment(data)
  402. })
  403. .finally(() => {
  404. uni.hideLoading()
  405. })
  406. },
  407. matchEquipment(data) {
  408. let par = {
  409. assetCode: data.assetCode,
  410. workOrderId: this.worksheetInfo.id
  411. }
  412. console.log('par', par)
  413. post(this.apiUrl + '/workOrder/scanMatching', par).then(res => {
  414. let data = res.data
  415. if (!data) {
  416. uni.showModal({
  417. title: '提示',
  418. content: '本工单中,无此设备!',
  419. confirmText: '好的', //这块是确定按钮的文字
  420. showCancel: false,
  421. success: function (res) {
  422. if (res.confirm) {
  423. // 执行确认后的操作
  424. } else {
  425. // 执行取消后的操作
  426. }
  427. }
  428. })
  429. } else {
  430. // 未报工
  431. if (this.worksheetInfo.status.code === 1) {
  432. this.handleCheck(data)
  433. }
  434. // 已报工
  435. if (this.worksheetInfo.status.code === 3) {
  436. this.checkDetail(data)
  437. }
  438. }
  439. })
  440. },
  441. back() {
  442. uni.navigateBack({
  443. delta: 1
  444. })
  445. },
  446. handleAssign() {
  447. this.$refs.assignRef.open(this.worksheetInfo.id)
  448. },
  449. assignSuccess() {
  450. this.back()
  451. },
  452. finishTime(start, end) {
  453. if (!end) return ''
  454. let dur = new Date(end).getTime() - new Date(start).getTime()
  455. return Math.ceil(dur / 1000 / 60) + '分钟'
  456. },
  457. // 申请备品备件
  458. sparepartApply() {
  459. uni.navigateTo({
  460. url: `/pages/maintenance/sparepart/sparepart?planCode=${this.worksheetInfo.planCode}&sourceId=${this.worksheetInfo.id}&sourceCode=${this.worksheetInfo.workOrderCode}`
  461. })
  462. },
  463. // 申请备品备件详情
  464. sparepartDetail() {
  465. uni.navigateTo({
  466. url: `/pages/maintenance/sparepart/sparepartDetail?applyOrder=${this.worksheetInfo.applyOrder}`
  467. })
  468. },
  469. // 报工
  470. handleReport() {
  471. if (this.worksheetInfo.finishNum !== this.worksheetInfo.total) {
  472. uni.showToast({
  473. title: '请完成巡检设备检查',
  474. icon: 'none'
  475. })
  476. } else {
  477. if (new Date(this.worksheetInfo.acceptTime).getTime() + this.worksheetInfo.duration * 60 * 1000 < new Date().getTime()) {
  478. this.$refs.inputDialog.open()
  479. return
  480. }
  481. this._report()
  482. }
  483. },
  484. handleClose() {
  485. this.$refs.inputDialog.close()
  486. },
  487. timeoutCauseConfirm(value) {
  488. if (!value) {
  489. uni.showToast({
  490. title: '请输入超时原因',
  491. icon: 'none'
  492. })
  493. return
  494. }
  495. this.$refs.inputDialog.close()
  496. this._report(value)
  497. },
  498. _report(timeoutCause = '') {
  499. signingWork({ id: this.pageId, timeoutCause: timeoutCause }).then(() => {
  500. uni.showToast({
  501. icon: 'success',
  502. title: '操作成功!',
  503. duration: 2000
  504. })
  505. this.getInfo()
  506. })
  507. },
  508. // 执行工单
  509. handleExecute() {
  510. startExecuting({ id: this.pageId }).then(() => {
  511. uni.showToast({
  512. icon: 'success',
  513. title: '操作成功!',
  514. duration: 2000
  515. })
  516. this.getInfo()
  517. })
  518. },
  519. //巡点检设备加载更多
  520. scrolltolower() {
  521. if (this.isEnd) return
  522. this.equipPage++
  523. this.getEquipList()
  524. },
  525. // 巡点检设备列表
  526. getEquipList() {
  527. const params = {
  528. planId: this.planId,
  529. status: this.equpStatus[this.typeActive].value,
  530. pageNum: 1,
  531. size: 9999
  532. }
  533. getDeviceList(params).then(data => {
  534. if (this.equipPage === 1) {
  535. this.euqiList = data.list
  536. } else {
  537. this.euqiList.push(...data.list)
  538. }
  539. this.isEnd = this.euqiList.length >= data.count
  540. })
  541. },
  542. handleTabChange(value) {
  543. if (value === 1) {
  544. this.typeChange(0)
  545. }
  546. },
  547. // 设备状态切换
  548. typeChange(type) {
  549. this.typeActive = type
  550. this.equipPage = 1
  551. this.getEquipList()
  552. },
  553. // handleCheck({ id, equiName, equiCode, sparePartsJson }) {
  554. // this.$store.commit('maintenance/SET_SPAREPARTSJSON', sparePartsJson)
  555. // uni.navigateTo({
  556. // url: `/pages/maintenance/check/index?workOrderId=${this.pageId}&id=${id}&equiName=${equiName}&equiCode=${equiCode}&applyOrder=${this.worksheetInfo.applyOrder}&workOrderCode=${this.worksheetInfo.workOrderCode}`
  557. // })
  558. // },
  559. // checkDetail({ id, equiName, equiCode, sparePartsJson }) {
  560. // this.$store.commit('maintenance/SET_SPAREPARTSJSON', sparePartsJson)
  561. // uni.navigateTo({
  562. // url: `/pages/maintenance/check/detail?workOrderId=${this.pageId}&id=${id}&equiName=${equiName}&equiCode=${equiCode}&applyOrder=${this.worksheetInfo.applyOrder}&workOrderCode=${this.worksheetInfo.workOrderCode}`
  563. // })
  564. // },
  565. handleCheck({ id }) {
  566. uni.navigateTo({
  567. url: `/pages/maintenance/check/index?id=${id}`
  568. })
  569. },
  570. checkDetail({ id }) {
  571. uni.navigateTo({
  572. url: `/pages/maintenance/check/detail?id=${id}`
  573. })
  574. },
  575. getInfo() {
  576. getWorkOrderDetail({ workId: this.pageId }).then(data => {
  577. this.worksheetInfo = data
  578. })
  579. getSpareParts({ workOrderId: this.pageId }).then(data => {
  580. let list = JSON.parse(JSON.stringify(data))
  581. this.repairInfoLogList = list.reverse()
  582. this.repairInfoLogList.forEach(item => {
  583. this.logs[item.id] = {
  584. id: item.id,
  585. content: item.content,
  586. createTime: item.createTime,
  587. type: item.type,
  588. remark: item.remark,
  589. requestUserName: item.requestUserName
  590. }
  591. if (item.type === 'SPARE_PARTS_APPLY') {
  592. this.logs[item.id].content.infoList =
  593. this.logs[item.id].content && this.logs[item.id].content.infoList && this.logs[item.id].content.infoList.length > 0
  594. ? this.logs[item.id].content.infoList.map(item => {
  595. return {
  596. ...JSON.parse(item.sparePartsList),
  597. sparePartsId: item.sparePartsId
  598. }
  599. })
  600. : []
  601. }
  602. console.log('this.logs---------------')
  603. console.log(this.logs)
  604. })
  605. })
  606. },
  607. // 报修
  608. handLbx(item) {
  609. uni.navigateTo({
  610. url: `/pages/repair/repair/index?source=4&workOrderCode=${this.workOrderCode}&equiCode=${item.equiCode}&equiId=${item.equiId}&workOrderId=${this.pageId}&equiName=${item.equiName}&equiModel=${item.equiModel}&equiLocation=${item.equiLocation}`
  611. })
  612. },
  613. // 报修详情
  614. handLbxDetail(item) {
  615. uni.navigateTo({
  616. url: `/pages/repair/detail/detail?id=${item.repairId}`
  617. })
  618. }
  619. }
  620. }
  621. </script>
  622. <style lang="scss" scoped>
  623. @import '@/components/submitted.scss';
  624. .list-cell {
  625. display: flex;
  626. align-items: center;
  627. justify-content: space-between;
  628. color: $uni-text-color-grey;
  629. padding: 5rpx 20rpx;
  630. }
  631. .font-sm {
  632. font-size: $uni-font-size-sm;
  633. }
  634. .font-text {
  635. color: $uni-text-color;
  636. }
  637. .btn-execute {
  638. background-color: $j-primary-border-green;
  639. width: 450rpx;
  640. margin-top: 10vh;
  641. }
  642. .btn-sparepart {
  643. width: 450rpx;
  644. margin-top: 20rpx;
  645. }
  646. .btn-reassignment {
  647. color: $uni-color-primary;
  648. background-color: transparent;
  649. border: none;
  650. box-shadow: none;
  651. &::after {
  652. display: none;
  653. }
  654. }
  655. .maintenance-container {
  656. position: fixed;
  657. top: 0;
  658. bottom: 0;
  659. width: 100vw;
  660. display: flex;
  661. flex-direction: column;
  662. /deep/.u-popup {
  663. flex: none !important;
  664. }
  665. }
  666. .maintenance-wrapper {
  667. position: relative;
  668. flex: 1;
  669. }
  670. .maintenance-content {
  671. padding-top: 40rpx;
  672. box-sizing: border-box;
  673. // height: calc(100vh - 88rpx);
  674. position: absolute;
  675. top: 0;
  676. bottom: 0;
  677. left: 0;
  678. right: 0;
  679. display: flex;
  680. flex-direction: column;
  681. }
  682. .kd-cell {
  683. line-height: 90rpx;
  684. border-bottom: 1px dashed #dadada;
  685. display: flex;
  686. justify-content: space-between;
  687. .kd-label {
  688. display: inline-block;
  689. width: 7em;
  690. font-weight: bold;
  691. }
  692. .kd-content {
  693. flex: 1;
  694. text-align: left;
  695. word-break: break-all;
  696. }
  697. }
  698. .kd-baseInfo {
  699. padding: 0 32rpx;
  700. font-size: 28rpx;
  701. }
  702. .kd-equipment {
  703. flex: 1;
  704. display: flex;
  705. flex-direction: column;
  706. overflow: hidden;
  707. .kd-type-box {
  708. text-align: center;
  709. padding: 26rpx 0;
  710. view {
  711. position: relative;
  712. display: inline-block;
  713. width: 120rpx;
  714. padding: 4rpx 0;
  715. color: #747474;
  716. margin: 0 20rpx;
  717. background-color: rgba(215, 215, 215, 0.5);
  718. &.type—active {
  719. background-color: #1e7f35;
  720. color: #fff;
  721. }
  722. .count {
  723. position: absolute;
  724. top: -9px;
  725. right: -9px;
  726. width: 18px;
  727. height: 18px;
  728. border-radius: 50%;
  729. font-size: 12px;
  730. background-color: red;
  731. color: #fff;
  732. }
  733. }
  734. }
  735. .kd-list-container {
  736. flex: 1;
  737. display: flex;
  738. flex-direction: column;
  739. overflow: hidden;
  740. padding: 12rpx 18rpx;
  741. background-color: $page-bg;
  742. .u-list {
  743. flex: 1;
  744. height: 100% !important;
  745. }
  746. }
  747. }
  748. .spare-parts {
  749. flex: 1;
  750. overflow: hidden;
  751. }
  752. .kd-card {
  753. background-color: #fff;
  754. margin-bottom: 20rpx;
  755. padding: 8rpx 0;
  756. font-size: 28rpx;
  757. word-break: break-all;
  758. .kd-card-wrapper {
  759. padding: 0 30rpx;
  760. border-bottom: 1px solid #dadada;
  761. }
  762. .kd-cell {
  763. line-height: 60rpx;
  764. }
  765. .kd-cell:last-of-type {
  766. border-bottom: none;
  767. }
  768. .status-box {
  769. margin-right: 16rpx;
  770. }
  771. .card-footer {
  772. display: flex;
  773. justify-content: flex-end;
  774. align-items: center;
  775. padding: 8rpx 0 20rpx;
  776. button {
  777. width: 180rpx;
  778. height: 56rpx;
  779. line-height: 56rpx;
  780. font-size: 28rpx;
  781. margin: 0 8rpx;
  782. }
  783. .primary-btn {
  784. background-color: $j-primary-border-green;
  785. }
  786. }
  787. }
  788. .apply-box {
  789. width: 70%;
  790. margin: 0 auto;
  791. display: flex;
  792. align-items: center;
  793. justify-content: space-around;
  794. }
  795. </style>