repairDetails.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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(detailInfo.phone)">
  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="box top" v-if="detailInfo.workerName">
  51. <view class="box_key">维修师傅:</view>
  52. <view class="box_value">{{ detailInfo.workerName }}</view>
  53. </view>
  54. <view class="box" v-if="detailInfo.workerPhone">
  55. <view class="box_key">师傅电话:</view>
  56. <view class="box_value phone" @click="handleCallPhone(detailInfo.workerPhone)">
  57. {{ detailInfo.workerPhone }}
  58. <img src="../../static/images/repairsImg/phone.png" />
  59. </view>
  60. </view>
  61. <view class="box" v-if="detailInfo.money">
  62. <view class="box_key">维修费用:</view>
  63. <view class="box_value2 phone" @click="checkFeeDetail">
  64. {{ detailInfo.money }}元
  65. <img src="../../static/images/repairsImg/eye.png" />
  66. </view>
  67. </view>
  68. <view class="title top">报修跟踪</view>
  69. <!-- 步骤条区域 -->
  70. <!-- activeIcon="checkmark-circle-fill" -->
  71. <uv-steps activeColor="#6FB6B8" direction="column" current="3">
  72. <uv-steps-item :customStyle="customStyle" v-for="item in stepsList" :key="item.id">
  73. <template v-slot:title>
  74. <view class="steps_title" :class="{ active: item.type }">{{ item.title }}</view>
  75. </template>
  76. <template v-slot:desc>
  77. <view class="steps_desc" v-for="(element, index) in item.desc" :key="index">{{ element }}</view>
  78. </template>
  79. </uv-steps-item>
  80. </uv-steps>
  81. <view class="gap"></view>
  82. <!-- 维修费用弹窗 -->
  83. <uni-popup :is-mask-click="false" ref="popup_fee">
  84. <view class="pop_fee">
  85. <view class="fee_title">
  86. 维修费用
  87. <text @click="$refs.popup_fee.close()">×</text>
  88. </view>
  89. <view class="fee_box">
  90. 耗材:
  91. <text>螺丝刀</text>
  92. </view>
  93. <view class="fee_box">
  94. 耗材单价:
  95. <text>1元</text>
  96. </view>
  97. <view class="fee_box">
  98. 耗材数量:
  99. <text>2</text>
  100. </view>
  101. <view class="fee_box">
  102. 耗材费用:
  103. <text>2元</text>
  104. </view>
  105. </view>
  106. </uni-popup>
  107. </view>
  108. </template>
  109. <script>
  110. export default {
  111. data() {
  112. return {
  113. detailInfo: {},
  114. customStyle: {
  115. marginBottom: '5px'
  116. },
  117. stepsList: [
  118. {
  119. id: 1,
  120. title: '提交订单',
  121. type: true,
  122. desc: ['2023-07-05 08:25:25']
  123. },
  124. {
  125. id: 2,
  126. title: '已接单',
  127. type: true,
  128. desc: ['2023-07-05 08:25:25']
  129. },
  130. {
  131. id: 3,
  132. title: '待确认',
  133. type: true,
  134. desc: ['2023-07-05 08:25:25', '张发财转后勤:太贵了', '系统管理员改价:耗材为螺丝刀,价格50元', '系统管理员改价:耗材为螺丝刀,价格50元']
  135. },
  136. {
  137. id: 4,
  138. title: '待确认',
  139. type: false,
  140. desc: ['2023-07-05 08:25:25']
  141. },
  142. {
  143. id: 5,
  144. title: '已完成',
  145. type: false,
  146. desc: ['2023-07-05 08:25:25']
  147. }
  148. ]
  149. }
  150. },
  151. onLoad(options) {
  152. this.detailInfo = JSON.parse(decodeURIComponent(options.detailInfo))
  153. console.log(this.detailInfo)
  154. },
  155. methods: {
  156. // 查看维修费用回调
  157. checkFeeDetail() {
  158. this.$refs.popup_fee.open('center')
  159. },
  160. // 点击电话号码回调
  161. handleCallPhone(phone) {
  162. uni.makePhoneCall({
  163. phoneNumber: phone
  164. })
  165. },
  166. // 点击图片回调
  167. handleLookImgs(img) {
  168. // console.log(img)
  169. uni.previewImage({
  170. urls: img
  171. })
  172. }
  173. }
  174. }
  175. </script>
  176. <style lang="scss" scoped>
  177. .container {
  178. padding: 0 30rpx;
  179. height: 100vh;
  180. overflow-y: auto;
  181. .title {
  182. height: 90rpx;
  183. line-height: 90rpx;
  184. font-size: 32rpx;
  185. font-weight: bold;
  186. }
  187. .top {
  188. margin-top: 20rpx;
  189. }
  190. .box {
  191. display: flex;
  192. height: 60rpx;
  193. font-size: 28rpx;
  194. .box_key {
  195. color: #808080;
  196. }
  197. .box_value {
  198. display: flex;
  199. img {
  200. margin-top: 5rpx;
  201. margin-left: 10rpx;
  202. width: 28rpx;
  203. height: 28rpx;
  204. }
  205. }
  206. .box_value2 {
  207. display: flex;
  208. img {
  209. margin-top: -2rpx;
  210. margin-left: 14rpx;
  211. width: 46rpx;
  212. height: 46rpx;
  213. }
  214. }
  215. .phone {
  216. color: #6fb6b8;
  217. }
  218. }
  219. .box_time {
  220. display: flex;
  221. height: 60rpx;
  222. .time_msg {
  223. font-size: 28rpx;
  224. color: #808080;
  225. text {
  226. color: #000000;
  227. }
  228. }
  229. .time_type {
  230. margin-left: 123rpx;
  231. margin-top: -5rpx;
  232. font-size: 32rpx;
  233. color: #ff5733;
  234. }
  235. .color_type {
  236. color: #1e7dfb;
  237. }
  238. .color_type2 {
  239. color: #6fb6b8;
  240. }
  241. }
  242. .box_img {
  243. display: flex;
  244. align-items: center;
  245. height: 120rpx;
  246. color: #808080;
  247. font-size: 28rpx;
  248. .img_key {
  249. }
  250. .img_value {
  251. width: 120rpx;
  252. height: 120rpx;
  253. border-radius: 14rpx;
  254. background-color: salmon;
  255. }
  256. }
  257. .steps_title {
  258. color: #969799;
  259. font-size: 28rpx;
  260. }
  261. .active {
  262. color: #6fb6b8;
  263. }
  264. .steps_desc {
  265. line-height: 45rpx;
  266. font-size: 24rpx;
  267. }
  268. .gap {
  269. height: 20rpx;
  270. }
  271. .pop_fee {
  272. padding-bottom: 50rpx;
  273. border-radius: 19rpx;
  274. background-color: #fff;
  275. .fee_title {
  276. display: flex;
  277. justify-content: space-between;
  278. align-items: center;
  279. box-sizing: border-box;
  280. padding: 0 31rpx 0 42rpx;
  281. width: 690rpx;
  282. height: 110rpx;
  283. font-size: 32rpx;
  284. font-weight: bold;
  285. border-radius: 19rpx 19rpx 0 0;
  286. border-bottom: 1rpx solid #e6e6e6;
  287. text {
  288. font-size: 45rpx;
  289. font-weight: 400;
  290. color: #808080;
  291. }
  292. }
  293. .fee_box {
  294. display: flex;
  295. align-items: center;
  296. padding-left: 42rpx;
  297. height: 80rpx;
  298. font-size: 28rpx;
  299. color: #808080;
  300. text {
  301. color: #000000;
  302. }
  303. }
  304. }
  305. }
  306. </style>