<template>
	<view class="center">
		<view class="buyup">
			<view class="c-row b-b">
				<text class="title">基本信息</text>
			</view>
		<view class="c-row b-b">
			<text class="tit">名头</text>
			<view class="con-list">
				{{procurementPlanInfos.buyer}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">标题</text>
			<view class="con-list">
				{{procurementPlanInfos.title}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">货名</text>
			<view class="con-list">
				{{procurementPlanInfos.goodsName}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">采购量（吨）</text>
			<view class="con-list">
				{{procurementPlanInfos.plannedPurchaseVolume}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">最小成交量（吨）</text>
			<view class="con-list">
				{{procurementPlanInfos.minimumVolume}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">类型</text>
			<view class="con-list">
				{{procurementPlanInfos.procurementPlanType}}
			</view>
			
		</view>
		
		<view class="c-row b-b">
			<text class="tit">价格类型</text>
			<view class="con-list">
				{{procurementPlanInfos.priceType}}
			</view>
		</view>
		<view class="c-row b-b" v-if="procurementPlanInfos.procurementPlanType == '现货'">
			<text class="tit">单价（元/吨）</text>
			<view class="con-list">
				{{procurementPlanInfos.procurementPrice}}
			</view>
		</view>
		<view class="c-row b-b" v-if="procurementPlanInfos.procurementPlanType == '期货'">
			<text class="tit">基差（元/吨）</text>
			<view class="con-list">
				{{procurementPlanInfos.basisPrice}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">产地</text>
			<view class="con-list">
				{{procurementPlanInfos.outputPrivate}}{{procurementPlanInfos.outputCity}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">收货地区</text>
			<view class="con-list">
				{{procurementPlanInfos.receivePrivate}}{{procurementPlanInfos.receiveCity}}{{procurementPlanInfos.receiveArea}}
			</view>
		</view>
		<view class="c-row">
			<text class="tit">买方手机号</text>
			<view class="con-list">
				{{procurementPlanInfos.buyerPhone}}
			</view>
		</view>
		</view>
		<view class="buylow">
		<view class="c-row b-b">
			<text class="title">货物要求</text>
		</view>
		<view class="c-row b-b">
			<text class="tit">水分（%）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.waterContent}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">容重（g/L）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.bulkDensity}}
			</view>
		</view>

		<view class="c-row b-b">
			<text class="tit">热损伤（%）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.jiaorenli}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">杂质（%）<= </text>
			<view class="con-list">
					{{procurementPlanInfos.impurity}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">霉变粒（%）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.mildewGrain}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">不完整粒（%）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.imperfectGrain}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">蛋白（%）<= </text>
			<view class="con-list">
				{{procurementPlanInfos.protein}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">粒型 </text>
			<view class="con-list">
				{{procurementPlanInfos.grain}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">品级 </text>
			<view class="con-list">
				{{procurementPlanInfos.grade}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">产出年份</text>
			<view class="con-list">
				{{procurementPlanInfos.outputYear}}
			</view>
		</view>
		<view class="c-row b-b">
			<text class="tit">包装方式</text>
			<view class="con-list">
				{{procurementPlanInfos.packingType}}
			</view>
		</view>
		<view class="c-row b-b" v-if="procurementPlanInfos.packingType == '大袋' || procurementPlanInfos.packingType == '小袋'">
			<text class="tit">袋装备注</text>
			<view class="con-list">
				{{procurementPlanInfos.baggingNotes}}
			</view>
		</view>
		<view class="c-row">
			<text class="tit">运费承担方</text>
			<view class="con-list">
				{{procurementPlanInfos.freightPayer == null || procurementPlanInfos.freightPayer == "" ?"暂无信息": procurementPlanInfos.freightPayer }}
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				types:'',
				typesType:["现货","期货"],
				procurementPlanInfos:{},
				typesIndex:'',
		
			}
		},
		onLoad(options){
			this.getList(options.id)
		},
		methods: {
			typeChange(e){
				this.typesIndex = e.detail.value
				this.types = this.typesType[this.typesIndex];
			},
			getList(id1){
				this.$api.doRequest('get','/procurementPlanInfo/getProcurementPlan',{id:id1}).then(res => {
					this.procurementPlanInfos = res.data.data
					
				})
				.catch(res => {
					uni.showToast({
						title: res.errmsg,
						icon:'none',
						duration: 2000
					})
				});
			}
		}
	}
</script>

<style>
	.center{
		padding: 10px 20px;
		background-color: #F5F6FA;
	}
	.c-row {
	    display: -webkit-box;
	    display: -webkit-flex;
	    display: flex;
	    -webkit-box-align: center;
	    -webkit-align-items: center;
	    align-items: center;
	    padding: 20rpx 30rpx;
	    position: relative;
	}
	.con-list {
	    -webkit-box-flex: 1;
	    -webkit-flex: 1;
	    flex: 1;
	    display: -webkit-box;
	    display: -webkit-flex;
	    display: flex;
	    -webkit-box-orient: vertical;
	    -webkit-box-direction: normal;
	    -webkit-flex-direction: column;
	    flex-direction: column;
	    color: #AFB3BF;
	    line-height: 40rpx;
	    text-align: right;
	    padding-right: 20rpx;
	    font-size: 14px;
	}
	.title{
		font-size: 18px;
		font-weight: 600;
	}
	.buyup {
		background-color: #FFFFFF;
		border-radius: 20px;
		margin-top: 10px;
	}
	
	.buylow {
		background-color: #FFFFFF;
		border-radius: 20px;
		margin-top: 10px;
	}


</style>
