<template>
  <el-tabs v-model="curTab" type="card" tab-position="top">
    <el-tab-pane label="库存" name="1" v-if="checkPermi(['mall:inventory:index'])">
      <InventoryDetail v-if="curTab == 1" />
    </el-tab-pane>
    <el-tab-pane label="库存变动记录" name="2" v-if="checkPermi(['mall:inventory:record'])">
      <InventoryRecord v-if="curTab == 2" />
    </el-tab-pane>
    <el-tab-pane label="仓库" name="3" v-if="checkPermi(['mall:inventory:depot'])">
      <Warehouse v-if="curTab == 3" />
    </el-tab-pane>
  </el-tabs>
</template>

<script setup>
import InventoryDetail from './Comp/InventoryDetail.vue'
import Warehouse from './Comp/Warehouse.vue'
import InventoryRecord from './Comp/InventoryRecord.vue'
import { checkPermi } from '@/utils/permission'

const curTab = ref('1')
</script>

<style lang="scss" scoped></style>
