<template>
	<view>
		<view class="card" v-for="(item,index) in list" :key="index" @tap="firstInspectionInfo(item.plan_id,item)">
			<view class="card-left">
				<view class="card-up-list">
					<view class="card-up-list-list">
						<view>物料名称:</view><text>{{item.product_name}}</text>
					</view>
					<view class="card-right">
						人员统计
					</view>
				</view>
				<view class="card-up-list">
					<view class="card-up-list-list">
						<view>物料编号:</view><text>{{item.product_number}}</text>
					</view>
				</view>
				<view class="card-dow-list">
					<view class="card-up-list-list">
						<view>规格:</view><text>{{item.product_size}}</text>
					</view>
					<view class="card-up-list-list">
						<view>产线:</view><text>{{item.line_title}}</text>
					</view>
				</view>
			</view>
			<view class="btn-grounp">
				<view v-if="item.status==0||item.status==0" @tap="openLine()">开线</view>
				<view v-if="item.status==1" class="btn-tx"  @tap="stopLine()">停线</view>
				<view v-if="item.status==0" class="btn-xx" @tap="offLine()">下线</view>
				<view v-if="item.status==0" class="btn-blp" @tap="badProduct()">不良品统计</view>
				<view v-if="item.status==0" class="btn-back" @tap="rework()">返修</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		firstCheckLists
	} from "../../api/user.js";
	export default {
		onLoad() {
			this.getData()
		},
		data() {
			return {
				list:[]
			};
		},methods:{
			openLine(){
				
			},
			getData(){
				firstCheckLists({}).then(res => {
					this.list = res;
				})
			},
			stopLine(){
				uni.navigateTo({
					url: '../stopLine/stopLine'				
				});
			},
			offLine(){
				uni.navigateTo({
					url: '../offLine/offLine'				
				});
			},
			badProduct(){
				uni.navigateTo({
					url: '../badProduct/badProduct'				
				});
			}
			,
			rework(){
				uni.navigateTo({
					url: '../rework/rework'				
				});
			}
		}
	}
</script>

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