bespeakDetail.vue 15 KB

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