<template>
	<view class="groundtials-wrap">
		<uni-easyinput prefixIcon="search" v-model="value" placeholder="请输入或扫描条码" @iconClick="iconClick" :focus="true">
		</uni-easyinput>
		<view class="inner-item" v-for="(item,index) in datas" :key="index">
			<view class="inventory-item">
				<view class="shuo-item shuo-one-cont">
					<view class="shuo-label">
						出库单号:
					</view>
					<view class="shuo-cont">
						{{item.id_bill}}
					</view>
				</view>
			</view>
			<view class="inventory-item">
				<view class="shuo-item">
					<view class="shuo-label">
						目标科室:
					</view>
					<view class="shuo-cont">
						{{item.id_dept_super}}
					</view>
				</view>
			</view>
			<view class="inventory-item">
				<view class="shuo-item">
					<view class="shuo-label">
						申请数量:
					</view>
					<view class="shuo-await">
						{{item.yansliang}}
					</view>
				</view>
				<view class="shuo-item">
					<view class="shuo-label">
						已拣数量:
					</view>
					<view class="shuo-ready">
						{{item.yishangj}}
					</view>
				</view>
			</view>
			<view class="inventory-item">
				<view class="shuo-item">
					<view class="shuo-label">
						耗材类型:
					</view>
					<view class="shuo-cont">
						{{item.guige}}
					</view>
				</view>
				<view class="shuo-item">
					<view class="shuo-label">
						结算方式:
					</view>
					<view class="shuo-cont">
						{{item.xinghao}}
					</view>
				</view>
			</view>
			<view class="inventory-item">
				<view class="shuo-item shuo-min">
					<view class="shuo-label">
						制单人:
					</view>
					<view class="shuo-cont">
						{{item.hispName}}
					</view>
				</view>
				<view class="shuo-item max-item">
					<view class="shuo-label">
						制单时间:
					</view>
					<view class="shuo-cont">
						{{item.rq}}
					</view>
				</view>
			</view>
			<view class="inventory-item">
				<view class="shuo-item shuo-one-cont">
					<view class="shuo-label">
						请领单号:
					</view>
					<view class="shuo-cont">
						{{item.shangjiatime}}
					</view>
				</view>
			</view>
			<view class="all-text">已出库</view>
		</view>
		<view class="total-wrap">
			<view class="total-item">
				<view class="total-label">
					待出库数量:
				</view>
				<view class="total-await">
					100
				</view>
			</view>
			<view class="total-item">
				<view class="total-label">
					已出库数量:
				</view>
				<view class="total-aready">
					100
				</view>
			</view>
		</view>
		<view class="inventory-wrap">
			<view class="inner-item" v-for="(item,index) in detailsData" :key="index" @click="itemDetails(item)">
				<view class="inventory-item">
					<view class="shuo-item shuo-onec">
						<view class="shuo-label">
							{{index+1}}:
						</view>
						<view class="shuo-cont">
							{{item.name_material}}
						</view>
					</view>

					<view class="shuo-nub">
						{{item.unit}}
					</view>

				</view>
				<view class="inventory-item">
					<view class="shuo-item">
						<view class="shuo-label">
							规格:
						</view>
						<view class="shuo-cont">
							{{item.spec}}
						</view>
					</view>
					<view class="shuo-item">
						<view class="shuo-label">
							型号:
						</view>
						<view class="shuo-cont">
							{{item.model}}
						</view>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-item">
						<view class="shuo-label">
							待拣数量:
						</view>
						<view class="shuo-await">
							{{item.qty}}
						</view>
					</view>
					<view class="shuo-item">
						<view class="shuo-label">
							已拣架数:
						</view>
						<view class="shuo-ready">
							{{item.yishangj}}
						</view>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						生产厂家:
					</view>
					<view class="shuo-cont">
						{{item.factory}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						上架货位:
					</view>
					<view class="shuo-cont">
						{{item.id_cell}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						上架时间:
					</view>
					<view class="shuo-cont">
						{{item.rq}}
					</view>
				</view>
			</view>
			<view class="footer-cont">
				<button type="primary" style="{'background-color': 'rgba(60, 100, 220, 1)'}">完成拣货</button>
				<button type="primary" style="{'background-color': 'rgba(233, 157, 66, 1)'}">撤销拣货</button>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		listData
	} from './list.js';
	import {
		mapState,
		mapMutations,
		mapActions
	} from 'vuex';
	export default {
		data() {
			return {
				datas: [],
				listDatacont: [],
				value: ""
			}
		},
		onLoad() {

		},
		computed: {
			...mapState(['detailsData'])
		},
		mounted() {
			this.listDatacont = listData;
			let data = uni.getStorageSync('outBounddetails');
			this.datas = data;
			this.getDetailsData({
				id_bill: data[0].id_bill
			})
		},
		methods: {
			...mapActions(['getDetailsData']),
			queryList(pageNo, pageSize) {
				this.$refs.paging.complete(this.data);
			},
			//跳转上架详情	 
			itemDetails(item) {
				uni.navigateTo({
					url: '/pages/pickingeitalscont/pickingetials',
					success: function(res) {}
				});
				uni.setStorageSync('BoundetailsCont', [item]);
			}
		}

	}
</script>

<style lang="scss" scoped>
	uni-page-body {
		width: 100%;
		height: 100%;
	}

	.groundtials-wrap {
		width: 100%;
		height: 100%;
		padding: 20rpx;
		box-sizing: border-box;
		background-color: #F1F1F1;
		overflow-y: scroll;

		.inner-item {
			width: 100%;
			height: 360rpx;
			border-bottom: 2rpx solid #BDBDBD;
			padding: 20rpx 20rpx 20rpx 50rpx;
			box-sizing: border-box;
			position: relative;
			background-color: #fff;
			border-radius: 20rpx;
			position: relative;
			margin-top: 10rpx;

			.all-text {
				width: 150rpx;
				height: 40rpx;
				position: absolute;
				right: 20rpx;
				top: 30rpx;
				font-family: PingFangSC-regular;
				font-size: 28rpx;
				color: rgba(52, 124, 175, 0.6);
			}

			.inventory-item {
				width: 100%;
				height: 40rpx;
				color: rgba(16, 16, 16, 1);
				font-size: 28rpx;
				text-align: left;
				font-family: PingFangSC-semiBold;
				margin-top: 10rpx;
				display: flex;
				align-items: center;

				.shuo-nub {
					width: 100rpx;
					height: 100%;
					text-align: right;
					color: rgba(55, 137, 234, 1);
					font-size: 28rpx;
					font-family: PingFangSC-semiBold;
					line-height: 30rpx;
				}

				.shuo-label {
					color: rgba(16, 16, 16, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					width: 130rpx;
				}

				.shuo-cont {
					color: rgba(16, 16, 16, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					margin-left: 30rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					height:30rpx;
					line-height: 30rpx;
				}

				.shuo-item {
					width: 50%;
					height: 100%;
					line-height: 20rpx;
					display: flex;
					align-items: center;

					.shuo-label {
						color: rgba(16, 16, 16, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
					}


					.shuo-cont {
						color: rgba(16, 16, 16, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 30rpx;

					}

					.shuo-await {
						color: rgba(255, 191, 107, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 20rpx;
					}

					.shuo-ready {
						color: rgba(162, 239, 77, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 20rpx;
					}
				}

				.shuo-onec {
					width: 70% !important;
					height: 30rpx;

					.shuo-cont {
						height: 30rpx;
						line-height: 30rpx;
					}
					.shuo-label{
						 text-align: right;
					}
				}

				.shuo-one-cont {
					width: 60%;
				}

				.shuo-min {
					width: 33%;
				}

				.max-item {
					width: 68%;
					margin-left: 10rpx;

					.shuo-cont {
						font-size: 25rpx;
					}

				}
			}
		}

		.total-wrap {
			width: 100%;
			height: 100rpx;
			margin-top: 10rpx;
			border: 2rpx solid #BDBDBD;
			padding: 20rpx;
			box-sizing: border-box;
			background-color: #fff;
			border-radius: 20rpx;
			display: flex;

			.total-item {
				width: 50%;
				height: 100%;
				display: flex;

				.total-label {
					height: 100%;
					padding-left: 30rpx;
					line-height: 50rpx;
					color: rgba(16, 16, 16, 1);
					font-size: 32rpx;
					text-align: left;
					font-family: PingFangSC-regular;
				}

				.total-await {
					height: 100%;
					line-height: 50rpx;
					color: rgba(255, 191, 107, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					margin-left: 20rpx;
				}

				.total-aready {
					height: 100%;
					line-height: 50rpx;
					color: rgba(162, 239, 77, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					margin-left: 20rpx;
				}
			}
		}

		.inventory-wrap {
			width: 100%;
			margin-top: 20rpx;
			border-radius: 20rpx;
			padding-bottom: 100rpx;

			.inner-item {
				width: 100%;
				height: 360rpx;
				border-bottom: 2rpx solid #BDBDBD;
				padding: 20rpx 20rpx 20rpx 50rpx;
				box-sizing: border-box;
				position: relative;
				background-color: #fff;
				border-radius: 20rpx;
				position: relative;

				.all-text {
					width: 150rpx;
					height: 40rpx;
					position: absolute;
					right: 20rpx;
					bottom: 25rpx;
					font-family: PingFangSC-regular;
					font-size: 28rpx;
					color: rgba(52, 124, 175, 0.6);
				}

				.inventory-item {
					width: 100%;
					height: 40rpx;
					color: rgba(16, 16, 16, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-semiBold;
					margin-top: 10rpx;
					display: flex;
					align-items: center;

					.shuo-label {
						color: rgba(16, 16, 16, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
					}

					.shuo-cont {
						color: rgba(16, 16, 16, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 30rpx;
					}

					.shuo-item {
						width: 50%;
						height: 100%;
						line-height: 20rpx;
						display: flex;
						align-items: center;

						.shuo-label {
							color: rgba(16, 16, 16, 1);
							font-size: 28rpx;
							text-align: left;
							font-family: PingFangSC-regular;
						}

						.shuo-cont {
							color: rgba(16, 16, 16, 1);
							font-size: 28rpx;
							text-align: left;
							font-family: PingFangSC-regular;
							margin-left: 30rpx;
						}

						.shuo-await {
							color: rgba(255, 191, 107, 1);
							font-size: 28rpx;
							text-align: left;
							font-family: PingFangSC-regular;
							margin-left: 20rpx;
						}

						.shuo-ready {
							color: rgba(162, 239, 77, 1);
							font-size: 28rpx;
							text-align: left;
							font-family: PingFangSC-regular;
							margin-left: 20rpx;
						}
					}
				}
			}
		}

		.footer-cont {
			width: 100%;
			height: 100rpx;
			display: flex;
			margin-top: 40rpx;
		}
	}

	body {
		width: 100%;
		height: 100%;
	}
</style>