| | |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 label="服务协议:" prop="contractUrl"> |
| | | <ProFormUpload |
| | | v-model:file-url="form.contractUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="jpg/jpeg,png,pdf" |
| | | ></ProFormUpload> |
| | | <ProFormItemV2 v-if="form.isDetail" label="报名时间:" prop="regiterTime"> |
| | | <div>{{ format(form.regiterTime, 'YYYY-MM-DD HH:mm') }}</div> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | |
| | | > |
| | | <ProFormText |
| | | placeholder="请输入身份证号" |
| | | v-model.trim="form.identity" |
| | | v-model.trim="_identity" |
| | | @blur="handleCalculateAge" |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="协议时间:" |
| | | prop="contractTime" |
| | | :check-rules="[{ message: '请选择协议时间', type: 'array' }]" |
| | | > |
| | | <ProFormDatePicker |
| | | v-model="form.contractTime" |
| | | type="daterange" |
| | | range-separator="至" |
| | | start-placeholder="起始日期" |
| | | end-placeholder="终止日期" |
| | | ></ProFormDatePicker> |
| | | <ProFormItemV2 v-if="form.isDetail" label="实名时间:" prop="userRealTime"> |
| | | <div>{{ format(form.userRealTime, 'YYYY-MM-DD HH:mm') }}</div> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | |
| | | ></ProFormText> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 v-if="form.isDetail" label="签约时间:" prop="userSignContractTime"> |
| | | <div>{{ format(form.userSignContractTime, 'YYYY-MM-DD HH:mm') }}</div> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="性别:" |
| | |
| | | ></ProFormRadio> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 v-if="form.isDetail" label="电子合同:" prop="contractUrl"> |
| | | <ProFormUpload |
| | | v-model:file-url="form.contractUrl" |
| | | :limit="1" |
| | | :limitFileSize="10" |
| | | accept="jpg/jpeg,png,pdf" |
| | | ></ProFormUpload> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | <ProFormColItem :span="12"> |
| | | <ProFormItemV2 |
| | | label="年龄:" |
| | |
| | | :min="0" |
| | | :max="9999" |
| | | placeholder="请输入年龄" |
| | | unit="岁" |
| | | /> |
| | | > |
| | | <template #readContent> |
| | | <span v-if="form.age">{{ form.age }}岁</span> |
| | | <span v-else></span> |
| | | </template> |
| | | </ProFormInputNumber> |
| | | </ProFormItemV2> |
| | | </ProFormColItem> |
| | | </ProFormCol> |
| | |
| | | v-model:file-url="form.identityImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | imgBlur |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | |
| | | v-model:file-url="form.identityBackImg" |
| | | :limitFileSize="10" |
| | | :showTip="false" |
| | | imgBlur |
| | | > |
| | | </ProFormImageUpload> |
| | | </ProFormItemV2> |
| | |
| | | <el-button v-if="form.isDetail" @click="emit('onCancel')">关闭</el-button> |
| | | <template v-else> |
| | | <el-button type="primary" @click="handleConfirm">提交</el-button> |
| | | <!-- <el-button @click="handleReset">重置</el-button> --> |
| | | <el-button @click="handleReset">重置</el-button> |
| | | <el-button @click="emit('onCancel')">取消</el-button> |
| | | </template> |
| | | </span> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormInstance, ModelValueType } from 'element-plus'; |
| | | import { FormInstance } from 'element-plus'; |
| | | import { |
| | | ProDialog, |
| | | ProForm, |
| | |
| | | ProFormRadio, |
| | | ProFormUpload, |
| | | ProFormInputNumber, |
| | | ProFormDatePicker, |
| | | } from '@bole-core/components'; |
| | | import { calculateAge, deepClone, format } from '@/utils'; |
| | | import { calculateAge, deepClone, format, hiddenIDNumberForEnd4 } from '@/utils'; |
| | | import { EnumUserGender, EnumUserGenderTextForPerson } from '@/constants'; |
| | | import { BoleRegExp } from '@bole-core/core'; |
| | | |
| | |
| | | userRealTime: string; |
| | | userSignContractTime: string; |
| | | isDetail: boolean; |
| | | |
| | | contractTime: ModelValueType; |
| | | }; |
| | | |
| | | const visible = defineModel({ type: Boolean }); |
| | |
| | | const form = defineModel<Form>('form'); |
| | | let defaultForm: Form = null; |
| | | |
| | | const _identity = computed({ |
| | | get: () => |
| | | form.value.isDetail ? hiddenIDNumberForEnd4(form.value.identity) : form.value.identity, |
| | | set(val) { |
| | | form.value.identity = val; |
| | | }, |
| | | }); |
| | | |
| | | watch( |
| | | visible, |
| | | (visible) => { |