index.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  1. <template>
  2. <view class="orderDetail">
  3. <view class="orderHeader">
  4. <!-- 手机状态栏占位 -->
  5. <view class="statusBar" :style="{height:statusBarHeight+'rpx'}"></view>
  6. <!-- 导航栏 -->
  7. <view class="navigationBar" :style="{height:navigationBarHeight,paddingTop:statusBarHeight+'rpx'}">
  8. <view @tap="goBack">
  9. <image :src="require('../../../../static/backw.png')" alt="">
  10. </view>
  11. <view class="navigationTitle">
  12. 订单详情
  13. </view>
  14. </view>
  15. <view class="headerBody" @click="toPath">
  16. <view>
  17. <view class="serveBody">
  18. <image :src="require('../../../../static/che.png')" alt="">
  19. <view class="serveTitle">
  20. {{orderData.status==1?'待服务':orderData.status==2?'提车中':orderData.status==3?'作业中':orderData.status==4?'作业完成待支付':orderData.status==5?'作业完成已支付':orderData.status==6?'已完成':'已取消'}}
  21. </view>
  22. </view>
  23. <view class="reserve">
  24. 预约时间:{{orderData.time}}
  25. </view>
  26. </view>
  27. <image class="more" :src="require('../../../../static/more-w.png')" alt="">
  28. </view>
  29. </view>
  30. <view class="orderBody">
  31. <view class="orderDetail">
  32. <view class="carHeader">
  33. 预约信息
  34. </view>
  35. <view class="carView">
  36. <image :src="baseImagePath+orderData.carLogo" alt="">
  37. <view class="carBody">
  38. <view class="carTitle">
  39. <image :src="require('../../../../static/car.png')" alt="">
  40. <span>{{orderData.carNumber}}</span>
  41. <view class="border"></view>
  42. <span>{{orderData.carMadelLevel}}</span>
  43. </view>
  44. <view class="content">
  45. {{orderData.carTypeName}}
  46. </view>
  47. </view>
  48. </view>
  49. <view class="shop">
  50. <view>
  51. 服务门店:{{orderData.shopName}}
  52. </view>
  53. </view>
  54. <view class="times">
  55. <view>
  56. 服务方式:{{orderData.serviceType==1?'在店下单':'上门提车'}}
  57. </view>
  58. </view>
  59. <view class="times" v-if="orderData.remarks">
  60. <view>
  61. 预约备注:{{orderData.remarks}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="explain">
  66. <view class="serveHeader">
  67. 服务项目
  68. </view>
  69. <view class="serveBodys" v-for="(item, index) in orderData.repairOrderServicesVO" :key="index">
  70. <view class="leftView">
  71. <view class="dian"></view>
  72. <view class="title">
  73. {{item.goodsName}}
  74. </view>
  75. </view>
  76. <view class="rightView" v-if="item.oneName !== null">
  77. {{item.oneName}}
  78. </view>
  79. </view>
  80. </view>
  81. <view style="height: 240rpx;"></view>
  82. </view>
  83. <view class="buttomBtn" v-if="orderData.status==4 || orderData.status==5 || orderData.status==6">
  84. <view class="inventory" @click="toRouter(orderData.id)">
  85. 费用清单
  86. </view>
  87. </view>
  88. </view>
  89. </template>
  90. <script>
  91. import {
  92. orderDetail
  93. } from "@/api/maintain.js"
  94. export default {
  95. components: {},
  96. data: function() {
  97. return {
  98. baseImagePath:this.baseImagePath,
  99. serveList: [{
  100. name: "常规检查",
  101. subTitle: "全车48项检测",
  102. },
  103. {
  104. name: "机械维修",
  105. subTitle: "机械维修",
  106. },
  107. {
  108. name: "常规检查",
  109. subTitle: "全车48项检测",
  110. },
  111. {
  112. name: "常规检查",
  113. subTitle: "机械维修",
  114. },
  115. ],
  116. orderData: {},
  117. statusBarHeight: "",
  118. navigationBarHeight: "",
  119. navHeight: ""
  120. }
  121. },
  122. onLoad(options) {
  123. console.log(options);
  124. this.orderData = JSON.parse(decodeURIComponent(options.data));
  125. orderDetail({id:this.orderData.id}).then((res)=>{
  126. this.orderData= res.data;
  127. console.log(this.orderData);
  128. })
  129. // 状态栏高度
  130. this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
  131. // #ifdef MP-WEIXIN
  132. // 获取微信胶囊的位置信息 width,height,top,right,left,bottom
  133. const custom = wx.getMenuButtonBoundingClientRect()
  134. // console.log(custom)
  135. // 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
  136. this.navigationBarHeight = custom.height + (custom.top - this.statusBarHeight) * 2
  137. // console.log("导航栏高度:"+this.globalData.navigationBarHeight)
  138. // 总体高度 = 状态栏高度 + 导航栏高度
  139. this.navHeight = (this.navigationBarHeight + this.statusBarHeight)
  140. this.navigationBarHeight = this.navigationBarHeight + 'px'
  141. this.statusBarHeight = this.statusBarHeight + 'px'
  142. this.navHeight = this.navHeight + 'px'
  143. // #endif
  144. },
  145. methods: {
  146. goBack() {
  147. uni.navigateBack({
  148. delta: 1
  149. })
  150. },
  151. toPath() {
  152. this.$yrouter.push({
  153. path: "/pages/maintenance/maintainOrder/flow/index?data=" + encodeURIComponent(JSON.stringify(this.orderData))
  154. });
  155. },
  156. toRouter(id){
  157. console.log(id);
  158. this.$yrouter.push({
  159. path:"/pages/maintenance/expensesList/expensesList?id="+id
  160. })
  161. }
  162. },
  163. }
  164. </script>
  165. <style lang="less">
  166. page {
  167. background: #F5F5F5;
  168. }
  169. .buttomBtn {
  170. position: fixed;
  171. bottom: 0;
  172. width: 750rpx;
  173. height: 144rpx;
  174. background: #FFFFFF;
  175. display: flex;
  176. align-items: center;
  177. justify-content: flex-end;
  178. .deliveryOfVehicle {
  179. width: 200rpx;
  180. height: 70rpx;
  181. background: #FFFFFF;
  182. border: 1px solid #005EFF;
  183. border-radius: 35rpx;
  184. font-size: 28rpx;
  185. font-family: PingFang SC;
  186. font-weight: 500;
  187. color: #005EFF;
  188. line-height: 70rpx;
  189. text-align: center;
  190. margin-right: 20rpx;
  191. }
  192. .liveStreaming {
  193. width: 200rpx;
  194. height: 70rpx;
  195. background: #FFFFFF;
  196. border: 1px solid #005EFF;
  197. border-radius: 35rpx;
  198. font-size: 28rpx;
  199. font-family: PingFang SC;
  200. font-weight: 500;
  201. color: #005EFF;
  202. line-height: 70rpx;
  203. text-align: center;
  204. margin-right: 20rpx;
  205. }
  206. .inventory {
  207. width: 200rpx;
  208. height: 70rpx;
  209. background: linear-gradient(0deg, #008EFF 0%, #0036FF 100%);
  210. border-radius: 35rpx;
  211. font-size: 28rpx;
  212. font-family: PingFang SC;
  213. font-weight: 500;
  214. color: #FFFFFF;
  215. line-height: 70rpx;
  216. text-align: center;
  217. margin-right: 20rpx;
  218. }
  219. }
  220. .more {
  221. width: 14rpx;
  222. height: 23rpx;
  223. }
  224. .serveBodys {
  225. display: flex;
  226. align-items: center;
  227. justify-content: space-between;
  228. padding: 34rpx 30rpx 0 36rpx;
  229. .leftView {
  230. display: flex;
  231. align-items: center;
  232. .dian {
  233. width: 6rpx;
  234. height: 6rpx;
  235. background: #005EFF;
  236. border-radius: 50%;
  237. }
  238. .title {
  239. padding-left: 10rpx;
  240. font-size: 28rpx;
  241. font-family: PingFang SC;
  242. font-weight: 500;
  243. color: #333333;
  244. line-height: 36rpx;
  245. }
  246. }
  247. .rightView {
  248. text-align: center;
  249. min-width: 94rpx;
  250. height: 32rpx;
  251. background: #FFFFFF;
  252. border: 1px solid #DBDBDB;
  253. border-radius: 3rpx;
  254. font-size: 18rpx;
  255. font-family: PingFang SC;
  256. font-weight: 500;
  257. color: #999999;
  258. line-height: 32rpx;
  259. }
  260. }
  261. .headerBody {
  262. display: flex;
  263. align-items: center;
  264. margin-top: 73rpx;
  265. margin-left: 44rpx;
  266. justify-content: space-between;
  267. margin-right: 41rpx;
  268. }
  269. .orderBody {
  270. position: absolute;
  271. top: 358rpx;
  272. //
  273. .orderDetail {
  274. width: 710rpx;
  275. background: #FFFFFF;
  276. border-radius: 10rpx;
  277. margin: 20rpx;
  278. .carHeader {
  279. padding: 38rpx 0 13rpx 31rpx;
  280. font-size: 32rpx;
  281. font-family: PingFang SC;
  282. font-weight: bold;
  283. color: #333333;
  284. line-height: 36rpx;
  285. }
  286. .carView {
  287. display: flex;
  288. padding: 26rpx;
  289. image {
  290. width: 120rpx;
  291. height: 120rpx;
  292. background: #FFFFFF;
  293. border: 2rpx solid #F4F4F4;
  294. border-radius: 8rpx;
  295. padding-top: 14rpx;
  296. }
  297. .carBody {
  298. padding: 14rpx 29rpx 14rpx 29rpx;
  299. .carTitle {
  300. display: flex;
  301. image {
  302. width: 33rpx;
  303. height: 27rpx;
  304. padding-top: 0rpx;
  305. }
  306. .border {
  307. width: 1px;
  308. height: 20rpx;
  309. background: #DBDBDB;
  310. }
  311. span {
  312. font-size: 30rpx;
  313. font-family: PingFang SC;
  314. font-weight: bold;
  315. color: #333333;
  316. line-height: 31rpx;
  317. padding: 0 15rpx 0 15rpx;
  318. }
  319. }
  320. .content {
  321. font-size: 26rpx;
  322. font-family: PingFang SC;
  323. font-weight: 500;
  324. color: #666666;
  325. line-height: 34rpx;
  326. padding: 20rpx 60rpx 20rpx 0;
  327. }
  328. }
  329. }
  330. .shop {
  331. display: flex;
  332. align-items: center;
  333. font-size: 26rpx;
  334. font-family: PingFang SC;
  335. font-weight: 500;
  336. color: #333333;
  337. line-height: 34rpx;
  338. padding: 15rpx 30rpx 15rpx 30rpx;
  339. image {
  340. width: 30rpx;
  341. height: 26rpx;
  342. }
  343. }
  344. .times {
  345. display: flex;
  346. align-items: center;
  347. font-size: 26rpx;
  348. font-family: PingFang SC;
  349. font-weight: 500;
  350. color: #333333;
  351. line-height: 34rpx;
  352. margin-top: 16rpx;
  353. padding-bottom: 30rpx;
  354. padding: 0rpx 30rpx 15rpx 30rpx;
  355. image {
  356. width: 30rpx;
  357. height: 26rpx;
  358. }
  359. }
  360. .buttomBtn {
  361. height: 33rpx;
  362. font-size: 26rpx;
  363. font-family: PingFang SC;
  364. font-weight: 500;
  365. color: #333333;
  366. line-height: 34rpx;
  367. text-align: center;
  368. margin: 26rpx 31rpx 0 74%;
  369. }
  370. }
  371. .explain {
  372. width: 710rpx;
  373. background: #FFFFFF;
  374. border-radius: 10rpx;
  375. margin: 20rpx;
  376. padding-top: 11rpx;
  377. padding-bottom: 40rpx;
  378. .serveHeader {
  379. padding: 38rpx 0 13rpx 31rpx;
  380. font-size: 32rpx;
  381. font-family: PingFang SC;
  382. font-weight: bold;
  383. color: #333333;
  384. line-height: 36rpx;
  385. }
  386. }
  387. }
  388. .orderHeader {
  389. width: 100%;
  390. height: 454rpx;
  391. background: linear-gradient(90deg, #005AFF 0%, #0078FF 100%);
  392. .navigationBar {
  393. display: flex;
  394. align-items: center;
  395. text-align: center;
  396. image {
  397. padding-left: 17rpx;
  398. width: 44rpx;
  399. height: 44rpx;
  400. }
  401. .navigationTitle {
  402. padding-left: 242rpx;
  403. font-size: 36rpx;
  404. font-family: PingFang SC;
  405. font-weight: bold;
  406. color: #FFFFFF;
  407. line-height: 75rpx;
  408. }
  409. }
  410. .serveBody {
  411. display: flex;
  412. align-items: center;
  413. image {
  414. width: 77rpx;
  415. height: 38rpx;
  416. }
  417. .serveTitle {
  418. font-size: 36rpx;
  419. font-family: PingFang SC;
  420. font-weight: bold;
  421. color: #FFFFFF;
  422. line-height: 75rpx;
  423. padding-left: 20rpx;
  424. }
  425. }
  426. .reserve {
  427. margin-top: 27rpx;
  428. font-size: 24rpx;
  429. font-family: PingFang SC;
  430. font-weight: 500;
  431. color: #FFFFFF;
  432. line-height: 31rpx;
  433. }
  434. }
  435. </style>