<template>
	<view>
		<view class="cmain">
		<!-- 	<view class="box order_detail" style="margin-top: 0px">
				<view class="item">
					<text class="label">订单状态</text>
					<text class="desc" v-if="item.isDelivery == 1">
						<text class="icon" style="color: #13ce66">&#xe830;</text>
						<text>已完成</text>
					</text>
					<text class="desc" v-else>
						<text class="icon">&#xe830;</text>
						<text>待收货</text>
					</text>
				</view>
			</view> -->
			<view class="box order_detail">
				<u-divider text="订单信息"></u-divider>
				<view class="item" style="padding-top: 0px">
					<text class="label">订单编号</text>
					<text class="desc">{{ item.orderNo }}</text>
				</view>
				<view class="item">
					<text class="label">口岸</text>
					<text class="desc">{{ item.tradeAreaName }}</text>
				</view>
				<view class="item">
					<text class="label">车牌</text>
					<text class="desc">{{ item.veNo }}</text>
				</view>
				<view class="item">
					<text class="label">店主</text>
					<text class="desc">{{ item.leaderName }}</text>
				</view>
				<view class="item">
					<text class="label">联系号码</text>
					<text class="desc">{{item.leaderPhone}}</text>
				</view>
				<view class="item">
					<text class="label">商品名称</text>
					<text class="desc">{{ item.goodsName }}</text>
				</view>
				<view class="item">
					<text class="label">计价单位</text>
					<text class="desc">{{ item.goodsUnit }}</text>
				</view>
				<view class="item">
					<text class="label">商品重量</text>
					<text class="desc">{{ item.netWet }}</text>
				</view>
				<view class="item">
					<text class="label">单价</text>
					<text class="desc">{{ item.singlePrice }}</text>
				</view>
				<view class="item">
					<text class="label">总价</text>
					<text class="desc">{{ item.resalePrice }}</text>
				</view>


				<view class="item">
					<text class="label">支付状态</text>
					<text class="desc">
						<text v-if="item.isPay==0">未支付</text>
						<text v-else-if="item.isPay==1">已支付</text>
						<text v-else-if="item.isPay==2">支付失败</text>
						<text v-else-if="item.isPay==3">支付中</text>
						<text v-else>支付中</text>
					</text>
				</view>
				<view class="item" v-if="item.payTime">
					<text class="label">采购时间</text>
					<text class="desc">{{ item.payTime }}</text>
				</view>
				<view class="item">
					<text class="label">创建时间</text>
					<text class="desc">{{ item.createTime }}</text>
				</view>
				<view style="height: 50px;"></view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			item: {}
		};
	},
	onLoad(e) {
		if (e.id) {
			this.http.request({
				url: '/level-two-server/app/TbOrders/getDetailById',
				data: { ids: e.id },
				success: res => {
					let data = res.data.data;
					this.item = data[0];
				}
			});
		}
	},
	methods: {}
};
</script>

<style lang="scss">
page {
	background-color: $pg;
}
</style>
