money.vue 7.5 KB

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