<template>
  <div class="app-container">
    <el-tabs v-model="activeTab">
      <el-tab-pane label="入库单据" name="in">
        <StIndex :st-by-type="stByType" />
      </el-tab-pane>
      <el-tab-pane label="入库明细" name="detailIn">
        <StiTable :st-by-type="stByType"/>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import StIndex from "@/views/repair/stockTransfer/Components/StIndex.vue";
import StiTable from "@/views/repair/stockTransfer/Components/StiTable.vue";

export default {
  name: "InStock",
  components: {StiTable, StIndex},
  data() {
    return {
      stByType: true,
      activeTab: "in"
    }
  },
  created() {
    this.isType()
  },
  methods: {
    // 判断是什么单据，决定字段的属性、展示否等
    async isType() {
      const url = this.$route.path
      this.stByType = url.includes("sti")
    },
  }
}
</script>

<style scoped lang="scss">

</style>
