tdRecord.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <view class="content">
  3. <!-- 筛选弹框 -->
  4. <search-modal v-if="openScreen" :visible="openScreen" :defaultParams="searchForm" @refresh="refresh" @close="openScreen=false"></search-modal>
  5. <view class="page-head">
  6. <text>筛选</text>
  7. <image class="filter-icon" src="@/static/filter.png" @tap="openScreen=true"></image>
  8. </view>
  9. <scroll-view class="list" scroll-y :scroll-top="scrollTop" @scrolltolower="onreachBottom">
  10. <view class="list-box" v-for="item in 12" :key="item">
  11. <view class="list-time">2020-01-13 15:25:25</view>
  12. <view class="list-cons">
  13. <view class="list-imgs">
  14. <u-image width="80rpx" height="80rpx" src="/static/GLASS.png"></u-image>
  15. <view class="cls-names">废旧金属/塑料</view>
  16. </view>
  17. <view class="list-md">
  18. <view>
  19. <text class="red">254</text> 克
  20. </view>
  21. <view>13709146191</view>
  22. </view>
  23. <view class="list-end">
  24. <text class="red">32</text>
  25. <u-image width="40rpx" height="40rpx" src="/static/ledou.png"></u-image>
  26. </view>
  27. </view>
  28. </view>
  29. <u-empty class="nodata" :text="noDataText" v-if="listdata.length==0 && status!='loading'" mode="list"></u-empty>
  30. <view class="loadmore">
  31. <u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
  32. </view>
  33. </scroll-view>
  34. </view>
  35. </template>
  36. <script>
  37. import searchModal from './searchModal.vue'
  38. export default {
  39. components: { searchModal },
  40. data() {
  41. return {
  42. openScreen: false,
  43. searchForm: { // 查询条件
  44. beginDate: '', // 创建时间默认筛选近7天
  45. endDate: '', // 创建时间默认筛选近7天
  46. customerMobile: '' // 手机号
  47. },
  48. scrollTop:0,
  49. pageNo: 1, // 当前页码
  50. pageSize: 10, // 每页条数
  51. total: 0,
  52. listdata: [],
  53. noDataText: '暂无数据', // 列表请求状态提示语
  54. status: 'loadmore', // 加载中状态
  55. }
  56. },
  57. methods: {
  58. // 获取查询参数 刷新列表
  59. refresh(params){
  60. this.searchForm = params
  61. this.listdata = []
  62. this.total = 0
  63. this.searchHandle(1)
  64. },
  65. searchHandle(){
  66. },
  67. // scroll-view到底部加载更多
  68. onreachBottom() {
  69. if(this.listdata.length < this.total){
  70. this.pageNo += 1
  71. this.searchHandle()
  72. }else{
  73. uni.showToast({ title: '已经到底了', icon: 'none' })
  74. this.status = "nomore"
  75. }
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="less">
  81. .content{
  82. width: 100%;
  83. padding: 0 20rpx;
  84. display: flex;
  85. flex-direction: column;
  86. height: 100vh;
  87. .page-head{
  88. padding: 20rpx;
  89. display: flex;
  90. align-items: center;
  91. justify-content: flex-end;
  92. .filter-icon{
  93. flex-shrink: 0;
  94. width: 36rpx;
  95. height: 36rpx;
  96. padding-left: 20rpx;
  97. }
  98. }
  99. .list{
  100. flex-grow: 1;
  101. }
  102. .list-box{
  103. background: #FFFFFF;
  104. border-radius: 10rpx;
  105. padding: 20rpx;
  106. box-shadow: 2rpx 2rpx 6rpx #eee;
  107. margin-bottom: 20rpx;
  108. .list-time{
  109. font-size: 28rpx;
  110. }
  111. .list-cons{
  112. display: flex;
  113. align-items: center;
  114. }
  115. .list-imgs{
  116. padding:20rpx 0 0;
  117. width: 180rpx;
  118. display: flex;
  119. align-items: center;
  120. flex-direction: column;
  121. justify-content: center;
  122. .cls-names{
  123. padding:10rpx 0;
  124. font-size: 24rpx;
  125. }
  126. }
  127. .list-md{
  128. flex-grow: 1;
  129. padding:0 20rpx;
  130. > view{
  131. padding:6rpx 0;
  132. display: flex;
  133. align-items: center;
  134. font-size: 30rpx;
  135. }
  136. }
  137. .list-end{
  138. padding:20rpx;
  139. font-size: 30rpx;
  140. display: flex;
  141. align-items: center;
  142. .red{
  143. font-size: 50rpx;
  144. color: #ff5500;
  145. }
  146. }
  147. .red{
  148. font-weight: bold;
  149. color: red;
  150. font-size: 36rpx;
  151. margin-right: 8rpx;
  152. }
  153. }
  154. }
  155. </style>