historyDetail.vue 12 KB

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