bill.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <template>
  2. <view class="center">
  3. <view @click="dataShow = true" class="data_top">{{data}} 年
  4. <image src="../../../static/images/myimg/gengduo1@3x.png" mode=""
  5. style="width:12rpx ;height: 20rpx;margin-left: 20rpx;"></image>
  6. </view>
  7. <u-picker :show="dataShow" :columns="columns" @confirm="dataChange" @cancel="dataShow = false"
  8. @close="dataShow = false"></u-picker>
  9. <view v-if='formlist.length>0' class="dataInfo_css">
  10. <view class="formData" v-for="(item,index) in formlist" @click="billSee(item)">
  11. <view class="flex row">
  12. <view class="left-text">{{item.types}}</view>
  13. <view class="flex right-text">
  14. {{item.amountMoney}}
  15. </view>
  16. </view>
  17. <view class="flex">
  18. <view class="order_no">
  19. <text v-if="item.types == '提现'">{{item.status}}</text>
  20. <text v-else>{{item.orderNo?item.orderNo:""}}</text>
  21. </view>
  22. <view class="date_css">
  23. {{item.createDate}}
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. <view v-else class="noBill">暂无账单</view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. type: "", //1个人 2 企业
  36. companyId: "",
  37. pageSize: 10,
  38. currentPage: 1,
  39. data: "2023",
  40. dataShow: false,
  41. value1: Number(new Date()),
  42. columns: [
  43. ["2023", "2024", "2025", "2026", "2027", "2028", "2029", "2030", "2031", "2032", "2033",
  44. "2034", "2035"
  45. ],
  46. ],
  47. startDate: "",
  48. endDate: "",
  49. formlist: []
  50. }
  51. },
  52. onLoad(options) {
  53. this.type = options.type
  54. this.companyId = options.id
  55. this.getList()
  56. },
  57. onShow() {
  58. },
  59. methods: {
  60. billSee(val){
  61. if(val.types == '提现'){
  62. uni.$u.route('/pages/mine/myAccount/billView?id=' + val.id)
  63. }
  64. },
  65. dataChange(e) {
  66. this.data = e.value[0]
  67. this.dataShow = false
  68. this.getList()
  69. },
  70. getList() {
  71. // commonId ,companyId,date
  72. this.startDate = this.data + "-01-01"
  73. this.endDate = this.data + "-12-31"
  74. if (this.type == 1) { //个人
  75. this.$request.baseRequest('get', '/hyCargoOwnerCapitalInfo/selectBill', {
  76. commonId: uni.getStorageSync("userInfo").id,
  77. startDate: this.startDate,
  78. endDate: this.endDate,
  79. pageSize: this.pageSize,
  80. currentPage: this.currentPage,
  81. }).then(res => {
  82. this.formlist = res.data.records
  83. })
  84. } else if (this.type == 2) {
  85. this.$request.baseRequest('get', '/hyCargoOwnerCapitalInfo/selectBill', {
  86. companyId: this.companyId,
  87. startDate: this.startDate,
  88. endDate: this.endDate,
  89. pageSize: this.pageSize,
  90. currentPage: this.currentPage,
  91. }).then(res => {
  92. this.formlist = res.data.records
  93. })
  94. }
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .center {
  101. // padding:0 20rpx;
  102. background: #F5F6FA;
  103. height: calc(100vh - 1vh);
  104. overflow: scroll;
  105. .data_top{
  106. padding: 20rpx 30rpx 0;
  107. background: #ffffff;
  108. height: 80rpx;
  109. }
  110. .dataInfo_css{
  111. padding: 10rpx 30rpx 20px;
  112. background: #ffffff;
  113. width: 85%;
  114. border-radius: 20rpx;
  115. margin: 20rpx auto;
  116. .formData {
  117. height: 140rpx;
  118. border-bottom: 2rpx solid #EEEEEE ;
  119. .tips {
  120. text-align: right;
  121. border-bottom: 2rpx solid #e6e6e6;
  122. height: 60rpx;
  123. }
  124. .row {
  125. margin: 30rpx 0;
  126. }
  127. .left-text {
  128. // background: red;
  129. width: 40%;
  130. color: #333333;
  131. display: flex;
  132. align-items: center;
  133. }
  134. .right-text {
  135. width: 60%;
  136. justify-content: flex-end;
  137. }
  138. .order_no {
  139. width: 50%;
  140. color: #999999 ;
  141. font-size: 28rpx;
  142. }
  143. .date_css {
  144. width: 50%;
  145. text-align: right;
  146. color: #999999 ;
  147. font-size: 28rpx;
  148. }
  149. }
  150. }
  151. .noBill{
  152. text-align:center;padding:10px;
  153. background: #FFFFFF;
  154. width: 90%;
  155. margin: 20rpx auto;
  156. border-radius: 20rpx;
  157. height: 70rpx;
  158. }
  159. }
  160. </style>