<template>
  <div class="main-contain">
    <div class="position">
      <bread-crumb :crumbs='crumbs'></bread-crumb>
    </div>
    <div class="app-container">
      <div class="service-box">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="入库明细" name="1">
            <stock-in-detail></stock-in-detail>
          </el-tab-pane>
          <!-- <el-tab-pane label="退货明细">
            <sales-return-detail></sales-return-detail>

          </el-tab-pane> -->
          <el-tab-pane label="出库明细" name="2">
            <stock-out-detail></stock-out-detail>

          </el-tab-pane>
          <el-tab-pane label="退库明细" name="3">
           <cancel-stock-detail></cancel-stock-detail>
          </el-tab-pane>

        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>

  import BreadCrumb from '@/xt_pages/components/bread-crumb'
  import StockInDetail from './detail/stockInDetail'
  import StockOutDetail from './detail/stockOutDetail'
  import SalesReturnDetail from './detail/salesReturnDetail'
  import CancelStockDetail from './detail/cancelStockDetail'

  export default {
    name: 'stockDetailIndex',
    components: {
      CancelStockDetail,
      SalesReturnDetail,
      StockOutDetail,
      StockInDetail,
      BreadCrumb
    },
    data() {
      return {
        crumbs: [
          { path: false, name: '库存管理' },
          { path: '/stock/detail', name: '出入库明细查询' }
        ],
        activeName: '1'

      }
    },
    methods: {
      handleClick(tab, event) {
        window.sessionStorage.setItem('active_Name',this.activeName)
      }
    },
    created(){
      
      var active_name =  window.sessionStorage.getItem('active_Name')
      if(active_name!=null){
        this.activeName = active_name
      }
     
    }
  }
</script>






