<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="time">
          <el-input
            v-model="form.status"
            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="100" />
        <el-table-column label="采购总斤数" prop="6" min-width="100" />
        <el-table-column label="总价" prop="7" min-width="80" />
        <el-table-column label="支付金额" prop="8" min-width="80" />
        <el-table-column label="支付方式" prop="9" min-width="80" />
        <el-table-column label="支付金额" prop="10" min-width="80" />
        <el-table-column label="采购时间" prop="11" min-width="80" />
        <el-table-column label="录入时间" prop="12" 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
            >
          </template>
        </el-table-column>
      </template>
    </Page>
  </div>
</template>
<script>
import Page from "@/components/Page";
export default {
  name: "MaterialOrder",
  components: {
    Page,
  },
  data() {
    return {};
  },
  methods: {
    handleAdd() {
      this.$router.push({
        path: "/material/order/add",
      });
    },
  },
};
</script>
