| | |
| | | prop="identity" |
| | | :check-rules="[{ message: '请输入身份证号', type: 'idCard' }]" |
| | | > |
| | | <ProFormText placeholder="请输入身份证号" v-model.trim="form.identity"></ProFormText> |
| | | <ProFormText |
| | | placeholder="请输入身份证号" |
| | | v-model.trim="form.identity" |
| | | @blur="handleCalculateAge" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | |
| | | </ProFormCol> |
| | | <ProFormItemV2 |
| | | label="身份证正面:" |
| | | prop="idFrontUrl" |
| | | prop="identityImg" |
| | | :check-rules="[{ message: '请上传身份证正面', type: 'upload' }]" |
| | | > |
| | | <ProFormImageUpload v-model:file-url="form.idFrontUrl" :limitFileSize="10" :showTip="false"> |
| | | <ProFormImageUpload |
| | | v-model:file-url="form.identityImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | | <ProFormItemV2 |
| | | label="身份证反面:" |
| | | prop="idBackUrl" |
| | | prop="identityBackImg" |
| | | :check-rules="[{ message: '请上传身份证反面', type: 'upload' }]" |
| | | > |
| | | <ProFormImageUpload v-model:file-url="form.idBackUrl" :limitFileSize="10" :showTip="false"> |
| | | <ProFormImageUpload |
| | | v-model:file-url="form.identityBackImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | | </ProForm> |
| | |
| | | ProFormUpload, |
| | | ProFormInputNumber, |
| | | } from '@bole-core/components'; |
| | | import { format } from '@/utils'; |
| | | import { calculateAge, deepClone, format } from '@/utils'; |
| | | import { EnumUserGender, EnumUserGenderTextForPerson } from '@/constants'; |
| | | import { BoleRegExp } from '@bole-core/core'; |
| | | |
| | | defineOptions({ |
| | | name: 'StaffInfoDialog', |
| | |
| | | contactPhoneNumber: string; |
| | | gender: EnumUserGender; |
| | | age: number; |
| | | idFrontUrl: UploadUserFile[]; |
| | | idBackUrl: UploadUserFile[]; |
| | | identityImg: UploadUserFile[]; |
| | | identityBackImg: UploadUserFile[]; |
| | | contractUrl: UploadUserFile[]; |
| | | regiterTime: string; |
| | | userRealTime: string; |
| | |
| | | visible, |
| | | (visible) => { |
| | | if (visible) { |
| | | defaultForm = { ...unref(form) }; |
| | | defaultForm = deepClone(unref(form)); |
| | | } |
| | | }, |
| | | { |
| | |
| | | function handleReset() { |
| | | form.value = { ...defaultForm }; |
| | | } |
| | | |
| | | function handleCalculateAge() { |
| | | form.value.age = calculateAge(form.value.identity); |
| | | } |
| | | </script> |