money.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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>{{year+'年度'|| "选择年度"}}</view>
  9. <image :src="up"></image>
  10. </view>
  11. </picker>
  12. <view class="search flexc">
  13. <image :src="search"></image>
  14. <!-- confirm-type="search" @confirm="getConfirm" -->
  15. <input placeholder="请输入房号进行搜索" v-model="text"/>
  16. <view class="btn" @click="getConfirm">搜索</view>
  17. </view>
  18. </view>
  19. <view class="mcont">
  20. <image :src="contbg" class="contbg"></image>
  21. <view class="mconta">
  22. <view class="mcontb">
  23. <view class="w50">
  24. <view class="mctit">已缴物业费 /元</view>
  25. <view class="mctxt over">{{infoCount.yjwyf}}</view>
  26. </view>
  27. <view class="w50">
  28. <view class="mctit">未缴物业费 /元</view>
  29. <view class="mctxt over">{{infoCount.wjwyf}}</view>
  30. </view>
  31. </view>
  32. <view class="mcontc">
  33. <view class="w50">
  34. <view class="mctit mb10">车位费 /元</view>
  35. <view class="mctxta">已缴费:<text>{{infoCount.yjcwf}}</text></view>
  36. <view class="mctxta">未缴费:<text>{{infoCount.wjcwf}}</text></view>
  37. </view>
  38. <view class="w50">
  39. <view class="mctit mb10">能耗费 /元</view>
  40. <view class="mctxta">已缴费:<text>{{infoCount.yjnhf}}</text></view>
  41. <view class="mctxta">未缴费:<text>{{infoCount.wjnhf}}</text></view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="tabtop flexc">
  47. <view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
  48. </view>
  49. </view>
  50. <!-- 列表 -->
  51. <view class="carlists">
  52. <car-list :datainfo="list" :wtdt="wtdt" type='money' @getDetail="getDetail"></car-list>
  53. </view>
  54. <block v-if="checkPermi(['wuYe:fee:callPaymentAll'])">
  55. <view style="height: 100rpx;"></view>
  56. <view class="rfbtn" @click="getcallPayFn">一键催缴</view>
  57. </block>
  58. <loading></loading>
  59. </view>
  60. </template>
  61. <script>
  62. import config from '@/config'
  63. const baseUrl = config.baseUrl
  64. import carList from "@/work/components/car/list.vue"
  65. import {feeCount,feeList,feecallPaymentAll} from "@/api/work/manage.js"
  66. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  67. export default{
  68. components:{carList},
  69. data(){
  70. return{
  71. reset:require('@/car/static/car/reset.png'),
  72. contbg:require('@/work/static/manage/contbg.png'),
  73. search:require('@/car/static/car/search.png'),
  74. up:require('@/car/static/car/up.png'),
  75. year:"",
  76. text:'',
  77. list:[],
  78. pageSize: 10,
  79. pageNum: 1,
  80. reachflag: true,
  81. wtdt:'',
  82. tabval:'N',
  83. tablist:[{tit:'未缴费',val:'N'},{tit:'已缴费',val:'Y'},],
  84. infoCount:'',
  85. }
  86. },
  87. onLoad: function() {
  88. var date = new Date();
  89. this.year=date.getFullYear();
  90. this.getfeeCount()
  91. this.getDataFn()
  92. },
  93. // 上拉触底加载更多触发事件
  94. onReachBottom() {
  95. if (this.reachflag) {
  96. this.pageNum++
  97. this.getDataFn()
  98. }
  99. },
  100. methods:{
  101. checkPermi, checkRole,
  102. gettime(){
  103. var date = new Date();
  104. var y = date.getFullYear();
  105. this.year=date.getFullYear();
  106. },
  107. getDetail(id){
  108. this.$tab.navigateTo("/work/pages/manage/moneydetail?id="+id)
  109. },
  110. getConfirm(){
  111. this.getrefreshData()
  112. },
  113. getReset(){
  114. this.text='';
  115. this.getrefreshData()
  116. },
  117. getrefreshData(){
  118. this.pageNum=1;
  119. this.list=[];
  120. this.reachflag=true;
  121. this.getDataFn();
  122. this.getfeeCount()
  123. },
  124. getTabFn(val){
  125. this.tabval=val;
  126. this.pageNum=1;
  127. this.list=[];
  128. this.reachflag=true;
  129. this.getDataFn();
  130. },
  131. bindDateChangea(e){
  132. var val=e.detail.value;
  133. this.year=val;
  134. this.getrefreshData();
  135. },
  136. getfeeCount(){
  137. var params={
  138. year:this.year
  139. }
  140. if(this.text){
  141. params.detailedAddress=this.text
  142. }
  143. feeCount(params).then(res=>{
  144. if(res.code==200){
  145. this.infoCount=res.data
  146. }
  147. })
  148. },
  149. getcallPayFn(){
  150. var params={
  151. year:this.year
  152. }
  153. feecallPaymentAll(params).then(res=>{
  154. if(res.code==200){
  155. this.$toast(res.msg)
  156. }
  157. })
  158. },
  159. getDataFn(){
  160. var params={
  161. pageSize:this.pageSize,
  162. pageNum: this.pageNum,
  163. isExpense:this.tabval,
  164. year:this.year
  165. }
  166. if(this.text){
  167. params.detailedAddress=this.text
  168. }
  169. feeList(params).then(res=>{
  170. if(res.code==200){
  171. if (res.rows.length < this.pageSize) {
  172. this.reachflag = false
  173. this.wtdt = '到底了~';
  174. } else {
  175. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  176. if (num < res.total) {
  177. this.reachflag = true
  178. this.wtdt = ''
  179. } else {
  180. this.reachflag = false
  181. this.wtdt = '到底了~';
  182. }
  183. }
  184. if (this.pageNum == 1) {
  185. this.list = res.rows;
  186. } else {
  187. this.list = this.list.concat(res.rows)
  188. }
  189. }else{
  190. this.$toast(res.msg)
  191. }
  192. })
  193. },
  194. }
  195. }
  196. </script>
  197. <style>
  198. page{background: #F3F3F0;}
  199. </style>
  200. <style lang="scss" scoped>
  201. .car{padding: 624rpx 0 10rpx;}
  202. .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
  203. .topa{padding: 20rpx ;
  204. .resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
  205. .chekt{min-width: 180rpx;
  206. view{font-weight: 500;font-size: 26rpx;color: #272727;flex: 1;}
  207. image{width: 24rpx;height: 16rpx;margin-left: 18rpx;flex: 0 0 auto;}
  208. }
  209. .search{flex: 1;margin-left: 16rpx;height: 64rpx;background: #EEEEEE;border-radius: 32rpx;border: 2rpx solid #E6E6E6;padding-left: 24rpx;box-sizing: border-box;
  210. image{width: 32rpx;height: 34rpx;margin-right: 22rpx;flex: 0 0 auto;}
  211. input{flex: 1;font-size: 26rpx;color: #272727;}
  212. .btn{width: 100rpx;height: 64rpx;background: #3565ED;border-radius: 32rpx;flex: 0 0 auto;font-weight: bold;text-align: center;line-height: 64rpx;
  213. font-size: 26rpx;
  214. color: #FFFFFF;}
  215. }
  216. }
  217. .tabtop{padding-bottom: 40rpx;
  218. .tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;margin-right: 6rpx;
  219. &.act{font-weight: bold;font-size: 32rpx;color: #272727;
  220. &::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
  221. }
  222. }
  223. }
  224. .mcont{position: relative;margin-top: 12rpx;
  225. .contbg{width: 100%;height: 382rpx;}
  226. .mconta{position: absolute;left: 0;top: 0;width: 100%;height: 382rpx;box-sizing: border-box;padding: 28rpx 56rpx;
  227. .w50{width: 50%;}
  228. .mctit{font-weight: 500;font-size: 24rpx;color: #CFE1FF;}
  229. .mctxt{font-size: 46rpx;color: #FFFFFF;font-weight: bold;margin-top: 26rpx;}
  230. .mctxta{font-weight: bold;font-size: 26rpx;color: #FFFFFF;margin-bottom: 14rpx;
  231. text{font-size: 30rpx;}
  232. }
  233. .mcontb{height: 124rpx;display: flex;}
  234. .mcontc{display: flex;padding-top: 28rpx;}
  235. }
  236. }
  237. }
  238. .carlists{padding: 0 18rpx;}
  239. </style>