management.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  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">
  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" @click="handleCallPhone('13820846714')">
  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" @click="handleCallPhone('13820846714')">
  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" @click="handleDelay">延时</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" @click="handleSendOrder">派单</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" @click="handleAudit(item.status)">审核</view>
  149. <view class="btn_box type" v-if="item.type === 5">改价</view>
  150. <view class="btn_box type2" v-if="item.type === 5" @click="handleLeaveWords">留言</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. <!-- 留言弹窗 -->
  165. <uni-popup ref="popup_leaveWords" :is-mask-click="false">
  166. <view class="pop_leaveWords">
  167. <view class="leaveWords_title">留言</view>
  168. <view class="leaveWords_body">
  169. <textarea placeholder-style="color:#CCCCCC" placeholder="请输入您宝贵的留言"></textarea>
  170. </view>
  171. <view class="leaveWords_btn">
  172. <view class="btn_box cancel" @click="$refs.popup_leaveWords[0].close()">取消</view>
  173. <view class="btn_box confirm" @click="$refs.popup_leaveWords[0].close()">确定</view>
  174. </view>
  175. </view>
  176. </uni-popup>
  177. </view>
  178. </view>
  179. </view>
  180. </template>
  181. <script>
  182. export default {
  183. data() {
  184. return {
  185. permission: true,
  186. items: ['团队工单', '个人工单'],
  187. current: 0,
  188. activeIndex: 1,
  189. // type为 1 是 待接单,type为 2 是维修中,
  190. // type为 3 是 待审核,type为 4 是已完成,
  191. // type为 5 是 待确认,type为 6 是已关单,
  192. dataList: [
  193. {
  194. id: 1,
  195. order: '656262219626262',
  196. overtime: true,
  197. time: '2023.07.05 09:25:26',
  198. type: 1,
  199. name: '张三',
  200. phone: '13659585689',
  201. area: '行政楼',
  202. address: '3楼309',
  203. goods: '电脑',
  204. description: '水龙头坏了',
  205. img: ''
  206. },
  207. {
  208. id: 2,
  209. order: '956262219626262',
  210. overtime: false,
  211. time: '2023.07.05 09:25:26',
  212. type: 2,
  213. name: '李四',
  214. phone: '13659585689',
  215. area: '行政楼',
  216. address: '3楼309',
  217. goods: '电脑',
  218. description: '电脑坏了',
  219. img: '',
  220. workerName: '老张',
  221. workerPhone: '13659585689'
  222. },
  223. {
  224. id: 3,
  225. order: '956262219626262',
  226. overtime: false,
  227. time: '2023.07.05 09:25:26',
  228. type: 3,
  229. name: '李四',
  230. phone: '13659585689',
  231. area: '行政楼',
  232. address: '3楼309',
  233. goods: '电脑',
  234. description: '电脑坏了',
  235. img: '',
  236. workerName: '老张',
  237. workerPhone: '13659585689',
  238. money: 50,
  239. status: 1
  240. },
  241. {
  242. id: 369,
  243. order: '956262219626262',
  244. overtime: false,
  245. time: '2023.07.05 09:25:26',
  246. type: 3,
  247. name: '李四',
  248. phone: '13659585689',
  249. area: '行政楼',
  250. address: '3楼309',
  251. goods: '电脑',
  252. description: '电脑坏了',
  253. img: '',
  254. workerName: '老张',
  255. workerPhone: '13659585689',
  256. money: 50,
  257. status: 2
  258. },
  259. {
  260. id: 4,
  261. order: '956262219626262',
  262. overtime: false,
  263. time: '2023.07.05 09:25:26',
  264. type: 4,
  265. name: '李四',
  266. phone: '13659585689',
  267. area: '行政楼',
  268. address: '3楼309',
  269. goods: '电脑',
  270. description: '电脑坏了',
  271. img: '',
  272. workerName: '老张',
  273. workerPhone: '13659585689',
  274. money: 50
  275. },
  276. {
  277. id: 5,
  278. order: '956262219626262',
  279. overtime: false,
  280. time: '2023.07.05 09:25:26',
  281. type: 5,
  282. name: '李四',
  283. phone: '13659585689',
  284. area: '行政楼',
  285. address: '3楼309',
  286. goods: '电脑',
  287. description: '电脑坏了',
  288. img: '',
  289. workerName: '老张',
  290. workerPhone: '13659585689',
  291. money: 50
  292. },
  293. {
  294. id: 6,
  295. order: '956262219626262',
  296. overtime: false,
  297. time: '2023.07.05 09:25:26',
  298. type: 6,
  299. name: '李四',
  300. phone: '13659585689',
  301. area: '行政楼',
  302. address: '3楼309',
  303. goods: '电脑',
  304. description: '电脑坏了',
  305. img: '',
  306. workerName: '老张',
  307. workerPhone: '13659585689',
  308. money: 50
  309. }
  310. ]
  311. }
  312. },
  313. methods: {
  314. // 关闭图标点击回调
  315. handleClose() {
  316. this.$refs.popup_close[0].open('center')
  317. },
  318. // 关闭按钮弹窗选中按钮时回调
  319. handleChangeItem(val) {
  320. this.activeIndex = val
  321. },
  322. // 报价按钮回调
  323. handleOffer() {
  324. uni.navigateTo({
  325. url: '/pagesRepairs/offer/offer'
  326. })
  327. },
  328. // 维修完成按钮回调
  329. handleFinish() {
  330. uni.navigateTo({
  331. url: '/pagesRepairs/repairRecord/repairRecord'
  332. })
  333. },
  334. // 转单按钮回调
  335. handleTransferOrder() {
  336. uni.navigateTo({
  337. url: '/pagesRepairs/transferOrder/transferOrder'
  338. })
  339. },
  340. // 协作图标点击回调
  341. handleHelp() {
  342. uni.navigateTo({
  343. url: '/pagesRepairs/help/help'
  344. })
  345. },
  346. // 分段器切换回调
  347. onClickItem(e) {
  348. if (this.current != e.currentIndex) {
  349. this.current = e.currentIndex
  350. console.log(this.current)
  351. }
  352. },
  353. // 留言按钮回调
  354. handleLeaveWords() {
  355. this.$refs.popup_leaveWords[0].open('center')
  356. },
  357. // 延时按钮回调
  358. handleDelay() {
  359. uni.navigateTo({
  360. url: '/pagesRepairs/delay/delay'
  361. })
  362. },
  363. // 派单按钮回调
  364. handleSendOrder() {
  365. uni.navigateTo({
  366. url: '/pagesRepairs/helpPeople/helpPeople?type=1'
  367. })
  368. },
  369. // 审核按钮回调
  370. handleAudit(status) {
  371. console.log(status)
  372. // 1为转单审核,2为协作审核
  373. if (status === 1) {
  374. uni.navigateTo({
  375. url: '/pagesRepairs/transferOrder/transferOrder?type=1'
  376. })
  377. } else if (status === 2) {
  378. uni.navigateTo({
  379. url: '/pagesRepairs/help/help?type=1'
  380. })
  381. }
  382. },
  383. // 点击电话号码回调
  384. handleCallPhone(phone) {
  385. console.log(phone)
  386. uni.makePhoneCall({
  387. phoneNumber: phone
  388. })
  389. }
  390. }
  391. }
  392. </script>
  393. <style lang="scss" scoped>
  394. .container {
  395. width: 100vw;
  396. height: calc(100vh - 102rpx);
  397. overflow-y: auto;
  398. .top_bg {
  399. height: 165rpx;
  400. background-color: #6fb6b8;
  401. }
  402. .top_types {
  403. display: flex;
  404. justify-content: space-evenly;
  405. margin: auto;
  406. margin-top: -100rpx;
  407. width: 690rpx;
  408. height: 188rpx;
  409. border-radius: 10rpx;
  410. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  411. background-color: #fff;
  412. .types_box {
  413. flex: 1;
  414. display: flex;
  415. flex-direction: column;
  416. justify-content: center;
  417. align-items: center;
  418. .box_num {
  419. font-size: 46rpx;
  420. color: #ff5733;
  421. }
  422. .box_info {
  423. margin-top: 10rpx;
  424. font-size: 34rpx;
  425. }
  426. }
  427. }
  428. .top_types2 {
  429. box-sizing: border-box;
  430. margin: auto;
  431. margin-top: -100rpx;
  432. padding: 0 30rpx;
  433. width: 690rpx;
  434. height: 402rpx;
  435. border-radius: 10rpx;
  436. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  437. background-color: #fff;
  438. .top {
  439. height: 112rpx;
  440. border-bottom: 1rpx solid #e6e6e6;
  441. }
  442. .bottom {
  443. display: flex;
  444. flex-wrap: wrap;
  445. justify-content: space-evenly;
  446. height: 290rpx;
  447. .bottom_box {
  448. width: 25%;
  449. display: flex;
  450. flex-direction: column;
  451. justify-content: center;
  452. align-items: center;
  453. .box_num {
  454. font-size: 46rpx;
  455. color: #ff5733;
  456. }
  457. .box_info {
  458. margin-top: 10rpx;
  459. font-size: 34rpx;
  460. }
  461. }
  462. }
  463. }
  464. .body {
  465. box-sizing: border-box;
  466. padding: 0 30rpx 30rpx 30rpx;
  467. .body_item {
  468. margin-top: 20rpx;
  469. border-radius: 11rpx;
  470. box-shadow: 0 0 8rpx #d9d9d9;
  471. .item_title {
  472. display: flex;
  473. align-items: center;
  474. padding: 0 30rpx;
  475. height: 87rpx;
  476. border-bottom: 1rpx solid #e6e6e6;
  477. img {
  478. width: 30rpx;
  479. height: 30rpx;
  480. }
  481. .title_info {
  482. margin: 0 21rpx 0 13rpx;
  483. font-size: 28rpx;
  484. }
  485. .title_type {
  486. width: 137rpx;
  487. height: 47rpx;
  488. line-height: 47rpx;
  489. text-align: center;
  490. border-radius: 136rpx;
  491. color: #ff5733;
  492. font-size: 24rpx;
  493. border: 1rpx solid #ff5733;
  494. }
  495. }
  496. .item_time {
  497. display: flex;
  498. justify-content: space-between;
  499. align-items: center;
  500. padding: 0 30rpx;
  501. height: 79rpx;
  502. .time_msg {
  503. font-size: 28rpx;
  504. color: #808080;
  505. text {
  506. color: #000000;
  507. }
  508. }
  509. .time_type {
  510. font-size: 32rpx;
  511. color: #ff5733;
  512. }
  513. .color_type {
  514. color: #1e7dfb;
  515. }
  516. .color_type2 {
  517. color: #d43030;
  518. }
  519. .color_type3 {
  520. color: #6fb6b8;
  521. }
  522. .color_type4 {
  523. color: #a6a6a6;
  524. }
  525. }
  526. .item_box {
  527. display: flex;
  528. padding: 0 30rpx;
  529. height: 60rpx;
  530. font-size: 28rpx;
  531. .box_key {
  532. color: #808080;
  533. }
  534. .box_value {
  535. display: flex;
  536. img {
  537. margin-top: 5rpx;
  538. margin-left: 10rpx;
  539. width: 28rpx;
  540. height: 28rpx;
  541. }
  542. }
  543. .box_value2 {
  544. display: flex;
  545. img {
  546. margin-top: -2rpx;
  547. margin-left: 14rpx;
  548. width: 46rpx;
  549. height: 46rpx;
  550. }
  551. }
  552. .phone {
  553. color: #6fb6b8;
  554. }
  555. }
  556. .item_img {
  557. display: flex;
  558. align-items: center;
  559. padding: 0 30rpx;
  560. height: 120rpx;
  561. color: #808080;
  562. font-size: 28rpx;
  563. .img_key {
  564. }
  565. .img_value {
  566. width: 120rpx;
  567. height: 120rpx;
  568. border-radius: 14rpx;
  569. background-color: salmon;
  570. }
  571. }
  572. .item_btn {
  573. display: flex;
  574. align-items: center;
  575. justify-content: flex-end;
  576. padding: 0 30rpx;
  577. line-height: 153rpx;
  578. img {
  579. margin-right: auto;
  580. margin-top: 45rpx;
  581. margin-bottom: 40rpx;
  582. width: 56rpx;
  583. height: 56rpx;
  584. }
  585. .img {
  586. margin-right: auto;
  587. margin-left: -55rpx;
  588. margin-top: 45rpx;
  589. margin-bottom: 40rpx;
  590. width: 62rpx;
  591. height: 62rpx;
  592. }
  593. .btn_box {
  594. display: flex;
  595. justify-content: center;
  596. align-items: center;
  597. margin-left: 16rpx;
  598. margin-top: 45rpx;
  599. margin-bottom: 40rpx;
  600. width: 174rpx;
  601. height: 68rpx;
  602. font-size: 28rpx;
  603. border-radius: 11rpx;
  604. }
  605. .type {
  606. color: #fff;
  607. background-color: #6fb6b8;
  608. }
  609. .type2 {
  610. color: #6fb6b8;
  611. background-color: #fff;
  612. border: 1rpx solid #6fb6b8;
  613. }
  614. }
  615. .popup_close {
  616. width: 690rpx;
  617. border-radius: 19rpx;
  618. background-color: #fff;
  619. .close_box {
  620. height: 100rpx;
  621. line-height: 100rpx;
  622. text-align: center;
  623. font-size: 32rpx;
  624. border: 1rpx solid #e6e6e6;
  625. }
  626. .radius {
  627. border-radius: 19rpx 19rpx 0 0;
  628. }
  629. .active {
  630. color: #fff;
  631. background-color: #6fb6b8;
  632. }
  633. .close_btn {
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-evenly;
  637. margin-top: 100rpx;
  638. height: 121rpx;
  639. .btn_box {
  640. display: flex;
  641. justify-content: center;
  642. align-items: center;
  643. width: 203rpx;
  644. height: 72rpx;
  645. border-radius: 9rpx;
  646. font-size: 32rpx;
  647. }
  648. .cancel {
  649. background-color: #e5e5e5;
  650. color: #6fb6b8;
  651. }
  652. .confirm {
  653. background-color: #6fb6b8;
  654. color: #fff;
  655. }
  656. }
  657. }
  658. .pop_leaveWords {
  659. border-radius: 19rpx;
  660. background-color: #fff;
  661. .leaveWords_title {
  662. display: flex;
  663. justify-content: center;
  664. align-items: center;
  665. width: 690rpx;
  666. height: 110rpx;
  667. font-size: 32rpx;
  668. font-weight: bold;
  669. border-radius: 19rpx 19rpx 0 0;
  670. border-bottom: 1rpx solid #e6e6e6;
  671. }
  672. .leaveWords_body {
  673. height: 320rpx;
  674. textarea {
  675. box-sizing: border-box;
  676. margin: 35rpx 40rpx;
  677. padding: 20rpx;
  678. width: 610rpx;
  679. height: 312rpx;
  680. font-size: 28rpx;
  681. border-radius: 14rpx;
  682. border: 1rpx solid #e6e6e6;
  683. }
  684. }
  685. .leaveWords_btn {
  686. display: flex;
  687. align-items: center;
  688. justify-content: space-evenly;
  689. height: 121rpx;
  690. .btn_box {
  691. display: flex;
  692. justify-content: center;
  693. align-items: center;
  694. width: 203rpx;
  695. height: 72rpx;
  696. border-radius: 9rpx;
  697. font-size: 32rpx;
  698. }
  699. .cancel {
  700. background-color: #e5e5e5;
  701. color: #6fb6b8;
  702. }
  703. .confirm {
  704. background-color: #6fb6b8;
  705. color: #fff;
  706. }
  707. }
  708. }
  709. }
  710. }
  711. }
  712. </style>