fenxiaodingdan.vue 3.1 KB
<template>
	<view class="content">
		<view class="tapnav flextwo">
			<view class="tapnavitem" :class="order==0?'tapnavactive':''" @click="ordersel" :data-id="0">全部</view>
			<view class="tapnavitem" :class="order==1?'tapnavactive':''" @click="ordersel" :data-id="1">待付款</view>
			<view class="tapnavitem" :class="order==2?'tapnavactive':''" @click="ordersel" :data-id="2">待发货</view>
			<view class="tapnavitem" :class="order==3?'tapnavactive':''" @click="ordersel" :data-id="3">待收货</view>
		</view>
		<view class="nodata" v-if="orderlist.length==0">暂无数据</view>
		<view class="fenorderlist" v-else>
			<view class='fenorderitem' v-for="(item,index) in orderlist" :key="index">
				<view class="fenordertop flextwo">
					<view class="fenorederleft">订单号:{{item.order_detail_num}}</view>
					<view class="fenorderright" v-if="item.status==1">待付款</view>
					<view class="fenorderright" v-if="item.status==2">待发货</view>
					<view class="fenorderright" v-if="item.status==3">待收货</view>
					
				</view>
				<view class="fenbody flextwo">
					<view class="fenbodyleft">
						<view class="fenbodytop">分销订单</view>
						<view class="fenbodybot">{{item.createtime}}  <text>用户名</text></view>
					</view>
					<view class="fenbodyright">5000.00</view>
					 
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import app from "../../App.vue";
	    export default {
	        data() {
	            return {
	               order:0,
				   orderlist:[]
	            }
	        },
	        onLoad() {
				this.getfenxiaoorder()
	        },
	        methods: {
	           ordersel(e){
	           	this.order=e.currentTarget.dataset.id;
				this.getfenxiaoorder()
	           },
			   // 获取分销订单
			   getfenxiaoorder(){
				   let that = this;
				   console.log(44747)
				   var url = 'distribution/distribution_order';
				   var params = {
				   	status:''
				   }
				   console.log('7766554', params)
				   app.post(url, params).then((res) => {
				   	console.log(res);
				   	that.orderlist = that.orderlist.concat(res.data.data)
				   
				   
				   }).catch((err) => {
					   console.log(err)
				   
				   })
			   }
	           	
	      
	        }
	
	    }
</script>

<style>
	@import url('../../base/homepage');
	page{
		background: #F7F7F7;
	}
	.fenbodytop{
		color:#232323;
		font-size: 28rpx;
		font-weight: bold;
	}
	.fenbody{
		margin-top:16rpx
	}
	.fenorederleft{
		color:#8C9198;
		font-size: 24rpx;
	}
	.fenordertop{
		padding-bottom: 16rpx;
		border-bottom: 1rpx solid #f5f5f5;
	}
	.fenbodybot{
		color:#8C9198;
		font-size: 22rpx;
		margin-top:16rpx
	}
	.fenbodyright{
		color:#FF9417;
		font-size: 32rpx;
		font-weight: bold;
	}
	.fenorderright{
		color:#FF9417;
		font-size: 24rpx;
	}
	.tapnav{
		background: #fff;
	}
	.topnaveitem{
		color:#232323;
		font-size: 32rpx;
	}
	.tapnavactive{
		color:#FF9417
	}
		
	.tapnavactive::after{
		width:144rpx;
		background: #FF9417;
	}
	.fenorderitem{
		width:686rpx;
		padding: 24rpx 32rpx;
		box-sizing: border-box;
		background: #fff;
		margin:32rpx auto 0;
		border-radius: 16rpx;
	}
</style>