<template>
	<view class="groundtials-wrap">
		<view class="inventory-wrap">
			<view class="inner-item">
				<view class="inventory-item">
					<view class="shuo-name">
						{{listData.prodName}}
					</view>
					<view class="shuo-bao">
						<span>{{ listData.pacunt }} ({{ listData.pacCnt
						            }}{{listData.prcUnt }}/{{ listData.pacunt }})</span>
						<span>【{{listData.purcPric }}元/{{ listData.prcUnt }}】</span>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						规格:
					</view>
					<view class="shuo-cont">
						{{listData.spec }}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						型号:
					</view>
					<view class="shuo-cont">
						{{listData.mol }}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						生产批次:
					</view>
					<view class="shuo-cont">
						{{listData.lotNum}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						生产日期:
					</view>
					<view class="shuo-cont">
						{{listData.manuDate}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						有效日期:
					</view>
					<view class="shuo-cont">
						{{listData.prodExpy}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						注册证号:
					</view>
					<view class="shuo-cont">
						{{listData.regcertno}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						耗材类别:
					</view>
					<view class="shuo-cont-Mcs">
						<span v-if="listData.mcsType == '0'"> 普通耗材 </span>
						<span v-if="listData.mcsType == '1'"> 高值耗材 </span>
						<span v-if="listData.mcsType == '2'"> 试剂 </span>
						<span v-if="listData.mcsType == '3'"> 总务耗材 </span>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						生产来源:
					</view>
					<view class="shuo-cont-Ly">
						<span v-if="listData.prodSouc == '1'" type="success"> 国产 </span>
						<span v-if="listData.prodSouc == '2'" type="danger"> 进口 </span>
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						生产企业:
					</view>
					<view class="shuo-cont">
						{{listData.prodEntp}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						是否集采:
					</view>
					<view class="shuo-cont">
						{{listData.isFas == "0" ? "否" : "是" }}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						采集批次:
					</view>
					<view class="shuo-cont">
						{{listData.fasBtch}}
					</view>
				</view>
			<!-- 	<view class="inventory-item">
					<view class="shuo-label">
						管理方式:
					</view>
					<view class="shuo-cont">
						{{listData.mol}}
					</view>
				</view> -->
				<view class="inventory-item">
					<view class="shuo-label">
						一物一码:
					</view>
					<view class="shuo-cont">
						{{ listData.isBarc == "0" ? "否" : " 是" }}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						SN编码:
					</view>
					<view class="shuo-cont">
						{{listData.id}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						RFID编码:
					</view>
					<view class="shuo-cont">
						{{listData.rfid}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						上架货位:
					</view>
					<view class="shuo-cont">
						{{listData.cgoLocName}}
					</view>
				</view>
				<view class="inventory-item">
					<view class="shuo-label">
						状态:
					</view>
					<view class="shuo-cont-Ly">
						{{listData.cgoLocName?'已上架':"待上架"}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		mapState,
		mapMutations,
		mapActions
	} from 'vuex';
	export default {
		data() {
			return {
				textCode: "显示扫码结果",
				listDatacont: [],
				listData: {},}
		},
		onLoad() {

		},
		onShow() {
			let that = this;
			uni.getStorage({
				key: 'ListingData',
				success: function(res) {
					that.listData = res.data;
					console.log(res.data, this);
				}
			});
		},
		computed: {
			// ...mapState(['mentItem','groundDetailsData'])
		},
		onBackPress(options) {
			uni.$emit('update', {
				msg: '页面更新'
			});
		},
		mounted() {
			this.listDatacont = listData;
			// this.getDetails();
		},
		methods: {
			scanCode(code) {
				this.textCode = code;
			}
		}

	}
</script>

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


		.inventory-wrap {
			width: 100%;
			border: 2rpx solid #BDBDBD;
			margin-top: 20rpx;
			border-radius: 20rpx;

			.inner-item {
				width: 100%;
				height: 85%;
				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-cont-Mcs {
						color: rgba(0, 170, 255, 1.0);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 30rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					.shuo-name {
						color: rgba(16, 16, 16, 1);
						font-size: 35rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						font-weight: bold;
						margin-bottom: 20rpx;
						width: 200rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

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

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

					.shuo-bao {
						color: #01A992;
						margin-bottom: 20rpx;
					}

					.shuo-cont-Ly {
						color: rgba(202, 202, 0, 1.0);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 30rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					.shuo-cont-byd {
						color: rgba(0, 170, 255, 1.0);
						font-size: 28rpx;
						text-align: left;
						font-family: PingFangSC-regular;
						margin-left: 30rpx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					.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;
							font-weight: normal;
							text-align: justify;
							text-align-last: justify;
						}

						.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;

						}

						.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;
						}
					}
				}
			}
		}
	}

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