<template>
	<view>
		<view class="detail-desc">
			 <view class="c-list">
				<view class="c-row b-b">
				 	<text class="tit">交易单号</text>
				 	<view class="con-list">
				 		<text>{{trade.orderNo}}</text>
				 	</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">卖方</text>
					<view class="con-list">
						<text>{{trade.seller}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">卖方电话</text>
					<view class="con-list">
						<text>{{trade.sellerPhone}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">买方</text>
					<view class="con-list">
						<text>{{trade.buyer}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">买方电话</text>
					<view class="con-list">
						<text>{{trade.buyerPhone}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">价格类型</text>
					<view class="con-list">
						<text>{{trade.priceType}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">协议单价（元/吨）</text>
					<view class="con-list">
						<text>{{trade.unitPrice}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">交接区域</text>
					<view class="con-list">
						<text>{{trade.province}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">详细交收地址</text>
					<view class="con-list">
						<text>{{trade.address}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">最小成交量</text>
					<view class="con-list">
						<text>{{trade.minSale}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">购买数量（吨）</text>
					<view class="con-list">
						<text>{{trade.count}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">质量验收方式</text>
					<view class="con-list">
						<text>{{trade.acceptType}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">发票类型</text>
					<view class="con-list">
						<text>{{trade.invoiceType}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">包装方式</text>
					<view class="con-list">
						<text>{{trade.packing}}</text>
					</view>
				</view>
				<view class="c-row b-b">
					<text class="tit">备注</text>
					<view class="con-list">
						<text>{{trade.memo}}</text>
					</view>
				</view>
			</view>
			
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				trade: [],
				orderNo:''
			}
		},
		onLoad(option) {
			this.orderNo = option.orderNo
			this.loadData()
		},
		methods: {
			loadData() {
				const that = this
				that.$api.request('trade', 'getTradeDetail', {
					orderNo: that.orderNo
				}).then(res => {
					that.trade = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: $page-color-base;
		padding-bottom: 100upx;
	}
/*  详情 */
	.detail-desc {
		background: #fff;
		margin-top: 16upx;
		width: 750upx;

		.d-header {
			display: flex;
			justify-content: center;
			align-items: center;
			height: 80upx;
			font-size: $font-base + 2upx;
			color: $font-color-dark;
			position: relative;

			text {
				padding: 0 20upx;
				background: #fff;
				position: relative;
				z-index: 1;
			}

			&:after {
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translateX(-50%);
				width: 300upx;
				height: 0;
				content: '';
				border-bottom: 1px solid #ccc;
			}
		}
	}
	.c-list {
		font-size: $font-sm + 2upx;
		color: $font-color-base;
		background: #fff;
	
		.c-row {
			display: flex;
			align-items: center;
			padding: 20upx 30upx;
			position: relative;
		}
	
		.tit {
			width: 180upx;
		}
	
		.con {
			flex: 1;
			color: $font-color-dark;
	
			.selected-text {
				margin-right: 10upx;
			}
		}
	
		.bz-list {
			height: 40upx;
			font-size: $font-sm+2upx;
			color: $font-color-dark;
	
			text {
				display: inline-block;
				margin-right: 30upx;
			}
		}
	
		.con-list {
			flex: 1;
			display: flex;
			flex-direction: column;
			color: $font-color-dark;
			line-height: 40upx;
			text-align: right;
			padding-right: 20upx;
		}
	
		.red {
			color: $uni-color-primary;
		}
	}
	
</style>
