import React, { Component } from 'react'; import { connect } from 'dva'; import { Button, Drawer, Form, Input, Tooltip, Cascader } from 'antd'; import PSelect from '../../../../components/Pro/PSelect'; import { getBayzgzSbInfoById, getDistrictData, enterpriseComContractGetComContractById, publicCommonFileFilePreview } from '../../../../services/api'; import PFromUpload from '../../../../components/Pro/PFromUpload'; const formItemLayout = { labelCol: { xs: { span: 24 }, sm: { span: 7 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 20 }, md: { span: 16 } } }; @connect(state => ({ companyInfo: state.global.companyInfo })) @Form.create() export default class NotSubmitted extends Component { constructor(props) { super(props); this.state = { comName: this.props.companyInfo.comName, openEdit: this.props.visible, bayzgzSbId: null, perInfo: [], //人员信息 areas: [], //省市区, key: Math.random() }; } componentWillMount() { // this.__getDistrict(); } componentDidMount() { } componentWillReceiveProps(nextProps) { this.setState({ openEdit: nextProps.visible, bayzgzSbId: nextProps.value }); // if (this.state.openEdit !== nextProps.visible && this.state.bayzgzSbId !== nextProps.value && nextProps.visible) { if (this.state.openEdit !== nextProps.visible && nextProps.visible) { //处理事件 this._getBayzgzSbInfoById(nextProps.value); } } _getBayzgzSbInfoById(bayzgzSbId) { getBayzgzSbInfoById({ bayzgzSbId }).then(res => { if (res.retType === '0') { this.setState( { perInfo: res.data, key: Math.random() }, () => { } ); } const { comContractId } = res.data; if (!!comContractId) { enterpriseComContractGetComContractById({ comContractId }).then(result => { if (result.data) { if (typeof result.data.effectStartDate == 'string') { result.data.effectStartDate = result.data.effectStartDate.split(' ')[0]; } else { result.data.effectStartDate = ''; } if (typeof result.data.effectEndDate == 'string') { result.data.effectEndDate = result.data.effectEndDate.split(' ')[0]; } else { result.data.effectEndDate = ''; } this.setState({ contracInfo: result.data }); } }); } }); } render() { const { getFieldDecorator } = this.props.form; const { contracInfo } = this.state; return ( {/* form表单 */}
{getFieldDecorator('backgroundScreenStatus', { initialValue: this.state.perInfo.backgroundScreenStatus === '001' ? '未筛查' : this.state.perInfo.backgroundScreenStatus === '003' ? '筛查通过' : this.state.perInfo.backgroundScreenStatus === '004' ? '筛查不通过' : '未审查' })()} {getFieldDecorator('approvalStatus', { initialValue: this.state.perInfo.approvalStatus === '001' ? '未提交' : this.state.perInfo.approvalStatus === '002' ? '待审批' : this.state.perInfo.approvalStatus === '003' ? '审批通过' : this.state.perInfo.approvalStatus === '004' ? '审批不通过' : this.state.perInfo.approvalStatus === '005' ? '审批中' : this.state.perInfo.approvalStatus })()}
{getFieldDecorator('approvalreason', { initialValue: this.state.perInfo.approvalreason ? this.state.perInfo.approvalreason : '-' })()}
{getFieldDecorator('payStatus', { initialValue: this.state.perInfo.payStatus === '0' ? '未缴费' : this.state.perInfo.payStatus === '1' ? '已缴费' : '未缴费' })()} {getFieldDecorator('isArrangeExam', { initialValue: this.state.perInfo.isArrangeExam === '0' ? '未安排' : this.state.perInfo.isArrangeExam === '1' ? '已安排' : '未安排' })()} {getFieldDecorator('examResult', { initialValue: this.state.perInfo.examResult === '0' ? '考试不通过' : this.state.perInfo.examResult === '1' ? '考试通过' : '未考试' })()} {getFieldDecorator('writtenScore', { initialValue: this.state.perInfo.writtenScore ? this.state.perInfo.writtenScore : '-' })()} {getFieldDecorator('operateScore', { initialValue: this.state.perInfo.operateScore ? this.state.perInfo.operateScore : '-' })()}

报名基础信息

{getFieldDecorator('comName', { initialValue: this.state.comName })()} {getFieldDecorator('name', { initialValue: this.state.perInfo.name })()} {getFieldDecorator('mobilePhone', { initialValue: this.state.perInfo.mobilePhone })()} {getFieldDecorator('idCardNo', { initialValue: this.state.perInfo.idCardNo })()} {getFieldDecorator('birthday', { initialValue: this.state.perInfo.birthday })()} {getFieldDecorator('sex', { initialValue: this.state.perInfo.sex === '1' ? '男' : '女' })()} {getFieldDecorator('height', { initialValue: this.state.perInfo.height })()} {getFieldDecorator('nation', { initialValue: this.state.perInfo.nation })()} {getFieldDecorator('education', { initialValue: this.state.perInfo.education })( // )} {getFieldDecorator('residenceFullAddress', { initialValue: this.state.perInfo.residenceFullAddress })( {this.state.perInfo.residenceFullAddress}}> )} {getFieldDecorator('domicileFullAddress', { initialValue: this.state.perInfo.domicileFullAddress })( // {this.state.perInfo.domicileFullAddress}}> )} {/* {getFieldDecorator('contractName', { // initialValue: this.state.perInfo.contractName, })( )} */}
{this.state.perInfo.bayFamilyMemberDtoList && this.state.perInfo.bayFamilyMemberDtoList.map((item, index) => { const current = index + 1; return (
{getFieldDecorator('name', { initialValue: item.name })( )} {getFieldDecorator('relation', { initialValue: item.relation })( )} {getFieldDecorator('idCardNo', { initialValue: item.idCardNo })( )} {getFieldDecorator('contactPhone', { initialValue: item.contactPhone })( )}
); })}
{this.state.perInfo.bayWorkExperienceDtoList && this.state.perInfo.bayWorkExperienceDtoList.map((item, index) => { const current = index + 1; return (
{getFieldDecorator('comName', { initialValue: item.comName })( {item.comName}}> )} {getFieldDecorator('position', { initialValue: item.position })( {item.position}}> )} {getFieldDecorator('workContent', { initialValue: item.workContent })( {item.workContent}}> )} {getFieldDecorator('entryDate', { initialValue: item.entryDate })( )} {getFieldDecorator('leaveDate', { initialValue: item.leaveDate })( )} {getFieldDecorator('leaveReason', { initialValue: item.leaveReason })( {item.leaveReason}}> )}
); })}
{ contracInfo && <>

合同信息

{getFieldDecorator('contractName', { initialValue: contracInfo.contractName })()} {getFieldDecorator('effectStartDate', { initialValue: `${contracInfo.effectStartDate}~${contracInfo.effectEndDate}` })()} { if (contracInfo.contractUrl) { publicCommonFileFilePreview({ url: contracInfo.contractUrl, isLoad: '1' }) .then(data => { if (data.data) { window.open(data.data); } }); } else { notification.warning({ message: '该合同未上传附件!', description: '请先上传合同文件,方可查看。' }); } }} > 点击查看 点击下载 {/* {getFieldDecorator('contractUrl' , { initialValue: info.contractUrl })( )} */} }

图像信息

{getFieldDecorator('colourPhotoUrl', { initialValue: this.state.perInfo.colourPhotoUrl })( )} {getFieldDecorator('idCardFrontUrl', { initialValue: this.state.perInfo.idCardFrontUrl })( )} {getFieldDecorator('idCardReverseUrl', { initialValue: this.state.perInfo.idCardReverseUrl })( )} {getFieldDecorator('eduCerUrl', { initialValue: this.state.perInfo.eduCerUrl })( )}
县级以上医院出具的
体检证明 } > {getFieldDecorator('hospitalExamProveUrl', { initialValue: this.state.perInfo.hospitalExamProveUrl })()}
{/* 底部提交按钮 */}
); } }