repairDetails.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <view class="container">
  3. <view class="title">工单信息</view>
  4. <view class="box">
  5. <view class="box_key">工单编号:</view>
  6. <view class="box_value">{{ detailInfo.order }}</view>
  7. </view>
  8. <view class="box_time">
  9. <view class="time_msg">
  10. 报修时间:
  11. <text>{{ detailInfo.time }}</text>
  12. </view>
  13. <view class="time_type" v-if="detailInfo.type === 1">待接单</view>
  14. <view class="time_type color_type" v-if="detailInfo.type === 2">维修中</view>
  15. <view class="time_type" v-if="detailInfo.type === 3">待确认</view>
  16. <view class="time_type color_type2" v-if="detailInfo.type === 4">已完成</view>
  17. <view class="time_type" v-if="detailInfo.type === 5">已取消</view>
  18. </view>
  19. <view class="box">
  20. <view class="box_key">报修姓名:</view>
  21. <view class="box_value">{{ detailInfo.name }}</view>
  22. </view>
  23. <view class="box">
  24. <view class="box_key">报修电话:</view>
  25. <view class="box_value phone" @click="handleCallPhone('13820846714')">
  26. {{ detailInfo.phone }}
  27. <img src="../../static/images/repairsImg/phone.png" />
  28. </view>
  29. </view>
  30. <view class="box">
  31. <view class="box_key">报修区域:</view>
  32. <view class="box_value">{{ detailInfo.area }}</view>
  33. </view>
  34. <view class="box">
  35. <view class="box_key">详细地址:</view>
  36. <view class="box_value">{{ detailInfo.address }}</view>
  37. </view>
  38. <view class="box">
  39. <view class="box_key">报修物品:</view>
  40. <view class="box_value">{{ detailInfo.goods }}</view>
  41. </view>
  42. <view class="box">
  43. <view class="box_key">故障描述:</view>
  44. <view class="box_value">{{ detailInfo.description }}</view>
  45. </view>
  46. <view class="box_img">
  47. <view class="img_key">上传图片:</view>
  48. <img class="img_value" mode="aspectFill" :src="detailInfo.img[0]" @click="handleLookImgs(detailInfo.img)" />
  49. </view>
  50. <view class="title top">报修跟踪</view>
  51. <!-- 步骤条区域 -->
  52. <!-- activeIcon="checkmark-circle-fill" -->
  53. <uv-steps activeColor="#6FB6B8" direction="column" current="3">
  54. <uv-steps-item :customStyle="customStyle" v-for="item in stepsList" :key="item.id">
  55. <template v-slot:title>
  56. <view class="steps_title" :class="{ active: item.type }">{{ item.title }}</view>
  57. </template>
  58. <template v-slot:desc>
  59. <view class="steps_desc" v-for="(element, index) in item.desc" :key="index">{{ element }}</view>
  60. </template>
  61. </uv-steps-item>
  62. </uv-steps>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. data() {
  68. return {
  69. detailInfo: {},
  70. customStyle: {
  71. marginBottom: '5px'
  72. },
  73. stepsList: [
  74. {
  75. id: 1,
  76. title: '提交订单',
  77. type: true,
  78. desc: ['2023-07-05 08:25:25']
  79. },
  80. {
  81. id: 2,
  82. title: '已接单',
  83. type: true,
  84. desc: ['2023-07-05 08:25:25']
  85. },
  86. {
  87. id: 3,
  88. title: '待确认',
  89. type: true,
  90. desc: ['2023-07-05 08:25:25', '张发财转后勤:太贵了', '系统管理员改价:耗材为螺丝刀,价格50元', '系统管理员改价:耗材为螺丝刀,价格50元']
  91. },
  92. {
  93. id: 4,
  94. title: '待确认',
  95. type: false,
  96. desc: ['2023-07-05 08:25:25']
  97. },
  98. {
  99. id: 5,
  100. title: '已完成',
  101. type: false,
  102. desc: ['2023-07-05 08:25:25']
  103. }
  104. ]
  105. }
  106. },
  107. onLoad(options) {
  108. this.detailInfo = JSON.parse(decodeURIComponent(options.detailInfo))
  109. console.log(this.detailInfo)
  110. },
  111. methods: {
  112. // 点击电话号码回调
  113. handleCallPhone(phone) {
  114. console.log(phone)
  115. uni.makePhoneCall({
  116. phoneNumber: phone
  117. })
  118. },
  119. // 点击图片回调
  120. handleLookImgs(img) {
  121. // console.log(img)
  122. uni.previewImage({
  123. urls: img
  124. })
  125. }
  126. }
  127. }
  128. </script>
  129. <style lang="scss" scoped>
  130. .container {
  131. padding: 0 30rpx 50rpx;
  132. height: 100vh;
  133. overflow-y: auto;
  134. .title {
  135. height: 90rpx;
  136. line-height: 90rpx;
  137. font-size: 32rpx;
  138. font-weight: bold;
  139. }
  140. .top {
  141. margin-top: 20rpx;
  142. }
  143. .box {
  144. display: flex;
  145. height: 60rpx;
  146. font-size: 28rpx;
  147. .box_key {
  148. color: #808080;
  149. }
  150. .box_value {
  151. display: flex;
  152. img {
  153. margin-top: 5rpx;
  154. margin-left: 10rpx;
  155. width: 28rpx;
  156. height: 28rpx;
  157. }
  158. }
  159. .phone {
  160. color: #6fb6b8;
  161. }
  162. }
  163. .box_time {
  164. display: flex;
  165. height: 60rpx;
  166. .time_msg {
  167. font-size: 28rpx;
  168. color: #808080;
  169. text {
  170. color: #000000;
  171. }
  172. }
  173. .time_type {
  174. margin-left: 123rpx;
  175. margin-top: -5rpx;
  176. font-size: 32rpx;
  177. color: #ff5733;
  178. }
  179. .color_type {
  180. color: #1e7dfb;
  181. }
  182. .color_type2 {
  183. color: #6fb6b8;
  184. }
  185. }
  186. .box_img {
  187. display: flex;
  188. align-items: center;
  189. height: 120rpx;
  190. color: #808080;
  191. font-size: 28rpx;
  192. .img_key {
  193. }
  194. .img_value {
  195. width: 120rpx;
  196. height: 120rpx;
  197. border-radius: 14rpx;
  198. background-color: salmon;
  199. }
  200. }
  201. .steps_title {
  202. color: #969799;
  203. font-size: 28rpx;
  204. }
  205. .active {
  206. color: #6fb6b8;
  207. }
  208. .steps_desc {
  209. line-height: 45rpx;
  210. font-size: 24rpx;
  211. }
  212. }
  213. </style>