bespeakDetail.vue 15 KB

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