parkingReceipt.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. <template>
  2. <div :class="['scroll-Y', theme]">
  3. <!-- <authorize ref="authorize"></authorize> -->
  4. <div class="choice">
  5. <!-- <LoginDom></LoginDom> -->
  6. <div v-for="(item, index) in invoiceList" :key="index" :class="index + 1 === tabIndex ? 'actived' : ''" @click="invoice(index + 1)">
  7. {{ item }}
  8. </div>
  9. </div>
  10. <div class="choice_select">
  11. <div :class="tabIndex == 1 ? 'choice_select_ews' : 'choice_select_ew'" />
  12. </div>
  13. <!-- 开票列表 <div class="choice_card" :style="{ height: height }">-->
  14. <div class="choice_card">
  15. <div class="suggestion-list">
  16. <van-checkbox-group v-model="ids" @change="checkboxChange">
  17. <div class="uni-list-cell uni-list-cell-pd" @click.stop="goToDeatil(item)" v-for="(item, index) in list" :key="index" :index="item.id" :activity="total - 1">
  18. <div class="choice_card_item">
  19. <div class="orderNum" v-if="tabIndex == 1">{{ item.orderNo }}</div>
  20. <div class="orderNum" v-else>
  21. <span>税号: {{ item.taxNo }}</span>
  22. <!-- 失败重试 -->
  23. <div class="failureReason" v-if="item.status === 'FAILED'">
  24. <span @click.stop="showFailureReason(item.errorMessage)"><van-icon name="info" /> 失败原因</span>
  25. </div>
  26. <div class="right">
  27. <div class="choice_card_status">
  28. {{ statusObj[item.status || 'FAILED'].name }}
  29. </div>
  30. <!-- <div v-if="/FAILED|3/.test(item.status)" class="try-again" @click="tryGoToInvoicing(item)">重新开票</div> -->
  31. </div>
  32. </div>
  33. <div class="van-hairline--bottom"></div>
  34. <div class="carno-box">
  35. <!-- ids.indexOf(item.id) > -1 && -->
  36. <div :class="['carno', 'active']" v-if="tabIndex == 1">
  37. <span class="left">{{ item.vehicleNo }}</span>
  38. <div class="right" @click.stop>
  39. <van-checkbox color="#ED1C24" :name="item.id" icon-size="20" checked-color="var(--k-color-primary-01)" />
  40. </div>
  41. </div>
  42. <div :class="['payfee', (ids.indexOf(item.id) > -1 || tabIndex == 2) && 'active']"></div>
  43. </div>
  44. <!-- 未开票 -->
  45. <div class="my-not-invoiced-list" v-if="tabIndex == 1">
  46. <div class="left">
  47. <div class="choice_card_index">
  48. <div class="choice_card_index_icon">
  49. <img class="car-icon" :src="require(`../static/images/vector.svg`)" />
  50. <div class="choice_card_index_text">入场时间</div>
  51. </div>
  52. <div class="choice_card_index_icon">
  53. <img class="car-icon" :src="require(`../static/images/car_time.svg`)" />
  54. <div class="choice_card_index_text">停车时长</div>
  55. </div>
  56. <!-- {{ item.enterTime }} -->
  57. </div>
  58. <div class="choice_card_index">
  59. <div class="choice_card_index_icon">
  60. {{ item.enterTime }}
  61. </div>
  62. <div class="choice_card_index_icon">
  63. {{ item.serviceMin | parkingTime }}
  64. </div>
  65. <!-- {{ item.enterTime }} -->
  66. </div>
  67. <div class="choice_card_index">
  68. <div class="choice_card_index_icon bg_parkingRoom2">
  69. <img class="car-icon" :src="require(`../static/images/parking_room.svg`)" />
  70. <div class="choice_card_index_text2">{{ item.parkName }}</div>
  71. </div>
  72. <!-- {{ item.enterTime }} -->
  73. </div>
  74. <div class="van-hairline--bottom"></div>
  75. <div class="choice_card_index orderno-box2" style="padding-top: 16px;padding-bottom: 17px;">
  76. <!-- ids.indexOf(item.id) > -1 && -->
  77. <div :class="['orderFee', 'active']" >{{ item.totalPaidAmount || item.invoiceTotalAmount |currency }}</div>
  78. <!-- <div class="orderDetail">查看详情</div> -->
  79. <!-- <van-icon name="arrow" /> -->
  80. </div>
  81. </div>
  82. <!-- <div class="right" @click.stop>
  83. <van-checkbox color="#ED1C24" :name="item.id" icon-size="20" checked-color="var(--k-color-primary-01)" />
  84. </div> -->
  85. </div>
  86. <!-- 已开票 -->
  87. <div class="my-not-invoiced-list my-invoiced-list" v-if="tabIndex == 2">
  88. <div class="left">
  89. <div class="invoiceHeader">{{ item.invoiceHeader }}</div>
  90. <div class="choice_card_index" style="margin-bottom: 10px;">
  91. <div class="choice_card_index_icon">
  92. <img class="car-icon" :src="require(`../static/images/vector.svg`)" />
  93. <div class="choice_card_index_text">开票时间</div>
  94. </div>
  95. <!-- {{ item.enterTime }} -->
  96. </div>
  97. <div class="choice_card_index">
  98. <div class="choice_card_index_icon3">
  99. {{ item.createTime ? item.createTime : '-' }}
  100. </div>
  101. <!-- {{ item.enterTime }} -->
  102. </div>
  103. <!-- 停车场名称 -->
  104. <div class="choice_card_index">
  105. <div class="choice_card_index_icon bg_parkingRoom2 ">
  106. <img class="car-icon" :src="require(`../static/images/parking_room.svg`)" />
  107. <div class="choice_card_index_text2">{{ item.parkName }}</div>
  108. </div>
  109. </div>
  110. <div class="van-hairline--bottom"></div>
  111. <div class="choice_card_index orderno-box2 orderDetail-box">
  112. <div class="orderFee2" >{{ item.totalPaidAmount || item.invoiceTotalAmount | currency }}</div>
  113. <div class="orderDetail" v-if="item.status === 'COMPLETE'">查看详情</div>
  114. <!-- v-if="/FAILED|3/.test(item.status)" -->
  115. <div v-if="/FAILED|3/.test(item.status)" class="try-again" @click="tryGoToInvoicing(item)">重新开票</div>
  116. <!-- <van-icon name="arrow" /> -->
  117. </div>
  118. <!-- <div class="choice_card_index mb0">
  119. 停车时长: <span>{{ item.serviceMin | parkingTime }}</span> _{{
  120. item.serviceMin
  121. }}
  122. </div> -->
  123. </div>
  124. <!-- 0:已提交申请(待开票) 1:开票中 2:开票完成 3:开票失败 -->
  125. </div>
  126. </div>
  127. </div>
  128. </van-checkbox-group>
  129. </div>
  130. </div>
  131. <div v-show="isLoadMore" :class="{ noData: !list.length }">
  132. <img :src="noData" v-if="!list.length" alt=""/>
  133. <span v-if="!list.length">当前暂无开票数据</span>
  134. <div v-else class="no-more-data">
  135. 没有更多啦
  136. </div>
  137. </div>
  138. <div style="height:14vh;background-color: transparent;width: 100%;"></div>
  139. <div class="flewx" v-if="tabIndex == 1">
  140. <div class="priceBtn">
  141. <div>
  142. 开票金额:
  143. <span class="price">{{ totalNum | currency}} 元</span>
  144. </div>
  145. <div
  146. class="flewx_index3"
  147. @click="goToInvoicing"
  148. >
  149. 去开票
  150. </div>
  151. </div>
  152. <!-- 开启底部安全区适配 -->
  153. <van-number-keyboard safe-area-inset-bottom />
  154. </div>
  155. </div>
  156. </template>
  157. <script>
  158. import parkingReceiptCouponJs from '../mixins/parkingReceipt/parkingReceipt';
  159. import baseMixins from '../mixins/base';
  160. export default {
  161. mixins: [baseMixins, parkingReceiptCouponJs],
  162. };
  163. </script>
  164. <style lang="less" scoped>
  165. .scroll-Y {
  166. width: 100%;
  167. display: flex;
  168. flex-direction: column;
  169. height: 100%;
  170. min-height: 100vh;
  171. // padding-bottom: 100px;
  172. background: #F4F7FF;
  173. .uni-list-cell {
  174. margin-bottom: 20px !important;
  175. }
  176. .choice {
  177. width: 750px;
  178. background-color: #fafbff;
  179. display: flex;
  180. align-items: center;
  181. justify-content: center;
  182. font-size: 30px;
  183. height: 88px;
  184. position: fixed;
  185. top: 0;
  186. left: 0;
  187. z-index:99999;
  188. div {
  189. width: 45%;
  190. text-align: center;
  191. height: 78px;
  192. line-height: 78px;
  193. }
  194. .actived {
  195. color: var(--k-color-primary-01);
  196. }
  197. }
  198. .choice_select {
  199. width: 750px;
  200. height: 10px;
  201. background-color: #fafbff;
  202. position: fixed;
  203. top: 74px;
  204. left: 0;
  205. div {
  206. width: 64px;
  207. height: 4px;
  208. border-radius: 2px;
  209. background-color: var(--k-color-primary-01);
  210. }
  211. .choice_select_ews {
  212. transform: translateX(175px);
  213. transition-duration: 0.1s;
  214. }
  215. .choice_select_ew {
  216. transform: translateX(510px);
  217. transition-duration: 0.1s;
  218. }
  219. }
  220. .shanghaiClassify {
  221. position: fixed;
  222. width: 750px;
  223. z-index: 2;
  224. }
  225. .blueClassify {
  226. .colorClassify('blue');
  227. }
  228. .greenClassify {
  229. .colorClassify('green');
  230. }
  231. .choice_card {
  232. margin: 112px 20px 0px;
  233. width: 710px;
  234. // background-color: #fff;
  235. .choice_card_item {
  236. // border: 2px solid #ddd;
  237. background: #FBFCFF;
  238. border-radius: 8px;
  239. // margin-bottom: 20px;
  240. // margin: 20px 0;
  241. // border-radius: 20px;
  242. // background-color: #fff;
  243. .orderNum {
  244. font-family: 'PingFang SC';
  245. font-style: normal;
  246. font-weight: 400;
  247. font-size: 28px;
  248. padding: 20px 35px 16px;
  249. color: #999999;
  250. display: flex;
  251. justify-content: space-between;
  252. .right {
  253. font-size: 30px;
  254. font-weight: 400;
  255. color: var(--k-color-primary-01);
  256. line-height: 42px;
  257. text-align: right;
  258. }
  259. }
  260. .carno-box {
  261. display: flex;
  262. justify-content: space-between;
  263. .invoiceTitleName {
  264. font-family: 'PingFang SC';
  265. font-style: normal;
  266. font-weight: 400;
  267. font-size: 28px;
  268. //padding: 31px 35px 22px;
  269. color: #999999;
  270. }
  271. .carno {
  272. padding: 31px 28px 22px 35px;
  273. font-size: 36px;
  274. line-height: 1;
  275. font-weight: 600;
  276. color: #999999;
  277. //line-height: 50px;
  278. display: flex;
  279. justify-content: space-between;
  280. width: 100%;
  281. .left {
  282. flex: 1;
  283. }
  284. .right {
  285. flex: 0 0 40px;
  286. font-size: 40px;
  287. display: flex;
  288. justify-content: right;
  289. flex-wrap: nowrap;
  290. white-space: nowrap;
  291. }
  292. }
  293. .payfee {
  294. font-size: 30px;
  295. font-weight: 600;
  296. color: #999999;
  297. line-height: 42px;
  298. }
  299. .active {
  300. color: #333333;
  301. }
  302. }
  303. .line {
  304. width: 100%;
  305. border-bottom: 1px solid #d8dae0;
  306. margin-bottom: 20px;
  307. }
  308. .my-not-invoiced-list {
  309. display: flex;
  310. justify-content: space-between;
  311. .left {
  312. flex: 1;
  313. }
  314. .invoiceHeader {
  315. font-family: 'PingFang SC';
  316. font-style: normal;
  317. font-weight: 600;
  318. font-size: 32px;
  319. padding: 31px 35px 20px;
  320. }
  321. .right {
  322. flex: 0 0 40px;
  323. font-size: 40px;
  324. display: flex;
  325. justify-content: right;
  326. flex-wrap: nowrap;
  327. white-space: nowrap;
  328. }
  329. }
  330. .failureReason {
  331. text-align: right;
  332. font-weight: normal;
  333. font-size: 25px;
  334. color: #bbb;
  335. align-self: center;
  336. border: 1px solid #999999;
  337. border-radius: 2px;
  338. position:absolute;
  339. right: 168px;
  340. z-index: 500;
  341. }
  342. .my-invoiced-list {
  343. align-items: flex-end;
  344. .right {
  345. flex: 0 0 150px;
  346. font-size: 30px;
  347. font-weight: 400;
  348. color: var(--k-color-primary-01);
  349. line-height: 42px;
  350. text-align: right;
  351. }
  352. }
  353. .choice_card_index {
  354. font-size: 28px;
  355. font-weight: 400;
  356. color: #999999;
  357. line-height: 40px;
  358. margin-bottom: 12px;
  359. &.mb0 {
  360. margin-bottom: 0;
  361. }
  362. }
  363. .choice_card_status {
  364. display: flex;
  365. white-space: nowrap;
  366. align-items: center;
  367. //padding-top: 10px;
  368. }
  369. .try-again {
  370. margin-left: 10px;
  371. background: var(--k-color-primary-01);
  372. border: 1px solid var(--k-color-primary-01);
  373. border-radius: 32.5px;
  374. padding: 11px 33px;
  375. color:#fff;
  376. }
  377. .choice_card_index1 {
  378. display: flex;
  379. align-items: center;
  380. justify-content: space-between;
  381. //border: 400;
  382. border-bottom: 1px solid #f8f8f8;
  383. padding: 10px 0;
  384. font-size: 28px;
  385. margin-bottom: 10px;
  386. }
  387. .choice_card_index2 {
  388. // padding-top: 20px;
  389. color: #bbbbbb;
  390. }
  391. .choice_card_index3 {
  392. display: flex;
  393. align-items: center;
  394. justify-content: space-between;
  395. color: #bbbbbb;
  396. }
  397. .choice_card_index4 {
  398. color: #bbbbbb;
  399. // padding-bottom: 20px;
  400. }
  401. .choice_card_index {
  402. // width: calc(100% - 48px);
  403. font-size: 28px;
  404. font-weight: 400;
  405. color: #999999;
  406. line-height: 40px;
  407. display: flex;
  408. margin-bottom: 22px;
  409. padding-left: 35px;
  410. padding-bottom: 0;
  411. .choice_card_index_icon {
  412. width: 50%;
  413. height: 40px;
  414. line-height: 40px;
  415. display: flex;
  416. color: #333;
  417. .car-icon {
  418. margin-right: 12px;
  419. }
  420. }
  421. .choice_card_index_icon3 {
  422. // width: 50%;
  423. height: 40px;
  424. line-height: 40px;
  425. display: flex;
  426. color: #333;
  427. .car-icon {
  428. margin-right: 12px;
  429. }
  430. }
  431. .bg_parkingRoom {
  432. background-color: #f4f7ff;
  433. width:calc(100% - 40px);
  434. padding: 11px 0px 15px 8px ;
  435. }
  436. .bg_parkingRoom2 {
  437. background-color: #f4f7ff;
  438. width:calc(100% - 42px);
  439. padding: 11px 0px 15px 8px ;
  440. }
  441. .choice_card_index_text {
  442. display: inline-block;
  443. line-height: 42px;
  444. font-family: 'PingFang SC';
  445. font-style: normal;
  446. font-weight: 400;
  447. font-size: 28px;
  448. color: #666;
  449. }
  450. .choice_card_index_text2 {
  451. display: inline-block;
  452. line-height: 40px;
  453. font-family: 'PingFang SC';
  454. font-style: normal;
  455. font-weight: 400;
  456. font-size: 28px;
  457. color: #333;
  458. }
  459. // justify-content: space-between;
  460. &.mt0 {
  461. margin-top: 0;
  462. }
  463. &.mb0 {
  464. margin-bottom: 0;
  465. }
  466. &.pb0 {
  467. padding-bottom: 0;
  468. }
  469. .status-box {
  470. font-size: 30px;
  471. font-weight: 400;
  472. color: var(--k-color-primary-01);
  473. line-height: 42px;
  474. &.other {
  475. color: #999999;
  476. }
  477. }
  478. }
  479. .orderno-box {
  480. display: flex;
  481. justify-content: space-between;
  482. font-weight: 600;
  483. color: #333;
  484. padding-top: 31px;
  485. line-height: 28px;
  486. }
  487. .orderno-box2 {
  488. display: flex;
  489. justify-content: space-between;
  490. font-weight: 600;
  491. color: #333;
  492. margin-bottom: 0;
  493. }
  494. .orderFee {
  495. font-family: 'PingFang SC';
  496. font-style: normal;
  497. font-weight: 500;
  498. font-size: 34px;
  499. line-height: 40px;
  500. color:#999;
  501. // vertical-align: middle;
  502. align-self: center;
  503. // margin-top:5px;
  504. // padding: 10px 0;
  505. }
  506. .orderFee2 {
  507. font-family: 'PingFang SC';
  508. font-style: normal;
  509. font-weight: 500;
  510. font-size: 34px;
  511. line-height: 40px;
  512. color:#333;
  513. // vertical-align: middle;
  514. align-self: center;
  515. // margin-top:5px;
  516. // padding: 10px 0;
  517. }
  518. .active {
  519. color: #333333;
  520. }
  521. .orderDetail-box {
  522. height: 81px;
  523. display: flex;
  524. justify-content: space-between;
  525. align-items: center;
  526. }
  527. .orderDetail {
  528. height: 50px;
  529. width: 179px;
  530. text-align: center;
  531. line-height: 50px;
  532. margin-right: 30px;
  533. //margin-left: 176px;
  534. border-radius: 4.333vw;
  535. //padding: 11px 33px;
  536. border: 1px solid #333333;
  537. font-family: 'PingFang SC';
  538. font-style: normal;
  539. font-weight: 400;
  540. font-size: 28px;
  541. color: #333333;
  542. }
  543. }
  544. }
  545. }
  546. .suggestion-list {
  547. display: flex;
  548. flex-direction: column;
  549. background: #F4F7FF;
  550. border-radius: 15px;
  551. .van-checkbox-group{
  552. // padding-bottom:104px;
  553. }
  554. }
  555. .flewx {
  556. width: 100%;
  557. //height: 150px;
  558. padding-top: 33px;
  559. background-color: #fafbff;
  560. box-shadow: 0 0 2px 0 hsla(0, 6%, 58%, 0.6);
  561. position: fixed;
  562. bottom: 0;
  563. display: flex;
  564. align-items: center;
  565. // justify-content: space-between;
  566. padding-bottom: 50px;
  567. // .checkAll {
  568. // .checkboxItem {
  569. // position: relative;
  570. // top: -2px;
  571. // }
  572. // }
  573. .priceBtn {
  574. width: 100%;
  575. padding: 0 30px 0 24px;
  576. display: flex;
  577. align-items: center;
  578. //margin-right: 20px;
  579. justify-content: space-between;
  580. font-size: 28px;
  581. font-weight: 400;
  582. color: #333333;
  583. .price {
  584. font-size: 36px;
  585. font-weight: 600;
  586. color: #333333;
  587. line-height: 50px;
  588. }
  589. .flewx_index3 {
  590. width: 270px;
  591. height: 80px;
  592. border-radius: 90px;
  593. text-align: center;
  594. font-size: 32px;
  595. line-height: 80px;
  596. background: var(--k-color-primary-01);
  597. font-weight: 400;
  598. color: #ffffff;
  599. }
  600. .blue_flewx_index3 {
  601. .color-background-color('blue');
  602. }
  603. .green_flewx_index3 {
  604. .color-background-color('green');
  605. }
  606. }
  607. }
  608. .uni-input_type {
  609. width: 42px;
  610. height: 42px;
  611. margin-right: 10px;
  612. border: 1px solid #f2f2f2;
  613. border-radius: 50%;
  614. img {
  615. width: 40px;
  616. height: 40px;
  617. }
  618. }
  619. .noData {
  620. width: 100%;
  621. padding-top: 15%;
  622. text-align: center;
  623. background: none;
  624. margin: 0 auto;
  625. img {
  626. width: 454px;
  627. height: 378px;
  628. margin-bottom: 40px;
  629. }
  630. span {
  631. color: #999;
  632. display: block;
  633. }
  634. }
  635. .no-more-data {
  636. width: 100%;
  637. position: relative;
  638. text-align: center;
  639. box-sizing: border-box;
  640. margin-top: 45px;
  641. font-size: 22px;
  642. font-weight: 400;
  643. color: #999999;
  644. line-height: 41px;
  645. background:rgba(255,255,255,0);
  646. padding:0 24px;
  647. &::before {
  648. content: '';
  649. display: block;
  650. width: calc(40% - 49px);
  651. position: absolute;
  652. left: 49px;
  653. top: 16px;
  654. border-top: 1px dashed #cfcfcf;
  655. }
  656. &::after {
  657. content: '';
  658. display: block;
  659. width: calc(40% - 49px);
  660. position: absolute;
  661. right: 49px;
  662. top: 16px;
  663. border-top: 1px dashed #cfcfcf;
  664. }
  665. }
  666. .choice_card {
  667. width: calc(100% - 48px);
  668. margin: 43px 24px;
  669. // margin-top: 30px;
  670. // padding: 30px;
  671. // border-radius: 20px;
  672. position: relative;
  673. background-color: #fafbff;
  674. border-radius: 4px;
  675. // border: 1px solid #d8dae0;
  676. &.mt30 {
  677. margin-top: 30px;
  678. }
  679. .carno-box {
  680. display: flex;
  681. //padding-bottom: 18px;
  682. // border-bottom: 1px solid #d8dae0;`
  683. justify-content: space-between;
  684. .carno {
  685. font-family: 'PingFang SC';
  686. font-style: normal;
  687. font-weight: 400;
  688. font-size: 28px;
  689. line-height: 5.6vw;
  690. color: #999999;
  691. padding: 20px 35px;
  692. }
  693. .servicefee {
  694. font-size: 30px;
  695. font-weight: 600;
  696. color: #333333;
  697. line-height: 42px;
  698. }
  699. .status-box {
  700. font-family: 'PingFang SC';
  701. font-style: normal;
  702. font-weight: 400;
  703. font-size: 30px;
  704. color: var(--k-color-primary-01);
  705. line-height: 42px;
  706. &.other {
  707. color: #b15124;
  708. }
  709. }
  710. }
  711. }
  712. </style>