/* * *@params personApplyId *@params onClose */ import React, { Component } from 'react'; import { connect } from 'dva'; import axios from 'axios'; import moment from 'moment'; import { Button, Drawer, Form, Input, Row, Col, Select, notification } from 'antd'; import PSelect from '../../../../components/Pro/PSelect'; import { qualify_applyInfo } from '../../../../services/bkt/qualify'; import { // enterpriseComContractGetComContractById, systemPerCerBaseInfoFind, publicCommonFileFilePreview } from '../../../../services/api'; import PFromUpload from '../../../../components/Pro/PFromUpload'; // import InternshipRecord from './InternshipRecord'; const { TextArea } = Input; const { Option } = Select; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 7 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 20 }, md: { span: 16 } } }; const formItemLayout1 = { labelCol: { span: 24 }, wrapperCol: { span: 24 } }; @connect(state => ({ companyInfo: state.global.companyInfo })) @Form.create() export default class SubDrawer extends Component { constructor(props) { super(props); this.state = { comName: this.props.companyInfo.comName, info: null, //申报详情 // contracInfo: {}, //合同详情 certInfo: {}, //证书详情 imgs: [], //图片材料 hospitalExamProveUrlRows: [], //体检证明材料 recordShow: false, //实习记录的显示 }; } componentWillMount() { // this.__getDistrict(); } componentDidMount() { console.log(this.state.isNanNiCode); } componentWillReceiveProps(nextProps) { if (!!nextProps.personApplyId) { this.__getDetailInfo(nextProps.personApplyId); } } __getDetailInfo = (personApplyId) => { qualify_applyInfo({ data: { personApplyId } }).then(res => { this.setState({ info: res.data }); if (res.data) { const { comContractId, perCerId, personType } = res.data; // 获取证书信息 // if (!!perCerId) { // systemPerCerBaseInfoFind({ perCerId }).then(certRes => { // if (certRes.data) { // this.setState({ // certInfo: certRes.data // }); // } // }); // } const imgArr = [ { label: '一寸免冠白底彩照', fieldsName: 'avatar', rules: [{ required: true, message: `一寸免冠彩照` }], faceCheckType:res.data.faceCheckType }, { label: '身份证人像面', fieldsName: 'idCardNoFrontUrl', rules: [{ required: true, message: `身份证人像面` }] }, { label: '身份证国徽面', fieldsName: 'idCardNoBackUrl', rules: [{ required: true, message: `身份证国徽面` }] }, // { // label: '初中以上学历证明原件', // fieldsName: 'educationUrl', // rules: [{ // required: true, // message: `初中以上学历证明原件` // }] // }, // { // label: '医院出具的体检证明', // fieldsName: 'hospitalExamProveUrl', // rules: [{ // required: true, // message: `医院出具的体检证明` // }] // }, ]; if(this.props.checkAreaCodeValue){ imgArr.push({ label: '初中以上学历证明原件', fieldsName: 'educationUrl', rules: [{ required: true, message: `初中以上学历证明原件` }] }, { label: '医院出具的体检证明', fieldsName: 'hospitalExamProveUrl', rules: [{ required: true, message: `医院出具的体检证明` }] }, )} const rows = []; const length = Math.ceil(imgArr.length / 3); for (let i = 0; i < length; i++) { rows.push([ imgArr[i * 3], imgArr[i * 3 + 1], imgArr[i * 3 + 2] //有可能是undefined ]); } const hospitalExamProveUrlRows = []; if(typeof res.data.medicalUrl == 'string') { const hospitalExamProveUrls = res.data.medicalUrl.split(',').map((url, index) => { log(url); const fieldsName = 'medicalUrl' + index; this.setState({ info: { ...this.state.info, [fieldsName]: url } }); return { label: '', fieldsName, rules: [{ required: false, message: `医院出具的体检证明` }] } }); const hospitalExamProveUrlLength = Math.ceil(hospitalExamProveUrls.length / 3); for (let i = 0; i < hospitalExamProveUrlLength; i++) { hospitalExamProveUrlRows.push([ hospitalExamProveUrls[i * 3], hospitalExamProveUrls[i * 3 + 1], hospitalExamProveUrls[i * 3 + 2] //有可能是undefined ]); } } this.setState({ imgs: rows, hospitalExamProveUrlRows }); } }); } render() { const { getFieldDecorator } = this.props.form; const { info, certInfo } = this.state; const { checkAreaCodeValue ,isNanNiCode } = this.props return ( {info &&
{ info.materialApproveStatus == '2' &&

材料核对不通过原因: {info.materialApproveFailReason}

} { info.approveStatus == '2' &&

审核不通过原因: {info.approveFailReason}

}
} {/* form表单 */} { info &&
{/* {getFieldDecorator('materialApproveStatus', { initialValue: info.materialApproveStatus })()} */} {getFieldDecorator('backgroundStatus', { initialValue: info.backgroundStatus || '0' })()} {getFieldDecorator('applyStatus', { initialValue: info.applyStatus || '0' })()} {getFieldDecorator('orderStatus', { initialValue: info.orderStatus })()} { info.examName && <>

考试信息

{getFieldDecorator('examName', { initialValue: info.examName })()} {getFieldDecorator('examDate', { initialValue: info.examDate })()} {getFieldDecorator('examAddress', { initialValue: info.examAddress })()} {getFieldDecorator('testStateName', { initialValue: info.testStateName })()} }

报名基础信息

{getFieldDecorator('fullName', { initialValue: info.fullname })()} {getFieldDecorator('mobile', { initialValue: info.mobile })()} { !checkAreaCodeValue && {getFieldDecorator('faceCheckType', { initialValue: info.faceCheckType })( info.faceCheckType=='0'?
无(请核对图片材料中的一寸白底照片)
:
有(该人员有人口库照片,无需再核对照片)
)}
} {getFieldDecorator('identitynumber', { initialValue: info.identitynumber })()} {getFieldDecorator('birthDate', { initialValue: info.birthDate })()} {getFieldDecorator('sex', { initialValue: info.sex })()} {getFieldDecorator('height', { initialValue: info.height })()} {/* {getFieldDecorator('officeArea', { initialValue: info.officeArea })()} */} {getFieldDecorator('education', { initialValue: info.education })()} {getFieldDecorator('nation', { initialValue: info.nation })()} { !checkAreaCodeValue&& {getFieldDecorator('residentType', { initialValue: info.residentType })()} } {/* {getFieldDecorator('residentPlaceType', { initialValue: info.residentPlaceType })()} */} { !!checkAreaCodeValue && {getFieldDecorator('householdAddress', { initialValue: info.householdAddress })(