bill.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="center">
  3. <view class="" @click="dataShow = true">{{data}}</view>
  4. <u-picker :show="dataShow" :columns="columns" @confirm="dataChange" @cancel="dataShow = false"
  5. @close="dataShow = false"></u-picker>
  6. <view class="formData" v-for="(item,index) in formlist">
  7. <view class="flex row">
  8. <view class="left-text">{{item.types}}</view>
  9. <view class="flex right-text">
  10. {{item.amountMoney}}
  11. </view>
  12. </view>
  13. <view class="date_css">
  14. {{item.createDate}}
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. data() {
  22. return {
  23. type: "", //1个人 2 企业
  24. companyId: "",
  25. pageSize: 10,
  26. currentPage: 1,
  27. data: "2022",
  28. dataShow: false,
  29. value1: Number(new Date()),
  30. columns: [
  31. ["2022", "2023", "2024", "2025", "2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033",
  32. "2034", "2035"
  33. ],
  34. ],
  35. startDate: "",
  36. endDate: "",
  37. formlist: []
  38. }
  39. },
  40. onLoad(options) {
  41. this.type = options.type
  42. this.companyId = options.id
  43. this.getList()
  44. },
  45. onShow() {
  46. },
  47. methods: {
  48. dataChange(e) {
  49. this.data = e.value[0]
  50. this.dataShow = false
  51. this.getList()
  52. },
  53. getList() {
  54. // commonId ,companyId,date
  55. this.startDate = this.data + "-01-01"
  56. this.endDate = this.data + "-12-31"
  57. if (this.type == 1) { //个人
  58. this.$request.baseRequest('get', '/hyCargoOwnerCapitalInfo/selectBill', {
  59. commonId: uni.getStorageSync("userInfo").id,
  60. startDate: this.startDate,
  61. endDate: this.endDate,
  62. pageSize: this.pageSize,
  63. currentPage: this.currentPage,
  64. }).then(res => {
  65. this.formlist = res.data.records
  66. })
  67. } else if (this.type == 2) {
  68. this.$request.baseRequest('get', '/hyCargoOwnerCapitalInfo/selectBill', {
  69. companyId: this.companyId,
  70. startDate: this.startDate,
  71. endDate: this.endDate,
  72. pageSize: this.pageSize,
  73. currentPage: this.currentPage,
  74. }).then(res => {
  75. this.formlist = res.data.records
  76. })
  77. }
  78. }
  79. }
  80. }
  81. </script>
  82. <style lang="scss" scoped>
  83. .center {
  84. padding: 20rpx;
  85. .formData {
  86. .tips {
  87. text-align: right;
  88. border-bottom: 2rpx solid #e6e6e6;
  89. height: 60rpx;
  90. }
  91. .row {
  92. margin: 30rpx 0;
  93. }
  94. .left-text {
  95. // background: red;
  96. width: 40%;
  97. color: #333333;
  98. display: flex;
  99. align-items: center;
  100. }
  101. .right-text {
  102. width: 60%;
  103. justify-content: flex-end;
  104. }
  105. .date_css {
  106. text-align: right;
  107. }
  108. }
  109. }
  110. </style>
  111. uni.setStorageSync('userInfo', res.data)
  112. helper.getListByUserId()
  113. that.$store.commit('login', res.data)
  114. // that.liangxinLogin()
  115. uni.switchTab({
  116. url: '/pages/order/index'
  117. });
  118. uni.hideLoading()