<template>
    <el-container>
        <el-header>
            <div class="left-panel">
                <el-button type="primary" @click="handleAdd">新增</el-button>
            </div>

        </el-header>
        <el-main class="nopadding">
            <scTable
            ref="table"
            :apiObj="API.hrm.resignation.list"
            row-key="id"
            stripe
            :query="query"
            @row-click="(row)=>{t_id=row.id;mode='show';drawerVisible=true;}"
            >
            <el-table-column label="姓名" prop="employee_name" width="100" show-overflow-tooltip></el-table-column>
            <el-table-column label="审批状态" width="200" show-overflow-tooltip>
                <template #default="scope">
                                <el-tag :type="actStateEnum[scope.row.ticket_?.act_state]?.type">
                        {{ actStateEnum[scope.row.ticket_?.act_state]?.text }}
                    </el-tag>
            <el-tag type="info" effect="plain">{{ scope.row.ticket_?.state_.name }}</el-tag>

          </template>
            </el-table-column>`
            <el-table-column label="部门" prop="belong_dept_name" width="120" show-overflow-tooltip></el-table-column>`
            <el-table-column label="岗位" prop="post_name" width="120" show-overflow-tooltip></el-table-column>
            <el-table-column label="身份证号" prop="employee_id_number" width="200" show-overflow-tooltip></el-table-column>
            <el-table-column label="离职日期" prop="end_date" width="100" show-overflow-tooltip></el-table-column>
            <el-table-column label="原因" prop="reason" show-overflow-tooltip></el-table-column>
            </scTable>
        </el-main>
    </el-container>
    <el-drawer title="新供应商审核" v-model="drawerVisible" :size="'80%'" destroy-on-close>
        <supplieraudit_form :mode="mode" :t_id="t_id"></supplieraudit_form>
    </el-drawer>
</template>
<script setup>
import { ref } from 'vue'
import API from '@/api'
import supplieraudit_form from './supplieraudit_form.vue'
import { actStateEnum, interveneTypeEnum } from "@/utils/enum.js";
const query = ref({});
const drawerVisible = ref(false);
const mode = ref('add');
const t_id = ref(null);
const handleAdd = () => {
    mode.value = 'add';
    drawerVisible.value = true;
}
</script>