<template>
	<view class="hole-page">
		<view class="device-info">
			<view>
				<h4>设备类型：</h4>
				<span style="color: #0000FD;">{{ infoList.deviceType }}</span>
			</view>
			<view>
				<h4>规格型号：</h4>
				<span style="color: #0000FD;">{{ infoList.specificationType }}</span>
			</view>
			<view>
				<h4>二维码编码：</h4>
				<span>{{ infoList.qrCode }}</span>
			</view>
			<view>
				<h4>设备编码：</h4>
				<span>{{ infoList.maCode }}</span>
			</view>
			<view>
				<h4>设备状态：</h4>
				<span>{{ infoList.maStatusName }}</span>
			</view>
			<view>
				<h4>本次检修人员：</h4>
				<span>{{ infoList.checkMan }}</span>
			</view>
			<view>
				<h4>本次检修时间：</h4>
				<span style="color: #0000FD;">{{ infoList.thisCheckTime }}</span>
			</view>
			<view>
				<h4>下次检修时间：</h4>
				<span style="color: #0000FD;">{{ infoList.nextCheckTime }}</span>
			</view>
			<!-- <view>
				<h4>检验人员：</h4>
				<span>{{ infoList.inspectMan }}</span>
			</view> -->
			<view>
				<h4>检验结论：</h4>
				<span style="color: #0000FD;">{{ infoList.inspectStatus }}</span>
			</view>
			<view>
				<h4>联系电话：</h4>
				<span>{{ infoList.phone }}</span>
			</view>
			<view>
				<h4>主要参数：</h4>
				<span style="color: #0000FD;"></span>
			</view>
			<view>
				<h4>生产厂家：</h4>
				<span>{{ infoList.maVender }}</span>
			</view>
			<view>
				<h4>出厂日期：</h4>
				<span>{{ infoList.outFacTime }}</span>
			</view>
			<view>
				<h4>出入库次数：</h4>
				<span>{{ infoList.inOutNum }}</span>
			</view>
			<view>
				<h4>领料单位：</h4>
				<span>{{ infoList.leaseUnit }}</span>
			</view>
			<view>
				<h4>领料工程：</h4>
				<span>{{ infoList.leasePro }}</span>
			</view>
			<view>
				<h4>领料时间：</h4>
				<span>{{ infoList.leaseTime }}</span>
			</view>
			<view>
				<h4>退料单位：</h4>
				<span>{{ infoList.backUnit }}</span>
			</view>
			<view>
				<h4>退料工程：</h4>
				<span>{{ infoList.backPro }}</span>
			</view>
			<view>
				<h4>退料时间：</h4>
				<span>{{ infoList.backTime }}</span>
			</view>
		</view>
		<view class="passed-area">
			<view class="seal-area">
				<feng-seal ref="seal" size="135px" sealText="机具检验专用章"></feng-seal>
			</view>
			<h4 class="tit">检验合格证</h4>
			<view class="area-lower">
				<view class="lower-lef">
					<view>
						<span>名称：</span>
						<h4>{{ infoList.deviceType }}</h4>
					</view>
					<view>
						<span>型号：</span>
						<h4>{{ infoList.specificationType }}</h4>
					</view>
					<view>
						<span>编号：</span>
						<h4>{{ infoList.maCode }}</h4>
					</view>
					<view>
						<span>本次检验日期：</span>
						<h4>{{ infoList.thisCheckTime }}</h4>
					</view>
					<view>
						<span>下次检验日期：</span>
						<h4>{{ infoList.nextCheckTime }}</h4>
					</view>
				</view>
				<view class="lower-rig">
					<h4>检验结论</h4>
					<h2>{{ infoList.inspectStatus }}</h2>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showDevice: false,
				infoList: {}
			}
		},
		methods: {
			
		},
		onLoad(params) {
			let that = this
			const { scan } = params
			// 根据二维码扫描结果查询具体信息
			that.$api.indexScan.infoByCode({
				qrCode: scan
			}).then(res => {
				console.log(res);
				if (res.data.code == 200) {
					that.infoList = res.data.data
					that.showDevice = true
				} else {
					that.showDevice = false
					uni.showToast({
						icon: 'none',
						title: res.data.msg
					})
				}
			}).catch(err => {
				console.log(err);
			})
		}
	}
</script>

<style lang="scss">
	.hole-page{
		.device-info{
			width: 96%;
			margin: 10rpx auto;
			display: flex;
			flex-direction: column;
			view{
				width: 100%;
				box-sizing: border-box;
				padding: 3rpx;
				margin-bottom: 10rpx;
				display: flex;
				border-bottom: 1px solid #B4D2DB;
				h4{
					font-weight: normal;
					font-size: 26rpx;
					padding-right: 10rpx;
				}
				span{
					font-size: 26rpx;
				}
			}
		}
		.passed-area{
			width: 96%;
			margin: 10rpx auto;
			border: 5px solid #00904A;
			position: relative;
			.seal-area{
				width: 40%;
				height: 100%;
				position: absolute;
				left: 20%;
				top: 0;
			}
			.tit{
				width: 100%;
				font-weight: normal;
				color: #47A074;
				display: flex;
				justify-content: center;
				letter-spacing: 5px;
			}
			.area-lower{
				width: 100%;
				display: flex;
				box-sizing: border-box;
				padding: 8rpx;
				.lower-lef{
					width: 60%;
					display: flex;
					flex-direction: column;
					view{
						width: 100%;
						display: flex;
						margin-bottom: 8rpx;
						span{
							font-size: 26rpx;
							color: #47A074;
						}
						h4{
							flex: 1;
							font-weight: normal;
							font-size: 26rpx;
							display: flex;
							justify-content: center;
							align-items: center;
							border-bottom: 1px solid #8BC4A9;
						}
					}
				}
				.lower-rig{
					flex: 1;
					box-sizing: border-box;
					padding-left: 20rpx;
					h4{
						width: 100%;
						font-weight: normal;
						font-size: 26rpx;
						color: #47A074;
						margin-top: 20rpx;
					}
					h2{
						font-size: 32px;
						color: red;
					}
				}
			}
		}
	}
</style>
