<script>
import add from "./add.vue";
import list from "./list.vue";

export default {
  name: "AppSellApply",
  label: "出栏申请",
  props: {
    instance: Function,
    dict: Object,
    permissions: Function
  },
  computed: {
    currentPage() {
      let {hash} = this.$route
      return ["#edit", "#add"].includes(hash) ? add : list
    }
  },
  created() {
    this.dict.load("auditStatus", "loanProduct", "loanStatus", "category", "variety")
  },
}
</script>

<template>
  <section class="AppSellApply">
    <component :is="currentPage" v-bind="$props"/>
  </section>
</template>

<style scoped lang="scss">
.AppSellApply {
  height: 100%;
}
</style>
