<template>
  <div>
    <Page>
      <template #search="{ form, search }">
        <el-form-item label="名称" prop="name">
          <el-input
            v-model="form.name"
            placeholder="请输入名称"
            clearable
            size="small"
            @keyup.enter.native="search"
          />
        </el-form-item>
        <el-form-item label="状态" prop="status">
          <el-input
            v-model="form.status"
            placeholder="请输入订单号"
            clearable
            @keyup.enter.native="search"
          />
        </el-form-item>
        <el-form-item label="时间" prop="time">
          <el-input
            v-model="form.time"
            placeholder="请输入桌码"
            clearable
            @keyup.enter.native="search"
          />
        </el-form-item>
      </template>
      <template #extendButton>
        <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd"
          >新增材料</el-button
        >
      </template>
      <template #default>
        <el-table-column label="序号" prop="id" min-width="80" />
        <el-table-column label="原材料名称" prop="1" min-width="80" />
        <el-table-column label="规格" prop="3" min-width="80" />
        <el-table-column label="原材料编号" prop="2" min-width="80" />
        <el-table-column label="入库数量(单号)" prop="4" min-width="80" />
        <el-table-column label="保质期(个月)" prop="5" min-width="80" />
        <el-table-column label="类型" prop="6" min-width="80" />
        <el-table-column label="创建时间" prop="7" min-width="80" />
        <el-table-column label="状态" prop="8" min-width="80" />
        <el-table-column label="操作" align="left" width="130" fixed="right">
          <template slot-scope="scope">
            <el-button size="mini" type="text">详情</el-button>
            <el-button size="mini" type="text" icon="el-icon-edit"
              >修改</el-button
            >
            <el-button size="mini" type="text">下架</el-button>
            <el-button size="mini" type="text" icon="el-icon-delete"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </template>
    </Page>
  </div>
</template>
<script>
import Page from "@/components/Page";
export default {
  name: "MaterialList",
  components: { Page },
  data() {
    return {};
  },
  methods: {
    async getList() {},
    handleAdd() {
      this.$router.push({ path: "/material/list/add" });
    },
  },
};
</script>
