<template>
  <Container>
    <el-button
      slot="right"
      type="primary"
      size="mini"
      style="margin-bottom: 10px"
      @click="$router.push('/stock/WarehouseManagement/newStart')"
    >
      设置期初库存
    </el-button>
    <div class="tips-info">
      支持根据供货地区（如杭州仓、北京仓）、使用场景（如销售仓、售后仓）的不同创建不同仓库并进行进销存管理。
    </div>

    <!-- 表格 -->
    <el-table border style="width: 100%" :data="begin_stoke">
      <el-table-column
        prop="sheetCode"
        align="center"
        label="单据号"
      ></el-table-column>
      <el-table-column
        prop="warehouseName"
        align="center"
        label="仓库"
      ></el-table-column>
      <el-table-column
        prop="operator"
        align="center"
        label="操作人"
      ></el-table-column>
      <el-table-column
        prop="createTime"
        align="center"
        label="制单时间"
      ></el-table-column>
      <el-table-column
        prop="mark"
        align="center"
        label="备注"
      ></el-table-column>
      <el-table-column align="center" label="操作">
        <template slot-scope="scope">
          <el-tooltip content="查看" placement="top">
            <el-button
              size="mini"
              type="success"
              icon="el-icon-tickets"
              @click="
                $router.push(
                  '/stock/WarehouseManagement/startInfo?id=' + scope.row.id
                )
              "
            ></el-button>
          </el-tooltip>
        </template>
      </el-table-column>
    </el-table>
    <FooterPage
      :page-size="pageSize"
      :total-page.sync="total_data"
      :current-page.sync="page"
      @pageChange="pageChange"
      @sizeChange="sizeChange"
    ></FooterPage>
  </Container>
</template>

<script>
  export default {
    name: "Start",
    data() {
      return {
        pageSize: 10,
        page: 1,
        total_data: 1,
        begin_stoke: [
          {
            id: 1,
            sheetCode: "ORDER3247892472398",
            warehouseName: "一号仓库",
            createTime: "2019-09-10 20:20:20",
            buyer: "小小",
            mobile: "13333333333",
            orderNo: "ORDER3247892472398",
            operator: "小小",
            mark: "一条备注飘过",
          },
        ],
      };
    },
    activated() {
      // this.getData()
    },
    created() {
      // this.getData()
    },
    methods: {
      pageChange(page) {
        this.page = page;
        this.getData();
      },
      sizeChange(size) {
        this.pageSize = size;
        this.pageChange(1);
      },
      async getData() {},
      handleCurrentChange(page) {
        this.page = page;
        this.getData();
      },
    },
  };
</script>

<style scoped>
  .tips-info {
    background-color: #f2f2f2;
    padding: 15px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666666;
  }
</style>
