123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- <template>
- <view>
- <view class="tab">
- <u-tabs :list="tab" @click="click" :lineHeight="5"></u-tabs>
- </view>
- <view class="goodsManageList">
- <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
- <view class="top">
- <view class="title omit">八角茴香(未磨) (可食用)八角茴香(未磨) (可食用)八角茴香(未磨) (可食用)</view>
- <view class="icon"></view>
- <view class="clear"></view>
- </view>
- <view class="con">
-
- <view class="flex fs">
- <view class="f left" style="flex: 0.5">
- <view class="tag">净重:50吨</view>
- </view>
- <view class="f left">
- <view class="tag">2023-08-03 22:37:02</view>
- </view>
- </view>
- </view>
- <view class="op">
- <view class="flex">
- <view class="f rline">
- <text class="icon" style="color: #ff660d"></text>
- <text>编辑</text>
- </view>
- <view class="f">
- <text class="icon" style="color: #0081ff"></text>
- <text>发布</text>
- </view>
- </view>
- </view>
- <view class="clear"></view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- tab: [
- { name: '全部', goodsStatus: '' },
- { name: '待发布', goodsStatus: 1 },
- { name: '发布中', goodsStatus: 0 },
- { name: '已接单', goodsStatus: 0 },
- { name: '已确认', goodsStatus: 0 },
- { name: '已完成', goodsStatus: 0 }
- ],
- list: [{}, {}, {}, {}, {}],
- param: { pageNo: 1, pageSize: 10 },
- loadMore: true
- };
- },
- onLoad(e) {
- //this.getData();
- },
- methods: {
- getData() {
- this.http.request({
- url: '/level-one-server/app/TbGoodsTransit/getTransitList',
- data: this.param,
- loading: 'false',
- success: res => {
- this.loadMore = parseInt(res.data.pageCount) > this.param.pageNo;
- this.list.push(...res.data.data);
- }
- });
- },
- //点击tab切换
- click(e) {
- this.param.goodsStatus = e.goodsStatus;
- this.refresh();
- },
- detail(item) {
- uni.navigateTo({ url: '/pages/market/two/purchaser/buy/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();
- }
- },
- onNavigationBarButtonTap() {
- uni.navigateTo({ url: '/pages/market/two/purchaser/buy/add' });
- }
- };
- </script>
- <style lang="scss">
- page {
- background-color: $pg;
- }
- </style>
|