<template>
	<view class="query-wrap">
		<uni-easyinput prefixIcon="search" v-model="value" placeholder="请输入商品名称" @iconClick="iconClick" :focus="true">
		</uni-easyinput>
		<z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
			<view class="inner-item" v-for="(item,index) in queryData" :key="index">
				<view class="inventory-item">
					<view class="shuo-item-name">
						<view class="shuo-label">
							{{item.name}}
						</view>
						<view class="shuo-unit">
							{{item.unit}}
						</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">
						<view class="shuo-label">
							耗材类别:
						</view>
						<view class="shuo-cont-blue">
							{{item.liebie}}
						</view>
					</view>
					<view class="shuo-item">
						<view class="shuo-label">
							生产来源:
						</view>
						<view class="shuo-cont-blue">
							{{item.laiyuan}}
						</view>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-item-qy">
						<view class="shuo-label">
							生产企业:
						</view>
						<view class="shuo-cont">
							{{item.qiye}}
						</view>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-item">
						<view class="shuo-label">
							所在仓库:
						</view>
						<view class="shuo-cont">
							{{item.suozcku}}
						</view>
					</view>
					<view class="shuo-item">
						<view class="shuo-label">
							所在库位:
						</view>
						<view class="shuo-cont">
							{{item.suozaikw}}
						</view>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-item">
						<view class="shuo-label">
							现有库存:
						</view>
						<view class="shuo-cont-blue">
							{{item.xianykc}}
						</view>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import {
		queryData
	} from './list.js'
	export default {
		data() {
			return {
				value: '',
				queryData: queryData,
				dataList: [],
			}
		},
		methods: {
			queryList(pageNo, pageSize) {
				// this.getGroundData();
				this.$refs.paging.complete(this.listData);
			},
		}
	}
</script>

<style lang="scss">
	.query-wrap {
		width: 100%;
		height: 100%;
		padding: 20rpx;
		box-sizing: border-box;
		background-color: #F1F1F1;
		overflow-y: scroll;
		overflow-x: hidden;

		.inner-item {
			width: 100%;
			height: 350rpx;
			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-item-name {
					width: 100%;
					height: 100%;
					line-height: 20rpx;
					display: flex;
					align-items: center;

					.shuo-label {
						width: 200rpx;
						color: rgba(16, 16, 16, 1);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						text-align: justify;
						text-align-last: justify;
						margin-right: 10rpx;
					}

					.shuo-cont {
						color: rgba(16, 16, 16, 1);
						font-size: 25rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 20rpx;
					}
				}
				.shuo-label {
					color: rgba(16, 16, 16, 1);
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					font-weight: bold;
					width: 130rpx;
					text-align: justify;
					text-align-last: justify;
				}

				.shuo-unit {
					color: rgba(0, 193, 0, 1.0);
					font-weight: bold;
				}

				.shuo-cont-blue {
					color: #00BBFF;
					font-size: 28rpx;
					text-align: left;
					font-family: PingFangSC-regular;
					font-weight: bold;
					margin-left: 20rpx;
				}

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

				.shuo-item-qy {
					width: 100%;
					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: 20rpx;
					}
				}

				.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: 20rpx;
					}

					.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-one-cont {
					width: 60%;
				}

				.shuo-min {
					width: 33%;
				}

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

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

				}
			}
		}
	}
</style>