bespeakDetail.vue 16 KB

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