123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <template>
- <view>
- <view class="tab">
- <u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
- </view>
- <view class="goodsList">
- <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
- <view class="title">{{ item.enterpriseName }}
- <view class="state" v-if="item.peopleConfirmStatus == 0">
- <text class="icon"></text>
- <text>未确认</text>
- </view>
- <view class="state" v-if="item.peopleConfirmStatus == 1">
- <text class="icon" style="color: #13ce66"></text>
- <text>已确认</text>
- </view>
- <view class="state" v-if="item.resaleStatus == 1">
- <text class="icon" style="color: #13ce66"></text>
- <text>已转售</text>
- </view>
- </view>
- <image src="../../../../static/news.jpg" mode="aspectFill" class="pic"></image>
- <view class="con">
- <view class="productName omit">{{ item.goodsNames }}</view>
- <view class="desc omit">
- <text>重量 {{ item.totalWeight }}</text>
- <text>{{ item.tradeAreaName }}</text>
- </view>
- <view class="price">¥ {{ item.totalPrice }}</view>
- </view>
- <view class="clear"></view>
- </view>
- <view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
- <u-empty v-if="!loadMore && list.length == 0"></u-empty>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- tab: [
- {
- name: '全部',
- peopleConfirmStatus: '', //边民确认状态
- finishStatus: '', //订单完成状态
- resaleStatus: '' //订单转售状态
- },
- {
- name: '待确认',
- peopleConfirmStatus: 0,
- finishStatus: 0,
- resaleStatus: 0
- },
- {
- name: '申报中',
- peopleConfirmStatus: 1,
- finishStatus: 0,
- resaleStatus: 0
- },
- {
- name: '已完成',
- peopleConfirmStatus: 1,
- finishStatus: 1,
- resaleStatus: 0
- },
- {
- name: '已转售',
- peopleConfirmStatus: 1,
- finishStatus: 1,
- resaleStatus: 1
- }
- ],
- param: {
- pageNo: 1,
- pageSize: 10
- },
- user:this.getUser(),
- list: [],
- loadMore: false,
- collageOrdersId: ''
- };
- },
- onLoad(e) {
- if(e.collageOrdersId) {
- this.collageOrdersId = e.collageOrdersId;
- this.getData();
- }
- },
- methods: {
- getData() {
- this.http.request({
- url: '/level-one-server/app/TbOrder/getList',
- loading: 'false',
- data: {collageOrdersId : this.collageOrdersId},
- success: res => {
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
- if (res.data.data) {
- this.list.push(...res.data.data);
- }
- }
- });
- },
- // 点击tab切换
- click(e) {
- console.log(e);
- this.param.peopleConfirmStatus = e.appeopleConfirmStatusply;
- this.param.finishStatus = e.finishStatus;
- this.param.resaleStatus = e.resaleStatus;
- this.refresh();
- },
- detail(item) {
- uni.navigateTo({url: '/pages/market/one/leader/detail?id=' + item.id});
- },
- // 刷新数据
- refresh() {
- this.loadMore = true;
- this.param.pageNo = 1;
- this.list = [];
- this.getData();
- },
- },
- //下拉刷新
- onPullDownRefresh() {
- setTimeout(() => {
- this.refresh();
- uni.stopPullDownRefresh();
- }, 1000);
- },
- //上拉加载
- onReachBottom() {
- if (this.loadMore) {
- this.param.pageNo++;
- this.getData();
- }
- }
- };
- </script>
- <style lang="scss">
- page {
- background-color: $pg;
- }
- .state{
- margin-right: -70px;
- }
- </style>
|