调整统计研判-员工统计-员工信息、入驻员工-详情页面样式
This commit is contained in:
parent
467ccd805d
commit
65c1e66f45
|
|
@ -1,219 +1,236 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<JFormContainer :disabled="true">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="NuEmployeesAdvisoryInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-row class="card-class">
|
||||
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="NuEmployeesAdvisoryInfoForm-cardZmPath"
|
||||
name="cardZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardZmPath" disabled></j-image-upload>
|
||||
<a-form-item label="姓名" v-bind="validateInfos.name" id="NuEmployeesAdvisoryInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.name }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="NuEmployeesAdvisoryInfoForm-cardFmPath"
|
||||
name="cardFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardFmPath" disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="咨询人姓名" v-bind="validateInfos.name" id="NuEmployeesAdvisoryInfoForm-name" name="name">
|
||||
<!-- <a-input v-model:value="formData.name" placeholder="请输入咨询人姓名" allow-clear disabled ></a-input> -->
|
||||
{{ formData.name }}
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="NuEmployeesAdvisoryInfoForm-tel" name="tel">
|
||||
<a-input v-model:value="formData.tel" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.tel }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="NuEmployeesAdvisoryInfoForm-sex" name="sex">
|
||||
<!-- <a-input v-model:value="formData.sex" placeholder="请输入性别" allow-clear disabled ></a-input> -->
|
||||
{{ formData.sex }}
|
||||
<a-input v-model:value="formData.sex" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.sex }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="NuEmployeesAdvisoryInfoForm-national"
|
||||
name="national">
|
||||
<!-- <a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear disabled ></a-input> -->
|
||||
{{ formData.national }}
|
||||
<a-form-item label="年龄" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
|
||||
<a-input v-model:value="ageVal" placeholder="请输入年龄" disabled allow-clear></a-input>
|
||||
<!-- <span> {{ handleComputedAge(formData.dateOfBirth) }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.birthDate" id="NuEmployeesAdvisoryInfoForm-birthDate"
|
||||
name="birthDate">
|
||||
<!-- <a-date-picker placeholder="请选择出生日期" v-model:value="formData.birthDate" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{ formData.birthDate }}
|
||||
<a-input v-model:value="formData.birthDate" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.birthDate }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="住址" v-bind="validateInfos.idCardAddress"
|
||||
id="NuEmployeesAdvisoryInfoForm-idCardAddress" name="idCardAddress">
|
||||
<!-- <a-input v-model:value="formData.idCardAddress" placeholder="请输入住址" allow-clear disabled ></a-input> -->
|
||||
{{ formData.idCardAddress }}
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="NuEmployeesAdvisoryInfoForm-national"
|
||||
name="national">
|
||||
<a-input v-model:value="formData.national" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.national }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="NuEmployeesAdvisoryInfoForm-idCard"
|
||||
name="idCard">
|
||||
<!-- <a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear disabled ></a-input> -->
|
||||
{{ formData.idCard }}
|
||||
<a-input v-model:value="formData.idCard" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.idCard }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="签发机关" v-bind="validateInfos.issuingAuthority"
|
||||
id="NuEmployeesAdvisoryInfoForm-issuingAuthority" name="issuingAuthority">
|
||||
<!-- <a-input v-model:value="formData.issuingAuthority" placeholder="请输入签发机关" allow-clear disabled ></a-input> -->
|
||||
{{ formData.issuingAuthority }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效开始日期" v-bind="validateInfos.startTime" id="NuEmployeesAdvisoryInfoForm-startTime"
|
||||
name="startTime">
|
||||
<!-- <a-date-picker placeholder="请选择有效开始日期" v-model:value="formData.startTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{ formData.startTime }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效结束日期" v-bind="validateInfos.endTime" id="NuEmployeesAdvisoryInfoForm-endTime"
|
||||
name="endTime">
|
||||
<!-- <a-date-picker placeholder="请选择有效结束日期" v-model:value="formData.endTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear /> -->
|
||||
{{ formData.endTime == '9999-12-31' ? '长期' : formData.endTime }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="NuEmployeesAdvisoryInfoForm-tel" name="tel">
|
||||
<!-- <a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear disabled ></a-input> -->
|
||||
{{ formData.tel }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'其他信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="婚否" v-bind="validateInfos.maritalStatus"
|
||||
id="NuEmployeesAdvisoryInfoForm-maritalStatus" name="maritalStatus">
|
||||
<!-- <a-input v-model:value="formData.maritalStatus" placeholder="请输入婚否" allow-clear disabled ></a-input> -->
|
||||
{{ formData.maritalStatus }}
|
||||
<a-input v-model:value="formData.maritalStatus" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.maritalStatus }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="NuEmployeesAdvisoryInfoForm-height"
|
||||
<a-form-item label="身高(cm)" v-bind="validateInfos.height" id="NuEmployeesAdvisoryInfoForm-height"
|
||||
name="height">
|
||||
<!-- <a-input v-model:value="formData.height" placeholder="请输入身高" allow-clear disabled ></a-input> -->
|
||||
{{ formData.height }}
|
||||
<a-input v-model:value="formData.height" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.height }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="NuEmployeesAdvisoryInfoForm-weight"
|
||||
<a-form-item label="体重(cm)" v-bind="validateInfos.weight" id="NuEmployeesAdvisoryInfoForm-weight"
|
||||
name="weight">
|
||||
<!-- <a-input v-model:value="formData.weight" placeholder="请输入体重" allow-clear disabled ></a-input> -->
|
||||
{{ formData.weight }}
|
||||
<a-input v-model:value="formData.weight" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.weight }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus"
|
||||
id="NuEmployeesAdvisoryInfoForm-healthStatus" name="healthStatus">
|
||||
<!-- <a-input v-model:value="formData.healthStatus" placeholder="请输入健康状况" allow-clear disabled ></a-input> -->
|
||||
{{ formData.healthStatus }}
|
||||
<a-input v-model:value="formData.healthStatus" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.healthStatus }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance"
|
||||
id="NuEmployeesAdvisoryInfoForm-politicalAppearance" name="politicalAppearance">
|
||||
<!-- <a-input v-model:value="formData.politicalAppearance" placeholder="请输入政治面貌" allow-clear disabled ></a-input> -->
|
||||
{{ formData.politicalAppearance }}
|
||||
<a-input v-model:value="formData.politicalAppearance" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.politicalAppearance }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouType" id="NuEmployeesAdvisoryInfoForm-hukouType"
|
||||
name="hukouType">
|
||||
<!-- <a-input v-model:value="formData.hukouType" placeholder="请输入户口性质" allow-clear disabled ></a-input> -->
|
||||
{{ formData.hukouType }}
|
||||
<a-form-item label="户籍所在地" v-bind="validateInfos.idCardAddress"
|
||||
id="NuEmployeesAdvisoryInfoForm-idCardAddress" name="idCardAddress">
|
||||
<a-input v-model:value="formData.idCardAddress" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.idCardAddress }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'联系人信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人姓名" v-bind="validateInfos.contactName"
|
||||
id="NuEmployeesAdvisoryInfoForm-contactName" name="contactName">
|
||||
<!-- <a-input v-model:value="formData.contactName" placeholder="请输入紧急联系人姓名" allow-clear disabled ></a-input> -->
|
||||
{{ formData.contactName }}
|
||||
<a-form-item label="紧急联系人" v-bind="validateInfos.contactName" id="NuEmployeesAdvisoryInfoForm-contactName"
|
||||
name="contactName">
|
||||
<a-input v-model:value="formData.contactName" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.contactName }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人电话" v-bind="validateInfos.contactTel" id="NuEmployeesAdvisoryInfoForm-contactTel"
|
||||
name="contactTel">
|
||||
<!-- <a-input v-model:value="formData.contactTel" placeholder="请输入紧急联系人电话" allow-clear disabled ></a-input> -->
|
||||
{{ formData.contactTel }}
|
||||
<a-input v-model:value="formData.contactTel" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.contactTel }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="与本人关系" v-bind="validateInfos.contactRelationship"
|
||||
id="NuEmployeesAdvisoryInfoForm-contactRelationship" name="contactRelationship">
|
||||
<!-- <a-input v-model:value="formData.contactRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear disabled ></a-input> -->
|
||||
{{ formData.contactRelationship }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'银行卡信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡正面" v-bind="validateInfos.bankZmPath" id="NuEmployeesAdvisoryInfoForm-bankZmPath"
|
||||
name="bankZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankZmPath" disabled></j-image-upload>
|
||||
<a-input v-model:value="formData.contactRelationship" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.contactRelationship }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡反面" v-bind="validateInfos.bankFmPath" id="NuEmployeesAdvisoryInfoForm-bankFmPath"
|
||||
name="bankFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankFmPath" disabled></j-image-upload>
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouType" id="NuEmployeesAdvisoryInfoForm-hukouType"
|
||||
name="hukouType">
|
||||
<a-input v-model:value="formData.hukouType" disabled allow-clear></a-input>
|
||||
<!-- {{ formData.hukouType }} -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开户行" v-bind="validateInfos.openingBank" id="NuEmployeesAdvisoryInfoForm-openingBank"
|
||||
name="openingBank">
|
||||
<!-- <a-input v-model:value="formData.openingBank" placeholder="请输入开户行" allow-clear disabled ></a-input> -->
|
||||
{{ formData.openingBank }}
|
||||
<a-form-item label="现住址" v-bind="validateInfos.currentAddress" id="EmployeesApplyForm-currentAddress"
|
||||
name="currentAddress">
|
||||
<a-input v-model:value="formData.currentAddress" placeholder="请输入现住址" disabled allow-clear></a-input>
|
||||
<!-- <span>{{ formData.currentAddress }}</span> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡号" v-bind="validateInfos.bankCard" id="NuEmployeesAdvisoryInfoForm-bankCard"
|
||||
name="bankCard">
|
||||
<!-- <a-input v-model:value="formData.bankCard" placeholder="请输入银行卡号" allow-clear disabled ></a-input> -->
|
||||
{{ formData.bankCard }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
<JFormContainer>
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
|
||||
name="EmployeesApplyForm">
|
||||
<a-row class="card-class">
|
||||
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
|
||||
<SectionDivider :title="'证件信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthZmPath"
|
||||
id="NuEmployeesAdvisoryInfoForm-healthZmPath" name="healthZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthZmPath" disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">
|
||||
<a-form-item label="健康证反面" v-bind="validateInfos.healthFmPath"
|
||||
id="NuEmployeesAdvisoryInfoForm-healthFmPath" name="healthFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthFmPath" disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资质证" v-bind="validateInfos.qualificationPath"
|
||||
id="NuEmployeesAdvisoryInfoForm-qualificationPath" name="qualificationPath">
|
||||
<j-image-upload :fileMax="0" text="无" v-model:value="formData.qualificationPath"
|
||||
disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="无犯罪正面" v-bind="validateInfos.noCrimeCertificate"
|
||||
id="NuEmployeesAdvisoryInfoForm-noCrimeCertificate" name="noCrimeCertificate">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.noCrimeCertificate"
|
||||
disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
<a-col :span="23" :push="1">
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane key="1" tab="身份证">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证正面" v-bind="validateInfos.idCardPositive"
|
||||
id="BizEmployeesInfoForm-idCardPositive" name="idCardPositive">
|
||||
<j-image-upload v-if="!!formData.cardZmPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.cardZmPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证反面" v-bind="validateInfos.idCardNegative"
|
||||
id="BizEmployeesInfoForm-idCardNegative" name="idCardNegative">
|
||||
<j-image-upload v-if="!!formData.cardFmPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.cardFmPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="健康证">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthCertificatePositive"
|
||||
id="BizEmployeesInfoForm-healthCertificatePositive" name="healthCertificatePositive">
|
||||
<j-image-upload v-if="!!formData.healthZmPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.healthZmPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- <a-col :span="12">
|
||||
<a-form-item label="健康证反面" v-bind="validateInfos.healthCertificateNegative"
|
||||
id="BizEmployeesInfoForm-healthCertificateNegative"
|
||||
name="healthCertificateNegative">
|
||||
<j-image-upload :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.healthCertificateNegative"
|
||||
disabled></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
</a-row>
|
||||
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="4" tab="银行卡">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡正面" v-bind="validateInfos.bankPositive"
|
||||
id="BizEmployeesInfoForm-bankPositive" name="bankPositive">
|
||||
<j-image-upload v-if="!!formData.bankZmPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.bankZmPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡反面" v-bind="validateInfos.bankNegative"
|
||||
id="BizEmployeesInfoForm-bankNegative" name="bankNegative">
|
||||
<j-image-upload v-if="!!formData.bankFmPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.bankFmPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="5" tab="资质证件">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="资质证" v-bind="validateInfos.qualification"
|
||||
id="BizEmployeesInfoForm-qualification" name="qualification" :labelCol="labelCol3">
|
||||
<j-image-upload v-if="!!formData.qualificationPath" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.qualificationPath" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="6" tab="无犯罪证明">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="无犯罪证明" v-bind="validateInfos.noCrimeCertificate"
|
||||
id="BizEmployeesInfoForm-noCrimeCertificate" name="noCrimeCertificate" :labelCol="labelCol3">
|
||||
<j-image-upload v-if="!!formData.noCrimeCertificate" :fileMax="1" :bizPath="`employeesZzxx`"
|
||||
v-model:value="formData.noCrimeCertificate" disabled></j-image-upload>
|
||||
<span v-else>未上传</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
|
|
@ -240,6 +257,7 @@ const props = defineProps({
|
|||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const ageVal = ref()
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
tel: '',
|
||||
|
|
@ -271,10 +289,14 @@ const formData = reactive<Record<string, any>>({
|
|||
healthFmPath: '',
|
||||
qualificationPath: '',
|
||||
noCrimeCertificate: '',
|
||||
currentAddress: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 12 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 4 } });
|
||||
const wrapperCol2 = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const labelCol3 = ref<any>({ xs: { span: 24 }, sm: { span: 2 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
|
|
@ -305,6 +327,7 @@ function add() {
|
|||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
ageVal.value = handleComputedAge(record.birthDate)
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
|
|
@ -318,6 +341,33 @@ function edit(record) {
|
|||
});
|
||||
}
|
||||
|
||||
function handleComputedAge(ageText) {
|
||||
// 检查输入是否有效
|
||||
if (!ageText || typeof ageText !== 'string') {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
// 解析日期字符串
|
||||
const birthDate = new Date(ageText);
|
||||
|
||||
// 检查日期是否合法(例如防止 '2025-99-99' 这类无效日期)
|
||||
if (isNaN(birthDate.getTime())) {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
const today = new Date();
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
||||
const dayDiff = today.getDate() - birthDate.getDate();
|
||||
|
||||
// 如果还没到生日,则年龄减1
|
||||
if (monthDiff < 0 || (monthDiff === 0 && dayDiff < 0)) {
|
||||
age--;
|
||||
}
|
||||
|
||||
return age >= 0 ? age : 0; // 防止返回负数
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
|
|
@ -375,7 +425,18 @@ defineExpose({
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
.antd-modal-form {}
|
||||
|
||||
.card-class {
|
||||
padding-top: 24px;
|
||||
padding-bottom: 24px;
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
// background-color: rgba(255, 255, 255, 0.9);
|
||||
background-color: #fcfdff;
|
||||
border-radius: 10px;
|
||||
// box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;
|
||||
margin-bottom: 14px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
|
||||
<a-drawer :title="title" :width="`70vw`" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<NuEmployeesAdvisoryInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuEmployeesAdvisoryInfoForm>
|
||||
<a-drawer :title="title" :width="`70vw`" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<NuEmployeesAdvisoryInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
|
||||
</NuEmployeesAdvisoryInfoForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
|
|
@ -11,73 +11,73 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuEmployeesAdvisoryInfoForm from './NuEmployeesAdvisoryInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70vw');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuEmployeesAdvisoryInfoForm from './NuEmployeesAdvisoryInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70vw');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue