<template>
	<view>
		<view class="cmain">
			<view class="box order_detail">
				<view class="item">
					<text class="label">订单编号</text>
					<text class="desc">{{ item.orderNo }}</text>
				</view>
				<view class="item">
					<text class="label">收购商</text>
					<text class="desc">{{ item.acquirerName }}</text>
				</view>
				<view class="item">
					<text class="label">联系号码</text>
					<text class="desc">{{ item.consigneePhone }}</text>
				</view>
				<view class="item">
					<text class="label">商品名称</text>
					<text class="desc omit">{{ item.goodsName }}</text>
				</view>
				<view class="item">
					<text class="label">计价单位</text>
					<text class="desc omit">{{ item.goodsUnit }}</text>
				</view>
				<view class="item" v-if="item.quotation">
					<text class="label">价格</text>
					<text class="desc" style="color: #f44336; font-weight: bold">¥ {{ item.quotation }}</text>
				</view>
				<view class="item">
					<text class="label">来源国</text>
					<text class="desc">{{ item.goodsFrom }}</text>
				</view>
				<view class="item">
					<text class="label">状态</text>
					<text class="desc" v-if="item.orderFinish == 0">已确认</text>
				</view>
				<view class="item" v-if="item.createTime">
					<text class="label">接单时间</text>
					<text class="desc">{{ item.createTime }}</text>
				</view>
			</view>
			<u-divider text="收货地址"></u-divider>
			<view class="box order_detail">
				<view class="item">
					<text class="label">收件人</text>
					<text class="desc omit">{{ item.consigneeName }}</text>
				</view>
				<view class="item">
					<text class="label">联系电话</text>
					<text class="desc">{{ item.consigneePhone }}</text>
				</view>
				<view class="item">
					<text class="label">收件地址</text>
					<text class="desc">{{ item.unloadingAddress }}</text>
				</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?id=' + e.id,
				success: res => {
					this.item = res.data.data;
				}
			});
		}
	},
	methods: {
	}
};
</script>

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