recoveryReport.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!--
  2. * @Description: 统计报表 => 追缴统计(路段)
  3. * @Author: 空白格
  4. * @Date: 2022-08-03 11:21:31
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-03 11:46:05
  7. * @FilePath: \parking_operation\pages\statisticalReport\roadModel\components\recoveryReport.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <view class="container">
  12. <view class="table">
  13. <view class="table-date" v-if="currentDate">{{ currentDate.join(' 至 ') }}</view>
  14. <view class="table-box">
  15. <TableRanking
  16. :loading="loading"
  17. :padding="'0'"
  18. :tableTh="tableTh"
  19. :tableData="tableData"
  20. @pageChange="pageChange"
  21. />
  22. </view>
  23. </view>
  24. <view class="total">
  25. <view>
  26. 数据统计,收费员共
  27. <text>{{ totalData.dataCount || 0 }}</text>人,累计追缴
  28. <text>{{ totalData.pursueCount || 0 }}</text>次,其中追缴现金金额
  29. <text>{{ totalData.cashAmt || 0 }}</text>元,追缴非现金金额
  30. <text>{{ totalData.otherAmount || 0 }}</text>元,追缴总额共计
  31. <text>{{ totalData.quickAmt || 0 }}</text>元
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. import TableRanking from '@/components/tableRanking.vue';
  38. export default {
  39. components: {
  40. TableRanking
  41. },
  42. props: {
  43. tableTh: {
  44. type: Array,
  45. default: () => {
  46. return [
  47. {
  48. field: '收费员',
  49. width: 120,
  50. key: 'payeeName'
  51. },
  52. {
  53. field: '追缴次数',
  54. width: 80,
  55. key: 'pursueCount'
  56. },
  57. {
  58. field: '追缴现金金额(元)',
  59. width: 80,
  60. key: 'cashAmt'
  61. },
  62. {
  63. field: '追缴非现金金额(元)',
  64. width: 80,
  65. key: 'otherAmount'
  66. },
  67. {
  68. field: '追缴总额(元)',
  69. width: 80,
  70. key: 'totalAmt'
  71. }
  72. ];
  73. }
  74. }
  75. },
  76. data() {
  77. return {
  78. loading: false,
  79. tableData: {
  80. current: 1,
  81. total: 0,
  82. list: []
  83. },
  84. totalData: {},
  85. currentDate: [],
  86. beginTime: undefined,
  87. endTime: undefined
  88. };
  89. },
  90. methods: {
  91. getData(data) {
  92. if (data.length) {
  93. this.beginTime = data[0];
  94. this.endTime = data[1];
  95. }
  96. this.currentDate = data;
  97. this.tableData.current = 1;
  98. this.getIncomeTotal();
  99. this.getIncomeList();
  100. },
  101. getIncomeTotal() {
  102. uni.$u.api.statisticalReportApi
  103. .getRecoverySumReportApi({
  104. beginTime: this.beginTime,
  105. endTime: this.endTime
  106. })
  107. .then((res) => {
  108. if (res.code === 200) {
  109. this.totalData = res.data;
  110. }
  111. });
  112. },
  113. getIncomeList() {
  114. this.loading = true;
  115. uni.$u.api.statisticalReportApi
  116. .getRecoveryReportApi({
  117. beginTime: this.beginTime,
  118. endTime: this.endTime,
  119. pageNum: this.tableData.current,
  120. pageSize: 10
  121. })
  122. .then((res) => {
  123. if (res.code === 200) {
  124. this.tableData.list = res.rows;
  125. this.tableData.total = res.total;
  126. }
  127. this.loading = false;
  128. });
  129. },
  130. pageChange(cur) {
  131. this.tableData.current = cur;
  132. this.getIncomeList();
  133. }
  134. }
  135. };
  136. </script>
  137. <style lang="scss" scoped>
  138. @import './report.scss';
  139. </style>