detail.vue 25 KB

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