<template>
	<view class="container">
		<nav-bar title="空管入库"></nav-bar>
		<view class="content">
			<view class="wrapper">
				<view class="filter_item">
					<view class="filter_label_wraper">
						<span class="filter_label">点位</span>
					</view>
					<view class="filter_input_wraper">
						<search-box
						v-model="val1"
						@toSearch="toSearch"
						/>
					</view>
				</view>
				<view class="filter_item">
					<view class="filter_label">物料</view>
					<view class="filter_input_wraper">
						<input type="text" class="filter_input">
					</view>
				</view>
				<view class="filter_item">
					<view class="filter_label">区域</view>
					<view class="filter_input_wraper">
						<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
					</view>
				</view>
			</view>
			<view class="wrapper grid-wraper">
				<view class="slide_new">
					<table>
						<thead>
							<tr>
								<th>任务号</th>
								<th>指令号</th>
								<th>起点</th>
								<th>终点</th>
								<th>状态</th>
								<th>agv车号</th>
								<th>物料类型</th>
								<th>优先级</th>
								<th>时间</th>
							</tr>
						</thead>
						<tbody>
							<tr v-for="(e, i) in dataList" :key="i">
								<td>{{e.task_no}}</td>
								<td>{{e.inst_no}}</td>
								<td>{{e.start_devicecode}}</td>
								<td>{{e.next_devicecode}}</td>
								<td>{{e.inst_status_name}}</td>
								<td>{{e.carno}}</td>
								<td>{{e.material_type_name}}</td>
								<td>{{e.priority}}</td>
								<td>{{e.create_time}}</td>
							</tr>
						</tbody>
					</table>
				</view>
			</view>
		</view>
		<view class="submit-bar">
			<button class="submit-button btn-disabled">入库确认</button>
			<button class="submit-button">查询</button>
		</view>
	</view>
</template>

<script>
	import NavBar from '@/components/NavBar.vue'
	import SearchBox from '@/components/SearchBox.vue'
	export default {
		components: {
			NavBar,
			SearchBox
		},
		data() {
			return {
				val1: '',
				options: [],
				index: 0,
				dataList: [{task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1'}, {task_no: '1', start_devicecode: '000fjopd', create_time: '2020-1-1444'}]
			};
		},
		methods: {
			toSearch (e) {
				console.log(e)
			},
			/** 选择器 */
			selectChange(e) {
				this.index = e
			}
		}
	}
</script>

<style lang="stylus">
.grid-wraper
	height calc(100% - 238rpx)
</style>
