<template>
	<view>
		<view class="cmain">
			<view class="box order_detail" style="margin-top: 0px">
				<u-divider text="订单信息"></u-divider>
				<view class="item" style="padding-top: 0px">
					<text class="label">订单编号</text>
					<text class="desc">{{param.orderId}}</text>
				</view>
			<!-- 	<view class="item">
					<text class="label">申报单号</text>
					<text class="desc">13454334567</text>
				</view> -->
				<view class="item">
					<text class="label">商家名称</text>
					<text class="desc">{{item.enterpriseName}}</text>
				</view>
				<view class="item">
					<text class="label">联系号码</text>
					<text class="desc">{{item.concat}}</text>
				</view>
				<view class="item">
					<text class="label">商品名称</text>
					<text class="desc">{{item.goodsTransitName}}</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.netWeight}}</text>
				</view>
				<view class="item">
					<text class="label">毛重</text>
					<text class="desc">{{item.grossWeight}}</text>
				</view>
				<view class="item">
					<text class="label">价格</text>
					<text class="desc">{{item.totalPrice}}</text>
				</view>
				<view class="item">
					<text class="label">边民</text>
					<text class="desc" style="color: blue;" @click="members(item.orderId)">查看</text>
				</view>
				<view class="item">
					<text class="label">发布时间</text>
					<text class="desc">{{item.goodsTransitCreateTime}}</text>
				</view>
				<view class="item">
					<text class="label">下单时间</text>
					<text class="desc">{{item.orderCreateTime}}</text>
				</view>
				<view class="item">
					<text class="label">购买边民组</text>
					<text class="desc">{{item.groupName}}</text>
				</view>
				<view class="item">
					<text class="label">确认时间</text>
					<text class="desc">{{item.enterpriseConfirmTime}}</text>
				</view>
				<view class="item">
					<text class="label">进境时间</text>
					<text class="desc">{{item.entrantTime}}</text>
				</view>
				<view class="item">
					<text class="label">进口时间</text>
					<text class="desc">{{item.importTime}}</text>
				</view>
				<view class="item">
					<text class="label">出互市区时间</text>
					<text class="desc">{{item.outFrontierTradeTime}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			item: {},
			param: {},
		};
	},
	onLoad(e) {
		if (e.id) {
			this.param.orderId = e.id
			this.http.request({
				url: '/level-one-server/app/TbOrder/getById?id=' + e.id,
				success: res => {
					// this.item = res.data.data;
					console.log('asd:' + JSON.stringify(res));
				}
			});
		}
		this.orderDetail()
	},
	methods: {
		orderDetail() {
			this.http.request({
				url: '/level-one-server/app/TbOrder/orderDetail',
				data: this.param,
				success: res => {
					this.item = res.data.data;
				}
			});
		},
		//查看边民
		members(id) {
			uni.navigateTo({
				url: '/pages/market/one/leader/members?id=' + id
			});
		}
	}
};
</script>

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