historyDetail.vue 12 KB

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