bespeakDetail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. <template>
  2. <view class="box">
  3. <view class="top">
  4. <view class="orderState">
  5. <image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
  6. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 0">待确认</view>
  7. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 1">预约中</view>
  8. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 2">已到店</view>
  9. <view class="SheetState" v-if="orderData.orderSheet.sheetState == 3">已取消</view>
  10. </view>
  11. </view>
  12. <!-- 店铺信息 -->
  13. <view class="shopBox">
  14. <image src="../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
  15. <view class="shopCont">
  16. <view class="shopName">{{orderData.shopInfo.ShopName}}</view>
  17. <view class="Address">{{orderData.shopInfo.province}}{{orderData.shopInfo.city}}{{orderData.shopInfo.area}}{{orderData.shopInfo.address}}</view>
  18. </view>
  19. <view class="shopRightBox" @click="map">
  20. <image src="../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
  21. <view class="shopRihgtTxt">地图</view>
  22. </view>
  23. <view class="shopsx"></view>
  24. <view class="shopRightBox" @click="call">
  25. <image src="../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
  26. <view class="shopRihgtTxt">电话</view>
  27. </view>
  28. </view>
  29. <!-- 订单信息 -->
  30. <view class="information">
  31. <view class="detailedTitle">基本信息</view>
  32. <view class="informationLine">
  33. <view class="informationTxt">车牌号:</view>
  34. <view class="informationNum">{{orderData.orderSheet.plateNumber}}</view>
  35. </view>
  36. <view class="informationLine">
  37. <view class="informationTxt">手机号:</view>
  38. <view class="informationNum">{{orderData.orderSheet.mobilePhone}}</view>
  39. </view>
  40. <view class="informationLine">
  41. <view class="informationTxt">预约时间:</view>
  42. <view class="informationNum">{{orderData.orderSheet.billDate}}</view>
  43. </view>
  44. <view class="informationLine">
  45. <view class="informationTxt">单号:</view>
  46. <view class="informationNum">{{orderData.orderSheet.code}}</view>
  47. </view>
  48. <view class="informationLine">
  49. <view class="informationTxt">备注:</view>
  50. <view class="informationNum">{{orderData.orderSheet.comment}}</view>
  51. </view>
  52. </view>
  53. <!-- 项目明细 -->
  54. <view class="detailedBox itemBox" v-if=" orderData.orderDetails.length!=0">
  55. <view class="detailedTitle">预约项目</view>
  56. <view class="detailedLineBox">
  57. <view class="detailedLine" v-for="(v,index) in orderData.orderDetails">
  58. <view class="detailedName">{{v.itemName}}</view>
  59. <span>¥{{v.amountMoney}}</span>
  60. </view>
  61. <view class="detailedLine" v-if=" orderData.orderDetails.length!=0">
  62. <view class="detailedName">预估总价</view>
  63. <span>¥{{v.amountMoney}}</span>
  64. </view>
  65. <view class="content">温馨提示:该报价仅为参考价格,实际以门店为准(不同品牌和车型费用会不同)</view>
  66. </view>
  67. </view>
  68. <view class="bottom" v-if="(orderData.orderSheet.sheetState == 0)||(orderData.orderSheet.sheetState == 1)">
  69. <view class="cancel">取消预约</view>
  70. <view class="defer" @click="cktime">延期</view>
  71. </view>
  72. <!-- 预约时间 -->
  73. <timeSelect ref="timeSelect" :timedata="timedata" @changeTime="changeTime"></timeSelect>
  74. </view>
  75. </template>
  76. <script>
  77. import timeSelect from '@/components/timeSelect/timeSelect.vue'
  78. export default {
  79. components: {
  80. timeSelect
  81. },
  82. data() {
  83. return {
  84. location: '',
  85. id: '',
  86. orderData: '',
  87. timedata:'',
  88. billDate:'',
  89. }
  90. },
  91. onLoad(opt) {
  92. this.id = opt.id
  93. if (this.id) {
  94. this.getData()
  95. }
  96. },
  97. methods: {
  98. changeTime(data){
  99. console.log(data)
  100. this.billDate=data
  101. this.upTime();
  102. },
  103. cktime(){
  104. this.$refs.timeSelect.open();
  105. },
  106. upTime() {
  107. uni.showLoading({
  108. title: '加载中'
  109. })
  110. this.$http('openreservation/carOwner/updateTimeOfAppointment', {
  111. id: this.id,
  112. shopid: this.orderData.shopInfo.id,
  113. billDate:this.billDate
  114. }, 'POST').then(res => {
  115. uni.hideLoading();
  116. // var list = res.data.Items
  117. var list = res.data
  118. console.log("result+=",res.data);
  119. })
  120. },
  121. map() {
  122. console.log("打开地图")
  123. var that = this;
  124. if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
  125. uni.showToast({
  126. title: '该店铺未设置定位',
  127. icon: 'none',
  128. duration: 3000
  129. });
  130. } else {
  131. uni.openLocation({
  132. latitude: Number(that.orderData.shopInfo.lat),
  133. longitude: Number(that.orderData.shopInfo.lng),
  134. name: that.orderData.shopInfo.shopName,
  135. address: that.orderData.shopInfo.province+that.orderData.shopInfo.city+that.orderData.shopInfo.area+that.orderData.shopInfo.Address,
  136. success: function() {
  137. console.log('success');
  138. },
  139. fail(err) {
  140. console.log(err)
  141. }
  142. });
  143. }
  144. },
  145. call() {
  146. uni.makePhoneCall({
  147. phoneNumber: this.orderData.orderSheet.mobilePhone
  148. });
  149. },
  150. getData() {
  151. uni.showLoading({
  152. title: '加载中'
  153. });
  154. this.$http('openreservation/orderSheetDetails', {
  155. // lat: this.location.lat,
  156. // lng: this.location.lng,
  157. id: this.id,
  158. }, 'GET').then(res => {
  159. uni.hideLoading();
  160. this.orderData = res.data;
  161. })
  162. },
  163. goback() {
  164. uni.navigateBack({})
  165. },
  166. },
  167. onPullDownRefresh() {
  168. this.getData()
  169. setTimeout(function() {
  170. uni.stopPullDownRefresh();
  171. }, 1000);
  172. },
  173. }
  174. </script>
  175. <style scoped>
  176. .box {
  177. min-height: 100vh;
  178. background: #F4F5F7;
  179. }
  180. .top {
  181. height: 190rpx;
  182. background-color: #F03B3B;
  183. }
  184. .orderState {
  185. display: flex;
  186. justify-content: center;
  187. align-items: center;
  188. padding-top: 40rpx;
  189. }
  190. .SheetState {
  191. display: flex;
  192. justify-content: center;
  193. font-size: 36rpx;
  194. font-weight: 500;
  195. color: #FFFFFF;
  196. margin-left: 15rpx;
  197. }
  198. .timeEditImg {
  199. width: 25rpx;
  200. height: 25rpx;
  201. padding-left: 20rpx;
  202. }
  203. .shopBoximg {
  204. width: 40rpx;
  205. height: 40rpx;
  206. }
  207. .shopRightImg {
  208. width: 44rpx;
  209. height: 45rpx;
  210. }
  211. .shopsx {
  212. width: 1px;
  213. height: 50rpx;
  214. background: #EEEEEE;
  215. margin-top: 30rpx;
  216. margin-left: 28rpx;
  217. }
  218. .shopBox {
  219. display: flex;
  220. padding: 30rpx 20rpx;
  221. margin: 0rpx 24rpx;
  222. margin-top: -60rpx;
  223. background-color: #FFFFFF;
  224. border-radius: 10rpx;
  225. }
  226. .shopCont {
  227. width: 405rpx;
  228. padding-left: 20rpx;
  229. }
  230. .shopName {
  231. font-size: 30rpx;
  232. font-weight: bold;
  233. color: #3C3C3C;
  234. line-height: 42rpx;
  235. }
  236. .Address {
  237. color: #999999;
  238. font-size: 24rpx;
  239. margin-top: 10rpx;
  240. }
  241. .shopRihgtTxt {
  242. color: #999999;
  243. font-size: 24rpx;
  244. }
  245. .shopRightBox {
  246. padding-left: 28rpx;
  247. }
  248. .peopleCont {
  249. font-size: 28rpx;
  250. color: #3C3C3C;
  251. padding-left: 20rpx;
  252. }
  253. .people {
  254. display: flex;
  255. padding-left: 20rpx;
  256. padding-top: 30rpx;
  257. padding-bottom: 36rpx;
  258. }
  259. .PlateNumberBox {
  260. display: flex;
  261. padding-left: 20rpx;
  262. padding-bottom: 30rpx;
  263. }
  264. .PlateNumbercx {
  265. font-size: 28rpx;
  266. color: #3C3C3C;
  267. padding-left: 20rpx;
  268. }
  269. .PlateNumber {
  270. width: 130rpx;
  271. height: 32rpx;
  272. border-radius: 4rpx;
  273. border: 1px solid #F19D01;
  274. line-height: 32rpx;
  275. text-align: center;
  276. font-size: 22rpx;
  277. color: #F19D01;
  278. margin-left: 26rpx;
  279. }
  280. .PlateNumberBoxTop {
  281. display: flex;
  282. }
  283. .CarModel {
  284. font-size: 26rpx;
  285. color: #999999;
  286. padding-left: 20rpx;
  287. padding-top: 6rpx;
  288. padding-right: 20rpx;
  289. padding-bottom: 15rpx;
  290. width: 600rpx;
  291. }
  292. .detailedBox {
  293. background: #FFFFFF;
  294. border-radius: 10px;
  295. margin: 20rpx 24rpx;
  296. padding-bottom: 20rpx;
  297. }
  298. .itemBox {
  299. margin-top: 20rpx;
  300. }
  301. .carMes {
  302. padding: 23rpx 20rpx;
  303. display: flex;
  304. align-items: center;
  305. justify-content: flex-start;
  306. border-bottom: 1rpx solid #EEEEEE;
  307. }
  308. .plate {
  309. font-size: 30rpx;
  310. color: #3C3C3C;
  311. font-weight: bold;
  312. margin-right: 20rpx;
  313. }
  314. .mileage {
  315. font-size: 24rpx;
  316. color: #F19D01;
  317. padding: 0rpx 10rpx;
  318. border: 1rpx solid #F19D01;
  319. border-radius: 4rpx;
  320. height: 36rpx;
  321. }
  322. .detailedTitle {
  323. padding: 23rpx 20rpx;
  324. display: flex;
  325. text-align: center;
  326. align-content: flex-start;
  327. border-bottom: 1rpx solid #EEEEEE;
  328. font-size: 30rpx;
  329. font-weight: bold;
  330. color: #3C3C3C;
  331. }
  332. .detailedLine {
  333. display: flex;
  334. padding: 20rpx 20rpx 0rpx;
  335. justify-content: space-between;
  336. }
  337. .detailedImg {
  338. width: 120rpx;
  339. height: 120rpx;
  340. border-radius: 10rpx;
  341. }
  342. .detailedName {
  343. font-size: 26rpx;
  344. color: #3C3C3C;
  345. }
  346. span{
  347. font-size: 26rpx;
  348. color: #999999;
  349. }
  350. .goodscost {
  351. width: 702rpx;
  352. background: #FFFFFF;
  353. border-radius: 10px;
  354. margin-left: 24rpx;
  355. margin-top: 20rpx;
  356. padding: 15rpx 0;
  357. }
  358. .goodscostLine {
  359. display: flex;
  360. justify-content: space-between;
  361. font-size: 28rpx;
  362. padding: 20rpx 20rpx;
  363. color: #666666;
  364. }
  365. .goodsCostNum {
  366. color: #3C3C3C;
  367. }
  368. .information {
  369. width: 702rpx;
  370. background: #FFFFFF;
  371. border-radius: 10px;
  372. margin-left: 24rpx;
  373. margin-top: 20rpx;
  374. padding: 0rpx 0 15rpx 0;
  375. }
  376. .informationLine {
  377. display: flex;
  378. font-size: 26rpx;
  379. padding: 15rpx 20rpx;
  380. }
  381. .informationTxt {
  382. width: 190rpx;
  383. color: #999999;
  384. }
  385. .informationNum {
  386. color: #333333;
  387. }
  388. .copyBtn {
  389. width: 86rpx;
  390. height: 40rpx;
  391. background: #F4F5F7;
  392. border-radius: 20rpx;
  393. font-size: 24rpx;
  394. color: #333333;
  395. text-align: center;
  396. line-height: 40rpx;
  397. margin-left: 20rpx;
  398. }
  399. .orderBottom {
  400. width: 750rpx;
  401. height: 98rpx;
  402. background: #FFFFFF;
  403. position: fixed;
  404. left: 0;
  405. bottom: 0;
  406. display: flex;
  407. justify-content: flex-end;
  408. }
  409. .cancelBtn {
  410. width: 150rpx;
  411. height: 56rpx;
  412. border-radius: 36rpx;
  413. border: 2rpx solid #DDDDDD;
  414. text-align: center;
  415. line-height: 56rpx;
  416. font-size: 28rpx;
  417. color: #3C3C3C;
  418. margin-top: 21rpx;
  419. margin-right: 16rpx;
  420. margin-left: 20rpx;
  421. }
  422. .payBtn {
  423. width: 150rpx;
  424. height: 56rpx;
  425. border-radius: 36rpx;
  426. border: 2rpx solid #FF4F00;
  427. text-align: center;
  428. line-height: 56rpx;
  429. font-size: 28rpx;
  430. color: #FF4F00;
  431. margin-top: 21rpx;
  432. margin-right: 16rpx;
  433. margin-left: 20rpx;
  434. }
  435. .timeBox2 {
  436. width: 100vw;
  437. height: 100vh;
  438. background: rgba(0, 0, 0, 0.5);
  439. position: fixed;
  440. top: 0;
  441. left: 0;
  442. }
  443. .timeLeftActive {
  444. background: #FFFFFF;
  445. }
  446. .timeMain {
  447. width: 100vw;
  448. height: 70vh;
  449. margin-top: 30vh;
  450. background: #FFFFFF;
  451. border-radius: 24rpx 24rpx 0px 0px;
  452. }
  453. .timesfNo {
  454. background: #F5F5F5;
  455. }
  456. .timesfActive {
  457. background: #FF4F00;
  458. }
  459. .timesfActive .timeSfNum {
  460. color: #FFFFFF;
  461. }
  462. .timesfActive .timeyy {
  463. color: #FFFFFF;
  464. }
  465. .timeTop {
  466. display: flex;
  467. line-height: 90rpx;
  468. padding-left: 24rpx;
  469. padding-right: 24rpx;
  470. justify-content: space-between;
  471. }
  472. .timeTopTitle {
  473. font-size: 30rpx;
  474. font-family: PingFangSC-Medium, PingFang SC;
  475. font-weight: 600;
  476. color: #3C3C3C;
  477. }
  478. .close {
  479. color: #999999;
  480. font-size: 30rpx;
  481. padding-left: 30rpx;
  482. }
  483. .timeCont {
  484. height: calc(70vh - 210rpx);
  485. }
  486. .timeSv {
  487. height: calc(70vh - 210rpx);
  488. }
  489. .timeLeft2 {
  490. width: 162rpx;
  491. background: #F4F5F7;
  492. border-top: 1px soid #F4F5F7;
  493. border-right: 1px soid #F4F5F7;
  494. }
  495. .timeRight2 {
  496. width: 588rpx;
  497. }
  498. .timesf {
  499. width: 165rpx;
  500. height: 98rpx;
  501. border-radius: 7rpx;
  502. border: 2rpx solid #EEEEEE;
  503. text-align: center;
  504. margin-left: 20rpx;
  505. margin-bottom: 24rpx;
  506. }
  507. .timeBottom {
  508. width: 750rpx;
  509. height: 120rpx;
  510. background: #FFFFFF;
  511. box-shadow: 0px -2px 20rpx 0px rgba(153, 153, 153, 0.2);
  512. display: flex;
  513. align-items: center;
  514. }
  515. .timerightBox {
  516. display: flex;
  517. flex-wrap: wrap;
  518. }
  519. .timeCont {
  520. display: flex;
  521. }
  522. .timeSfNum {
  523. color: #666666;
  524. font-size: 28rpx;
  525. padding-top: 15rpx;
  526. }
  527. .timeyy {
  528. font-size: 24rpx;
  529. color: #999999;
  530. }
  531. .timecomplete {
  532. width: 690rpx;
  533. height: 74rpx;
  534. background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
  535. border-radius: 37rpx;
  536. line-height: 74rpx;
  537. text-align: center;
  538. font-size: 30rpx;
  539. color: #FFFFFF;
  540. margin-left: 30rpx;
  541. }
  542. .timeleftLine {
  543. font-size: 30rpx;
  544. color: #999999;
  545. text-align: center;
  546. padding: 28rpx 10rpx;
  547. border-bottom: 1px solid #EEEEEE;
  548. }
  549. .yuyueBox {
  550. background: #FFFFFF;
  551. border-radius: 10rpx;
  552. margin-left: 24rpx;
  553. margin-right: 24rpx;
  554. }
  555. .yuyueTime {
  556. display: flex;
  557. padding-left: 20rpx;
  558. padding-top: 30rpx;
  559. padding-bottom: 36rpx;
  560. align-items: center;
  561. }
  562. .yuyueState {
  563. display: flex;
  564. padding-left: 20rpx;
  565. padding-top: 30rpx;
  566. padding-bottom: 36rpx;
  567. }
  568. .maBox {
  569. display: flex;
  570. justify-content: space-between;
  571. padding: 24rpx 20rpx;
  572. }
  573. .querenMa {
  574. margin: 20rpx 0;
  575. padding-bottom: 30rpx;
  576. }
  577. .maBoximg {
  578. width: 308rpx;
  579. height: 308rpx;
  580. margin: 30rpx 197rpx;
  581. }
  582. .rightShou {
  583. display: flex;
  584. justify-content: flex-start;
  585. align-items: center;
  586. }
  587. .content{
  588. background-color: #F4F5F7;
  589. border-radius: 10rpx;
  590. padding: 16rpx;
  591. color: #999999;
  592. font-size: 24rpx;
  593. margin: 20rpx;
  594. }
  595. .bottom {
  596. display: flex;
  597. justify-content: flex-end;
  598. padding: 20rpx;
  599. background-color: #FFFFFF;
  600. align-items: center;
  601. height: 98rpx;
  602. width: 100vw;
  603. position: fixed;
  604. bottom: 0rpx;
  605. }
  606. .cancel{
  607. color: #3C3C3C;
  608. font-size: 28rpx;
  609. width: 150rpx;
  610. height: 56rpx;
  611. border-radius: 36rpx;
  612. border: 1rpx solid #DDDDDD;
  613. text-align: center;
  614. line-height: 56rpx;
  615. margin-right: 40rpx;
  616. }
  617. .defer {
  618. color: #D53533;
  619. font-size: 28rpx;
  620. width: 150rpx;
  621. height: 56rpx;
  622. border-radius: 36rpx;
  623. border: 1rpx solid #D53533;
  624. text-align: center;
  625. line-height: 56rpx;
  626. margin-right: 40rpx;
  627. }
  628. </style>