tollCollectorPerformance.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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 :loading="loading" :padding="'0'" :tableTh="tableTh" :tableData="tableData" @pageChange="pageChange"/>
  8. </view>
  9. </view>
  10. <view class="total">
  11. <view>
  12. 应收金额<text>{{ totalData.payAmount || 0 }}</text>元,实收金额<text>{{ totalData.realAmount || 0 }}</text>元
  13. </view>
  14. <view>
  15. 现金收入<text>{{ totalData.cashAmt || 0 }}</text>元,非现金收入<text>{{ totalData.otherAmt || 0 }}</text>元
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import TableRanking from '@/components/tableRanking.vue'
  22. export default {
  23. components: {
  24. TableRanking
  25. },
  26. props: {
  27. tableTh: {
  28. type: Array,
  29. default: () => {
  30. return [{
  31. field: '工号',
  32. key: 'payeeNo'
  33. },
  34. {
  35. field: '姓名',
  36. key: 'payeeName'
  37. },
  38. {
  39. field: '所属路段',
  40. key: 'roadName'
  41. },
  42. {
  43. field: '应收金额(元)',
  44. key: 'payAmount',
  45. width: 80
  46. },
  47. {
  48. field: '实收金额(元)',
  49. key: 'realAmount',
  50. width: 80
  51. }
  52. ]
  53. }
  54. }
  55. },
  56. data() {
  57. return {
  58. tableData: {
  59. current: 1,
  60. total: 0,
  61. list: []
  62. },
  63. totalData: {},
  64. beginTime: undefined,
  65. endTime: undefined,
  66. loading: false,
  67. currentDate: []
  68. }
  69. },
  70. methods: {
  71. getData(data) {
  72. if (data.length) {
  73. this.beginTime = data[0]
  74. this.endTime = data[1]
  75. } else {
  76. this.beginTime = undefined
  77. this.endTime = undefined
  78. }
  79. this.currentDate = data
  80. this.tableData.current = 1
  81. this.getTollCollectorAchieveTotal()
  82. this.getTollCollectorAchieveList()
  83. },
  84. getTollCollectorAchieveTotal() {
  85. uni.$u.api.statisticalReportApi.getTollCollectorAchieveTotalApi({
  86. beginTime: this.beginTime,
  87. endTime: this.endTime
  88. }).then(res => {
  89. if (res.code === 200) {
  90. this.totalData = res.data
  91. }
  92. })
  93. },
  94. getTollCollectorAchieveList() {
  95. this.loading = true
  96. uni.$u.api.statisticalReportApi.getTollCollectorAchieveListApi({
  97. beginTime: this.beginTime,
  98. endTime: this.endTime,
  99. pageNum: this.tableData.current,
  100. pageSize: 10
  101. }).then(res => {
  102. if (res.code === 200) {
  103. this.tableData.list = res.rows
  104. this.tableData.total = res.total
  105. }
  106. this.loading = false
  107. })
  108. },
  109. pageChange(cur) {
  110. this.tableData.current = cur
  111. this.getTollCollectorAchieveList()
  112. }
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. @import './report.scss';
  118. </style>