<template>
	<view>
		<view class="sm-box">
			<view class="card">
				<view class="title">注:</view>
				<view class="content">1.量化的需填写真实测量数据；</view>
				<view class="content">2.无量化检查项填写检查结果，结果判定：合格的填写“OK”，不合格的填“NG”；</view>
			</view>
			<view class="content-box-card">
				<view class="content-box-card-ul-two">
					<view class="content-box-card-list">
						<view class="content-box-card-title">物料编号:</view>
						<text>{{CyInfo.product_number}}</text>
					</view>
					<view class="content-box-card-list">
						<view class="content-box-card-title">生产日期:</view>
						<text>{{CyInfo.production}}</text>
					</view>
				</view>
				<view class="content-box-card-ul-two">
					<view class="content-box-card-list">
						<view class="content-box-card-title">机型:</view>
						<text>{{CyInfo.product_size}}</text>
					</view>
					<view class="content-box-card-list">
						<view class="content-box-card-title">班次:</view>
						<picker @change="bindline" :value="lineIndex" :range="line">
						<view class="lin-div">
							<text>{{line[lineIndex]}}</text>
							<image src="../../static/xiala.png"></image>
						</view>
						</picker>
					</view>
				</view>
				<view class="content-box-card-ul-two">
					<!-- <view class="content-box-card-list">
						<view class="content-box-card-title">时间段:</view>
						<text>2021-07-15</text>
					</view> -->
					<view class="content-box-card-list">
						<view class="content-box-card-title">检测员:</view>
						<text>{{info.name}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="big-title">外观</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">料号/刻印线/日期清晰、正确、完整</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>
					<view class="czyj-text">
						<textarea value="" placeholder="不良情况分析" />
					</view>
					<view class="xx-title">不良处置情况</view>
					<picker @change="bindMethod" :value="methIds" :range="methList">
					<view class="slect-list">
						<text>{{methList[methIds]}}</text>
						<image src="../../static/xiala.png"></image>
					</view>
					</picker>
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无压痕/拉痕/变形</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无凸包裂口/裂口</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无摁伤/碰划伤</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">毛刺/毛边≤0.05mm</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无水渍/锈渍</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无弹跳</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无油污堆积</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>									
				</view>
			</view>
			<view class="mid-card">
				<view class="left">V1</view>
				<view class="right">
					<view class="right-list">
						<view class="titles">0°天地左右侧，±0.5°</view>
						<view class="inp">
							<input placeholder="输入" />
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="big-title">结构</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">无少孔、错位、模印、凸包拉裂、缺料、裂口、漏工程等符合图纸要求</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>								
		</view>
		<view class="big-title">试装配</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">面框/SOURCE卡扣/支架</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>								
		</view>
		<view class="big-title">平整度</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="tx-ul">
					<view class="tx-title">I:碗翘最大变形1.5mm,不允许龟翘</view>
					<input placeholder="请输入" />
				</view>
			</view>								
		</view>
		<view class="big-title">葫芦孔</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">沉台深度符合图纸要求</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>								
		</view>
		<view class="big-title">螺孔</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">牙规检测M2.5/3.0/4.0顺利通止</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">M4.0螺孔扭力8Kgf.cm锁附5次无滑牙、爆牙</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
				<view class="cyxj-content-card">
					<view class="xx-card">
						<view class="xx-title">M2.5螺孔扭力3Kgf.cm锁附5次无滑牙、爆牙</view>
						<view class="xx-ul">
							<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
								<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
								<text>{{item}}</text>
							</view>
						</view>					
					</view>
				</view>
				<view class="cyxj-content-card">
					<view class="xx-card">
						<view class="xx-title">M3.0螺孔扭力4Kgf.cm锁附5次无滑牙、爆牙</view>
						<view class="xx-ul">
							<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
								<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
								<text>{{item}}</text>
							</view>
						</view>					
					</view>
				</view>		
			</view>									
		</view>
		<view class="big-title">包装</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">与背板尺寸匹配的栈板/护角/标识/围膜/打包带均无异常</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">铁框无变形、少支撑/标识清晰、完整、正确</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>	
			</view>									
		</view>
		<view class="big-title">铆钉</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="cyxj-content-card">
				<view class="xx-card">
					<view class="xx-title">正推力、侧推力按图纸要求</view>
					<view class="xx-ul">
						<view class="xx-list" v-for="(item,index) in ifcomplete" :key="index" @tap="bindifcomplete(index)">
							<image :src="ifcompleteIds==index?'../../static/xz.png':'../../static/wxz.png'" mode=""></image>
							<text>{{item}}</text>
						</view>
					</view>					
				</view>
			</view>									
		</view>
		<view class="cyxj-content" style="margin-top: 24upx;">
			<view class="bzqk-card">
				<textarea value="" placeholder="备注情况说明" />
			</view>
			<view class="submit-btn">
				<button type="primary">提交并发起审核</button>
			</view>									
		</view>
	</view>
</template>

<script>
	import {cyCheckAdd,cyCheckDetail} from "../../api/user.js"
	export default {
		data() {
			return {
				line:["白班","夜班"],
				lineIndex:0,
				ifcomplete:["OK","NG"],
				ifcompleteIds:0,
				methList:["更换丝锥","丝锥加油","调整丝锥位置","换冲针"],
				methIds:0,
				planId:0,
				CyInfo:{},
				info:{},
				froms:{
					plan_id:'',
					model:'',
					frequency:'',//班次
					remake:'',//，备注
					
				}
			};
		},
		onLoad(e) {
			this.pId = e.plan_id;
			this.CyInfo = JSON.parse(decodeURIComponent(e.planInfo));
			this.getInfo()
		},
		methods:{
			getInfo(){
				cyCheckDetail({plan_id:this.pId}).then(res=>{
					this.info=res
					console.log("详情",res)
				})
			},
			bindline: function(e) {
					console.log('picker发送选择改变，携带值为', e.target.value)
					this.lineIndex = e.target.value
			},
			bindMethod(e){
				this.methIds = e.target.value
			},
			bindifcomplete(index){
				this.ifcompleteIds=index
			}
		}
	}
</script>

<style lang="scss">
@import "./index.scss"
</style>
