<template>
  <div class="manage">
    <!-- <nav-header title="出入库管理" @back="$router.go(-1)" /> -->
    <van-tabs color="#EB4E3F" title-active-color="#EB4E3F" title-inactive-color="#666666">
      <van-tab title="审核">
        <verify :addressList="addressList"></verify>
      </van-tab>
      <van-tab title="入库">
        <put-in :addressList="addressList"></put-in>
      </van-tab>
      <van-tab title="出库">
        <put-out :addressList="addressList"></put-out>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import Vue from "vue";
import { Tab, Tabs } from "vant";
import PutIn from "./components/PutIn";
import PutOut from "./components/PutOut";
import Verify from "./components/Verify";
import { getAddress } from "@/api/coldfood";

Vue.use(Tab).use(Tabs);

export default {
  components: {
    PutIn,
    PutOut,
    Verify,
  },
  data() {
    return {
      userInfo: {},
      addressList: [],
    };
  },
  methods: {
    initAddress() {
      getAddress({ appId: 1234 }).then((res) => {
        // alert(JSON.stringify(res))
        this.addressList = res.data;
      });
    },
  },
  created() {
    let res = sessionStorage.getItem("ZJCD-UserInfo");
    this.userInfo = JSON.parse(res);
    this.initAddress();
  },
};
</script>

<style lang="stylus" scoped>
.manage {
  .main {
  }
}
</style>
