moneybill.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="car">
  3. <view class="cartop">
  4. <!-- <view class="topa flexc">
  5. <image :src="reset" class="resetimg" @click="getReset"></image>
  6. <picker mode="date" fields="year" @change='bindDateChangea'>
  7. <view class="chekt flexc">
  8. <view>{{cxrq|| "选择日期"}}</view>
  9. <image :src="up"></image>
  10. </view>
  11. </picker>
  12. <view class="search flexc">
  13. <image :src="search"></image>
  14. <input placeholder="请输入房号进行搜索" v-model="text"/>
  15. <view class="btn" @click="getConfirm">搜索</view>
  16. </view>
  17. </view> -->
  18. <view class="tabtop flexc">
  19. <view class="tabt" :class="ttopval==ite.val?'act':''" v-for="(ite,idx) in ttoplist" :key="idx" @click="getTabtop(ite.val)">{{ite.tit}}</view>
  20. </view>
  21. </view>
  22. <!-- 列表 -->
  23. <view class="carlists">
  24. <car-list :datainfo="list" :topval="ttopval" :wtdt="wtdt" type='moneybill' @getDetail="getDetail"></car-list>
  25. </view>
  26. <view class="rfbtn" @click="getAddFn">催缴</view>
  27. <loading></loading>
  28. </view>
  29. </template>
  30. <script>
  31. import config from '@/config'
  32. const baseUrl = config.baseUrl
  33. import carList from "@/work/components/car/list.vue"
  34. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  35. export default{
  36. components:{carList},
  37. data(){
  38. return{
  39. // reset:require('@/work/static/car/reset.png'),
  40. // search:require('@/work/static/car/search.png'),
  41. // up:require('@/work/static/car/up.png'),
  42. cxrq:"",
  43. text:'',
  44. list:[{tit:'皖A IC520',type:1},{tit:'晋E KD783',type:2},],
  45. pageSize: 10,
  46. pageNum: 1,
  47. reachflag: true,
  48. wtdt:'',
  49. ttopval:'0',
  50. ttoplist:[{tit:'全部',val:0},{tit:'未缴费',val:1},{tit:'已缴费',val:2},]
  51. }
  52. },
  53. onLoad: function() {
  54. },
  55. // 上拉触底加载更多触发事件
  56. onReachBottom() {
  57. if (this.reachflag) {
  58. this.pageNum++
  59. this.getDataFn()
  60. }
  61. },
  62. methods:{
  63. checkPermi, checkRole,
  64. getDetail(){
  65. this.$tab.navigateTo("/work/pages/manage/moneydetail")
  66. },
  67. getAddFn(){
  68. },
  69. getTabtop(val){
  70. this.ttopval=val
  71. },
  72. getConfirm(){
  73. this.getrefreshData()
  74. },
  75. getReset(){
  76. this.cxrq='';
  77. this.text='';
  78. this.getrefreshData()
  79. },
  80. getrefreshData(){
  81. this.pageNum=1;
  82. this.list=[];
  83. this.reachflag=true;
  84. this.getDataFn()
  85. },
  86. getTabFn(val){
  87. this.tabval=val
  88. },
  89. bindDateChangea(e){
  90. var val=e.detail.value;
  91. this.cxrq=val;
  92. },
  93. getDataFn(){
  94. var params={
  95. pageSize:this.pageSize,
  96. pageNum: this.pageNum,
  97. }
  98. params.noticeType=this.tabidx
  99. getNoticeList(params).then(res=>{
  100. if(res.code==200){
  101. if (res.rows.length < this.pageSize) {
  102. this.reachflag = false
  103. this.wtdt = '到底了~';
  104. } else {
  105. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  106. if (num < res.total) {
  107. this.reachflag = true
  108. this.wtdt = ''
  109. } else {
  110. this.reachflag = false
  111. this.wtdt = '到底了~';
  112. }
  113. }
  114. if (this.pageNum == 1) {
  115. this.list = res.rows;
  116. } else {
  117. this.list = this.list.concat(res.rows)
  118. }
  119. }else{
  120. this.$toast(res.msg)
  121. }
  122. })
  123. },
  124. }
  125. }
  126. </script>
  127. <style>
  128. page{background: #F3F3F0;}
  129. </style>
  130. <style lang="scss" scoped>
  131. .car{padding: 154rpx 0 110rpx;}
  132. .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
  133. .topa{padding: 20rpx ;
  134. .resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
  135. .chekt{min-width: 180rpx;
  136. view{font-weight: 500;font-size: 26rpx;color: #272727;flex: 1;}
  137. image{width: 24rpx;height: 16rpx;margin-left: 18rpx;flex: 0 0 auto;}
  138. }
  139. .search{flex: 1;margin-left: 16rpx;height: 64rpx;background: #EEEEEE;border-radius: 32rpx;border: 2rpx solid #E6E6E6;padding-left: 24rpx;box-sizing: border-box;
  140. image{width: 32rpx;height: 34rpx;margin-right: 22rpx;flex: 0 0 auto;}
  141. input{flex: 1;font-size: 26rpx;color: #272727;}
  142. .btn{width: 100rpx;height: 64rpx;background: #3565ED;border-radius: 32rpx;flex: 0 0 auto;font-weight: bold;text-align: center;line-height: 64rpx;
  143. font-size: 26rpx;
  144. color: #FFFFFF;}
  145. }
  146. }
  147. .tabtop{padding-bottom: 46rpx;padding-top: 28rpx;
  148. .tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;margin-right: 6rpx;
  149. &.act{font-weight: bold;font-size: 32rpx;color: #272727;
  150. &::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
  151. }
  152. }
  153. }
  154. }
  155. .carlists{padding: 0 18rpx;}
  156. </style>