<template>
    <div class="info-title f-s-16 c-333 f-w-7 mb-10">企业基本信息</div>
    <el-descriptions :column="4">
        <el-descriptions-item label="企业名称:">{{ form?.cpyName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="统一社会信用代码:">{{ form?.creditCode || '-' }}</el-descriptions-item>
        <el-descriptions-item label="会员级别:">{{ form?.vipLevelName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="法人姓名:">{{ form?.legalPersonName || '-' }}</el-descriptions-item>
        <el-descriptions-item label="法人职务:">{{ form?.legalPersonPosition || '-' }}</el-descriptions-item>
        <el-descriptions-item label="法人电话:">{{ form?.legalPersonPhone || '-' }}</el-descriptions-item>
        <el-descriptions-item label="注册类型:">{{ form?.regType || '-' }}</el-descriptions-item>
        <el-descriptions-item label="主管部门:">{{ form?.department || '-' }}</el-descriptions-item>
        <el-descriptions-item label="总资产:">{{ form?.totalAssets || '-' }}</el-descriptions-item>
        <el-descriptions-item label="单位负责人:">{{ form?.contact || '-' }}</el-descriptions-item>
        <el-descriptions-item label="单位负责人联系电话:">{{ form?.contactTel || '-' }}</el-descriptions-item>
        <el-descriptions-item label="邮箱">{{ form?.email || '-' }}</el-descriptions-item>
        <el-descriptions-item label="单位简介:" :span="2">{{ form?.introduction || '-' }}</el-descriptions-item>
        <el-descriptions-item label="入会主要目的:" :span="2">{{ form?.membershipPurpose || '-'
        }}</el-descriptions-item>
    </el-descriptions>
    <el-divider />
    <el-descriptions :column="3" direction="vertical">
        <el-descriptions-item label="营业执照:">
            <el-image class="bg-ccc" style="width: 100px; height: 100px" :src="form?.license" :zoom-rate="1.2"
                :max-scale="7" :min-scale="0.2" :preview-src-list="[form?.license]" fit="contain" />
        </el-descriptions-item>
        <el-descriptions-item label="法人身份证:">
            <el-image :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :preview-src-list="[form?.legalPersonIdFront]"
                class="mr-10 bg-ccc" style="width: 180px; height: 100px" :src="form?.legalPersonIdFront"
                fit="contain" />
            <el-image style="width: 180px; height: 100px" class="bg-ccc" :zoom-rate="1.2" :max-scale="7"
                :min-scale="0.2" :preview-src-list="[form?.legalPersonIdBack]" :src="form?.legalPersonIdBack"
                fit="contain" />
        </el-descriptions-item>
        <el-descriptions-item label="公司荣誉证书等资料:">
            <template v-for="(item, index) in form?.companyCertificate" :key="index">
                <el-image class="bg-ccc mr-10" :initial-index="index" :preview-src-list="form?.companyCertificate"
                    style="width: 100px; height: 100px" :src="item" fit="contain" />
            </template>
        </el-descriptions-item>
    </el-descriptions>
    <el-divider />
    <div class="info-title f-s-16 c-333 f-w-7 mb-10">药材种植信息</div>
    <vxe-table border :data="form?.plantingInfo" min-height="0" max-height="100%">
        <!-- 序号 -->
        <vxe-column title="序号" align="center" type="seq" width="60" />
        <vxe-column title="种植药材品种" align="center" field="variety" :formatter="colNoData" />
        <vxe-column title="种植地点" align="center" field="plantingPlace" :formatter="colNoData" />
        <vxe-column title="种植面积" align="center" field="plantingArea" :formatter="colNoData" />
    </vxe-table>
</template>

<script setup name="Check-detail" lang="ts">
import { getMember } from '@/api/dgtmedicine/member/index'
import { colNoData } from '@/utils/noData'
import { CheckPass, CheckNoPass } from '../model/index'
const router = useRouter()
const { query }: any = useRoute()
const form = ref<any>({})
const showPass = ref(false)
const showNoPass = ref(false)
// 获取详情
const getDetail = async () => {
    const { data } = await getMember(query?.memberId)
    form.value = data
}
onMounted(() => {
    getDetail()
})
</script>