<script setup lang="ts">
import { httpList } from "/@/api/InvoiceSales/invoiceApply";
import { reactive, ref, onMounted } from "vue";

import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
// import { useNav } from "/@/layout/hooks/nav";
import addEditForm from "./components/addEditForm.vue";
import examStatusForm from "./components/examStatusForm.vue";
console.log("/@/components/examRecord");
import { examRecord } from "/@/components/examRecord";
// const { logout } = useNav();
defineOptions({
  name: "InvoiceApplyDetail"
});
const activeName = ref("0");
const collapseItem = ref(["0", "1", "2", "3"]);
const loading = ref(false);
const examCode = ref("");
const dataList = ref([]);

async function onSearch() {
  if (loading.value) return;
  // loading.value = true;
  // const { code, data, message } = await httpList(form);
  // responseHandle({
  //   code,
  //   message,
  //   logout,
  //   handler: () => {

  //   }
  // });

  loading.value = false;
}

onMounted(() => {
  onSearch();
});
</script>

<template>
  <div class="main bg-white">
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane label="新建发票申请" name="0">
        <addEditForm />
      </el-tab-pane>
      <el-tab-pane label="业务详情" name="1">
        <el-collapse v-model="collapseItem">
          <el-collapse-item title="审核" name="1">
            <examStatusForm />
          </el-collapse-item>
        </el-collapse>
      </el-tab-pane>
      <el-tab-pane label="审批记录" name="2">
        <examRecord :examCode="examCode" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<style scoped lang="scss">
:deep(.el-dropdown-menu__item i) {
  margin: 0;
}
</style>
