queryFortuneBag.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="m-container">
  3. <p class="title">福袋统计</p>
  4. <van-cell-group>
  5. <van-cell title="总收入"
  6. :value="totalMoney" />
  7. <van-cell title="总笔数"
  8. :value="totalNum" />
  9. </van-cell-group>
  10. <div class="tableWrap">
  11. <div class="item">
  12. <span>分部名</span>
  13. <span>总笔数</span>
  14. <span>总收入</span>
  15. </div>
  16. <div class="item"
  17. v-for='(item,index) in orangeList'
  18. :key="index">
  19. <span>{{ item.organName}}</span>
  20. <span>{{ item.nums}}</span>
  21. <span>{{ item.money}}</span>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. import { getFortuneBag } from '@/api/teacher'
  28. export default {
  29. name: 'FortuneBag',
  30. data () {
  31. return {
  32. totalNum: null,
  33. totalMoney: null,
  34. orangeList: []
  35. }
  36. },
  37. mounted () {
  38. getFortuneBag().then(res => {
  39. if (res.data.code == 200) {
  40. this.totalNum = res.data.data.totalNum + ' 笔'
  41. this.totalMoney = res.data.data.totalMoney + ' 元'
  42. this.orangeList = res.data.data.orderStatisDtoList
  43. }
  44. })
  45. }
  46. }
  47. </script>
  48. <style lang="less">
  49. .m-container {
  50. background-color: #fff;
  51. }
  52. .title {
  53. height: 0.4rem;
  54. line-height: 0.4rem;
  55. text-align: center;
  56. background-color: #14928a;
  57. color: #fff;
  58. }
  59. .tableWrap {
  60. .item {
  61. padding: 0 15px;
  62. height: 44px;
  63. line-height: 44px;
  64. background-color: #fff;
  65. border-bottom: 1px solid #ebedf0;
  66. font-size: 14px;
  67. display: flex;
  68. flex-direction: row;
  69. justify-content: space-around;
  70. &:nth-child(1) {
  71. background-color: #ebedf0;
  72. }
  73. span {
  74. display: inline-block;
  75. width: 33%;
  76. text-align: center;
  77. overflow: hidden;
  78. text-overflow: ellipsis;
  79. }
  80. }
  81. }
  82. </style>