management.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <template>
  2. <view class="container">
  3. <view class="top_bg"></view>
  4. <!-- 状态统计区域 -->
  5. <view class="top_types">
  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. <!-- 订单列表区域 -->
  24. <view class="body">
  25. <!-- 每一个订单区域 -->
  26. <view class="body_item" v-for="item in dataList" :key="item.id">
  27. <!-- 工单编号 -->
  28. <view class="item_title">
  29. <img src="../../static/images/repairsImg/order.png" />
  30. <view class="title_info">工单编号:{{ item.order }}</view>
  31. <view class="title_type" v-if="item.overtime">超时未接</view>
  32. </view>
  33. <!-- 报修时间 -->
  34. <view class="item_time">
  35. <view class="time_msg">
  36. 报修时间:
  37. <text>{{ item.time }}</text>
  38. </view>
  39. <view class="time_type" v-if="item.type === 1">待接单</view>
  40. <view class="time_type color_type" v-if="item.type === 2">维修中</view>
  41. <view class="time_type color_type2" v-if="item.type === 3">待审核</view>
  42. </view>
  43. <!-- 报修姓名 -->
  44. <view class="item_box">
  45. <view class="box_key">报修姓名:</view>
  46. <view class="box_value">{{ item.name }}</view>
  47. </view>
  48. <!-- 报修电话 -->
  49. <view class="item_box">
  50. <view class="box_key">报修电话:</view>
  51. <view class="box_value phone">
  52. {{ item.phone }}
  53. <img src="../../static/images/repairsImg/phone.png" />
  54. </view>
  55. </view>
  56. <!-- 报修区域 -->
  57. <view class="item_box">
  58. <view class="box_key">报修区域:</view>
  59. <view class="box_value">{{ item.area }}</view>
  60. </view>
  61. <!-- 详细地址 -->
  62. <view class="item_box">
  63. <view class="box_key">详细地址:</view>
  64. <view class="box_value">{{ item.address }}</view>
  65. </view>
  66. <!-- 报修物品 -->
  67. <view class="item_box">
  68. <view class="box_key">报修物品:</view>
  69. <view class="box_value">{{ item.goods }}</view>
  70. </view>
  71. <!-- 故障描述 -->
  72. <view class="item_box">
  73. <view class="box_key">故障描述:</view>
  74. <view class="box_value">{{ item.description }}</view>
  75. </view>
  76. <!-- 上传图片 -->
  77. <view class="item_img">
  78. <view class="img_key">上传图片:</view>
  79. <view class="img_value"></view>
  80. </view>
  81. <!-- 维修师傅 -->
  82. <view class="item_time" v-if="item.type === 2 || item.type === 3">
  83. <view class="time_msg">
  84. 维修师傅:
  85. <text>{{ item.workerName }}</text>
  86. </view>
  87. </view>
  88. <!-- 师傅电话 -->
  89. <view class="item_box" v-if="item.type === 2 || item.type === 3">
  90. <view class="box_key">师傅电话:</view>
  91. <view class="box_value phone">
  92. {{ item.workerPhone }}
  93. <img src="../../static/images/repairsImg/phone.png" />
  94. </view>
  95. </view>
  96. <!-- 维修费用 -->
  97. <view class="item_box" v-if="item.type === 3">
  98. <view class="box_key">维修费用:</view>
  99. <view class="box_value2 phone" @click="checkFeeDetail">
  100. {{ item.money }}元
  101. <img src="../../static/images/repairsImg/eye.png" />
  102. </view>
  103. </view>
  104. <!-- 按钮区域 -->
  105. <view class="item_btn" v-if="item.type !== 3">
  106. <img v-if="item.type !== 3" src="../../static/images/repairsImg/close.png" @click="handleClose" />
  107. <img class="img" src="../../static/images/repairsImg/help.png" v-if="item.type === 1" />
  108. <view class="btn_box type" v-if="item.type === 1">接单</view>
  109. <view class="btn_box type2" v-if="item.type === 1">转单</view>
  110. <view class="btn_box type" v-if="item.type === 2" @click="handleOffer">报价</view>
  111. <view class="btn_box type2" v-if="item.type === 2" @click="handleFinish">维修完成</view>
  112. </view>
  113. <view class="item_btn2" v-else></view>
  114. <!-- 关闭按钮弹窗 -->
  115. <uni-popup ref="popup_close" :is-mask-click="false">
  116. <view class="popup_close">
  117. <view :class="{ active: activeIndex === 1 }" class="close_box radius" @click="handleChangeItem(1)">重复报单</view>
  118. <view :class="{ active: activeIndex === 2 }" class="close_box" @click="handleChangeItem(2)">不属于维修范围</view>
  119. <view :class="{ active: activeIndex === 3 }" class="close_box" @click="handleChangeItem(3)">已维修完成</view>
  120. <view class="close_btn">
  121. <view class="btn_box cancel" @click="$refs.popup_close[0].close()">取消</view>
  122. <view class="btn_box confirm" @click="$refs.popup_close[0].close()">确定</view>
  123. </view>
  124. </view>
  125. </uni-popup>
  126. </view>
  127. </view>
  128. </view>
  129. </template>
  130. <script>
  131. export default {
  132. data() {
  133. return {
  134. activeIndex: 1,
  135. // type为 1 是 待接单,type为 2 是维修中,
  136. // type为 3 是 待审核
  137. dataList: [
  138. {
  139. id: 1,
  140. order: '656262219626262',
  141. overtime: true,
  142. time: '2023.07.05 09:25:26',
  143. type: 1,
  144. name: '张三',
  145. phone: '13659585689',
  146. area: '行政楼',
  147. address: '3楼309',
  148. goods: '电脑',
  149. description: '水龙头坏了',
  150. img: ''
  151. },
  152. {
  153. id: 2,
  154. order: '956262219626262',
  155. overtime: false,
  156. time: '2023.07.05 09:25:26',
  157. type: 2,
  158. name: '李四',
  159. phone: '13659585689',
  160. area: '行政楼',
  161. address: '3楼309',
  162. goods: '电脑',
  163. description: '电脑坏了',
  164. img: '',
  165. workerName: '老张',
  166. workerPhone: '13659585689'
  167. },
  168. {
  169. id: 3,
  170. order: '956262219626262',
  171. overtime: false,
  172. time: '2023.07.05 09:25:26',
  173. type: 3,
  174. name: '李四',
  175. phone: '13659585689',
  176. area: '行政楼',
  177. address: '3楼309',
  178. goods: '电脑',
  179. description: '电脑坏了',
  180. img: '',
  181. workerName: '老张',
  182. workerPhone: '13659585689',
  183. money: 50
  184. }
  185. ]
  186. }
  187. },
  188. methods: {
  189. handleClose() {
  190. this.$refs.popup_close[0].open('center')
  191. },
  192. handleChangeItem(val) {
  193. this.activeIndex = val
  194. },
  195. handleOffer() {
  196. uni.navigateTo({
  197. url: '/pagesRepairs/offer/offer'
  198. })
  199. },
  200. handleFinish() {
  201. uni.navigateTo({
  202. url: '/pagesRepairs/repairRecord/repairRecord'
  203. })
  204. }
  205. }
  206. }
  207. </script>
  208. <style lang="scss" scoped>
  209. .container {
  210. width: 100vw;
  211. height: calc(100vh - 102rpx);
  212. .top_bg {
  213. height: 165rpx;
  214. background-color: #6fb6b8;
  215. }
  216. .top_types {
  217. display: flex;
  218. justify-content: space-evenly;
  219. margin: auto;
  220. margin-top: -100rpx;
  221. width: 690rpx;
  222. height: 188rpx;
  223. border-radius: 10rpx;
  224. box-shadow: 0px 0px 4rpx rgba(0, 0, 0, 0.25);
  225. background-color: #fff;
  226. .types_box {
  227. flex: 1;
  228. display: flex;
  229. flex-direction: column;
  230. justify-content: center;
  231. align-items: center;
  232. .box_num {
  233. font-size: 46rpx;
  234. color: #ff5733;
  235. }
  236. .box_info {
  237. margin-top: 10rpx;
  238. font-size: 34rpx;
  239. }
  240. }
  241. }
  242. .body {
  243. box-sizing: border-box;
  244. padding: 0 30rpx 30rpx 30rpx;
  245. height: calc(100vh - 355rpx);
  246. overflow-y: auto;
  247. .body_item {
  248. margin-top: 20rpx;
  249. border-radius: 11rpx;
  250. box-shadow: 0 0 8rpx #d9d9d9;
  251. .item_title {
  252. display: flex;
  253. align-items: center;
  254. padding: 0 30rpx;
  255. height: 87rpx;
  256. border-bottom: 1rpx solid #e6e6e6;
  257. img {
  258. width: 30rpx;
  259. height: 30rpx;
  260. }
  261. .title_info {
  262. margin: 0 21rpx 0 13rpx;
  263. font-size: 28rpx;
  264. }
  265. .title_type {
  266. width: 137rpx;
  267. height: 47rpx;
  268. line-height: 47rpx;
  269. text-align: center;
  270. border-radius: 136rpx;
  271. color: #ff5733;
  272. font-size: 24rpx;
  273. border: 1rpx solid #ff5733;
  274. }
  275. }
  276. .item_time {
  277. display: flex;
  278. justify-content: space-between;
  279. align-items: center;
  280. padding: 0 30rpx;
  281. height: 79rpx;
  282. .time_msg {
  283. font-size: 28rpx;
  284. color: #808080;
  285. text {
  286. color: #000000;
  287. }
  288. }
  289. .time_type {
  290. font-size: 32rpx;
  291. color: #ff5733;
  292. }
  293. .color_type {
  294. color: #1e7dfb;
  295. }
  296. .color_type2 {
  297. color: #d43030;
  298. }
  299. }
  300. .item_box {
  301. display: flex;
  302. padding: 0 30rpx;
  303. height: 60rpx;
  304. font-size: 28rpx;
  305. .box_key {
  306. color: #808080;
  307. }
  308. .box_value {
  309. display: flex;
  310. img {
  311. margin-top: 5rpx;
  312. margin-left: 10rpx;
  313. width: 28rpx;
  314. height: 28rpx;
  315. }
  316. }
  317. .box_value2 {
  318. display: flex;
  319. img {
  320. margin-top: -2rpx;
  321. margin-left: 14rpx;
  322. width: 46rpx;
  323. height: 46rpx;
  324. }
  325. }
  326. .phone {
  327. color: #6fb6b8;
  328. }
  329. }
  330. .item_img {
  331. display: flex;
  332. align-items: center;
  333. padding: 0 30rpx;
  334. height: 120rpx;
  335. color: #808080;
  336. font-size: 28rpx;
  337. .img_key {
  338. }
  339. .img_value {
  340. width: 120rpx;
  341. height: 120rpx;
  342. border-radius: 14rpx;
  343. background-color: salmon;
  344. }
  345. }
  346. .item_btn {
  347. display: flex;
  348. align-items: center;
  349. justify-content: flex-end;
  350. padding: 0 30rpx;
  351. height: 153rpx;
  352. img {
  353. margin-right: auto;
  354. width: 56rpx;
  355. height: 56rpx;
  356. }
  357. .img {
  358. margin-right: auto;
  359. margin-left: -55rpx;
  360. width: 62rpx;
  361. height: 62rpx;
  362. }
  363. .btn_box {
  364. display: flex;
  365. justify-content: center;
  366. align-items: center;
  367. margin-left: 16rpx;
  368. width: 174rpx;
  369. height: 68rpx;
  370. font-size: 28rpx;
  371. border-radius: 11rpx;
  372. }
  373. .type {
  374. color: #fff;
  375. background-color: #6fb6b8;
  376. }
  377. .type2 {
  378. color: #6fb6b8;
  379. background-color: #fff;
  380. border: 1rpx solid #6fb6b8;
  381. }
  382. }
  383. .item_btn2 {
  384. height: 50rpx;
  385. }
  386. .popup_close {
  387. width: 690rpx;
  388. border-radius: 19rpx;
  389. background-color: #fff;
  390. .close_box {
  391. height: 100rpx;
  392. line-height: 100rpx;
  393. text-align: center;
  394. font-size: 32rpx;
  395. border: 1rpx solid #e6e6e6;
  396. }
  397. .radius {
  398. border-radius: 19rpx 19rpx 0 0;
  399. }
  400. .active {
  401. color: #fff;
  402. background-color: #6fb6b8;
  403. }
  404. .close_btn {
  405. display: flex;
  406. align-items: center;
  407. justify-content: space-evenly;
  408. margin-top: 100rpx;
  409. height: 121rpx;
  410. .btn_box {
  411. display: flex;
  412. justify-content: center;
  413. align-items: center;
  414. width: 203rpx;
  415. height: 72rpx;
  416. border-radius: 9rpx;
  417. font-size: 32rpx;
  418. }
  419. .cancel {
  420. background-color: #e5e5e5;
  421. color: #6fb6b8;
  422. }
  423. .confirm {
  424. background-color: #6fb6b8;
  425. color: #fff;
  426. }
  427. }
  428. }
  429. }
  430. }
  431. }
  432. </style>