<template>
	<view class="container">
		<view class="center">
			<view class="title_b ">发运信息</view>
			<view class="c-row ">
				<text class="tit">合同编号</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.contractNo}}</text>
				</view>
			</view>
			<view v-if='warehouseInOutInfo.taskType=="出库任务"' class="c-row ">
				<text class="tit">收货方</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.consignee}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">货名</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.goodsName}}</text>
				</view>
			</view>
			<view v-if='warehouseInOutInfo.taskType=="入库任务"' class="c-row ">
				<text class="tit">发车净重(吨)</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.startWeight}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">车牌号</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.carNo}}</text>
				</view>
			</view>
			<view v-if='warehouseInOutInfo.taskType=="出库任务"' class="c-row ">
				<text class="tit">箱号</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.boxNo}}</text>
				</view>
			</view>
			<view v-if='warehouseInOutInfo.taskType=="出库任务"' class="c-row ">
				<text class="tit">封号</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.titleNo}}</text>
				</view>
			</view>
		</view>
		<view class="center">
			<view v-if='warehouseInOutInfo.taskType=="入库任务"' class="title_c ">入库信息</view>
			<view v-if='warehouseInOutInfo.taskType=="出库任务"' class="title_c ">出库信息</view>
			<view class="c-list">
				<view class="c-row ">
					<text class="tit">毛重（吨）</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.grossWeight}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text class="tit">皮重（吨）</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.tare}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text class="tit">净重（吨）</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.netWeight}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text class="tit">仓库</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.warehouseName}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text class="tit">仓位号</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.binNumber}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text v-if='warehouseInOutInfo.taskType=="入库任务"' class="tit">入库类型 </text>
					<text v-if='warehouseInOutInfo.taskType=="出库任务"' class="tit">出库类型 </text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.inOutType}}</text>
					</view>
				</view>
				<view v-if='warehouseInOutInfo.taskType=="入库任务"' class="c-row ">
					<text  class="tit">扣款金额（元/吨）</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.deductionAmount}}</text>
					</view>
				</view>
				<view v-if='warehouseInOutInfo.taskType=="入库任务"' class="c-row ">
					<text class="tit">扣款项</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.deductionItems}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text v-if='warehouseInOutInfo.taskType=="入库任务"' class="tit">入库日期</text>
					<text v-if='warehouseInOutInfo.taskType=="出库任务"' class="tit">出库日期</text>
					<view class="con-list">
						<text>{{warehouseInOutInfo.inOutDate}}</text>
					</view>
				</view>
				<view class="c-row ">
					<text class="tit">磅单照片</text>
				</view>
				<view >
					<image  v-bind:src="warehouseInOutInfo.addressUrl" class="picture"></image>
				</view>
			</view>
		</view>
		<view class="center">
			<view class="title_b">化验信息</view>
			<view class="c-row ">
				<text class="tit">质检员</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.qualityInspector}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">蛋白(%){{'>='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.protein}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">水分(%){{'<='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.waterContent}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">容重(g/L){{'<='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.bulkDensity}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">热损伤(%){{'<='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.jiaorenli}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">杂质(%){{'<='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.impurity}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">霉变粒(%){{'<='}}</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.mildewGrain}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">不完整粒(%){{'<='}} </text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.warehouseInOutDetail.imperfectGrain}}</text>
				</view>
			</view>
			<view class="c-row ">
				<text class="tit">品级</text>
				<view class="con-list">
					<text>{{warehouseInOutInfo.grade}}</text>
				</view>
			</view>
		</view>

	</view>
</template>
<script>
	export default {

		data() {
			return {
				warehouseInOutInfo: {
					warehouseInOutDetail:{
						qualityInspector:''
					}
				}
			}
		},
		onLoad(options){
				
			this.getList(options.id)
			console.log(options.id,"idwei1")
		},
		methods: {
			typeChange(e){
				this.typesIndex = e.detail.value
				this.types = this.typesType[this.typesIndex];
			},
			getList(id1){
				var that=this
				this.$api.doRequest('get','/warehouseInOutInfo/getInfo',{id:id1}).then(res => {
					console.log(res)
					that.warehouseInOutInfo = res.data.data
					
				})
				.catch(res => {
					if(res.errmsg){
						uni.showToast({
							title: res.errmsg,
							icon: 'none',
							duration: 2000
						})
					}
					else{
						uni.showToast({
							title: "系统异常，请联系管理员",
							icon: 'none',
							duration: 2000
						})
					}
				});
			}
		}
		}
</script>
<style scoped lang='scss'>
	.center{
		margin: 15rpx 15rpx 10rpx 15rpx;
		padding:0rpx 10rpx 30rpx 10rpx;
		background-color: #FFFFFF;
		border-radius: 15px;
	}
	.title_b{
		margin: 20rpx 20rpx 0rpx 20rpx;
		padding:20rpx 10rpx 20rpx 10rpx;
		font-size: 18px;
		font-weight: 550;
		border-bottom: 1px solid #d6d6d6;
	}
	.title_c{
		margin: 20rpx 20rpx 0rpx 20rpx;
		padding:20rpx 10rpx 20rpx 10rpx;
		font-size: 18px;
		font-weight: 550;
	}
	.margin-bottom {
		margin-bottom: 30px;
	}
	
	.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: #303133;
		line-height: 40rpx;
		text-align: right;
		padding-right: 20rpx;
	}
	
	.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;
		}
	}
	/* 底部操作菜单 */
	.page-bottom1 {
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 95;
		width:100%;
		height: 70px;
		background: rgba(255, 255, 255, .9);
		padding:15px;
		border-radius: 0;
		text-align:right;
		button{
			display:inline-block;
			border-radius:18px;
			margin:0 10px;
			font-size:14px;background:#fff;
			color:#333;
			border:1px solid #333;
			padding-left: 50rpx;
			padding-right: 50rpx;
		}
		.action-btn{
			background:#22C572;
			color:#fff;
			border:1px solid #22C572;
		}
		.p-b-btn {
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			font-size: $font-sm;
			color: $font-color-base;
			width: 96upx;
			height: 80upx;
	
			.yticon {
				font-size: 40upx;
				line-height: 48upx;
				color: $font-color-light;
			}
	
			&.active,
			&.active .yticon {
				color: $uni-color-primary;
			}
	
			.icon-fenxiang2 {
				font-size: 42upx;
				transform: translateY(-2upx);
			}
	
			.icon-shoucang {
				font-size: 46upx;
			}
		}	
	}
	.container{
		padding-bottom: 160upx;
	}
	.picture{
		width: 75px;
		height: 75px;
		border-radius: 10px;
		margin-left: 16px;
	}
</style>

