management.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <template>
  2. <view class="container">
  3. <view class="top_bg" @click="permission = !permission"></view>
  4. <!-- 状态统计区域 -->
  5. <view class="top_types" v-if="!permission">
  6. <view class="types_box">
  7. <view class="box_num">100</view>
  8. <view class="box_info">待接单</view>
  9. </view>
  10. <view class="types_box">
  11. <view class="box_num">10</view>
  12. <view class="box_info">维修中</view>
  13. </view>
  14. <view class="types_box">
  15. <view class="box_num">50</view>
  16. <view class="box_info">已超时</view>
  17. </view>
  18. <view class="types_box">
  19. <view class="box_num">60</view>
  20. <view class="box_info">待审核</view>
  21. </view>
  22. </view>
  23. <view class="top_types2" v-else>
  24. <view class="top">
  25. <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#6FB6B8"></uni-segmented-control>
  26. </view>
  27. <view class="bottom">
  28. <view class="bottom_box">
  29. <view class="box_num">100</view>
  30. <view class="box_info">工单数</view>
  31. </view>
  32. <view class="bottom_box">
  33. <view class="box_num">10</view>
  34. <view class="box_info">处理中</view>
  35. </view>
  36. <view class="bottom_box">
  37. <view class="box_num">50</view>
  38. <view class="box_info">已完成</view>
  39. </view>
  40. <view class="bottom_box">
  41. <view class="box_num">60</view>
  42. <view class="box_info">已超时</view>
  43. </view>
  44. <view class="bottom_box">
  45. <view class="box_num">60</view>
  46. <view class="box_info">已完成</view>
  47. </view>
  48. <view class="bottom_box">
  49. <view class="box_num">60</view>
  50. <view class="box_info">已关单</view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 订单列表区域 -->
  55. <view class="body" :class="{ body2: permission }">
  56. <!-- 每一个订单区域 -->
  57. <view class="body_item" v-for="item in dataList" :key="item.id">
  58. <!-- 工单编号 -->
  59. <view class="item_title">
  60. <img src="../../static/images/repairsImg/order.png" />
  61. <view class="title_info">工单编号:{{ item.order }}</view>
  62. <view class="title_type" v-if="item.overtime">超时未接</view>
  63. </view>
  64. <!-- 报修时间 -->
  65. <view class="item_time">
  66. <view class="time_msg">
  67. 报修时间:
  68. <text>{{ item.time }}</text>
  69. </view>
  70. <view class="time_type" v-if="item.type === 1">待接单</view>
  71. <view class="time_type color_type" v-if="item.type === 2">维修中</view>
  72. <view class="time_type color_type2" v-if="item.type === 3">待审核</view>
  73. <view class="time_type color_type3" v-if="item.type === 4">已完成</view>
  74. <view class="time_type" v-if="item.type === 5">待确认</view>
  75. <view class="time_type color_type4" v-if="item.type === 6">已关单</view>
  76. </view>
  77. <!-- 报修姓名 -->
  78. <view class="item_box">
  79. <view class="box_key">报修姓名:</view>
  80. <view class="box_value">{{ item.name }}</view>
  81. </view>
  82. <!-- 报修电话 -->
  83. <view class="item_box">
  84. <view class="box_key">报修电话:</view>
  85. <view class="box_value phone">
  86. {{ item.phone }}
  87. <img src="../../static/images/repairsImg/phone.png" />
  88. </view>
  89. </view>
  90. <!-- 报修区域 -->
  91. <view class="item_box">
  92. <view class="box_key">报修区域:</view>
  93. <view class="box_value">{{ item.area }}</view>
  94. </view>
  95. <!-- 详细地址 -->
  96. <view class="item_box">
  97. <view class="box_key">详细地址:</view>
  98. <view class="box_value">{{ item.address }}</view>
  99. </view>
  100. <!-- 报修物品 -->
  101. <view class="item_box">
  102. <view class="box_key">报修物品:</view>
  103. <view class="box_value">{{ item.goods }}</view>
  104. </view>
  105. <!-- 故障描述 -->
  106. <view class="item_box">
  107. <view class="box_key">故障描述:</view>
  108. <view class="box_value">{{ item.description }}</view>
  109. </view>
  110. <!-- 上传图片 -->
  111. <view class="item_img">
  112. <view class="img_key">上传图片:</view>
  113. <view class="img_value"></view>
  114. </view>
  115. <!-- 维修师傅 -->
  116. <view class="item_time" v-if="item.type === 2 || item.type === 3 || item.type === 4 || item.type === 6">
  117. <view class="time_msg">
  118. 维修师傅:
  119. <text>{{ item.workerName }}</text>
  120. </view>
  121. </view>
  122. <!-- 师傅电话 -->
  123. <view class="item_box" v-if="item.type === 2 || item.type === 3 || item.type === 4 || item.type === 6">
  124. <view class="box_key">师傅电话:</view>
  125. <view class="box_value phone">
  126. {{ item.workerPhone }}
  127. <img src="../../static/images/repairsImg/phone.png" />
  128. </view>
  129. </view>
  130. <!-- 维修费用 -->
  131. <view class="item_box" v-if="item.type === 3 || item.type === 4">
  132. <view class="box_key">维修费用:</view>
  133. <view class="box_value2 phone" @click="checkFeeDetail">
  134. {{ item.money }}元
  135. <img src="../../static/images/repairsImg/eye.png" />
  136. </view>
  137. </view>
  138. <!-- 按钮区域 -->
  139. <view class="item_btn">
  140. <img v-if="item.type < 3" src="../../static/images/repairsImg/close.png" @click="handleClose" />
  141. <img class="img" src="../../static/images/repairsImg/help.png" v-if="item.type === 1 && !permission" @click="handleHelp" />
  142. <view class="btn_box type" v-if="item.type < 3 && permission">延时</view>
  143. <view class="btn_box type" v-if="item.type === 1">接单</view>
  144. <view class="btn_box type2" v-if="item.type === 1 && !permission" @click="handleTransferOrder">转单</view>
  145. <view class="btn_box type2" v-if="item.type === 1 && permission">派单</view>
  146. <view class="btn_box type" v-if="item.type === 2" @click="handleOffer">报价</view>
  147. <view class="btn_box type2" v-if="item.type === 2" @click="handleFinish">维修完成</view>
  148. <view class="btn_box type" v-if="item.type === 3 && permission">审核</view>
  149. <view class="btn_box type" v-if="item.type === 5">改价</view>
  150. <view class="btn_box type2" v-if="item.type === 5">留言</view>
  151. </view>
  152. <!-- 关闭按钮弹窗 -->
  153. <uni-popup ref="popup_close" :is-mask-click="false">
  154. <view class="popup_close">
  155. <view :class="{ active: activeIndex === 1 }" class="close_box radius" @click="handleChangeItem(1)">重复报单</view>
  156. <view :class="{ active: activeIndex === 2 }" class="close_box" @click="handleChangeItem(2)">不属于维修范围</view>
  157. <view :class="{ active: activeIndex === 3 }" class="close_box" @click="handleChangeItem(3)">已维修完成</view>
  158. <view class="close_btn">
  159. <view class="btn_box cancel" @click="$refs.popup_close[0].close()">取消</view>
  160. <view class="btn_box confirm" @click="$refs.popup_close[0].close()">确定</view>
  161. </view>
  162. </view>
  163. </uni-popup>
  164. </view>
  165. </view>
  166. </view>
  167. </template>
  168. <script>
  169. export default {
  170. data() {
  171. return {
  172. permission: true,
  173. items: ['团队工单', '个人工单'],
  174. current: 0,
  175. activeIndex: 1,
  176. // type为 1 是 待接单,type为 2 是维修中,
  177. // type为 3 是 待审核,type为 4 是已完成,
  178. // type为 5 是 待确认,type为 6 是已关单,
  179. dataList: [
  180. {
  181. id: 1,
  182. order: '656262219626262',
  183. overtime: true,
  184. time: '2023.07.05 09:25:26',
  185. type: 1,
  186. name: '张三',
  187. phone: '13659585689',
  188. area: '行政楼',
  189. address: '3楼309',
  190. goods: '电脑',
  191. description: '水龙头坏了',
  192. img: ''
  193. },
  194. {
  195. id: 2,
  196. order: '956262219626262',
  197. overtime: false,
  198. time: '2023.07.05 09:25:26',
  199. type: 2,
  200. name: '李四',
  201. phone: '13659585689',
  202. area: '行政楼',
  203. address: '3楼309',
  204. goods: '电脑',
  205. description: '电脑坏了',
  206. img: '',
  207. workerName: '老张',
  208. workerPhone: '13659585689'
  209. },
  210. {
  211. id: 3,
  212. order: '956262219626262',
  213. overtime: false,
  214. time: '2023.07.05 09:25:26',
  215. type: 3,
  216. name: '李四',
  217. phone: '13659585689',
  218. area: '行政楼',
  219. address: '3楼309',
  220. goods: '电脑',
  221. description: '电脑坏了',
  222. img: '',
  223. workerName: '老张',
  224. workerPhone: '13659585689',
  225. money: 50
  226. },
  227. {
  228. id: 4,
  229. order: '956262219626262',
  230. overtime: false,
  231. time: '2023.07.05 09:25:26',
  232. type: 4,
  233. name: '李四',
  234. phone: '13659585689',
  235. area: '行政楼',
  236. address: '3楼309',
  237. goods: '电脑',
  238. description: '电脑坏了',
  239. img: '',
  240. workerName: '老张',
  241. workerPhone: '13659585689',
  242. money: 50
  243. },
  244. {
  245. id: 5,
  246. order: '956262219626262',
  247. overtime: false,
  248. time: '2023.07.05 09:25:26',
  249. type: 5,
  250. name: '李四',
  251. phone: '13659585689',
  252. area: '行政楼',
  253. address: '3楼309',
  254. goods: '电脑',
  255. description: '电脑坏了',
  256. img: '',
  257. workerName: '老张',
  258. workerPhone: '13659585689',
  259. money: 50
  260. },
  261. {
  262. id: 6,
  263. order: '956262219626262',
  264. overtime: false,
  265. time: '2023.07.05 09:25:26',
  266. type: 6,
  267. name: '李四',
  268. phone: '13659585689',
  269. area: '行政楼',
  270. address: '3楼309',
  271. goods: '电脑',
  272. description: '电脑坏了',
  273. img: '',
  274. workerName: '老张',
  275. workerPhone: '13659585689',
  276. money: 50
  277. }
  278. ]
  279. }
  280. },
  281. methods: {
  282. handleClose() {
  283. this.$refs.popup_close[0].open('center')
  284. },
  285. handleChangeItem(val) {
  286. this.activeIndex = val
  287. },
  288. handleOffer() {
  289. uni.navigateTo({
  290. url: '/pagesRepairs/offer/offer'
  291. })
  292. },
  293. handleFinish() {
  294. uni.navigateTo({
  295. url: '/pagesRepairs/repairRecord/repairRecord'
  296. })
  297. },
  298. handleTransferOrder() {
  299. uni.navigateTo({
  300. url: '/pagesRepairs/transferOrder/transferOrder'
  301. })
  302. },
  303. handleHelp() {
  304. uni.navigateTo({
  305. url: '/pagesRepairs/help/help'
  306. })
  307. },
  308. onClickItem(e) {
  309. if (this.current != e.currentIndex) {
  310. this.current = e.currentIndex
  311. console.log(this.current)
  312. }
  313. }
  314. }
  315. }
  316. </script>
  317. <style lang="scss" scoped>
  318. .container {
  319. width: 100vw;
  320. height: calc(100vh - 102rpx);
  321. .top_bg {
  322. height: 165rpx;
  323. background-color: #6fb6b8;
  324. }
  325. .top_types {
  326. display: flex;
  327. justify-content: space-evenly;
  328. margin: auto;
  329. margin-top: -100rpx;
  330. width: 690rpx;
  331. height: 188rpx;
  332. border-radius: 10rpx;
  333. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  334. background-color: #fff;
  335. .types_box {
  336. flex: 1;
  337. display: flex;
  338. flex-direction: column;
  339. justify-content: center;
  340. align-items: center;
  341. .box_num {
  342. font-size: 46rpx;
  343. color: #ff5733;
  344. }
  345. .box_info {
  346. margin-top: 10rpx;
  347. font-size: 34rpx;
  348. }
  349. }
  350. }
  351. .top_types2 {
  352. box-sizing: border-box;
  353. margin: auto;
  354. margin-top: -100rpx;
  355. padding: 0 30rpx;
  356. width: 690rpx;
  357. height: 402rpx;
  358. border-radius: 10rpx;
  359. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  360. background-color: #fff;
  361. .top {
  362. height: 112rpx;
  363. border-bottom: 1rpx solid #e6e6e6;
  364. }
  365. .bottom {
  366. display: flex;
  367. flex-wrap: wrap;
  368. justify-content: space-evenly;
  369. height: 290rpx;
  370. .bottom_box {
  371. width: 25%;
  372. display: flex;
  373. flex-direction: column;
  374. justify-content: center;
  375. align-items: center;
  376. .box_num {
  377. font-size: 46rpx;
  378. color: #ff5733;
  379. }
  380. .box_info {
  381. margin-top: 10rpx;
  382. font-size: 34rpx;
  383. }
  384. }
  385. }
  386. }
  387. .body {
  388. box-sizing: border-box;
  389. padding: 0 30rpx 30rpx 30rpx;
  390. height: calc(100vh - 355rpx);
  391. overflow-y: auto;
  392. .body_item {
  393. margin-top: 20rpx;
  394. border-radius: 11rpx;
  395. box-shadow: 0 0 8rpx #d9d9d9;
  396. .item_title {
  397. display: flex;
  398. align-items: center;
  399. padding: 0 30rpx;
  400. height: 87rpx;
  401. border-bottom: 1rpx solid #e6e6e6;
  402. img {
  403. width: 30rpx;
  404. height: 30rpx;
  405. }
  406. .title_info {
  407. margin: 0 21rpx 0 13rpx;
  408. font-size: 28rpx;
  409. }
  410. .title_type {
  411. width: 137rpx;
  412. height: 47rpx;
  413. line-height: 47rpx;
  414. text-align: center;
  415. border-radius: 136rpx;
  416. color: #ff5733;
  417. font-size: 24rpx;
  418. border: 1rpx solid #ff5733;
  419. }
  420. }
  421. .item_time {
  422. display: flex;
  423. justify-content: space-between;
  424. align-items: center;
  425. padding: 0 30rpx;
  426. height: 79rpx;
  427. .time_msg {
  428. font-size: 28rpx;
  429. color: #808080;
  430. text {
  431. color: #000000;
  432. }
  433. }
  434. .time_type {
  435. font-size: 32rpx;
  436. color: #ff5733;
  437. }
  438. .color_type {
  439. color: #1e7dfb;
  440. }
  441. .color_type2 {
  442. color: #d43030;
  443. }
  444. .color_type3 {
  445. color: #6fb6b8;
  446. }
  447. .color_type4 {
  448. color: #a6a6a6;
  449. }
  450. }
  451. .item_box {
  452. display: flex;
  453. padding: 0 30rpx;
  454. height: 60rpx;
  455. font-size: 28rpx;
  456. .box_key {
  457. color: #808080;
  458. }
  459. .box_value {
  460. display: flex;
  461. img {
  462. margin-top: 5rpx;
  463. margin-left: 10rpx;
  464. width: 28rpx;
  465. height: 28rpx;
  466. }
  467. }
  468. .box_value2 {
  469. display: flex;
  470. img {
  471. margin-top: -2rpx;
  472. margin-left: 14rpx;
  473. width: 46rpx;
  474. height: 46rpx;
  475. }
  476. }
  477. .phone {
  478. color: #6fb6b8;
  479. }
  480. }
  481. .item_img {
  482. display: flex;
  483. align-items: center;
  484. padding: 0 30rpx;
  485. height: 120rpx;
  486. color: #808080;
  487. font-size: 28rpx;
  488. .img_key {
  489. }
  490. .img_value {
  491. width: 120rpx;
  492. height: 120rpx;
  493. border-radius: 14rpx;
  494. background-color: salmon;
  495. }
  496. }
  497. .item_btn {
  498. display: flex;
  499. align-items: center;
  500. justify-content: flex-end;
  501. padding: 0 30rpx;
  502. line-height: 153rpx;
  503. img {
  504. margin-right: auto;
  505. margin-top: 45rpx;
  506. margin-bottom: 40rpx;
  507. width: 56rpx;
  508. height: 56rpx;
  509. }
  510. .img {
  511. margin-right: auto;
  512. margin-left: -55rpx;
  513. margin-top: 45rpx;
  514. margin-bottom: 40rpx;
  515. width: 62rpx;
  516. height: 62rpx;
  517. }
  518. .btn_box {
  519. display: flex;
  520. justify-content: center;
  521. align-items: center;
  522. margin-left: 16rpx;
  523. margin-top: 45rpx;
  524. margin-bottom: 40rpx;
  525. width: 174rpx;
  526. height: 68rpx;
  527. font-size: 28rpx;
  528. border-radius: 11rpx;
  529. }
  530. .type {
  531. color: #fff;
  532. background-color: #6fb6b8;
  533. }
  534. .type2 {
  535. color: #6fb6b8;
  536. background-color: #fff;
  537. border: 1rpx solid #6fb6b8;
  538. }
  539. }
  540. .popup_close {
  541. width: 690rpx;
  542. border-radius: 19rpx;
  543. background-color: #fff;
  544. .close_box {
  545. height: 100rpx;
  546. line-height: 100rpx;
  547. text-align: center;
  548. font-size: 32rpx;
  549. border: 1rpx solid #e6e6e6;
  550. }
  551. .radius {
  552. border-radius: 19rpx 19rpx 0 0;
  553. }
  554. .active {
  555. color: #fff;
  556. background-color: #6fb6b8;
  557. }
  558. .close_btn {
  559. display: flex;
  560. align-items: center;
  561. justify-content: space-evenly;
  562. margin-top: 100rpx;
  563. height: 121rpx;
  564. .btn_box {
  565. display: flex;
  566. justify-content: center;
  567. align-items: center;
  568. width: 203rpx;
  569. height: 72rpx;
  570. border-radius: 9rpx;
  571. font-size: 32rpx;
  572. }
  573. .cancel {
  574. background-color: #e5e5e5;
  575. color: #6fb6b8;
  576. }
  577. .confirm {
  578. background-color: #6fb6b8;
  579. color: #fff;
  580. }
  581. }
  582. }
  583. }
  584. }
  585. .body2 {
  586. height: calc(100vh - 555rpx);
  587. }
  588. }
  589. </style>