revenueReport.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <!-- 营收统计 -->
  2. <template>
  3. <view class="container">
  4. <view class="table">
  5. <!-- <view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view> -->
  6. <view class="table-box">
  7. <TableRanking
  8. :loading="loading"
  9. :tableTh="tableTh"
  10. :tableData="tableData"
  11. @pageChange="pageChange"
  12. />
  13. </view>
  14. </view>
  15. <view class="total">
  16. <view>
  17. 车辆
  18. <text>{{ totalData.vehicleCount || 0 }}</text>辆,应收金额
  19. <text>{{ totalData.payAmount || 0 }}</text>元,实收金额
  20. <text>{{ totalData.realAmount || 0 }}</text>元,
  21. 欠费金额
  22. <text>{{ totalData.amtOwe || 0 }}</text>元,其中贵州银行快捷支付
  23. <text>{{ totalData.quickAmt || 0 }}</text>元,贵州银行聚合支付
  24. <text>{{ totalData.unionAmt || 0 }}</text>元,微信支付
  25. <text>{{ totalData.wechatAmt || 0 }}</text>元,无感支付
  26. <text>{{ totalData.unconsAmt || 0 }}</text>元,现金支付
  27. <text>{{ totalData.cashAmt || 0 }}</text>元
  28. </view>
  29. </view>
  30. </view>
  31. </template>
  32. <script>
  33. import TableRanking from '@/components/tableRanking.vue';
  34. export default {
  35. components: {
  36. TableRanking
  37. },
  38. props: {
  39. tableTh: {
  40. type: Array,
  41. default: () => {
  42. return [
  43. {
  44. field: '停车场/路段',
  45. width: 120,
  46. key: 'roadName'
  47. },
  48. {
  49. field: '车辆(辆)',
  50. width: 80,
  51. key: 'vehicleCount'
  52. },
  53. {
  54. field: '应收金额(元)',
  55. width: 80,
  56. key: 'payAmount'
  57. },
  58. {
  59. field: '实收金额(次)',
  60. width: 80,
  61. key: 'realAmount'
  62. },
  63. {
  64. field: '欠费金额(元)',
  65. width: 80,
  66. key: 'amtOwe'
  67. },
  68. {
  69. field: '贵州银行快捷支付(元)',
  70. width: 150,
  71. key: 'quickAmt'
  72. },
  73. {
  74. field: '贵州银行聚合支付(元)',
  75. width: 150,
  76. key: 'unionAmt'
  77. },
  78. {
  79. field: '微信(元)',
  80. width: 80,
  81. key: 'wechatAmt'
  82. },
  83. {
  84. field: '无感(元)',
  85. width: 80,
  86. key: 'unconsAmt'
  87. },
  88. {
  89. field: '现金(元)',
  90. width: 80,
  91. key: 'cashAmt'
  92. }
  93. ];
  94. }
  95. }
  96. },
  97. data() {
  98. return {
  99. loading: false,
  100. tableData: {
  101. current: 1,
  102. total: 0,
  103. list: []
  104. },
  105. totalData: {},
  106. currentDate: [],
  107. beginTime: undefined,
  108. endTime: undefined
  109. };
  110. },
  111. methods: {
  112. getData(data) {
  113. if (data.length) {
  114. this.beginTime = data[0];
  115. this.endTime = data[1];
  116. }
  117. this.currentDate = data;
  118. this.tableData.current = 1;
  119. this.getIncomeTotal();
  120. this.getIncomeList();
  121. },
  122. getIncomeTotal() {
  123. uni.$u.api.statisticalReportApi
  124. .getParkIncomeTotalApi({
  125. beginTime: this.beginTime,
  126. endTime: this.endTime
  127. })
  128. .then((res) => {
  129. if (res.code === 200) {
  130. this.totalData = res.data;
  131. }
  132. });
  133. },
  134. getIncomeList() {
  135. this.loading = true;
  136. uni.$u.api.statisticalReportApi
  137. .getParkIncomeListApi({
  138. beginTime: this.beginTime,
  139. endTime: this.endTime,
  140. pageNum: this.tableData.current,
  141. pageSize: 10
  142. })
  143. .then((res) => {
  144. if (res.code === 200) {
  145. this.tableData.list = res.rows;
  146. this.tableData.total = res.total;
  147. }
  148. this.loading = false;
  149. });
  150. },
  151. pageChange(cur) {
  152. this.tableData.current = cur;
  153. this.getIncomeList();
  154. }
  155. }
  156. };
  157. </script>
  158. <style lang="scss" scoped>
  159. @import './../../styles/report.scss';
  160. </style>