depositList.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="box">
  3. <homenav :iStatusBarHeight="iStatusBarHeight" :title="'寄存订单'" :cj="4"></homenav>
  4. <view class="cont">
  5. <view class="line" @click="goDetail(item)" v-for="(item,index) in items">
  6. <view class="lineLeft">
  7. <view class="plateNumber">{{item.plateNumber}}</view>
  8. <view class="tire" v-if="item.goodsQty">{{item.goodsQty}}条轮胎</view>
  9. </view>
  10. <view class="state1" v-if="item.sheetState==0">寄存中</view>
  11. <view class="state2" v-if="item.sheetState==-1">待寄存</view>
  12. <view class="state2" v-if="item.sheetState==1">已领取</view>
  13. <view class="state2" v-if="item.sheetState==2">已作废</view>
  14. </view>
  15. </view>
  16. <nodata v-show="items==''&&isload"></nodata>
  17. </view>
  18. </template>
  19. <script>
  20. import nodata from '@/components/nodata/nodata.vue'
  21. import homenav from "@/components/homenav/nav.vue"
  22. export default {
  23. components: {
  24. nodata,homenav
  25. },
  26. data() {
  27. return {
  28. page: 1,
  29. tabIndex: -1,
  30. items: [],
  31. isload: false,
  32. iStatusBarHeight:'',
  33. }
  34. },
  35. onLoad(opt) {
  36. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  37. this.getData()
  38. },
  39. onShow() {
  40. },
  41. methods: {
  42. goDetail(item) {
  43. uni.navigateTo({
  44. url: "depositDetail?id="+item.id
  45. })
  46. },
  47. getData() {
  48. uni.showLoading({
  49. title: '加载中'
  50. });
  51. this.isload = false;
  52. var padata = {
  53. page: this.page,
  54. limit: 10,
  55. }
  56. this.$http('/applet/tire-deposit-sheet/list', padata, 'GET').then(res => {
  57. uni.hideLoading();
  58. this.isload = true;
  59. var list = res.data.Items;
  60. if (this.page == 1) {
  61. this.items = list
  62. } else {
  63. this.items = this.items.concat(list)
  64. }
  65. })
  66. },
  67. },
  68. onReachBottom() {
  69. this.page++;
  70. this.getData()
  71. },
  72. onPullDownRefresh() {
  73. this.page = 1;
  74. this.getData()
  75. setTimeout(function() {
  76. uni.stopPullDownRefresh();
  77. }, 1000);
  78. }
  79. }
  80. </script>
  81. <style scoped>
  82. .box {
  83. min-height: 100vh;
  84. background: #F4F5F7;
  85. }
  86. .cont{
  87. padding:0 24rpx;
  88. }
  89. .line{
  90. display: flex;
  91. justify-content: space-between;
  92. line-height: 42rpx;
  93. padding: 29rpx 20rpx;
  94. margin-top: 20rpx;
  95. background: #ffffff;
  96. border-radius: 10rpx;
  97. }
  98. .lineLeft{
  99. display: flex;
  100. }
  101. .plateNumber{
  102. font-weight: 500;
  103. color: #3C3C3C;
  104. font-size: 30rpx;
  105. }
  106. .tire{
  107. color: #666666;
  108. font-size: 24rpx;
  109. padding-left: 24rpx;
  110. }
  111. .state1{
  112. color: #FF0000;font-size: 24rpx;
  113. }
  114. .state2{
  115. color: #00A040;font-size: 24rpx;
  116. }
  117. </style>