|
|
|
@ -16,7 +16,7 @@ import ProCard from '@ant-design/pro-card';
|
|
|
|
|
import { Button, Col, message, Row } from 'antd';
|
|
|
|
|
import { PageContainer } from '@ant-design/pro-layout';
|
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
|
import { queryExaminationRule,queryPersonInfo,savePersonSignUpInfo } from './service';
|
|
|
|
|
import { queryExaminationRule,queryPersonInfo,savePersonSignUpInfo,checkExaminationPersonID } from './service';
|
|
|
|
|
import cookie from 'react-cookies';
|
|
|
|
|
|
|
|
|
|
import styles from './index.less'
|
|
|
|
@ -85,12 +85,23 @@ export default () => {
|
|
|
|
|
description: false,
|
|
|
|
|
}}
|
|
|
|
|
onFinish={async (values) => {
|
|
|
|
|
// console.log('values',values);
|
|
|
|
|
// console.log(formRef.current?.getFieldsValue());
|
|
|
|
|
// await waitTime(2000);
|
|
|
|
|
setBaseInfo(values);
|
|
|
|
|
return true;
|
|
|
|
|
}}
|
|
|
|
|
try {
|
|
|
|
|
const info = await checkExaminationPersonID({
|
|
|
|
|
examination_id:params.examination_id,
|
|
|
|
|
id_code:values.idCard
|
|
|
|
|
});
|
|
|
|
|
setBaseInfo(values);
|
|
|
|
|
return true;
|
|
|
|
|
}catch (error) {
|
|
|
|
|
if(error.response){
|
|
|
|
|
message.error(error.response.info);
|
|
|
|
|
}else {
|
|
|
|
|
message.error('填写失败,请重新填写!');
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Row gutter={24}>
|
|
|
|
|
<Col lg={12} md={12} sm={24}>
|
|
|
|
@ -126,14 +137,13 @@ export default () => {
|
|
|
|
|
picker="month"
|
|
|
|
|
fieldProps={{
|
|
|
|
|
format: 'YYYY-MM',
|
|
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
|
|
rules={[{ required: true, message: '请选择出生年月' }]}
|
|
|
|
|
/>
|
|
|
|
|
<ProFormText name="idCard" label="身份证号" width="sm" rules={[{ required: true, message: '请输入身份证号' },{len:18,message:'请输入18位身份证号'},{pattern:/^[0-9]+$/,message:'只允许输入数字'}]}/>
|
|
|
|
|
<ProFormText name="idCard" label="身份证号" width="sm" rules={[{ required: true, message: '请输入身份证号' },{pattern:/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:'请输入正确身份证号'}]}/>
|
|
|
|
|
<ProFormText name="address" label="家庭地址" rules={[{ required: true, message: '请输入家庭地址' },{ whitespace: true },]}/>
|
|
|
|
|
<ProFormText name="contact" label="联系方式" width="lg" placeholder="联系方式" rules={[{ required: true, message: '请输入联系方式' },{ whitespace: true },{len:11,message:'请输入11位联系方式'},{pattern:/^[0-9]+$/,message:'只允许输入数字'}]} />
|
|
|
|
|
<ProFormText name="contact" label="联系方式" width="lg" placeholder="联系方式" rules={[{ required: true, message: '请输入联系方式' },{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,message:'请输入正确联系方式'}]} />
|
|
|
|
|
</Col>
|
|
|
|
|
<Col lg={12} md={12} sm={24}>
|
|
|
|
|
<ProFormText name="org" label="所在学校" width="md" placeholder="请填写" value={backInfo?.bureau_name} disabled />
|
|
|
|
@ -270,37 +280,37 @@ export default () => {
|
|
|
|
|
// console.log(formRef.current?.getFieldsValue());
|
|
|
|
|
// 跳转到指定路由
|
|
|
|
|
try {
|
|
|
|
|
const success = await savePersonSignUpInfo({
|
|
|
|
|
address:baseInfo?.address,
|
|
|
|
|
birthday:baseInfo?.birthday,
|
|
|
|
|
bureau_id:backInfo?.bureau_id,
|
|
|
|
|
bureau_name:backInfo?.bureau_name,
|
|
|
|
|
city_id:backInfo?.city_id,
|
|
|
|
|
city_name:backInfo?.city_name,
|
|
|
|
|
district_id:backInfo?.district_id,
|
|
|
|
|
district_name:backInfo?.district_name,
|
|
|
|
|
education:baseInfo?.qualifications,
|
|
|
|
|
examination_id:params.examination_id,
|
|
|
|
|
gender:baseInfo?.sex,
|
|
|
|
|
id_code:baseInfo?.idCard,
|
|
|
|
|
identity_id:backInfo?.identity_id,
|
|
|
|
|
major:baseInfo?.major,
|
|
|
|
|
person_id:backInfo?.person_id,
|
|
|
|
|
person_name:backInfo?.person_name,
|
|
|
|
|
province_id:backInfo?.province_id,
|
|
|
|
|
province_name:backInfo?.province_name,
|
|
|
|
|
subject:baseInfo?.subject,
|
|
|
|
|
tel:baseInfo?.contact,
|
|
|
|
|
university:baseInfo?.graduation,
|
|
|
|
|
const success = await savePersonSignUpInfo({
|
|
|
|
|
address:baseInfo?.address,
|
|
|
|
|
birthday:baseInfo?.birthday,
|
|
|
|
|
bureau_id:backInfo?.bureau_id,
|
|
|
|
|
bureau_name:backInfo?.bureau_name,
|
|
|
|
|
city_id:backInfo?.city_id,
|
|
|
|
|
city_name:backInfo?.city_name,
|
|
|
|
|
district_id:backInfo?.district_id,
|
|
|
|
|
district_name:backInfo?.district_name,
|
|
|
|
|
education:baseInfo?.qualifications,
|
|
|
|
|
examination_id:params.examination_id,
|
|
|
|
|
gender:baseInfo?.sex,
|
|
|
|
|
id_code:baseInfo?.idCard,
|
|
|
|
|
identity_id:backInfo?.identity_id,
|
|
|
|
|
major:baseInfo?.major,
|
|
|
|
|
person_id:backInfo?.person_id,
|
|
|
|
|
person_name:backInfo?.person_name,
|
|
|
|
|
province_id:backInfo?.province_id,
|
|
|
|
|
province_name:backInfo?.province_name,
|
|
|
|
|
subject:baseInfo?.subject,
|
|
|
|
|
tel:baseInfo?.contact,
|
|
|
|
|
university:baseInfo?.graduation,
|
|
|
|
|
});
|
|
|
|
|
const msg=testInfo.examination_start_time+','+testInfo.examination_end_time+','+testInfo.examination_name+','+success.admission_number;
|
|
|
|
|
history.push( '/registration/success/'+msg);
|
|
|
|
|
}catch (error) {
|
|
|
|
|
if(error.response){
|
|
|
|
|
message.error(error.response.info);
|
|
|
|
|
}else {
|
|
|
|
|
message.error('报名失败');
|
|
|
|
|
}
|
|
|
|
|
const msg=testInfo.examination_start_time+','+testInfo.examination_end_time+','+testInfo.examination_name+','+success.admission_number;
|
|
|
|
|
history.push( '/registration/success/'+msg);
|
|
|
|
|
}catch (error) {
|
|
|
|
|
if(error.response){
|
|
|
|
|
message.error(error.response.info);
|
|
|
|
|
}else {
|
|
|
|
|
message.error('报名失败');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|