repairDetails.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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.recordNo }}</view>
  7. </view>
  8. <view class="box_time">
  9. <view class="time_msg">
  10. 报修时间:
  11. <text>{{ detailInfo.reportTime }}</text>
  12. </view>
  13. <view class="time_type" v-if="detailInfo.state === '待接单'">待接单</view>
  14. <view class="time_type color_type" v-if="detailInfo.state === '维修中'">维修中</view>
  15. <view class="time_type" v-if="detailInfo.state === '待确认'">待确认</view>
  16. <view class="time_type color_type2" v-if="detailInfo.state === '已完成'">已完成</view>
  17. <view class="time_type" v-if="detailInfo.state === '已取消'">已取消</view>
  18. </view>
  19. <view class="box">
  20. <view class="box_key">报修姓名:</view>
  21. <view class="box_value">{{ detailInfo.userName }}</view>
  22. </view>
  23. <view class="box">
  24. <view class="box_key">报修电话:</view>
  25. <view class="box_value phone" @click="handleCallPhone(detailInfo.userPhone)">
  26. {{ detailInfo.userPhone }}
  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.areaName }}</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.articleName }}</view>
  41. </view>
  42. <view class="box">
  43. <view class="box_key">故障描述:</view>
  44. <view class="box_value">{{ detailInfo.descript }}</view>
  45. </view>
  46. <view class="box_img">
  47. <view class="img_key">上传图片:</view>
  48. <img class="img_value" mode="aspectFill" :src="detailInfo.images[0]" @click="handleLookImgs(detailInfo.images)" />
  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="4">
  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. // 报修详情信息
  114. detailInfo: {},
  115. // 步骤条样式
  116. customStyle: {
  117. marginBottom: '5px'
  118. },
  119. // 步骤条数据
  120. stepsList: [
  121. {
  122. id: 1,
  123. title: '提交订单',
  124. type: true,
  125. desc: ['2023-07-05 08:25:25']
  126. },
  127. {
  128. id: 2,
  129. title: '已接单',
  130. type: true,
  131. desc: ['2023-07-05 08:25:25']
  132. },
  133. {
  134. id: 3,
  135. title: '待确认',
  136. type: true,
  137. desc: ['2023-07-05 08:25:25', '张发财转后勤:太贵了', '系统管理员改价:耗材为螺丝刀,价格50元', '系统管理员改价:耗材为螺丝刀,价格50元']
  138. },
  139. {
  140. id: 4,
  141. title: '待确认',
  142. type: false,
  143. desc: ['2023-07-05 08:25:25']
  144. },
  145. {
  146. id: 5,
  147. title: '已完成',
  148. type: false,
  149. desc: ['2023-07-05 08:25:25']
  150. }
  151. ]
  152. }
  153. },
  154. onLoad(options) {
  155. this.detailInfo = JSON.parse(decodeURIComponent(options.detailInfo))
  156. console.log(this.detailInfo)
  157. },
  158. methods: {
  159. // 查看维修费用回调
  160. checkFeeDetail() {
  161. this.$refs.popup_fee.open('center')
  162. },
  163. // 点击电话号码回调
  164. handleCallPhone(phone) {
  165. uni.makePhoneCall({
  166. phoneNumber: phone
  167. })
  168. },
  169. // 点击图片回调
  170. handleLookImgs(img) {
  171. uni.previewImage({
  172. urls: img
  173. })
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="scss" scoped>
  179. .container {
  180. padding: 0 30rpx;
  181. height: 100vh;
  182. overflow-y: auto;
  183. .title {
  184. height: 90rpx;
  185. line-height: 90rpx;
  186. font-size: 32rpx;
  187. font-weight: bold;
  188. }
  189. .top {
  190. margin-top: 20rpx;
  191. }
  192. .box {
  193. display: flex;
  194. height: 60rpx;
  195. font-size: 28rpx;
  196. .box_key {
  197. color: #808080;
  198. }
  199. .box_value {
  200. display: flex;
  201. img {
  202. margin-top: 5rpx;
  203. margin-left: 10rpx;
  204. width: 28rpx;
  205. height: 28rpx;
  206. }
  207. }
  208. .box_value2 {
  209. display: flex;
  210. img {
  211. margin-top: -2rpx;
  212. margin-left: 14rpx;
  213. width: 46rpx;
  214. height: 46rpx;
  215. }
  216. }
  217. .phone {
  218. color: #6fb6b8;
  219. }
  220. }
  221. .box_time {
  222. display: flex;
  223. height: 60rpx;
  224. .time_msg {
  225. font-size: 28rpx;
  226. color: #808080;
  227. text {
  228. color: #000000;
  229. }
  230. }
  231. .time_type {
  232. margin-left: 123rpx;
  233. margin-top: -5rpx;
  234. font-size: 32rpx;
  235. color: #ff5733;
  236. }
  237. .color_type {
  238. color: #1e7dfb;
  239. }
  240. .color_type2 {
  241. color: #6fb6b8;
  242. }
  243. }
  244. .box_img {
  245. display: flex;
  246. align-items: center;
  247. height: 120rpx;
  248. color: #808080;
  249. font-size: 28rpx;
  250. .img_key {
  251. }
  252. .img_value {
  253. width: 120rpx;
  254. height: 120rpx;
  255. border-radius: 14rpx;
  256. }
  257. }
  258. .steps_title {
  259. color: #969799;
  260. font-size: 28rpx;
  261. }
  262. .active {
  263. color: #6fb6b8;
  264. }
  265. .steps_desc {
  266. line-height: 45rpx;
  267. font-size: 24rpx;
  268. }
  269. .gap {
  270. height: 20rpx;
  271. }
  272. .pop_fee {
  273. padding-bottom: 50rpx;
  274. border-radius: 19rpx;
  275. background-color: #fff;
  276. .fee_title {
  277. display: flex;
  278. justify-content: space-between;
  279. align-items: center;
  280. box-sizing: border-box;
  281. padding: 0 31rpx 0 42rpx;
  282. width: 690rpx;
  283. height: 110rpx;
  284. font-size: 32rpx;
  285. font-weight: bold;
  286. border-radius: 19rpx 19rpx 0 0;
  287. border-bottom: 1rpx solid #e6e6e6;
  288. text {
  289. font-size: 45rpx;
  290. font-weight: 400;
  291. color: #808080;
  292. }
  293. }
  294. .fee_box {
  295. display: flex;
  296. align-items: center;
  297. padding-left: 42rpx;
  298. height: 80rpx;
  299. font-size: 28rpx;
  300. color: #808080;
  301. text {
  302. color: #000000;
  303. }
  304. }
  305. }
  306. }
  307. </style>