ledgertable.vue 4.2 KB

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