parkingReceipt.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <template>
  2. <div
  3. :class="['scroll-Y',theme]"
  4. @scrolltolower="scrollLower"
  5. >
  6. <!-- <authorize ref="authorize"></authorize> -->
  7. <div class="choice">
  8. <!-- <LoginDom></LoginDom> -->
  9. <div
  10. v-for="(item, index) in invoiceList"
  11. :key="index"
  12. :class="index + 1 === tabIndex ? 'actived' : ''"
  13. @click="invoice(index + 1)"
  14. >
  15. {{ item }}
  16. </div>
  17. </div>
  18. <div class="choice_select">
  19. <div :class="tabIndex == 1 ? 'choice_select_ews' : 'choice_select_ew'" />
  20. </div>
  21. <!-- 开票列表 -->
  22. <div class="choice_card" :style="{ height: height }">
  23. <div class="suggestion-list">
  24. <van-checkbox-group v-model="ids" @change="checkboxChange">
  25. <label
  26. class="uni-list-cell uni-list-cell-pd"
  27. @click.stop="goToDeatil(item)"
  28. v-for="(item, index) in list"
  29. :key="index"
  30. :index="item.id"
  31. :activity="total - 1"
  32. >
  33. <div class="choice_card_item">
  34. <div class="carno-box">
  35. <div
  36. :class="['carno', ids.indexOf(item.id) > -1 && 'active']"
  37. v-if="tabIndex == 1"
  38. >
  39. <span>{{ item.vehicleNo }}</span>
  40. </div>
  41. <div class="invoiceTitleName" v-else>
  42. {{ item.titleName }}的停车发票&nbsp;<van-icon
  43. name="arrow"
  44. color="#D8DAE0"
  45. />
  46. </div>
  47. <div
  48. :class="[
  49. 'payfee',
  50. (ids.indexOf(item.id) > -1 || tabIndex == 2) && 'active',
  51. ]"
  52. >
  53. ¥{{
  54. item.totalPaidAmount || item.invoiceTotalAmount
  55. }}
  56. </div>
  57. </div>
  58. <div class="line"></div>
  59. <!-- 未开票 -->
  60. <div class="my-not-invoiced-list" v-if="tabIndex == 1">
  61. <div class="left">
  62. <div class="choice_card_index">{{ item.parkName }}</div>
  63. <div class="choice_card_index">
  64. 订单号: {{ item.orderNo }}
  65. </div>
  66. <div class="choice_card_index">
  67. 入场时间: {{ item.enterTime }}
  68. </div>
  69. <div class="choice_card_index mb0">
  70. 停车时长: {{ item.serviceMin | parkingTime }}
  71. </div>
  72. </div>
  73. <div class="right" @click.stop>
  74. <van-checkbox
  75. color="#ED1C24"
  76. :name="item.id"
  77. icon-size="20"
  78. checked-color="#064C8A"
  79. />
  80. </div>
  81. </div>
  82. <!-- 已开票 -->
  83. <div
  84. class="my-not-invoiced-list my-invoiced-list"
  85. v-if="tabIndex == 2"
  86. >
  87. <div class="left">
  88. <div class="choice_card_index">
  89. 税号: {{ item.taxNo }}
  90. </div>
  91. <div class="choice_card_index">
  92. 开票时间:
  93. {{ item.createTime ? item.createTime : '-' }}
  94. </div>
  95. <!-- <div class="choice_card_index mb0">
  96. 停车时长: <span>{{ item.serviceMin | parkingTime }}</span> _{{
  97. item.serviceMin
  98. }}
  99. </div> -->
  100. </div>
  101. <div class="right">
  102. <!-- 0:已提交申请(待开票) 1:开票中 2:开票完成 3:开票失败 -->
  103. <div class="choice_card_status">
  104. {{ statusObj[item.status||'FAILED'].name }}
  105. </div>
  106. <div v-if="/FAILED|3/.test(item.status)" class="try-again" @click="tryGoToInvoicing(item)">
  107. 重新开票
  108. </div>
  109. </div>
  110. </div>
  111. <!-- 失败重试 -->
  112. <div class="failureReason" v-if="item.status === 'FAILED'">
  113. <span @click.stop="showFailureReason(item.errorMessage)"
  114. ><van-icon name="info" /> 失败原因</span
  115. >
  116. </div>
  117. </div>
  118. </label>
  119. </van-checkbox-group>
  120. <div v-show="isLoadMore" :class="{ noData: !list.length }">
  121. <img :src="noData" v-if="!list.length" mode="widthFix" />
  122. <span v-if="!list.length">暂无数据</span>
  123. <div v-else class="no-more-data">没有更多了</div>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="flewx" v-if="tabIndex == 1">
  128. <div class="priceBtn">
  129. <div>
  130. 开票金额
  131. <span class="price">{{ totalNum }} 元</span>
  132. </div>
  133. <div
  134. :class="{
  135. flewx_index3: true,
  136. blue_flewx_index3: custTypeId === 1,
  137. green_flewx_index3: custTypeId === 2,
  138. }"
  139. @click="goToInvoicing"
  140. >
  141. 去开票
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </template>
  147. <script>
  148. import parkingReceiptCouponJs from '../../../mixins/parkingReceipt/parkingReceipt'
  149. export default {
  150. mixins:[parkingReceiptCouponJs]
  151. }
  152. </script>
  153. <style lang="less" scoped>
  154. .scroll-Y {
  155. width: 100%;
  156. display: flex;
  157. flex-direction: column;
  158. height: 100vh;
  159. // padding-bottom: 100px;
  160. background: #f4f7ff;
  161. .choice {
  162. width: 750px;
  163. background-color: #fafbff;
  164. display: flex;
  165. align-items: center;
  166. justify-content: center;
  167. font-size: 30px;
  168. height: 88px;
  169. position: fixed;
  170. top: 0;
  171. left: 0;
  172. div {
  173. width: 30%;
  174. text-align: center;
  175. height: 78px;
  176. line-height: 78px;
  177. }
  178. .actived {
  179. color: #064c8a;
  180. }
  181. }
  182. .choice_select {
  183. width: 750px;
  184. height: 10px;
  185. background-color: #fafbff;
  186. position: fixed;
  187. top: 74px;
  188. left: 0;
  189. div {
  190. width: 64px;
  191. height: 4px;
  192. border-radius: 2px;
  193. background-color: #064c8a;
  194. }
  195. .choice_select_ews {
  196. transform: translateX(230px);
  197. transition-duration: 0.1s;
  198. }
  199. .choice_select_ew {
  200. transform: translateX(455px);
  201. transition-duration: 0.1s;
  202. }
  203. }
  204. .shanghaiClassify {
  205. position: fixed;
  206. width: 750px;
  207. z-index: 2;
  208. }
  209. .blueClassify {
  210. .colorClassify('blue');
  211. }
  212. .greenClassify {
  213. .colorClassify('green');
  214. }
  215. .choice_card {
  216. margin: 112px 20px 0px;
  217. width: 710px;
  218. // background-color: #fff;
  219. .choice_card_item {
  220. // border: 2px solid #ddd;
  221. background: #fafbff;
  222. border-radius: 4px;
  223. border: 1px solid #d8dae0;
  224. padding: 36px 30px 30px 30px;
  225. // margin: 20px 0;
  226. margin-bottom: 30px;
  227. // border-radius: 20px;
  228. // background-color: #fff;
  229. .carno-box {
  230. display: flex;
  231. justify-content: space-between;
  232. margin-bottom: 18px;
  233. .carno {
  234. font-size: 36px;
  235. font-weight: 600;
  236. color: #999999;
  237. line-height: 50px;
  238. }
  239. .payfee {
  240. font-size: 30px;
  241. font-weight: 600;
  242. color: #999999;
  243. line-height: 42px;
  244. }
  245. .active {
  246. color: #333333;
  247. }
  248. }
  249. .line {
  250. width: 100%;
  251. border-bottom: 1px solid #d8dae0;
  252. margin-bottom: 20px;
  253. }
  254. .my-not-invoiced-list {
  255. display: flex;
  256. justify-content: space-between;
  257. .left {
  258. flex: 1;
  259. }
  260. .right {
  261. flex: 0 0 40px;
  262. font-size: 40px;
  263. display: flex;
  264. justify-content: right;
  265. flex-wrap: nowrap;
  266. white-space: nowrap;
  267. }
  268. }
  269. .failureReason {
  270. margin-top: 10px;
  271. text-align: right;
  272. font-weight: normal;
  273. font-size: 25px;
  274. color: #bbb;
  275. }
  276. .my-invoiced-list {
  277. align-items: flex-end;
  278. .right {
  279. flex: 0 0 150px;
  280. font-size: 30px;
  281. font-weight: 400;
  282. color: #064c8a;
  283. line-height: 42px;
  284. text-align: right;
  285. }
  286. }
  287. .choice_card_index {
  288. font-size: 28px;
  289. font-weight: 400;
  290. color: #999999;
  291. line-height: 40px;
  292. margin-bottom: 12px;
  293. &.mb0 {
  294. margin-bottom: 0;
  295. }
  296. }
  297. .choice_card_status {
  298. display: flex;
  299. white-space: nowrap;
  300. align-items: center;
  301. //padding-top: 10px;
  302. }
  303. .try-again {
  304. margin-left: 10px;
  305. color: #e89e42;
  306. border: 1px solid #e89e42;
  307. border-radius: 10px;
  308. padding: 10px;
  309. }
  310. .choice_card_index1 {
  311. display: flex;
  312. align-items: center;
  313. justify-content: space-between;
  314. //border: 400;
  315. border-bottom: 1px solid #f8f8f8;
  316. padding: 10px 0;
  317. font-size: 28px;
  318. margin-bottom: 10px;
  319. }
  320. .choice_card_index2 {
  321. // padding-top: 20px;
  322. color: #bbbbbb;
  323. }
  324. .choice_card_index3 {
  325. display: flex;
  326. align-items: center;
  327. justify-content: space-between;
  328. color: #bbbbbb;
  329. }
  330. .choice_card_index4 {
  331. color: #bbbbbb;
  332. // padding-bottom: 20px;
  333. }
  334. }
  335. }
  336. }
  337. .suggestion-list {
  338. display: flex;
  339. flex-direction: column;
  340. // background: #fff;
  341. border-radius: 15px;
  342. }
  343. .flewx {
  344. width: 100%;
  345. //height: 150px;
  346. padding-top: 20px;
  347. background-color: #fafbff;
  348. position: fixed;
  349. bottom: 0;
  350. display: flex;
  351. align-items: center;
  352. // justify-content: space-between;
  353. padding-bottom: 25px;
  354. //padding-bottom: constant(safe-area-inset-bottom);
  355. //padding-bottom: env(safe-area-inset-bottom);
  356. // .checkAll {
  357. // .checkboxItem {
  358. // position: relative;
  359. // top: -2px;
  360. // }
  361. // }
  362. .priceBtn {
  363. width: 100%;
  364. padding: 0 30px 20px;
  365. display: flex;
  366. align-items: center;
  367. margin-right: 20px;
  368. justify-content: space-between;
  369. font-size: 28px;
  370. font-weight: 400;
  371. color: #333333;
  372. .price {
  373. font-size: 36px;
  374. font-weight: 600;
  375. color: #333333;
  376. line-height: 50px;
  377. }
  378. .flewx_index3 {
  379. width: 150px;
  380. height: 70px;
  381. border-radius: 40px;
  382. text-align: center;
  383. font-size: 28px;
  384. line-height: 70px;
  385. color: #fff;
  386. background: #064c8a;
  387. border-radius: 45px;
  388. font-size: 34px;
  389. font-weight: 400;
  390. color: #ffffff;
  391. }
  392. .blue_flewx_index3 {
  393. .color-background-color('blue');
  394. }
  395. .green_flewx_index3 {
  396. .color-background-color('green');
  397. }
  398. }
  399. }
  400. .uni-input_type {
  401. width: 42px;
  402. height: 42px;
  403. margin-right: 10px;
  404. border: 1px solid #f2f2f2;
  405. border-radius: 50%;
  406. img {
  407. width: 40px;
  408. height: 40px;
  409. }
  410. }
  411. .noData {
  412. width: 100%;
  413. padding-top: 15%;
  414. text-align: center;
  415. // background: #f2f2f2;
  416. margin: 0 auto;
  417. img {
  418. width: 200px;
  419. margin-bottom: 2%;
  420. }
  421. span {
  422. color: #999;
  423. display: block;
  424. }
  425. }
  426. .no-more-data {
  427. margin-top: 40px;
  428. text-align: center;
  429. font-size: 29px;
  430. font-weight: 400;
  431. color: #999999;
  432. line-height: 41px;
  433. }
  434. </style>