parkingReceipt.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <template>
  2. <div
  3. class="scroll-Y"
  4. >
  5. <div class="choice" v-if="custTypeId === 0">
  6. <div
  7. v-for="(item, index) in invoiceList"
  8. :key="index"
  9. :class="index + 1 == tabIndex ? 'actived' : ''"
  10. @click="invoice(index + 1)"
  11. >{{ item }}
  12. </div
  13. >
  14. </div>
  15. <div
  16. class="shanghaiClassify"
  17. :class="{
  18. blueClassify: custTypeId === 1,
  19. greenClassify: custTypeId === 2,
  20. }"
  21. v-else
  22. >
  23. <div
  24. :class="{ classifyItem: true, isChecked: tabIndex === index + 1 }"
  25. v-for="(item, index) in invoiceList"
  26. :key="index"
  27. >
  28. <div @click="invoice(index + 1)">{{ item }}</div>
  29. </div>
  30. </div>
  31. <div class="choice_select" v-if="custTypeId === 0"
  32. >
  33. <div :class="tabIndex == 1 ? 'choice_select_ews' : 'choice_select_ew'"
  34. />
  35. </div>
  36. <!-- 开票列表 -->
  37. <scroll-view class="choice_card" :style="{ height: height }" @scrolltolower="scrollLower">
  38. <div class="suggestion-list">
  39. <van-checkbox-group v-model="ids" v-if="isJingAn" @change="radioChange" style="background-color: #f2f2f2">
  40. <label
  41. class="uni-list-cell uni-list-cell-pd"
  42. @click="goToDeatil(item)"
  43. v-for="(item, index) in list"
  44. :key="index"
  45. :index="item.id"
  46. :activity="total - 1"
  47. >
  48. <div class="choice_card_item">
  49. <div class="choice_card_index choice_card_index1">
  50. <div v-if="tabIndex == 1"
  51. >{{ item.orderNo }}-{{ item.vehicleNo }}
  52. </div
  53. >
  54. <div v-else>{{ item.titleName }}的停车发票</div>
  55. <div v-if="tabIndex == 1" style="color: #ed1c24"
  56. >¥{{item.totalPaidAmount}}
  57. </div
  58. >
  59. <div v-else style="color: #ed1c24"
  60. >{{item.totalPaidAmount}}
  61. </div
  62. >
  63. </div>
  64. <div
  65. class="choice_card_index choice_card_index2"
  66. v-if="tabIndex == 1"
  67. >{{ item.parkName }}
  68. </div
  69. >
  70. <div
  71. class="choice_card_index choice_card_index3"
  72. v-if="tabIndex == 1"
  73. >
  74. <div>入场时间: {{ item.enterTime }}</div>
  75. <div
  76. >
  77. <radio
  78. color="#ED1C24"
  79. :value="item.id"
  80. :checked="index === current"
  81. />
  82. </div>
  83. </div>
  84. <div
  85. class="choice_card_index choice_card_index2"
  86. v-if="tabIndex == 1"
  87. >
  88. 停车时长: {{ item.serviceMin | parkingTime }}
  89. </div>
  90. <div
  91. class="choice_card_index choice_card_index2"
  92. v-if="tabIndex == 2"
  93. >税号: {{ item.taxNo }}
  94. </div
  95. >
  96. <div
  97. class="choice_card_index choice_card_index3"
  98. v-if="tabIndex == 2"
  99. style="padding-bottom: 20px"
  100. >
  101. <div
  102. >开票时间:
  103. {{ item.createTime ? item.createTime : '-' }}
  104. </div
  105. >
  106. <!-- 0:已提交申请(待开票) 1:开票中 2:开票完成 3:开票失败 -->
  107. <div
  108. class="choice_card_status"
  109. v-if="item.status === 'COMPLETE'"
  110. style="color: #8cc63f"
  111. >
  112. 开票完成
  113. <img
  114. class="arrow"
  115. :src="arrowIcon"
  116. mode="heightFix"
  117. style="height: 40px"
  118. />
  119. </div>
  120. <div
  121. class="choice_card_status"
  122. v-else-if="item.status === 3"
  123. style="color: #ed1c24"
  124. >
  125. 开票失败
  126. <img
  127. class="arrow"
  128. :src="arrowIcon"
  129. mode="heightFix"
  130. style="height: 40px"
  131. />
  132. </div>
  133. <div class="choice_card_status" v-else style="color: #f7931e">
  134. 开票中
  135. <img
  136. class="arrow"
  137. :src="arrowIcon"
  138. mode="heightFix"
  139. style="height: 40px"
  140. />
  141. </div>
  142. </div>
  143. </div>
  144. </label>
  145. </van-checkbox-group>
  146. <van-checkbox-group v-model="ids" v-else @change="checkboxChange">
  147. <label
  148. class="uni-list-cell uni-list-cell-pd"
  149. @click="goToDeatil(item)"
  150. v-for="(item, index) in list"
  151. :key="index"
  152. :index="item.id"
  153. :activity="total - 1"
  154. >
  155. <div class="choice_card_item">
  156. <div class="choice_card_index choice_card_index1">
  157. <div v-if="tabIndex == 1"
  158. >{{ item.orderNo }}-{{ item.vehicleNo }}
  159. </div
  160. >
  161. <div v-else>{{ item.invoiceHeader }}</div>
  162. <div v-if="tabIndex == 1" style="color: #ed1c24"
  163. >¥{{item.totalPaidAmount}}
  164. </div
  165. >
  166. <div v-else style="color: #ed1c24"
  167. >¥{{item.invoiceTotalAmount}}
  168. </div
  169. >
  170. </div>
  171. <div
  172. class="choice_card_index choice_card_index2"
  173. v-if="tabIndex == 1"
  174. >{{ item.parkName }}
  175. </div
  176. >
  177. <div
  178. class="choice_card_index choice_card_index3"
  179. v-if="tabIndex == 1"
  180. >
  181. <div>入场时间: {{ item.enterTime }}</div>
  182. <div class="my-not-invoiced-item">
  183. <van-checkbox
  184. shape="square"
  185. :name="item.id"
  186. icon-size="20"
  187. ref="checkboxes"
  188. @click="checkboxchange2($event, index)"
  189. />
  190. </div>
  191. </div>
  192. <div
  193. class="choice_card_index choice_card_index2"
  194. v-if="tabIndex == 1"
  195. >
  196. 停车时长: {{ item.serviceMin | parkingTime }}
  197. </div>
  198. <div
  199. class="choice_card_index choice_card_index2"
  200. v-if="tabIndex == 2"
  201. >税号: {{ item.taxNo }}
  202. </div
  203. >
  204. <div
  205. class="choice_card_index choice_card_index3"
  206. v-if="tabIndex == 2"
  207. style="padding-bottom: 20px"
  208. >
  209. <div
  210. >开票时间:
  211. {{ item.createTime ? item.createTime : '-' }}
  212. </div
  213. >
  214. <!-- 0:已提交申请(待开票) 1:开票中 2:开票完成 3:开票失败 -->
  215. <div
  216. class="choice_card_status"
  217. v-if="item.status === 'COMPLETE'"
  218. style="color: #8cc63f"
  219. >
  220. 开票完成
  221. <img
  222. class="arrow"
  223. :src="arrowIcon"
  224. style="height: 40px"
  225. />
  226. </div>
  227. <div
  228. class="choice_card_status"
  229. v-else-if="item.status === 'FAILED'"
  230. style="color: #ed1c24" @click.stop
  231. >
  232. <div>开票失败</div>
  233. <!-- <div>重新开票</div> -->
  234. <div class="bordClass" type="default" plain="true" @click.stop="tryGoToInvoicing(item)" size="mini" style="margin-left: 10px;color: #E89E42;border-radius: 10px;padding: 10px;">重新开票</div>
  235. <!-- <img
  236. class="arrow"
  237. :src="arrowIcon"
  238. mode="heightFix"
  239. style="height: 40px"
  240. />
  241. <div
  242. class="choice_card_index choice_card_index3"
  243. v-if="tabIndex == 2 && item.status === 'FAILED'"
  244. style="padding-bottom: 20rpx;justify-content: flex-end;font-size: 20rpx;"
  245. @click.stop="showFailureReason(item.failureReason)"
  246. >
  247. <icon type="info" size="12" color="#d7d7d7" style="margin-right: 10rpx;"/>失败原因
  248. </div> -->
  249. </div>
  250. <div
  251. class="choice_card_status"
  252. v-else
  253. style="color: #f7931e">
  254. 开票中
  255. <img
  256. class="arrow"
  257. :src="arrowIcon"
  258. style="height: 40px"
  259. />
  260. </div>
  261. </div>
  262. <div
  263. class="choice_card_index choice_card_index3"
  264. v-if="tabIndex == 2 && item.status === 'FAILED'"
  265. style="padding-bottom: 20px;justify-content: flex-end;font-size: 20px;"
  266. @click.stop="showFailureReason(item)"
  267. >
  268. <van-icon name="info" size="12" color="#d7d7d7" style="margin-right: 10px;"/>
  269. <!-- <van-icon name="info-o" > -->
  270. <!-- <icon type="info" size="12" color="#d7d7d7" style="margin-right: 10px;"/> -->
  271. 失败原因
  272. </div>
  273. </div>
  274. </label>
  275. </van-checkbox-group>
  276. <div v-show="isLoadMore" :class="{ noData: !list.length }">
  277. <img :src="noData" v-if="!list.length" alt="widthFix"/>
  278. <span v-if="!list.length">暂无数据</span>
  279. <uni-load-more :status="loadStatus" v-else></uni-load-more>
  280. </div>
  281. <!-- <div class="noData" v-if="!list.length">
  282. <span>暂无数据</span>
  283. </div> -->
  284. </div>
  285. </scroll-view>
  286. <div class="flewx" v-if="tabIndex == 1">
  287. <!-- <radio-group class="checkAll" @click="isCheckAll = !isCheckAll">
  288. <label>
  289. <radio style="transform: scale(0.7);position: relative;top: -2px;"
  290. color='#1FBB81' value="all" :checked="isCheckAll" /> 本页全选
  291. </label>
  292. </radio-group> -->
  293. <div class="priceBtn">
  294. <div
  295. >开票金额
  296. <span class="price">{{ totalNum.toFixed(2) }} 元</span></div
  297. >
  298. <div
  299. :class="{
  300. flewx_index3: true,
  301. blue_flewx_index3: custTypeId === 1,
  302. green_flewx_index3: custTypeId === 2,
  303. }"
  304. @click="goToInvoicing"
  305. >去开票
  306. </div
  307. >
  308. </div>
  309. </div>
  310. </div>
  311. </template>
  312. <script>
  313. import parkingReceiptJs from '../../../mixins/parkingReceipt/parkingReceipt'
  314. export default {
  315. mixins: [parkingReceiptJs]
  316. }
  317. </script>
  318. <style lang="less" scoped>
  319. //@import '../../../styles/common.less';
  320. .scroll-Y {
  321. width: 100%;
  322. display: flex;
  323. flex-direction: column;
  324. height: 100vh;
  325. // padding-bottom: 100px;
  326. background: #f2f2f2;
  327. margin-bottom: 40px;
  328. .choice {
  329. width: 750px;
  330. background-color: #fff;
  331. display: flex;
  332. align-items: center;
  333. justify-content: center;
  334. font-size: 30px;
  335. height: 78px;
  336. position: fixed;
  337. top: 0;
  338. left: 0;
  339. div {
  340. width: 30%;
  341. text-align: center;
  342. height: 78px;
  343. line-height: 78px;
  344. }
  345. .actived {
  346. color: #000000;
  347. }
  348. }
  349. .choice_select {
  350. width: 750px;
  351. height: 10px;
  352. background-color: #fff;
  353. position: fixed;
  354. top: 78px;
  355. left: 0;
  356. div {
  357. width: 70px;
  358. height: 4px;
  359. border-radius: 25%;
  360. background-color: #000000;
  361. }
  362. .choice_select_ews {
  363. transform: translateX(230px);
  364. transition-duration: 0.1s;
  365. }
  366. .choice_select_ew {
  367. transform: translateX(455px);
  368. transition-duration: 0.1s;
  369. }
  370. }
  371. .shanghaiClassify {
  372. position: fixed;
  373. width: 750px;
  374. z-index: 2;
  375. }
  376. .blueClassify {
  377. .colorClassify('blue');
  378. }
  379. .greenClassify {
  380. .colorClassify('green');
  381. }
  382. .choice_card {
  383. margin: 98px 20px 0px;
  384. width: 710px;
  385. // background-color: #fff;
  386. .choice_card_item {
  387. // border: 2px solid #ddd;
  388. padding: 10px 20px;
  389. margin: 20px 0;
  390. border-radius: 20px;
  391. background-color: #fff;
  392. .choice_card_index {
  393. // padding-top: 6px;
  394. padding-bottom: 10px;
  395. font-size: 24px;
  396. .choice_card_status {
  397. display: flex;
  398. align-items: center;
  399. .bordClass {
  400. border: 1px solid #E89E42 !important;
  401. }
  402. }
  403. }
  404. .choice_card_index1 {
  405. display: flex;
  406. align-items: center;
  407. justify-content: space-between;
  408. border: 400;
  409. border-bottom: 1px solid #f8f8f8;
  410. padding: 10px 0;
  411. font-size: 28px;
  412. margin-bottom: 10px;
  413. }
  414. .choice_card_index2 {
  415. // padding-top: 20px;
  416. color: #bbbbbb;
  417. }
  418. .choice_card_index3 {
  419. display: flex;
  420. align-items: center;
  421. justify-content: space-between;
  422. color: #bbbbbb;
  423. }
  424. .choice_card_index4 {
  425. color: #bbbbbb;
  426. // padding-bottom: 20px;
  427. }
  428. }
  429. }
  430. }
  431. .suggestion-list {
  432. display: flex;
  433. flex-direction: column;
  434. //background: #fff;
  435. border-radius: 15px;
  436. padding-bottom:120px;
  437. }
  438. //:global {
  439. // .van-checkbox__icon--checked .van-icon{
  440. // color: #c8c9cc;
  441. // }
  442. //}
  443. .flewx {
  444. width: 100%;
  445. height: 100px;
  446. background-color: #fff;
  447. position: fixed;
  448. bottom: 0;
  449. display: flex;
  450. align-items: center;
  451. justify-content: flex-end;
  452. // padding-bottom: constant(safe-area-inset-bottom);
  453. // padding-bottom: env(safe-area-inset-bottom);
  454. padding-bottom: 20px;
  455. // .checkAll {
  456. // .checkboxItem {
  457. // position: relative;
  458. // top: -2px;
  459. // }
  460. // }
  461. .priceBtn {
  462. display: flex;
  463. align-items: center;
  464. margin-right: 20px;
  465. justify-content: space-around;
  466. .price {
  467. color: #ed1c24;
  468. font-size: 36px;
  469. margin: 0 10px;
  470. }
  471. .flewx_index3 {
  472. width: 150px;
  473. height: 70px;
  474. border-radius: 40px;
  475. text-align: center;
  476. font-size: 28px;
  477. line-height: 70px;
  478. color: #fff;
  479. background-image: linear-gradient(to right, #7e50a3, #433c7f);
  480. margin-left: 50px;
  481. margin-right: 30px;
  482. }
  483. .blue_flewx_index3 {
  484. .color-background-color('blue');
  485. }
  486. .green_flewx_index3 {
  487. .color-background-color('green');
  488. }
  489. }
  490. }
  491. .uni-input_type {
  492. width: 42px;
  493. height: 42px;
  494. margin-right: 10px;
  495. border: 1px solid #f2f2f2;
  496. border-radius: 50%;
  497. img {
  498. width: 40px;
  499. height: 40px;
  500. }
  501. }
  502. .noData {
  503. width: 100%;
  504. padding-top: 15%;
  505. text-align: center;
  506. background: #f2f2f2;
  507. margin: 15% auto 0;
  508. img {
  509. width: 200px;
  510. margin-bottom: 2%;
  511. }
  512. span {
  513. color: #999;
  514. display: block;
  515. }
  516. }
  517. </style>
  518. <style lang="less">
  519. .my-not-invoiced-item {
  520. .van-checkbox__icon--checked .van-icon{
  521. color: #ED1C24;
  522. background-color: #fff;
  523. border-color: #c8c9cc;
  524. }
  525. }
  526. </style>