<template>
    <!-- 入库异常 -->
    <div class="app-container">
        <el-form
            :model="queryParams"
            ref="queryForm"
            size="small"
            :inline="true"
            label-width="80px"
        >
            <el-form-item prop="unitId">
                <el-input
                    v-model="queryParams.keyWords"
                    placeholder="请输入关键字"
                    clearable
                />
            </el-form-item>

            <el-form-item prop="deviceType">
                <el-select
                    v-model="queryParams.deviceType"
                    placeholder="请选择工机具类型"
                    clearable
                    filterable
                >
                </el-select>
            </el-form-item>
            <el-form-item prop="time">
                <el-date-picker
                    v-model="queryParams.time"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    type="daterange"
                    value-format="yyyy-MM-dd"
                    style="width: 240px"
                />
            </el-form-item>
            <el-form-item>
                <el-button
                    type="primary"
                    icon="el-icon-search"
                    size="mini"
                    @click="handleQuery"
                    >查询</el-button
                >
                <el-button
                    icon="el-icon-refresh"
                    size="mini"
                    @click="resetQuery"
                    >重置</el-button
                >

                <el-button
                    type="primary"
                    icon="el-icon-search"
                    size="mini"
                    @click="handleQuery"
                    >下载模板</el-button
                >
            </el-form-item>
        </el-form>

        <el-row :gutter="10" class="mb8">
            <el-col :span="1.5">
                <el-button
                    type="primary"
                    plain
                    icon="el-icon-plus"
                    size="mini"
                    @click="checkClick"
                    >入库审核</el-button
                >
            </el-col>
            <el-col :span="1.5">
                <el-button
                    type="warning"
                    plain
                    icon="el-icon-download"
                    size="mini"
                    >导出数据</el-button
                >
            </el-col>
        </el-row>

        <el-table border :data="tableList">
            <el-table-column label="序号" type="index" align="center" />
            <el-table-column prop="name" label="采购单号" align="center" />
            <el-table-column prop="upload_time" label="采购日期" align="center" />
            <el-table-column
                prop="upload_time"
                label="到货日期"
                align="center"
            />
            <el-table-column
                prop="machine"
                label="采购机具设备"
                align="center"
            />
            <el-table-column prop="upload_user" label="采购员" align="center" />
            <el-table-column
                prop="upload_user"
                label="发布人员"
                align="center"
            />
            <el-table-column
                prop="upload_time"
                label="发布日期"
                align="center"
            />
            <el-table-column
                prop="remark"
                label="不通过原因"
                align="center"
            />
            <el-table-column label="状态" align="center">
                异常
            </el-table-column>
            <el-table-column label="操作" align="center">
                <template slot-scope="{ row }">
                    <el-button type="text"> 查看 </el-button>
                    <el-button type="text"> 审核 </el-button>
                </template>
            </el-table-column>
        </el-table>

        <pagination
            :total="total"
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
        />
    </div>
</template>

<script>
import { tableList } from './tableData'
export default {
    data() {
        return {
            queryParams: {
                keyWords: '',
                deviceType: '',
                time: '',
                pageNum: 1,
                pageSize: 10,
            },
            tableList,
            total: 10,
        }
    },
}
</script>

<style></style>
