list.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="listbox">
  3. <view class="fixedt">
  4. <!-- 选择器 -->
  5. <view class="flexc checkbox">
  6. <picker mode="date" @change='bindDateChangea'>
  7. <view class="chekt">
  8. <view>{{sbsj|| "申报时间"}}</view>
  9. <image :src="upimg"></image>
  10. </view>
  11. </picker>
  12. <picker range-key='label' :value="shidx" :range="shlist" @change='bindDateChangeb'>
  13. <view class="chekt">
  14. <view>{{shzt || "申贷次数"}}</view>
  15. <image :src="upimg"></image>
  16. </view>
  17. </picker>
  18. <view class="reset" @click="getResetFn">
  19. <image :src="resetimg"></image>
  20. </view>
  21. <view class="topc flexc">
  22. <image :src="secimg"></image>
  23. <input placeholder="请输入客户名称" confirm-type="search" v-model="usename" @confirm="getConfirm"/>
  24. </view>
  25. </view>
  26. </view>
  27. <!-- 列表 -->
  28. <view class="plr18">
  29. <bus-list :datalist="list" :wtdt="wtdt" :type="type" @getDetail="getDetail"></bus-list>
  30. </view>
  31. <view class="scanbox flexcc">
  32. <image :src="scanimg"></image>
  33. 扫码查看
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import config from '@/config'
  39. const baseUrl = config.baseUrl
  40. import busList from "@/work/components/business/list.vue"
  41. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  42. export default{
  43. components:{busList},
  44. data(){
  45. return{
  46. secimg:require("@/static/images/home/hsearch.png"),
  47. upimg:require('@/work/static/images/sup.png'),
  48. resetimg:require('@/work/static/images/reset.png'),
  49. scanimg:require('@/work/static/images/scan.png'),
  50. list:[{tit:'123'},{tit:'123'}],
  51. pageSize: 10,
  52. pageNum: 1,
  53. reachflag: true,
  54. wtdt:'',
  55. // limit:''
  56. type:'file',
  57. }
  58. },
  59. // 上拉触底加载更多触发事件
  60. onReachBottom() {
  61. // if (this.reachflag) {
  62. // this.pageNum++
  63. // this.getDataFn()
  64. // }
  65. },
  66. methods:{
  67. checkPermi, checkRole,
  68. getDetail(){
  69. this.$tab.navigateTo("/work/pages/file/details")
  70. },
  71. getTabFn(val){
  72. this.tabval=val
  73. },
  74. bindDateChangea(e){
  75. var val=e.detail.value;
  76. this.sbsj=val;
  77. this.getrefreshData()
  78. },
  79. bindDateChangeb(e){
  80. var val=e.detail.value;
  81. this.shzt=this.shlist[val].label;
  82. this.shztid=this.shlist[val].value;
  83. this.getrefreshData()
  84. },
  85. getResetFn(){
  86. // 重置
  87. this.getrefreshData()
  88. },
  89. getrefreshData(){
  90. // this.pageNum=1;
  91. // this.list=[];
  92. // this.reachflag=true;
  93. // this.getDataFn()
  94. },
  95. getDataFn(){
  96. var params={
  97. pageSize:this.pageSize,
  98. pageNum: this.pageNum,
  99. }
  100. getCaseListFn(params).then(res=>{
  101. if(res.code==200){
  102. if (res.rows.length < this.pageSize) {
  103. this.reachflag = false
  104. this.wtdt = '到底了~';
  105. } else {
  106. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  107. if (num < res.total) {
  108. this.reachflag = true
  109. this.wtdt = ''
  110. } else {
  111. this.reachflag = false
  112. this.wtdt = '到底了~';
  113. }
  114. }
  115. if (this.pageNum == 1) {
  116. this.list = res.rows;
  117. } else {
  118. this.list = this.list.concat(res.rows)
  119. }
  120. }else{
  121. this.$toast(res.msg)
  122. }
  123. })
  124. },
  125. },
  126. }
  127. </script>
  128. <style lang="scss" scoped>
  129. .fixedt{position: fixed;left: 0;right: 0;top: 0;z-index: 2;}
  130. .fixedt /deep/ uni-picker{flex: 1;}
  131. .checkbox{padding:16rpx 32rpx;background-color: #efefef;
  132. .chekt{display: flex;align-items: center;margin-right: 12rpx;height:88rpx;
  133. view{text-align: center;
  134. font-weight: bold;font-size: 26rpx;color: #374B61;width: 136rpx;word-break: break-all;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;white-space: normal;}
  135. image{width: 16rpx;height: 12rpx;flex: 0 0 auto;margin-left: 4rpx;}
  136. }
  137. }
  138. .reset{width:56rpx; height: 88rpx;display: flex;align-items: center;justify-content: center;
  139. image{width: 26rpx;height: 30rpx;}
  140. }
  141. .topc{border-radius: 34rpx;height:68rpx;box-sizing: border-box;padding:0 28rpx;position: relative;flex:1;background-color:rgba(90, 135, 186, 0.2);width: 260rpx;
  142. flex: 0 0 auto;margin-left: 20rpx;
  143. input{font-weight: 500;font-size: 26rpx;color: #222327;}
  144. image{width: 30rpx;height: 30rpx;margin-right: 16rpx;flex: 0 0 auto;}
  145. }
  146. .listbox{padding-top: 120rpx;padding-bottom: 100rpx;}
  147. .scanbox{position: fixed;left: 0;right: 0;bottom: 0;height: 100rpx;
  148. background: #00A9F0;font-weight: bold;font-size: 30rpx;color: #FFFFFF;
  149. image{width: 26rpx;height: 26rpx;margin-right: 24rpx;}
  150. }
  151. </style>