<template>
    <div>
        <el-descriptions :column="2" border>
            <el-descriptions-item label="创建者">{{ form.nickName }}</el-descriptions-item>
            <el-descriptions-item label="创建时间">{{ parseTime(form.createTime) }}</el-descriptions-item>
            <!-- <el-descriptions-item label="申领编号" :span="2">{{ form.sparePartApplyId }}</el-descriptions-item> -->
            <el-descriptions-item label="申领状态" :span="2">
                <div class="flex">
                    <dict-tag :options="com_apply_state" :value="form.sparePartApplyState" />
                    <!-- <el-link type="primary" class="margin-left">查看审批流程进度</el-link> -->
                </div>
            </el-descriptions-item>
            <el-descriptions-item label="申领说明" :span="2">{{ form.sparePartApplyExplain }}</el-descriptions-item>
        </el-descriptions>
        <el-divider content-position="center">
            备件列表
        </el-divider>
        <Index :list="form.sparePartApplyDetailsList" :editable="false" />
    </div>
</template>

<script setup>
import Index from "@/components/SparePartApplyDetails/index";
const { proxy } = getCurrentInstance();
const { com_apply_state } = proxy.useDict('com_apply_state');
const props = defineProps({
    form: {
        type: [Object],
        default: null,
    },
});
const { form } = toRefs(props);
</script>