123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <template>
- <view class="box">
- <homenav :iStatusBarHeight="iStatusBarHeight" :title="'寄存订单'" :cj="4"></homenav>
- <view class="cont">
- <view class="line" @click="goDetail(item)" v-for="(item,index) in items">
- <view class="lineLeft">
- <view class="plateNumber">{{item.plateNumber}}</view>
- <view class="tire" v-if="item.goodsQty">{{item.goodsQty}}条轮胎</view>
- </view>
- <view class="state1" v-if="item.sheetState==0">寄存中</view>
- <view class="state2" v-if="item.sheetState==-1">待寄存</view>
- <view class="state2" v-if="item.sheetState==1">已领取</view>
- <view class="state2" v-if="item.sheetState==2">已作废</view>
- </view>
-
- </view>
- <nodata v-show="items==''&&isload"></nodata>
-
- </view>
- </template>
- <script>
- import nodata from '@/components/nodata/nodata.vue'
- import homenav from "@/components/homenav/nav.vue"
- export default {
- components: {
- nodata,homenav
- },
- data() {
- return {
- page: 1,
- tabIndex: -1,
- items: [],
- isload: false,
- iStatusBarHeight:'',
- }
- },
- onLoad(opt) {
- this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
- this.getData()
- },
- onShow() {
-
- },
- methods: {
-
- goDetail(item) {
- uni.navigateTo({
- url: "depositDetail?id="+item.id
- })
-
- },
- getData() {
- uni.showLoading({
- title: '加载中'
- });
- this.isload = false;
- var padata = {
- page: this.page,
- limit: 10,
- }
- this.$http('/applet/tire-deposit-sheet/list', padata, 'GET').then(res => {
- uni.hideLoading();
- this.isload = true;
- var list = res.data.Items;
- if (this.page == 1) {
- this.items = list
- } else {
- this.items = this.items.concat(list)
- }
- })
- },
- },
- onReachBottom() {
- this.page++;
- this.getData()
- },
- onPullDownRefresh() {
- this.page = 1;
- this.getData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- }
- }
- </script>
- <style scoped>
- .box {
- min-height: 100vh;
- background: #F4F5F7;
- }
- .cont{
- padding:0 24rpx;
- }
- .line{
- display: flex;
- justify-content: space-between;
- line-height: 42rpx;
- padding: 29rpx 20rpx;
- margin-top: 20rpx;
- background: #ffffff;
- border-radius: 10rpx;
- }
- .lineLeft{
- display: flex;
- }
- .plateNumber{
- font-weight: 500;
- color: #3C3C3C;
- font-size: 30rpx;
- }
- .tire{
- color: #666666;
- font-size: 24rpx;
- padding-left: 24rpx;
- }
- .state1{
- color: #FF0000;font-size: 24rpx;
- }
- .state2{
- color: #00A040;font-size: 24rpx;
- }
- </style>
|