parkentrace.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <!-- 地磁 -->
  3. <view class="parking-lock">
  4. <!-- 地磁支付 -->
  5. <template>
  6. <view class="parking-lock-pay" v-if="infoData">
  7. <!-- <view class="parking-lock-title">支付停车费</view> -->
  8. <!-- <view class="parking-lock-tips">请您确认停车费用,确认后请支付费用,结束停车。谢谢您的使用!</view> -->
  9. <view class="parking-lock-info">
  10. <view class="parking-lock-info-item">
  11. <view>停车场</view>
  12. <view class="weight">{{ infoData.parkingName }}</view>
  13. </view>
  14. <view class="parking-lock-info-item">
  15. <view>入口名称</view>
  16. <view>{{ infoData.entranceName }}</view>
  17. </view>
  18. <view class="parking-lock-info-item">
  19. <view>通道名称</view>
  20. <view>{{ infoData.roadwayName }}</view>
  21. </view>
  22. <view class="parking-lock-info-item">
  23. <view>入场时间</view>
  24. <view>{{ infoData.inTime }}</view>
  25. </view>
  26. </view>
  27. <view class="parking-lock-pay-btn">
  28. <button type="default" @click="onEntraceClick">立即入场</button>
  29. </view>
  30. </view>
  31. <view v-else>
  32. <view class="parking-lock-info">
  33. <view class="parking-lock-info-item">
  34. <view>入口无车辆</view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <u-toast ref="uToast" />
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. components: {},
  45. data() {
  46. return {
  47. intoInfo: {
  48. parkNo: '',
  49. roadwayNo: ''
  50. },
  51. infoData: undefined
  52. };
  53. },
  54. onLoad(page) {
  55. this.intoInfo.parkNo = page?.parkNo;
  56. this.intoInfo.roadwayNo = page?.roadwayNo;
  57. },
  58. onShow() {
  59. this.getOrderDetails(this.intoInfo.parkNo, this.intoInfo.roadwayNo);
  60. },
  61. onUnload() {},
  62. methods: {
  63. onEntraceClick() {
  64. let askParams = {
  65. orderId: this.infoData.id
  66. };
  67. this.$u.api.entranceByNoVehicleApi(askParams).then((res) => {
  68. if (res.code === 200) {
  69. this.$refs.uToast.show({
  70. title: res.msg || '入场成功',
  71. type: 'success'
  72. });
  73. uni.reLaunch({
  74. url: '/pages/parkroadgate/parkroadgate'
  75. });
  76. } else {
  77. this.$refs.uToast.show({
  78. title: res.msg || '入场失败',
  79. type: 'error'
  80. });
  81. }
  82. });
  83. },
  84. /**
  85. * 查询订单信息
  86. * @param { String } tqgThree 车位ID
  87. * @param { String } orderId 订单id
  88. * @param { String } payeeId 收费员ID
  89. */
  90. getOrderDetails(parkNo, roadwayNo) {
  91. this.$u.api.getDetailEntranceApi({ parkNo, roadwayNo }).then((res) => {
  92. if (res.code === 200) {
  93. this.infoData = res.data;
  94. } else {
  95. this.$refs.uToast.show({
  96. title: res.msg || '订单无数据',
  97. type: 'error'
  98. });
  99. }
  100. });
  101. }
  102. }
  103. };
  104. </script>
  105. <style lang="scss" scoped>
  106. @import './parkentrace.scss';
  107. </style>