//建卡登记(完整版)
import React from 'react';
import { Form, Row, Col, Input, Select, DatePicker, Button, Modal, message, Tooltip, Icon, Spin } from 'antd';
import moment from 'moment';
import FindPatients from './FindPatients';
import PatientInformation from './PatientInformation';
import { $http } from '../../containers/config/https';
import { Util } from 'tools/index';
import './css/error.less';

const FormItem = Form.Item;
const Option = Select.Option;
const warning = Modal.warning;
const userData = sessionStorage.userData ? JSON.parse(sessionStorage.userData) : {}
const style = {
    padding: "0 6px"
}
const adressStyle = {
    width: '13.2%',
    padding: '0',
    marginRight: '14px'
}

const provinceStyle = {
    width: '13.2%',
    padding: '0',
    marginRight: '14px'
}
const nowAdStyle = {
    width: '10.2%',
    padding: '0',
    marginRight: '14px'
}
const formItemLayouNowAdress = {
    labelCol: { span: 10 },
    wrapperCol: { span: 14 },
}
const formItemMoney = {
    labelCol: { span: 11 },
    wrapperCol: { span: 11 },
}
const formItemLayouAdress = {
    labelCol: { span: 8 },
    wrapperCol: { span: 16 },
}
const formItemMoreAdress = {
    labelCol: { span: 10 },
    wrapperCol: { span: 23 },
}
const formItemThreeAdress = {
    labelCol: { span: 10 },
    wrapperCol: { span: 24 },
}
const formItemLayoutBind = {
    labelCol: { span: 3 },
    wrapperCol: { span: 25 },
}
const formItemLayoutSexy = {
    labelCol: { span: 10 },
    wrapperCol: { span: 14 },
}
const formItemLayoutBirth = {
    labelCol: { span: 7 },
    wrapperCol: { span: 17 },
}
const formItemLayout = { // label 和input宽度
    labelCol: { span: 8 },
    wrapperCol: { span: 14 },
}
const formItemNew = {
    labelCol: { span: 2 },
    wrapperCol: { span: 16 },
}
const formItemNewButton = {
    labelCol: { span: 2 },
    wrapperCol: { span: 22 },
}
const formItemLayoutAge = {
    labelCol: { span: 7 },
    wrapperCol: { span: 15 },
}

let timer = undefined;
const confirm = Modal.confirm;
const registerPro = Form.create()(
    class registerPro extends React.Component {
        constructor(props) {
            super(props)
            this.state = {

                birthCity: [],//出生地市区信息
                birthAreas: [],//出生地县信息
                birthVillages: [],//出生地乡信息
                birthHamlets: [],//出生地村落信息

                nativeCity: [],//籍贯市区信息
                nativeAreas: [],//籍贯县信息
                nativeVillages: [],//籍贯乡信息
                nativeHamlets: [],//籍贯村落信息

                presentCity: [],//现住址市区信息
                presentAreas: [],//现住址县信息
                presentVillages: [],//现住址乡信息
                presentHamlets: [],//现住址村落信息

                registerCity: [],//户口地址市区信息
                registerAreas: [],//户口地址县信息
                registerVillages: [],//户口地址乡信息
                registerHamlets: [],//户口地址村落信息

                companyCity: [],//单位市区信息
                companyAreas: [],//单位县信息
                companyVillages: [],//单位乡信息
                companyHamlets: [],//单位村落信息

                contactCity: [],//紧急联系人市区信息
                contactAreas: [],//紧急联系人县信息
                contactVillages: [],//紧急联系人乡信息
                contactHamlets: [],//紧急联系人村落信息

                invoiceValue: '',
                loading: false,
                postLoading: false,//提交loading状态
                visible: false,
                baseParms: {},//下拉框信息
                parms: {},//接收查找病人传递来的信息
                patieParms: {},//接收关联病人传递来的信息

                bindDis: true,//绑卡操作按钮                
                cardSatus: {},//当前录入卡        
                isCancel: -1,//是否挂失
                patId: "",//病人信息id 
                patientInfo: [],//病人关联信息 
                visibleCardTips: false,//卡操作成功弹窗 
                popCardVis: false,//卡操作 弹窗
                initpatCardID: "",//卡操作 弹窗 卡类型选择
                bindMoreInfo: false,//绑卡更多信息显示
                bindVail: true,
                canRetarCard: "N",//注销按钮
                cardInfo: {},

                patPresentOthID: "",//修改现住址Id
                patNativeOthID: "",//修改籍贯住址Id
                patRegisterOthID: "",//修改户口住址Id
                patCompanyOthID: "",//修改单位住址Id
                patBirthOthID: "",//修改出生住址Id
                patContactOthID: "",//修改联系人住址Id

                nowAdressProvinceId: 0,//现住址省id
                bornProvinceId: 0,//出生地省id
                nativeProvinceId: 0,//籍贯省id
                houseProvinceId: 0,//户口地址省id
                workProvinceId: 0,//单位省id
                eContactProvinceId: 0,//紧急联系人

                bornCity: [],//出生地市区信息
                bornCountys: [],//出生地县信息
                bornVillages: [],//出生地乡信息
                bornhamlets: [],//出生地村落信息

                nativeCity: [],//籍贯市区信息
                nativeCountys: [],//籍贯县信息
                nativeVillages: [],//籍贯乡信息
                nativehamlets: [],//籍贯村落信息

                presentCity: [],//现住址市区信息
                presentAreas: [],//现住址县信息
                presentVillages: [],//现住址乡信息
                presentHamlets: [],//现住址村落信息

                houseCity: [],//户口地址市区信息
                houseCountys: [],//户口地址县信息
                houseVillages: [],//户口地址乡信息
                househamlets: [],//户口地址村落信息

                workCity: [],//单位市区信息
                workCountys: [],//单位县信息
                workVillages: [],//单位乡信息
                workhamlets: [],//单位村落信息

                eContactCity: [],//紧急联系人市区信息
                eContactCountys: [],//紧急联系人县信息
                eContactVillages: [],//紧急联系人乡信息
                eContacthamlets: [],//紧急联系人村落信息

                municipals: [],//市区信息
                countys: [],//县信息
                villages: [],//乡镇信息
                hamlets: [],//村落信息
                readLoading: false,//读卡loading状态
                credSex: '1',//性别
                credBirthday: '',//出生日期
                credAge: '',//年龄
                provinceId: '',//匹配省级id
                proviceBornId: '',//匹配出生省级id
                proviceNativeId: '',//匹配籍贯省级id
                proviceHouseId: '',//匹配户口省级id
                proviceWorkId: '',//匹配工作单位省级id
                proviceContactId: '',//匹配联系人省级id
                credCountry: 44,//国家Id
                posType: 1,//证件类型
                socialTag: -1,//身份标签
                nowCost: 0,//当前卡费
                str: '',//地址标识
                nowRead: 'n',//卡类型设置是否可操作
                cardLength: "",//卡长度
                idCardCode: "",//身份证code 
                idCardCodePop: "",//弹窗身份证code
                nowReadCard: 'n',//卡类型设置是否可操作 --卡操作
                nowReadCardPop: "n",//卡类型设置是否可操作 -- 弹窗
                cardLengthCard: "",//卡长度 ---卡长度
                replenishZero: "",//是否补0
                nowCard: '',//当前卡类型
                nowInv: '',//是否显示发票
                initCardDr: '',//默认卡类型
                isModefined: -1,//是否点击修改基本资料
                patiId: '',//病人id
                reciprocal: 2,//2S后关闭弹窗
                visibles: false,//是否弹取消补卡
                cardId: '',//记录头卡id
                isFlag: '',//卡操作
                originalNo: '',//卡操作---原卡号
                localProvince: [],//存第一次请求的loca 省
                localCity: [],//存第一次请求的loca 市
                localArea: [],//存第一次请求的loca 县
                selfCredNo: '',//修改前的身份证号
                bindCardArr: [],//已绑卡类型
                allDis: false,//全部锁定建卡类型
                cardNoVisible: false,//建卡卡号错误提示 - title框显示
                cardNoMessage: "",//建卡卡号错误提示 - 文字信息
                posVisible: false,//身份证号码错误提示 - title框显示
                posMessage: "",//身份证号码错误提示 - 文字信息
                patNameVisible: false,//病人姓名错误提示 - title框显示
                patNameMessage: "",//病人姓名错误提示 - 文字信息
                econNameVisible: false,//联系人姓名错误提示 - title框显示
                econNameMessage: "",//联系人姓名错误提示 - 文字信息
                patBirthVisible: false,//病人出生日期错误提示 - title框显示
                patBirthMessage: "",//病人出生日期错误提示 - 文字信息
                patTypeVisible: false,//病人类型错误提示 - 文字信息
                patTypeMessage: "",//病人类型错误提示 - 文字信息
                patAdressVisible: false,//详细地址错误提示 - 文字信息
                patAdressMessage: "",//详细地址错误提示 - 文字信息
                patAdressMessageZip: "",//详细地址邮编错误提示 - 文字信息
                patAdressZipVisible: false,
                patAdressHouseMessageZip: "",//详细地址户口邮编错误提示 - 文字信息
                patAdressHouseZipVisible: false,
                patAdressComMessageZip: "",//详细地址单位邮编错误提示 - 文字信息
                patAdressComZipVisible: false,

                cardPayMentID: "",//当前操作注销的卡
                econPhoneVisible: false,
                econPhoneMessage: "",

                changeCardVisible: false,//换卡操作错误提示 
                changeCardMessage: "",//换卡操作错误文字提示
                patchCardVisible: false,//补卡操作错误提示 
                patchCardMessage: "",//补卡操作错误文字提示
                bindCardVisible: false,//绑卡操作错误提示 
                bindCardMessage: "",//绑卡操作错误文字提示 
                canSave: false,
                credWarning: false,
                formatType: true,//日期手动录入
                noCard: true,//绑卡显示
                repariFeeFlag: "N",//费用置为0或空
                repariFeeFlagCard: "N",//卡操作 费用置为0或空
                nowCostCard: 0,
                readInfoLoading: false,//无卡时loading信息

                noSend: true,//优化 回车后失去焦点二次请求

            }
            this.readOneButton = React.createRef();

            this.cardNo = React.createRef();
            this.patName = React.createRef();
            this.sex = React.createRef();
            this.credType = React.createRef();
            this.patCredNo = React.createRef();
            this.patBirthDate = React.createRef();
            this.patMobile = React.createRef();
            this.patType = React.createRef();
            this.nation = React.createRef();
            this.patMaritalID = React.createRef();
            this.patAddress = React.createRef();
            this.cardPayMethodID = React.createRef();
            this.creadCard = React.createRef();

            this.province = React.createRef();
            this.city = React.createRef();
            this.country = React.createRef();
            this.village = React.createRef();
            this.hamlet = React.createRef();

            this.bornProvince = React.createRef();
            this.birthCity = React.createRef();
            this.bornCountry = React.createRef();
            this.bornVillage = React.createRef();
            this.bornHamlet = React.createRef();
            this.birthAddress = React.createRef();

            this.nativeProvince = React.createRef();
            this.nativeCity = React.createRef();
            this.nativeCountry = React.createRef();
            this.nativeVillage = React.createRef();
            this.nativeHamlet = React.createRef();
            this.nativeAddress = React.createRef();

            this.houseProvince = React.createRef();
            this.houseCity = React.createRef();
            this.houseCountry = React.createRef();
            this.houseVillage = React.createRef();
            this.houseHamlet = React.createRef();
            this.houseAddress = React.createRef();
            this.registerZIP = React.createRef();

            this.companyProvince = React.createRef();
            this.companyCity = React.createRef();
            this.companyCountry = React.createRef();
            this.companyVillage = React.createRef();
            this.companyHamlet = React.createRef();
            this.companyAddress = React.createRef();
            this.companyZIP = React.createRef();

            this.patSocialStatusID = React.createRef();

            this.econProvince = React.createRef();
            this.econCity = React.createRef();
            this.econCountry = React.createRef();
            this.econVillage = React.createRef();
            this.econHamlet = React.createRef();
            this.contactsAddress = React.createRef();

            this.econName = React.createRef();
            this.econMobile = React.createRef();
            this.econRelation = React.createRef();

            this.patCompany = React.createRef();
            this.patCompanyTel = React.createRef();

            this.changeCard = React.createRef();
            this.patchCard = React.createRef();
            this.creadCardPop = React.createRef();
            this.creadCardPops = React.createRef();
            this.bindNewCard = React.createRef();
            this.bindCardNu = React.createRef();
            this.bindCardButton = React.createRef();

            this.companyZIP = React.createRef();
            this.registerZIP = React.createRef();
            this.presentZIP = React.createRef();

            this.changeOkButton = React.createRef();
            this.patchOkButton = React.createRef();
            this.bindOkButton = React.createRef();
        }

        componentDidMount() {
            // //卡号输入框高亮
            // setTimeout(() => {
            //     this.cardNo.current.focus();
            // }, 800)
            let self = this
            document.addEventListener("keydown", function (e) {
                self.KeyDowns(e)
            })
            let data = {}
            data = {
                params: [{
                    cardTypeFlag: 1,//卡类型
                    credTypeFlag: 1,//证件类型
                    patTypeFlag: 1,//病人类型
                    sexFlag: 1,	//性别
                    countryFlag: 1,	//国家
                    nationFlag: 1,//民族
                    occupationFlag: 1,//职业
                    maritalFlag: 1,	//婚姻
                    socialStatusFlag: 1,//身份标签
                    ageUnitFlag: '',
                    payMethodFlag: 1,
                    provinceFlag: localStorage.getItem('province') != null ? '' : 1,	//省
                    cityFlag: localStorage.getItem('city') != null ? '' : 1,  //市
                    // areaFlag: localStorage.getItem('area') != null ? '' : 1,//县
                    relationFlag: 1,
                }]
            }
            $http.post('urlS', this, {
                code: '03030005',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            baseParms: res,
                            invoiceValue: res.transactionNo,
                        })
                        //接收挂号页面
                        if (this.getQueryString("cardTypeId") != null) {
                            this.props.form.setFieldsValue({ cardTypeID: this.getQueryString("cardTypeId"), cardNo: this.getQueryString("cardNum") })
                            setTimeout(() => {
                                this.patName.current.focus();
                            }, 300)
                            res.cardType.map((item, i) => {
                                if (this.getQueryString("cardTypeId") == item.id) {
                                    this.setState({
                                        initCardDr: res.cardType[i].id,
                                        nowRead: res.cardType[i].readMode,
                                        idCardCode: res.cardType[i].code,
                                        cardLength: res.cardType[i].cardLength && res.cardType[i].cardLength != "" ? res.cardType[i].cardLength + "位," : "",
                                        cardLengthInput: res.cardType[i].cardLength,
                                        replenishZero: res.cardType[i].replenishZero,
                                        repariFeeFlag: res.cardType[i].repariFeeFlag,
                                        nowCost: res.cardType[i].cardCost,
                                        nowInv: res.cardType[i].invFlag,
                                    })
                                    this.props.form.setFieldsValue({
                                        cardPayMethodID: res.payMethod && res.payMethod.length > 0 ? res.payMethod[i].id : undefined,
                                        payMethods: res.payMethod && res.payMethod.length > 0 ? res.payMethod[i].id : undefined
                                    })
                                }
                            })
                        } else {
                            //卡号输入框高亮
                            // setTimeout(() => {
                            //     this.cardNo.current.focus();
                            // }, 600)
                            res.cardType.map((item, i) => {
                                if (item.defaultFlag == "Y") {
                                    this.setState({
                                        initCardDr: item.id,
                                        nowRead: item.readMode,
                                        idCardCode: item.code,
                                        cardLength: item.cardLength && item.cardLength != "" ? item.cardLength + "位," : "",
                                        cardLengthInput: item.cardLength,
                                        replenishZero: item.replenishZero,
                                        repariFeeFlag: item.repariFeeFlag,
                                        nowCost: item.cardCost,
                                        nowInv: item.invFlag,
                                    })
                                    if (item.readMode == "R") {
                                        setTimeout(() => {
                                            this.readOneButton.current.buttonNode.focus();
                                        }, 300)
                                    } else {
                                        //卡号输入框高亮
                                        setTimeout(() => {
                                            this.cardNo.current.focus();
                                        }, 600)
                                    }
                                }
                                if (res.cardType[i].defaultFlag == "N") {
                                    // console.log("都未默认")
                                    this.setState({
                                        initCardDr: res.cardType[0].id,
                                        nowRead: res.cardType[0].readMode,
                                        idCardCode: res.cardType[0].code,
                                        cardLength: res.cardType[0].cardLength && res.cardType[0].cardLength != "" ? res.cardType[0].cardLength + "位," : "",
                                        cardLengthInput: res.cardType[0].cardLength,
                                        replenishZero: res.cardType[0].replenishZero,
                                        repariFeeFlag: res.cardType[0].repariFeeFlag,
                                        nowCost: res.cardType[0].cardCost,
                                        nowInv: res.cardType[0].invFlag,

                                    })
                                    if (res.cardType[0].readMode == "R") {
                                        setTimeout(() => {
                                            this.readOneButton.current.buttonNode.focus();
                                        }, 300)
                                    } else {
                                        //卡号输入框高亮
                                        setTimeout(() => {
                                            this.cardNo.current.focus();
                                        }, 600)
                                    }

                                }
                            })
                            this.props.form.setFieldsValue({
                                cardPayMethodID: res.payMethod && res.payMethod.length > 0 ? res.payMethod[0].id : undefined,
                                payMethods: res.payMethod && res.payMethod.length > 0 ? res.payMethod[0].id : undefined
                            })
                        }
                        if (JSON.parse(localStorage.getItem('province')) && JSON.parse(localStorage.getItem('province')).length > 0) {
                            this.setState({
                                localProvince: JSON.parse(localStorage.getItem('province'))
                            })
                        } else {
                            localStorage.setItem('province', JSON.stringify(res.province))
                            this.setState({
                                localProvince: res.province
                            })
                        } if (JSON.parse(localStorage.getItem('city')) && JSON.parse(localStorage.getItem('city')).length > 0) {
                            this.setState({
                                localCity: JSON.parse(localStorage.getItem('city'))
                            })
                        } else {
                            localStorage.setItem('city', JSON.stringify(res.city))
                            this.setState({
                                localCity: res.city
                            })

                        }
                        // if (JSON.parse(localStorage.getItem('area')) && JSON.parse(localStorage.getItem('area')).length > 0) {

                        //     // this.setState({
                        //     //     localArea: JSON.parse(localStorage.getItem('area'))
                        //     // })
                        // } else {
                        //     // localStorage.setItem('area', JSON.stringify(res.area))
                        //     this.setState({
                        //         localArea: res.area
                        //     })

                        //     // }
                        //     this.setState({
                        //         baseParms: res,
                        //         invoiceValue: res.transactionNo,
                        //         initCardDr: res.cardType[0].id,
                        //         nowRead: res.cardType[0].readMode,
                        //         cardLength:res.cardType[0].cardLength&&res.cardType[0].cardLength!=""?res.cardType[0].cardLength + "位,":"",
                        //         nowCost: res.cardType[0].cardCost,
                        //         nowInv: res.cardType[0].invFlag,
                        //     })
                        //     this.props.form.setFieldsValue({ cardPayMethodID: res.payMethod[0].id, payMethods: res.payMethod[0].id })
                    } else {

                    }
                }
            })
        }
        handleChange(value) {
        }
        updataTrans = () => {
            let data = {}
            data = {
                params: [{

                }]
            }
            $http.post('urlS', this, {
                code: '03030005',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            invoiceValue: res.transactionNo
                        })
                    }
                }
            })
        }
        //绑定卡 选择卡类型
        handleBindCardType = (data) => {
            // console.log('点击选择',data)
            this.props.form.setFieldsValue({ cardBindNo: undefined })
            for (var i = 0; i < this.state.baseParms.cardType.length; i++) {
                if (data == this.state.baseParms.cardType[i].id) {
                    this.props.form.setFieldsValue({ newCard: this.state.baseParms.cardType[i].id })
                    this.props.form.setFieldsValue({ newCardMoney: '￥' + this.state.baseParms.cardType[i].cardCost })
                    this.setState({
                        nowCostCard: this.state.baseParms.cardType[i].cardCost,
                        initpatCardID: this.state.baseParms.cardType[i].id,
                        // initCardDr:this.state.baseParms.cardType[i].id,
                        idCardCodePop: this.state.baseParms.cardType[i].code,
                        nowReadCardPop: this.state.baseParms.cardType[i].readMode,
                        cardLengthCard: this.state.baseParms.cardType[i].cardLength && this.state.baseParms.cardType[i].cardLength != "" ? this.state.baseParms.cardType[i].cardLength + "位," : "",
                        replenishZero: this.state.baseParms.cardType[i].replenishZero,
                        repariFeeFlagCard: this.state.baseParms.cardType[i].repariFeeFlag,
                    })
                }
            }
            this.setState({
                bindCardVisible: false,
                bindVail: true
            })
        }
        //取消挂失 / 挂失 注销   成功后  再次请求更新状态
        cardSuccess = (flag, id) => {
            let datas = {}
            //卡收费记录
            if (this.state.cardPayMentID != "") {
                datas = {
                    params: [{
                        cardID: id,
                        flag: flag,
                        card: {
                            recordID: this.state.cardPayMentID,//
                            cost: this.state.nowCost,//卡费
                            payWID: "",//支付方式
                        }
                    }],
                }
            } else {
                datas = {
                    params: [{
                        cardID: id,
                        flag: flag,
                    }],
                }
            }
            $http.post('urlS', this, {
                code: '03030010',
                data: datas,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            visibleCardTips: true,
                            reciprocal: 2,
                            // visible:false,
                        })
                        this.timerStart()
                        //   this.props.handleEdit('','Other','')
                    } else {
                    }
                }
            })
        }

        //补卡 换卡 就诊卡自动补0
        chaeckLength = (flag) => {
            if (flag == 3) {
                if (this.state.replenishZero == "Y"
                    && parseInt(this.state.cardLengthCard) && parseInt(this.state.cardLengthCard) > 0
                    && this.props.form.getFieldValue('cardNumber')
                    && this.props.form.getFieldValue('cardNumber').length != 0) {
                    let No = this.props.form.getFieldValue('cardNumber') ? this.props.form.getFieldValue('cardNumber') : ''
                    let length = parseInt(this.state.cardLengthCard)
                    let num = (Array(length).join(0) + No).slice(-length)
                    this.props.form.setFieldsValue({ cardNumber: num });
                    this.props.form.setFieldsValue({ cardNumber: num });
                    // this.checkIs()
                }
            } else {
                if (this.state.replenishZero == "Y"
                    && parseInt(this.state.cardLengthCard) && parseInt(this.state.cardLengthCard) > 0
                    && this.props.form.getFieldValue('patchNumber')
                    && this.props.form.getFieldValue('patchNumber').length != 0) {
                    let No = this.props.form.getFieldValue('patchNumber') ? this.props.form.getFieldValue('patchNumber') : ''
                    let length = parseInt(this.state.cardLengthCard)
                    let num = (Array(length).join(0) + No).slice(-length)
                    this.props.form.setFieldsValue({ patchNumber: num });
                    this.props.form.setFieldsValue({ patchNumber: num });
                    // this.checkIs()
                }

            }
        }
        //进行卡后验证
        checkIs() {
            if ((this.props.form.getFieldValue('cardBindNo') && this.props.form.getFieldValue('cardBindNo').length > 0)
                || (this.props.form.getFieldValue('cardNumber') && this.props.form.getFieldValue('cardNumber').length > 0)
                || (this.props.form.getFieldValue('patchNumber') && this.props.form.getFieldValue('patchNumber').length > 0)
            ) {
                if (this.props.form.getFieldValue('newCard') && this.props.form.getFieldValue('newCard')) {
                    let data = {}
                    if (this.state.isFlag == 3 || this.state.isFlag == 4) {
                        if (this.state.isFlag == 3) {
                            data = {
                                params: [{
                                    cardTypeID: this.props.form.getFieldValue('newCard') ? this.props.form.getFieldValue('newCard') : '',
                                    cardNo: this.props.form.getFieldValue('cardNumber') ? this.props.form.getFieldValue('cardNumber') : '',
                                    credTypeID: '',
                                    credNo: ''
                                }],
                            }
                        } else {
                            data = {
                                params: [{
                                    cardTypeID: this.props.form.getFieldValue('newCard') ? this.props.form.getFieldValue('newCard') : '',
                                    cardNo: this.props.form.getFieldValue('patchNumber') ? this.props.form.getFieldValue('patchNumber') : '',
                                    credTypeID: '',
                                    credNo: ''
                                }],
                            }
                        }
                    } else {
                        data = {
                            params: [{
                                cardTypeID: this.props.form.getFieldValue('newCard') ? this.props.form.getFieldValue('newCard') : '',
                                cardNo: this.props.form.getFieldValue('cardBindNo') ? this.props.form.getFieldValue('cardBindNo') : '',
                                credTypeID: '',
                                credNo: ''
                            }],
                        }
                    }

                    $http.post('urlS', this, {
                        code: '03030009',
                        data: data,
                        success: function (res) {
                            if (+res.errorCode === 0 && res.result.data.length > 0) {
                                // debugger;
                                // console.log("卡状态",res)
                                var str = "";
                                str = res.result.patInfo.patNo;
                                //判断接口请求成功数据是否返回成功
                                // this.setState({
                                //   readLoading: false
                                // })
                                for (var i = 0; i < res.result.data.length; i++) {
                                    if (this.state.isFlag == 3 || this.state.isFlag == 4) {
                                        if (this.props.form.getFieldValue('cardNumber') != res.result.data[i].cardNo) {
                                            message.warning('卡号已存在,病人ID：' + str);
                                            return
                                        }
                                        if (this.props.form.getFieldValue('patchNumber') != res.result.data[i].cardNo) {
                                            message.warning('卡号已存在,病人ID：' + str);
                                            return
                                        }
                                        if (this.state.isFlag == 3) {
                                            if (
                                                this.props.form.getFieldValue('cardNumber') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc == "作废")
                                            ) {
                                                message.warning('该卡卡号已被作废');
                                                this.setState({
                                                    bindVail: true
                                                })
                                                return
                                            }
                                            if (
                                                (this.props.form.getFieldValue('cardNumber') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc != "回收" || res.result.data[i].cardStatusDesc != "退卡"))
                                            ) {
                                                // console.log("3434343434344-0-0-0-0--0-0", res.result.data[i].patID) 
                                                if (res.result.data[i].code == "12") {
                                                    message.warning('非本人证件号码，不能绑定')
                                                } else {
                                                    message.warning('卡号已存在,病人ID：' + str);
                                                }
                                                this.setState({
                                                    bindVail: true,
                                                    bindMoreInfo: false,
                                                })
                                                return
                                            }
                                        } else {
                                            if (
                                                this.props.form.getFieldValue('patchNumber') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc == "作废")
                                            ) {
                                                message.warning('该卡卡号已被作废');
                                                this.setState({
                                                    bindVail: true
                                                })
                                                return
                                            }
                                            if (
                                                (this.props.form.getFieldValue('patchNumber') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc != "回收" || res.result.data[i].cardStatusDesc != "退卡"))
                                            ) {
                                                // console.log("3434343434344-0-0-0-0--0-0", res.result.data[i].patID) 
                                                if (res.result.data[i].code == "12") {
                                                    message.warning('非本人证件号码，不能绑定')
                                                } else {
                                                    message.warning('卡号已存在,病人ID：' + str);
                                                }
                                                this.setState({
                                                    bindVail: true,
                                                    bindMoreInfo: false,
                                                })
                                                return
                                            } else {
                                                message.warning('卡号已存在,病人ID：' + str);
                                            }
                                        }

                                    } else {
                                        if (this.props.form.getFieldValue('cardBindNo') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc == "作废")) {
                                            message.warning('该卡卡号已被作废');
                                            this.setState({
                                                bindVail: true,
                                                bindMoreInfo: false,
                                            })
                                            return
                                        }
                                        if (this.props.form.getFieldValue('cardBindNo') == res.result.data[i].cardNo && (res.result.data[i].cardStatusDesc != "回收" || res.result.data[i].cardStatusDesc != "退卡")) {
                                            str = res.result.patInfo.patNo;
                                            if (res.result.data[i].code == "12") {
                                                message.warning('非本人证件号码，不能绑定')
                                            } else {
                                                message.warning('卡号已存在,病人ID：' + str);
                                            }
                                            this.setState({
                                                bindVail: true,
                                                bindMoreInfo: false,
                                            })
                                            return
                                        }
                                    }
                                }

                            }
                            if (+res.errorCode === 0 && res.result.data.length == 0) {
                                //  console.log("checIs检测通过",res.result.data,"res.result.data.length--",res.result.data.length)
                                // console.log("checkis----------",)
                                if (this.state.nowCostCard != 0 && this.state.repariFeeFlagCard != "Y" && this.state.isFlag != 3 && this.state.isFlag != 4) {
                                    this.setState({
                                        bindVail: false,
                                        bindMoreInfo: true,
                                        // flag: 7,
                                        isFlag: 7
                                    })
                                    setTimeout(() => {
                                        this.bindOkButton.current.buttonNode.focus();
                                    }, 300)
                                    this.props.form.setFieldsValue({ transactionNo: this.state.baseParms.transactionNo })
                                } else {
                                    this.setState({
                                        bindMoreInfo: false,
                                        bindVail: false,
                                        // isFlag:-1
                                    })
                                    if (this.state.isFlag == 3) {
                                        // this.props.form.setFieldsValue({ transactionNo: undefined })
                                        setTimeout(() => {
                                            this.changeOkButton.current.buttonNode.focus();
                                        }, 300)
                                        return
                                    }
                                    if (this.state.isFlag == 4) {
                                        setTimeout(() => {
                                            this.patchOkButton.current.buttonNode.focus();
                                        }, 300)
                                        return
                                    }
                                    if (this.state.isFlag == 6 || this.state.isFlag == 7 || flag == 6) {
                                        setTimeout(() => {
                                            this.bindOkButton.current.buttonNode.focus();
                                        }, 300)
                                        return
                                    }
                                }
                                if (this.state.isFlag == 3 || this.state.isFlag == 4) {
                                    this.setState({
                                        bindVail: false,
                                        // isFlag:-1
                                    })
                                    if (this.state.isFlag == 3) {
                                        setTimeout(() => {
                                            this.changeOkButton.current.buttonNode.focus();
                                        }, 300)
                                    }
                                    if (this.state.isFlag == 4) {
                                        setTimeout(() => {
                                            this.patchOkButton.current.buttonNode.focus();
                                        }, 300)
                                    }
                                    this.props.form.setFieldsValue({ transactionNo: this.state.baseParms.transactionNo })
                                }
                                // message.success('此卡号可以使用');
                            }
                        }, error: function () {
                            this.setState({
                                bindVail: true
                            })
                        }
                    })
                } else {
                    this.setState({
                        bindVail: true,
                    })
                    message.warning('请选择建卡类型');
                }
            } else {
                this.setState({
                    bindVail: true,
                })
                //   message.warning('请输入卡号');
            }
        }
        //检测就诊卡长度
        checkLength = () => {
            if (this.state.replenishZero == "Y"
                && parseInt(this.state.cardLength) && parseInt(this.state.cardLength) > 0
                && this.props.form.getFieldValue('cardBindNo')
                && this.props.form.getFieldValue('cardBindNo').length != 0) {
                let No = this.props.form.getFieldValue('cardBindNo') ? this.props.form.getFieldValue('cardBindNo') : ''
                let length = parseInt(this.state.cardLength)
                let num = (Array(length).join(0) + No).slice(-length)
                this.props.form.setFieldsValue({ cardBindNo: num });
                this.props.form.setFieldsValue({ cardBindNom: num });
                // this.checkIs()
            }
        }
        handleOnKeydown = (e) => {
            var e = window.event || e;
            switch (e.keyCode) {
                case 13:
                    e.preventDefault()
                    this.handleFlag(this.state.isFlag)
                    break;
            }
        }
        //选择卡操作确认
        handleFlag = (flag) => {
            const { cardInfo, patId, isFlag } = this.state
            if (flag == 3 || flag == 4) {
                let datas = {}
                datas = {
                    params: [{
                        // this.state.cardInfo.patCardID,
                        cardID: cardInfo.cardID,
                        flag: flag,
                        newCard: {
                            patID: patId,
                            cardTypeID: this.props.form.getFieldValue('newCard'),
                            cardNo: flag == 3 ? this.props.form.getFieldValue('cardNumber') : this.props.form.getFieldValue('patchNumber'),
                            userID: userData.userID,
                            cardCost: flag == 4 ? cardInfo.cardCost : undefined,
                            ip: flag == 4 ? (React.$getSessionData('ipConfig')?.ipv4 || '') : undefined,
                            cardPayMethodID: flag == 4 ? this.props.form.getFieldValue('payMethods') : undefined,
                            tradeNum: flag == 4 ? this.state.baseParms.transactionNo : undefined,
                        }
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030010',
                    data: datas,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                popCardVis: false,
                                visibleCardTips: true,
                                reciprocal: 2,

                            })
                            this.timerStart()
                        } else {
                            this.setState({

                            })
                        }
                    },
                    error: function () {
                        this.setState({

                        })
                    }
                })
            }
            if (flag == 7 || flag == 6) {
                let data = {}
                //未设置仅补卡时收费 且 有卡费时
                if (this.state.repariFeeFlagCard != "Y" && this.state.nowCostCard != 0 && this.state.nowCostCard != "") {
                    data = {
                        params: [{
                            userID: userData.userID,
                            hospID: userData.hospID,
                            groupID: userData.groupID,
                            locID: userData.locID,
                            patient: {
                                patID: patId,
                                active: "",
                                createUserID: userData.userID,
                                companyTel: ''
                            },
                            card: {
                                cardTypeID: this.props.form.getFieldValue('newCard'),
                                cardNo: this.props.form.getFieldValue('cardBindNo'),
                                userID: userData.userID,
                                cardCost: this.state.repariFeeFlagCard != "Y" ? this.state.nowCostCard : "0",
                                ip: React.$getSessionData('ipConfig')?.ipv4 || '',
                                cardPayMethodID: this.props.form.getFieldValue('payMethods'),
                                tradeNum: this.state.baseParms.transactionNo,
                            },
                            accm: {
                                passWord: "",
                                deposit: "",
                                groupFlag: "",
                            },

                        }]
                    }
                } else {
                    data = {
                        params: [{
                            userID: userData.userID,
                            hospID: userData.hospID,
                            groupID: userData.groupID,
                            locID: userData.locID,
                            patient: {
                                patID: patId,
                                active: "",
                                createUserID: userData.userID,
                                companyTel: ''
                            },
                            card: {
                                cardTypeID: this.props.form.getFieldValue('newCard'),
                                cardNo: this.props.form.getFieldValue('cardBindNo'),
                                userID: userData.userID,
                            },
                            accm: {
                                passWord: "",
                                deposit: "",
                                groupFlag: "",
                            },

                        }]
                    }
                }
                $http.post('urlS', this, {
                    code: '03030003',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            if (this.state.cardCost > 0) {
                                this.updataTrans()
                            }
                            this.setState({
                                popCardVis: false,
                                visibleCardTips: true,
                                reciprocal: 2,
                            })
                            this.props.form.setFieldsValue({ cardBindNo: undefined })
                            this.timerStart()
                        } else {
                            this.setState({
                                //   postLoading: false
                            })
                        }
                    }
                })
            }
        }
        //卡操作前 ---提示
        cardBefor = (flag, info) => {
            let self = this
            const { patientInfo } = this.state
            confirm({
                key: flag == 1 ? '1' : (flag == 2 ? '2' : (flag == 5 ? '3' : '4')),
                title: flag == 1 ? '取消挂失后，该卡将继续启用，启用该卡？' : (flag == 2 ? '挂失后，将不能使用该卡，是否确认挂失？' : (flag == 5 ? '注销后，将不能使用该卡，是否确认注销？' : '')),
                centered: true,
                content: (
                    <p style={{ color: 'rgba(0, 0, 0, 0.85)', fontSize: '16px' }}>病人:<span style={{ marginRight: '6px' }}>{patientInfo.patInfo ? patientInfo.patInfo.patName : ''}</span><span style={{ marginRight: '6px' }}>{info.cardTypeDesc && info.cardTypeDesc ? info.cardTypeDesc : ''},</span><span>{info.cardNo && info.cardNo ? info.cardNo : ''}</span></p>
                ),
                onOk() {
                    self.cardSuccess(flag, info.cardID)
                    Modal.destroyAll()
                },
                onCancel() {
                },
            });
        }
        //重置cardType
        initType = () => {
            this.state.baseParms.cardType.map((carditem, index) => {
                carditem["disabled"] = false
            })
        }
        //卡操作弹窗 取消
        handleCancelCard = () => {
            this.setState({
                popCardVis: false,
                changeCardVisible: false,
                bindCardVisible: false,
                patchCardVisible: false,
                bindMoreInfo: false,
                bindVail: true
            })
            this.initType()
        }
        //绑定卡需收费 返回上一步
        handlePrev = () => {
            this.setState({
                isFlag: 6,
            })
        }
        //点击进行卡操作 1取消挂失 2挂失 3换卡 4补卡 5注销 6 绑定
        handleCard = (flag, info) => {
            const { patientInfo, patId, isFlag } = this.state
            // console.log("点击绑定",info)
            this.props.form.setFieldsValue({ cardNumber: undefined, cardBindNo: undefined, patchNumber: undefined });
            this.setState({
                isFlag: flag,
                cardInfo: info,
                //   reciprocal: 2,
                //   bindVail:true
            })
            if (flag == 1) {
                this.cardBefor(flag, info)
            } if (flag == 2) {
                this.cardBefor(flag, info)
            }
            if (flag == 5) {
                this.cardBefor(flag, info)
            }
            if (flag == 3 || flag == 4 || flag == 6) {
                this.props.form.setFieldsValue({
                    payMethods: this.state.baseParms.payMethod && this.state.baseParms.payMethod.length > 0 ? this.state.baseParms.payMethod[0].id : undefined,
                });
                const cardType = this.state.baseParms.cardType;
                let readMo = "";
                this.setState({
                    popCardVis: true
                }, () => {
                    cardType.map((item, i) => {
                        if (info.cardTypeID == item.id) {
                            readMo = item.readMode
                            if (flag == 3) {
                                if (item.readMode == 'I' || item.readMode == '') {
                                    setTimeout(() => {
                                        this.changeCard.current.focus();
                                    }, 300)
                                } else {
                                    setTimeout(() => {
                                        this.creadCardPop.current.buttonNode.focus();
                                    }, 1000)
                                }
                            } if (flag == 4) {
                                if (item.readMode == 'I' || item.readMode == '') {
                                    setTimeout(() => {
                                        this.patchCard.current.focus();
                                    }, 300)
                                } else {
                                    setTimeout(() => {
                                        this.creadCardPops.current.buttonNode.focus();
                                    }, 1000)
                                }
                            }
                        }
                    })
                    //3 换卡 4 补卡 
                    if (flag == 3 || flag == 4) {
                        //选中当前卡类型
                        for (var i = 0; i < this.state.baseParms.cardType.length; i++) {
                            if (info.cardTypeDesc == this.state.baseParms.cardType[i].descripts) {
                                this.props.form.setFieldsValue({ newCard: this.state.baseParms.cardType[i].id });
                                this.setState({
                                    initpatCardID: this.state.baseParms.cardType[i].id,
                                    nowReadCardPop: this.state.baseParms.cardType[i].readMode,
                                    repariFeeFlagCard: this.state.baseParms.cardType[i].repariFeeFlag,
                                    idCardCodePop: this.state.baseParms.cardType[i].code,
                                    cardLengthCard: this.state.baseParms.cardType[i].cardLength && this.state.baseParms.cardType[i].cardLength != "" ? this.state.baseParms.cardType[i].cardLength + "位," : "",
                                    replenishZero: this.state.baseParms.cardType[i].replenishZero,
                                });
                            }
                        }
                    }
                    if (flag == 4) {
                        this.props.form.setFieldsValue({ patchMoney: '￥' + info.cardCost });
                        this.props.form.setFieldsValue({ transactionNo: info.transactionNo ? info.transactionNo : this.state.baseParms.transactionNo })
                        this.setState({
                            nowCost: flag == 4 ? info.patCardCost : '',
                            initpatCardID: this.props.form.getFieldValue('newCard')
                        })
                    }
                    if (flag == 6) { //绑定卡
                        let canBindArr = []
                        const { bindCardArr } = this.state
                        this.props.form.setFieldsValue({ cardBindNo: undefined })
                        if (bindCardArr) {
                            this.state.baseParms.cardType.map((carditem, index) => {
                                bindCardArr.map((item, index) => {
                                    if (item.cardTypeDesc == carditem.descripts) {
                                        carditem["disabled"] = true
                                    }
                                })
                            })
                            this.state.baseParms.cardType.map((carditem, index) => {
                                if (carditem.disabled == undefined || carditem.disabled == false) {
                                    canBindArr.push(carditem)
                                }
                            })

                            this.props.form.setFieldsValue({ newCard: canBindArr[0].id })
                            this.setState({
                                // initCardDr:canBindArr[0].id,
                                nowCostCard: canBindArr[0].cardCost,
                                initpatCardID: canBindArr[0].id,
                                nowReadCardPop: canBindArr[0].readMode,
                                repariFeeFlagCard: canBindArr[0].repariFeeFlag,
                                idCardCodePop: canBindArr[0].code,
                                cardLengthCard: canBindArr[0].cardLength && canBindArr[0].cardLength != "" ? canBindArr[0].cardLength + "位," : "",
                                replenishZero: canBindArr[0].replenishZero,
                            }, () => {
                                if (this.state.nowReadCardPop == 'I' || this.state.nowReadCardPop == '') {
                                    setTimeout(() => {
                                        this.bindCardNu.current.focus();
                                    }, 300)
                                } else {
                                    setTimeout(() => {
                                        this.bindCardButton.current.buttonNode.focus();
                                    }, 1000)
                                }
                            })
                        }
                    }
                })
            }
            this.props.form.setFieldsValue({ originalCard: this.props.form.getFieldValue('patName') + ',' + info.cardTypeDesc + ',' + info.cardNo })
        }
        //已绑卡类型
        bingCardArr = (data) => {
            let bindCardArr = []
            let newArr = []
            for (var i = 0; i < data.length; i++) {
                data[i].key = i + "info";
                if (this.props.form.getFieldValue('cardNo') == data[i].cardNo) {
                    this.setState({
                        cardSatus: data[i],
                    })
                    if (data[i].cardStatusDesc == "正常" || data[i].cardStatusDesc == "挂失") {
                        this.setState({
                            canRetarCard: "Y"
                        })
                    } else {
                        this.setState({
                            canRetarCard: "N"
                        })
                    }
                    if (data[i].cardStatusDesc == '挂失') {
                        this.setState({
                            isCancel: 1
                        })
                    } else {
                        this.setState({
                            isCancel: -1
                        })
                    }
                }
                if (data[i].cardStatusDesc == '退卡' || data[i].cardStatusDesc == '回收' || data[i].cardStatusDesc == '作废') {
                    data.splice(i, 1)
                }
            }
            newArr = data
            if (newArr.length == this.state.baseParms.cardType.length) { //检测卡种是否全部都有绑定
                this.setState({
                    bindDis: true
                })
            } else {
                this.setState({
                    bindDis: false
                })
            }
            this.setState({
                bindCardArr: newArr
            }, () => {
                this.state.bindCardArr.map((item, index) => {
                    if (this.props.form.getFieldValue('cardNo') == item.cardNo) {
                        // console.log("相等",this.state.bindCardArr[index])
                        this.state.bindCardArr[index]["light"] = true
                    } else {
                        this.state.bindCardArr[index]["light"] = false
                    }
                })
            })
        }
        //表单回显
        setForm = (even) => {
            // console.log("完整版", even)
            //表单信息回显
            // console.log("even.patNativeCityID",even.patNativeCityID)
            // debugger;
            this.props.form.setFieldsValue({
                balance: parseInt(even.balance) == NaN ? "￥--" : "￥" + even.balance,
                patName: even.patName,
                patSexID: String(even.patSexID),
                patCredTypeID: even.patCredTypeID,
                patCredNo: even.patCredNo,
                patBirthDate: moment(even.patBirthDate),
                age: even.patAge,
                patMobile: even.patMobile,
                patTypeID: even.patTypeID,
                patCountryID: even.patCountryID,
                patNationID: even.patNationID,
                presentAddressDesc: even.patPresentAddressDesc,
                patSocialStatusID: even.patSocialStatusID,
                patientType: even.patientType ? even.patientType : '',
                patMaritalID: even.patMaritalID,
                patOccupationID: even.patOccupationID,
                patCompany: even.patCompany,
                patCompanyTel: even.patCompanyTel,
                patEContactMobile: even.patEContactMobile,
                patEContact: even.patEContact,
                patERelationID: even.patERelationID,
                nativeAddress: even.patNativeAddressDesc,
                birthAddress: even.patBirthAddressDesc,
                houseAddress: even.patRegisterAddressDesc,
                companyAddress: even.patCompanyAddressDesc,
                contactsAddress: even.patContactAddressDesc,
                //现住址
                // patProvinceID: even.patPresentProvinceID,
                // patCityID: String(even.patPresentCityID),
                // patAreaID: even.patPresentAreaID,
                // patVillageID: even.patPresentVillageID,
                // patHamletID: even.patPresentHamletID,
                // //出生地址
                // birthProvinceID: even.patBirthProvinceID,
                // cityBornDr: even.patBirthCityID,
                // areaBornDr: even.patBirthAreaID,
                // villageBornDr: even.patBirthVillageID,
                // hamletBornDr: even.patBirthHamletID,
                // //籍贯地址
                // nativeProvinceBDr: even.patNativeProvinceID,
                // nativeCityDr:even.patNativeCityID,
                // nativeAreaDr:even.patNativeAreaID,
                // nativeVillageDr:even.patNativeVillageID,
                // nativeHamletDr:even.patNativeHamletID,
                // //户口地址
                // provinceHouseDr:even.patRegisterProvinceID,
                // cityHouseDr:even.patRegisterCityID,
                // areaHouseDr:even.patRegisterAreaID,
                // villageHouseDr:even.patRegisterVillageID,
                // hamletHouseDr:even.patRegisterHamletID,
                // //单位地址
                // companyProvinceID:even.patCompanyProvinceID,
                // companyCityDr:even.patCompanyCityID,
                // companyAreaDr:even.patCompanyAreaID,
                // companyVillageDr:even.patCompanyVillageID,
                // companyHamletDr:even.patCompanyHamletID,
                // //联系人地址
                // contactsProvinceBDr:even.patContactProvinceID,
                // contactsCityDr:even.patContactCityID,
                // contactsAreaDr:even.patContactAreaID,
                // contactsVillageDr:even.patContactVillageID,
                // contactsHamletDr:even.patContactHamletID,
            });

            if (even.patCredTypeID == '1') {
                this.setState({
                    selfCredNo: even.patCredNo
                })
            }
            // //现住址
            // this.handleProvince(even.patPresentProvinceID ? String(even.patPresentProvinceID) : "", 2)
            // this.autoCity(even.patPresentCityID ? String(even.patPresentCityID) : "", 2)
            // this.handleCountys(even.patPresentAreaID ? even.patPresentAreaID + 'auto' : '', 2)
            // this.handlevillages(even.patPresentVillageID, 2)
            // //出生地
            // this.handleOneCity(even.patBirthProvinceID ? String(even.patBirthProvinceID) : "", undefined, "1", 1)
            // this.autoCitys(even.patBirthCityID ? even.patBirthCityID : "", 2)
            // this.handleOneVillages(even.patBirthAreaID ? even.patBirthAreaID : "", 2)
            // this.handleOneHamlets(even.patBirthVillageID ? even.patBirthVillageID : "", 2)
            // //户口地址
            // this.handleOneCity(even.patRegisterProvinceID ? String(even.patRegisterProvinceID) : "", undefined, "3", 1)
            // this.autoHouseCitys(even.patRegisterCityID ? String(even.patRegisterCityID) : "", 2)
            // this.autoHouseVillage(even.patRegisterAreaID ? even.patRegisterAreaID + 'auto' : "", 2)
            // this.autoHouseHamlet(even.patRegisterVillageID ? even.patRegisterVillageID : "", 2)
            // //籍贯地址
            // this.handleOneCity(even.patNativeProvinceID ? String(even.patNativeProvinceID) : "", undefined, "2", 1)
            // this.handleOneCountys(even.patNativeCityID ? even.patNativeCityID : "", 2)
            // this.handleNativeVillages(even.patNativeAreaID ? even.patNativeAreaID : "", 2)
            // this.autoNativeHamlet(even.patNativeVillageID ? even.patNativeVillageID : "", 2)
            // //联系人地址
            // this.handleOneCity(even.patContactProvinceID ? String(even.patContactProvinceID) : "", undefined, "5", 1)
            // this.autoContactsCitys(even.patContactCityID ? even.patContactCityID : "", 2)
            // this.handleOneVillagess(even.patContactAreaID ? even.patContactAreaID : "", 2)
            // this.autoContasHamlet(even.patContactVillageID ? even.patContactVillageID : "", 2)
            // //单位地址
            // this.handleOneCity(even.patCompanyProvinceID ? String(even.patCompanyProvinceID) : "", undefined, "4", 1)
            // this.autoCompanyCitys(even.patCompanyCityID ? String(even.patCompanyCityID) : "", 2)
            // this.autoCompanyVillage(even.patCompanyAreaID ? even.patCompanyAreaID + 'auto' : "", 2)
            // this.autoCompanyHamlet(even.patCompanyVillageID ? even.patCompanyVillageID : "", 2)
            // this.autoAge(this.props.form.getFieldValue('patBirthDate')),
            this.setState({
                posType: even.patCredTypeID,
                isModefined: 1,
                // parms: even,
                credCountry: Number(even.patCountryID),
                credBirthday: even.patBirthDate,
                patiId: even.patID,
            }, () => {
                this.setState({
                    readInfoLoading: false
                })
            })


        }
        //失去焦点进行读卡 --  卡号   不弹窗
        handleNoPopInmation = () => {
            let cardNo = this.props.form.getFieldValue('cardNo');
            let cardTypeID = this.props.form.getFieldValue('cardTypeID');
            if (this.state.popCardVis) {
                return
            }
            if (this.state.isModefined == 1) {
                return
            }
            this.setState({
                noSend: false,
                credAge: undefined,
                credBirthday: undefined,
                // parms:{}
            })
            if (this.state.noSend === false) {
                return
            }
            this.handleVail()
            if (this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length > 0) {
                // console.log("路过。。。。。handleNoPopInmation。。。。。。")
                let data = {}
                data = {
                    params: [{
                        cardTypeID: this.props.form.getFieldValue('cardTypeID') ? this.props.form.getFieldValue('cardTypeID') : '',
                        cardNo: this.props.form.getFieldValue('cardNo') ? this.props.form.getFieldValue('cardNo') : '',
                        credTypeID: '',
                        credNo: ''
                    }],
                }
                this.props.form.resetFields();
                this.props.form.setFieldsValue({ cardNo: cardNo, cardTypeID: cardTypeID, });
                $http.post('urlS', this, {
                    code: '03030009',
                    data: data,
                    success: function (res) {
                        // debugger;
                        this.setState({
                            noSend: true,
                        })
                        console.log("失去焦点进行读卡 --  卡号   不弹窗")
                        if (+res.errorCode === 0 && res.result.data.length > 0) {
                            //判断接口请求成功数据是否返回成功       
                            console.log("-------res.result.patInfo-------", res.result.patInfo)
                            //年龄 出生日期 默认值不是patInfo.
                            this.setState({
                                // readInfoLoading:true,
                                cardNo: res.result.patCurrentCard.cardNo,
                                credAge: res.result.patInfo.patAge ? res.result.patInfo.patAge : undefined,
                                credBirthday: res.result.patInfo.patBirthDate ? res.result.patInfo.patBirthDate : undefined,
                                parms: res.result.patInfo,
                                isModefined: 1,
                            })
                            setTimeout(() => {
                                this.patName.current.focus();
                            }, 300)
                            if (res.result.patInfo.patNo) {
                                const info = res.result.data;
                                const cardInfo = res.result.data
                                for (var i = 0; i < cardInfo.length; i++) {
                                    if (this.props.form.getFieldValue('cardNo') == cardInfo[i].cardNo) {
                                        this.setState({
                                            cardPayMentID: cardInfo[i].cardPayMentID
                                        })
                                    }
                                }
                                //表单回显
                                const even = res.result.patInfo
                                this.setState({
                                    // parms:even,
                                    cardSatus: res.result.patCurrentCard,
                                    patId: res.result.patInfo.patID,
                                    patientInfo: res.result.patInfo,
                                    selfCredNo: res.result.patInfo.patCredNo
                                })

                                this.bingCardArr(info)
                            }
                            else {
                                this.setState({
                                    cardSatus: [],
                                    bindCardArr: []
                                })
                            }
                        } else {
                            if (this.state.cardNoVisible == false) {
                                // setTimeout(() => {
                                //     this.patName.current.focus();
                                // }, 300) 
                            }
                            this.setState({
                                cardSatus: [],
                                bindCardArr: []
                            })
                        }
                    }, error: function () {

                    }
                })
            } else {
                if (this.state.nowRead != "R") {
                    message.warning('请输入卡号');
                }
            }

        }
        //选择建卡类型  code 10 就诊卡 12 身份证 14 银医卡
        handleCred = (data) => {
            this.setState({
                cardNoVisible: false
            })
            this.props.form.setFieldsValue({ cardNo: undefined });
            setTimeout(() => {
                this.cardNo.current.focus();
            }, 300)
            for (var i = 0; i < this.state.baseParms.cardType.length; i++) {
                if (data == this.state.baseParms.cardType[i].id) {
                    this.setState({
                        initCardDr: this.state.baseParms.cardType[i].id,
                        nowRead: this.state.baseParms.cardType[i].readMode,
                        idCardCode: this.state.baseParms.cardType[i].code,
                        cardLength: this.state.baseParms.cardType[i].cardLength && this.state.baseParms.cardType[i].cardLength != "" ? this.state.baseParms.cardType[i].cardLength + "位," : "",
                        nowCost: this.state.baseParms.cardType[i].cardCost,
                        nowInv: this.state.baseParms.cardType[i].invFlag,
                        replenishZero: this.state.baseParms.cardType[i].replenishZero,
                        repariFeeFlag: this.state.baseParms.cardType[i].repariFeeFlag,
                    })
                }
            }
        }
        //不足12字补0
        handleLength = () => {
            if (this.state.replenishZero == "Y" && parseInt(this.state.cardLength) && parseInt(this.state.cardLength) > 0 && this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length > 0) {
                let No = this.props.form.getFieldValue('cardNo') ? this.props.form.getFieldValue('cardNo') : ''
                // console.log("长度",this.state.cardLength,parseInt(this.state.cardLength))
                let length = parseInt(this.state.cardLength)
                let num = (Array(length).join(0) + No).slice(-length)
                this.props.form.setFieldsValue({ cardNo: num });
                this.setState({
                    cardNoVisible: false,
                })
                this.handleNoPopInmation()
                return
            }
            if (this.state.initCardDr == '3' && this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length == 18) {
                this.handleNoPopInmation()
                return
            }
            if (this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length > 0) {
                this.handleNoPopInmation()
            }
        }
        //选择证件类型
        handleCerdType = (data) => {
            setTimeout(() => {
                this.patCredNo.current.focus();
            }, 300)
            this.setState({
                posType: data
            })
        }
        //建卡卡号
        cardTip = (num) => {
            this.props.form.validateFields(['cardNo',], (errors, values) => {
                // console.log(errors, values)
                if (errors == null && num != 1) {
                    setTimeout(() => {
                        this.patName.current.focus();
                    }, 300)
                    return
                }
                if (!errors) {
                    this.setState({
                        cardNoVisible: false
                    })
                    if (num != 1) {
                        if (this.props.form.getFieldValue('cardNo') && this.state.popCardVis == false) {
                            setTimeout(() => {
                                this.patName.current.focus();
                            }, 300)

                        }
                    }
                } else {
                    // console.log("----------",errors)
                    this.setState({
                        cardNoVisible: true,
                        cardNoMessage: errors.cardNo.errors[0].message,
                    })
                }
            });
        }
        //病人姓名
        patNameTip = (num) => {
            this.props.form.validateFields(['patName',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patNameVisible: false
                    })
                    if (num != 2) {
                        setTimeout(() => {
                            this.sex.current.focus();
                        }, 300)
                    }
                } else {
                    this.setState({
                        patNameVisible: true,
                        patNameMessage: errors.patName.errors[0].message,
                    })
                }
            });
        }
        //联系人姓名
        econNameTip = (num) => {
            this.props.form.validateFields(['patEContact',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        econNameVisible: false
                    })
                    if (num != 2) {
                        setTimeout(() => {
                            this.econRelation.current.focus();
                        }, 300)
                    }
                } else {
                    this.setState({
                        econNameVisible: true,
                        econNameMessage: errors.patEContact.errors[0].message,
                    })
                }
            });
        }
        //病人出生日期
        patBirthTip = () => {
            this.props.form.validateFields(['patBirthDate',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patBirthVisible: false
                    })
                    if (this.props.form.getFieldValue('patBirthDate')) {
                        setTimeout(() => {
                            this.patMobile.current.focus();
                        }, 300)
                    }
                } else {
                    this.setState({
                        patBirthVisible: true,
                        patBirthMessage: errors.patBirthDate.errors[0].message,
                    })
                    //     setTimeout(() => {
                    //        this.setState({
                    //         patNameVisible: false, // tip提示
                    //        });
                    //    }, 3000);
                    //    setTimeout(() => {
                    //        this.cardNo.current.focus();
                    //    }, 300)
                }
            });
        }
        //证件号
        posTip = (data, num) => {
            this.props.form.validateFields(['patCredNo',], (errors, values) => {
                if (!errors) {
                    this.setState({
                        posVisible: false
                    })
                    if (this.props.form.getFieldValue('patCredTypeID') == '1') {
                        // this.handleInmations(this.props.form.getFieldValue('patCredNo'))
                        if (this.props.form.getFieldValue('patCredNo').length == 18 && this.state.credWarning == false) {
                            this.setState({
                                credBirthday: this.getBirthday(data),
                                credAge: this.getAge(data),
                            })
                            this.props.form.setFieldsValue({ patSexID: this.getSex(data), patBirthDate: moment(this.getBirthday(data)) });
                            this.handleInmations(data)
                            if (num != 2) {
                                setTimeout(() => {
                                    this.patMobile.current.focus();
                                }, 300)
                            }
                        }
                    } else {

                    }
                } else {
                    this.setState({
                        posVisible: true,
                        posMessage: errors.patCredNo.errors[0].message,
                    })
                }
            });
        }
        //病人手机号码
        patMobileTip = (num) => {
            this.props.form.validateFields(['patMobile',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patMobileVisible: false
                    })
                    if (num != 2) {
                        if (this.props.form.getFieldValue('patMobile')) {
                            setTimeout(() => {
                                this.patType.current.focus();
                            }, 300)
                        }
                    }
                } else {
                    this.setState({
                        patMobileVisible: true,
                        patMobileMessage: errors.patMobile.errors[0].message,
                    })
                    //     setTimeout(() => {
                    //        this.setState({
                    //         patNameVisible: false, // tip提示
                    //        });
                    //    }, 3000);
                    //    setTimeout(() => {
                    //        this.cardNo.current.focus();
                    //    }, 300)
                }
            });
        }
        //病人类型
        patTypeTip = () => {
            this.props.form.validateFields(['patTypeID',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patTypeVisible: false
                    })
                    if (this.props.form.getFieldValue('patCountryID') == 44 && this.props.form.getFieldValue('patNationID') == undefined) {
                        setTimeout(() => {
                            this.nation.current.focus();
                        }, 300)
                    } else {
                        // console.log("patTypeTip----0")
                        setTimeout(() => {
                            this.patAddress.current.focus();
                        }, 300)
                    }
                } else {
                    this.setState({
                        patTypeVisible: true,
                        patTypeMessage: errors.patTypeID.errors[0].message,
                    })
                    //     setTimeout(() => {
                    //        this.setState({
                    //         patNameVisible: false, // tip提示
                    //        });
                    //    }, 3000);
                    //    setTimeout(() => {
                    //        this.cardNo.current.focus();
                    //    }, 300)
                }
            });
        }
        //详细地址
        patAdressTip = (num) => {
            const { repariFeeFlag, nowCost, isModefined, isFlag, noCard } = this.state
            this.props.form.validateFields(['presentAddressDesc',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patAdressVisible: false
                    })
                    if (num != 2) {
                        if (this.props.form.getFieldValue('presentAddressDesc')) {
                            if (repariFeeFlag == "Y" || nowCost == 0 || isModefined == 1 || isFlag == 3 || !noCard) {
                                setTimeout(() => {
                                    this.creadCard.current.buttonNode.focus();
                                }, 300)
                            } else {
                                setTimeout(() => {
                                    this.cardPayMethodID.current.focus();
                                }, 600)
                            }

                        }
                    }
                } else {
                    this.setState({
                        patAdressVisible: true,
                        patAdressMessage: errors.presentAddressDesc.errors[0].message,
                    })
                }
            });
        }
        //详细地址单位邮编
        patAdressComZipTip = (num) => {
            const { repariFeeFlag, nowCost, isModefined, isFlag, noCard } = this.state
            this.props.form.validateFields(['companyZIP',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patAdressComZipVisible: false
                    })
                    if (num != 2) {

                    }
                } else {
                    this.setState({
                        patAdressComZipVisible: true,
                        patAdressComMessageZip: errors.companyZIP.errors[0].message,
                    })
                }
            });
        }
        //详细地址户口邮编
        patAdressHouseZipTip = (num) => {
            const { repariFeeFlag, nowCost, isModefined, isFlag, noCard } = this.state
            this.props.form.validateFields(['registerZIP',], (errors, values) => {
                // console.log(errors, values)
                if (!errors) {
                    this.setState({
                        patAdressHouseZipVisible: false
                    })
                    if (num != 2) {

                    }
                } else {
                    this.setState({
                        patAdressHouseZipVisible: true,
                        patAdressHouseMessageZip: errors.registerZIP.errors[0].message,
                    })
                }
            });
        }
        //详细地址邮编
        patAdressZipTip = (num) => {
            // debugger;
            const { repariFeeFlag, nowCost, isModefined, isFlag, noCard } = this.state
            this.props.form.validateFields(['presentZIP',], (errors, values) => {
                // console.log(errors, values)
                if (errors == undefined) {
                    return
                }
                if (!errors) {
                    this.setState({
                        patAdressZipVisible: false
                    })
                    if (num != 2) {
                        // if (this.props.form.getFieldValue('presentZIP')) {
                        //     if(repariFeeFlag=="Y"||nowCost == 0 || isModefined == 1 || isFlag == 3 ||!noCard){
                        //         setTimeout(() => {
                        //             this.creadCard.current.buttonNode.focus();
                        //         }, 300)
                        //     }else{
                        //         setTimeout(() => {
                        //             this.cardPayMethodID.current.focus();
                        //         }, 600)
                        //     }

                        // }
                    }
                } else {
                    this.setState({
                        patAdressZipVisible: true,
                        patAdressMessageZip: errors.presentZIP.errors[0].message,
                    })
                }
            });
        }
        //联系人手机
        econPhoneTip = () => {
            this.props.form.validateFields(['patEContactMobile',], (errors, values) => {
                // console.log(errors, values)
                // debugger;
                if (!errors) {
                    // debugger;
                    this.setState({
                        econPhoneVisible: false
                    })
                    if (this.props.form.getFieldValue('patEContactMobile')) {
                        setTimeout(() => {
                            this.patCompany.current.focus();
                        }, 300)
                    }
                } else {
                    this.setState({
                        econPhoneVisible: true,
                        econPhoneMessage: errors.patEContactMobile.errors[0].message,
                    })
                }
            });
        }

        //绑卡操作
        bindCardTip = () => {
            this.props.form.validateFields(['cardBindNo',], (errors, values) => {
                if (errors == null) {
                    return
                }
                if (errors.cardBindNo.errors[0].message == "cardBindNo need to revalidate") {
                    this.setState({
                        bindCardVisible: false
                    })
                    return
                }
                if (!errors) {
                    this.setState({
                        bindCardVisible: false
                    })
                } else {
                    if (this.props.form.getFieldValue("cardBindNo") && this.props.form.getFieldValue("cardBindNo").length > 0) {
                        this.setState({
                            bindCardVisible: true,
                            bindCardMessage: errors.cardBindNo.errors[0].message,
                        })
                    }
                }
            });
        }
        //补卡操作
        patchCardTip = () => {
            this.props.form.validateFields(['patchNumber',], (errors, values) => {
                if (errors == null) {
                    return
                }
                if (errors.patchNumber.errors[0].message == "patchNumber need to revalidate") {
                    this.setState({
                        patchCardVisible: false
                    })
                    return
                }
                if (!errors) {
                    this.setState({
                        patchCardVisible: false
                    })
                } else {
                    if (this.props.form.getFieldValue("patchNumber") && this.props.form.getFieldValue("patchNumber").length > 0) {
                        this.setState({
                            patchCardVisible: true,
                            patchCardMessage: errors.patchNumber.errors[0].message,
                        })
                    }
                }
            });
        }
        //换卡操作
        changCardTip = () => {
            this.props.form.validateFields(['cardNumber',], (errors, values) => {
                if (errors == null) {
                    return
                }
                if (errors.cardNumber.errors[0].message == "cardNumber need to revalidate") {
                    this.setState({
                        changeCardVisible: false
                    })
                    return
                }
                if (!errors) {
                    this.setState({
                        changeCardVisible: false
                    })
                } else {
                    if (this.props.form.getFieldValue("cardNumber") && this.props.form.getFieldValue("cardNumber").length > 0) {
                        this.setState({
                            changeCardVisible: true,
                            changeCardMessage: errors.cardNumber.errors[0].message,
                        })
                    }
                }
            });
        }
        //失去焦点 绑定卡
        bindCardBlur = () => {
            this.handleZero();
            this.bindCardTip();
        }
        //输入改变时 不可绑定
        closeBindVail = () => {
            this.setState({
                bindVail: true,
                changeCardVisible: false,
                patchCardVisible: false,
                bindCardVisible: false,
            })
        }
        //失去焦点 changeCard
        changeCardBlur = (flag) => {
            if (flag == 1) {
                this.handleZero()
                //检测卡号格式 错误提示
                this.changCardTip();
            } else {
                this.handleZero()
                //检测卡号格式 错误提示
                this.patchCardTip();
            }
        }
        //失去焦点 patName
        patBlur = () => {
            this.patNameTip(2)
        }
        //失去焦点 patName
        patEconNameBlur = () => {
            this.econNameTip(2)
        }
        //失去焦点 patMobile
        patMobileBlur = () => {
            this.patMobileTip(2)
        }
        //失去焦点 patTypeId
        patTypeBlur = () => {
            this.patTypeTip()
        }
        //失去焦点 payMethods
        patAdressBlur = () => {
            this.patAdressTip(2)
        }
        //身份证点击获取焦点
        fouceCredNo = () => {
            setTimeout(() => {
                this.patCredNo.current.focus();
            }, 300)
        }
        // 失去焦点--日期
        onChangeTimeBlur = () => {
            this.setState({
                formatType: true
            });
        }
        checkPatMobile = () => {
            this.econPhoneTip()
        }
        //必填项错误提示显示时 框内内容变化 隐藏
        visibleTip = (num) => {
            switch (num) {
                case 1:
                    this.setState({
                        cardNoVisible: false
                    })
                    break;
                case 2:
                    this.setState({
                        patNameVisible: false
                    })
                    break;
                case 3:
                    this.setState({
                        posVisible: false
                    })
                    break;
                case 4:
                    this.setState({
                        patMobileVisible: false
                    })
                    break;
                case 5:
                    this.setState({
                        patAdressVisible: false
                    })
                    break;
                case 6:
                    this.setState({
                        changeCardVisible: false
                    })
                    break;
                case 8:
                    this.setState({
                        bindCardVisible: false
                    })
                    break;
                case 9:
                    this.setState({
                        patTypeVisible: false
                    })
                    break;
                case 10:
                    this.setState({
                        patBirthVisible: false,
                        formatType: false
                    })
                    break;
                case 11:
                    this.setState({
                        econPhoneVisible: false,
                    })
                case 12:
                    this.setState({
                        econNameVisible: false,
                    })
                    break;
                case 13:
                    this.setState({
                        patAdressZipVisible: false,
                    })
                    break;
                case 14:
                    this.setState({
                        patAdressHouseZipVisible: false,
                    })
                    break;
                case 15:
                    this.setState({
                        patAdressComZipVisible: false,
                    })
                    break;
                default:

            }
        }
        //下拉框无数据时 跳到下一个必填项
        checkOption = (num) => {
            switch (num) {
                case 1:
                    setTimeout(() => {
                        if (this.state.bornhamlets.length == 0) {
                            this.patAddress.current.focus();
                        }
                    }, 600)
                    break;
                case 2:
                    setTimeout(() => {
                        if (this.state.nativehamlets.length == 0) {
                            this.patAddress.current.focus();
                        }
                    }, 600)
                    break;
                case 3:
                    setTimeout(() => {
                        if (this.state.hamlets.length == 0) {
                            this.patAddress.current.focus();
                        }
                    }, 600)
                    break;
                case 4:
                    setTimeout(() => {
                        if (this.state.househamlets.length == 0) {
                            this.cardPayMethodID.current.focus();
                        }
                    }, 600)
                    break;
                case 5:
                    setTimeout(() => {
                        if (this.state.eContacthamlets.length == 0) {
                            this.cardPayMethodID.current.focus();
                        }
                    }, 600)
                    break;
                case 6:
                    setTimeout(() => {
                        if (this.state.workhamlets.length == 0) {
                            this.cardPayMethodID.current.focus();
                        }
                    }, 600)
                    break;
                default:

            }
        }
        //进行卡号检测补0操作
        handleZero = () => {
            if (this.state.popCardVis) {
                if (this.state.isFlag == 3 || this.state.isFlag == 4) {
                    this.chaeckLength(this.state.isFlag)
                } else { //绑定
                    this.checkLength()
                }
            } else {
                if (this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length == 0) {
                    this.setState({
                        cardNoVisible: false
                    })
                    return
                } else {
                    this.handleLength()
                }
            }
        }
        //失去焦点 patCard
        patCardBlur = () => {
            this.handleZero()
            this.cardTip(1)
        }
        //回车调到下一个必填项 卡号--->姓名
        handleKeydownM = (num) => {
            switch (num) {
                case 1:
                    this.handleZero()
                    this.cardTip()
                    break;
                case 2:
                    this.patNameTip()
                    break;
                case 3:
                    if (this.props.form.getFieldValue('patSexID')) {
                        setTimeout(() => {
                            this.credType.current.focus();
                        }, 300)
                    }
                    break;
                case 4:
                    if (this.props.form.getFieldValue('patCredTypeID')) {
                        setTimeout(() => {
                            this.patCredNo.current.focus();
                        }, 300)
                    }
                    break;
                case 5:
                    this.posTip()
                    break;
                case 6:
                    this.patMobileTip()
                    break;
                case 7:
                    // this.patTypeTip()
                    this.setState({
                        patTypeVisible: false
                    })
                    if (this.props.form.getFieldValue('patCountryID') == 44 && this.props.form.getFieldValue('patNationID') == undefined) {
                        setTimeout(() => {
                            this.nation.current.focus();
                        }, 300)
                    } else {
                        setTimeout(() => {
                            this.patAddress.current.focus();
                        }, 300)
                    }
                    break;
                case 8:
                    if (this.props.form.getFieldValue('patNationID')) {
                        setTimeout(() => {
                            this.patAddress.current.focus();
                        }, 300)
                    }
                    break;
                case 9:
                    this.patAdressTip()
                    break;
                case 10:
                    if (this.state.nowCost != 0 && this.props.form.getFieldValue('cardPayMethodID')) {
                        setTimeout(() => {
                            this.creadCard.current.buttonNode.focus();
                        }, 300)
                    }
                    break;
                case 11:
                    this.econNameTip()
                    break;
                case 12:
                    this.econPhoneTip()
                    // if (this.props.form.getFieldValue('patEContactMobile')) {
                    //     setTimeout(() => {
                    //         this.econMobile.current.focus();
                    //     }, 300)
                    // }
                    break;
                case 13:
                    setTimeout(() => {
                        this.econProvince.current.focus();
                    }, 300)
                    break;
                case 14:
                    setTimeout(() => {
                        this.econHamlet.current.focus()
                    }, 300)
                    break;
                case 14.1:
                    setTimeout(() => {
                        this.contactsAddress.current.focus()
                    }, 300)
                    break;
                case 14.2:
                    setTimeout(() => {
                        this.cardPayMethodID.current.focus()
                    }, 300)
                    break;
                case 15:
                    if (this.props.form.getFieldValue('patCompany')) {
                        setTimeout(() => {
                            this.patCompanyTel.current.focus();
                        }, 300)
                    }
                    break;
                case 16:
                    if (this.props.form.getFieldValue('patCompanyTel')) {
                        setTimeout(() => {
                            this.companyProvince.current.focus();
                        }, 300)
                    }
                    break;
                case 17:
                    setTimeout(() => {
                        this.companyAddress.current.focus();
                    }, 300)
                    break;
                case 18:
                    if (this.props.form.getFieldValue('companyAddress')) {
                        setTimeout(() => {
                            this.companyZIP.current.focus();
                        }, 300)
                    }
                    break;
                case 19:
                    this.patAdressComZipTip()
                    break;
                case 20:
                    setTimeout(() => {
                        this.patAddress.current.focus();
                    }, 300)
                    break;
                case 21:
                    setTimeout(() => {
                        this.patAddress.current.focus();
                    }, 300)
                    break;
                case 22:
                    setTimeout(() => {
                        this.birthAddress.current.focus();
                    }, 300)
                    break;
                case 23:
                    setTimeout(() => {
                        this.patAddress.current.focus();
                    }, 300)
                    break;
                case 24:
                    setTimeout(() => {
                        this.nativeAddress.current.focus();
                    }, 300)
                    break;
                case 25:
                    setTimeout(() => {
                        this.patAddress.current.focus();
                    }, 300)
                    break;
                case 26:
                    setTimeout(() => {
                        this.patAddress.current.focus();
                    }, 300)
                    break;
                case 27://现住址邮编
                    // debugger;
                    this.patAdressZipTip()
                    // setTimeout(() => {
                    //     this.cardPayMethodID.current.focus();
                    // }, 300)
                    break;
                case 28:
                    setTimeout(() => {
                        this.houseAddress.current.focus();
                    }, 300)
                    break;
                case 29:
                    if (this.props.form.getFieldValue('houseAddress')) {
                        setTimeout(() => {
                            this.registerZIP.current.focus();
                        }, 300)
                    }
                    break;
                case 30:
                    this.patAdressHouseZipTip()
                    // setTimeout(() => {
                    //     this.cardPayMethodID.current.focus();
                    // }, 300)
                    break;
                default:
                    setTimeout(() => {
                        this.creadCard.current.buttonNode.focus();
                    }, 300)
            }
        }
        //选择身份标签
        handleposTag = (data) => {
            setTimeout(() => {
                this.cardPayMethodID.current.focus();
            }, 300)
            this.setState({
                socialTag: data
            })
            //三无人员时证件类型/证件号 可不必填
            if (data == 4) {
                if (this.props.form.getFieldValue('patCredNo') && this.props.form.getFieldValue('patCredNo').length > 0) {
                } else {
                    this.props.form.setFieldsValue({ patCredTypeID: undefined });
                    this.setState({
                        posType: '-1'
                    })
                }
            } else {
                if (this.props.form.getFieldValue('patCredNo') && this.props.form.getFieldValue('patCredNo').length > 0) {
                } else {
                    this.setState({
                        posType: 1
                    })
                    this.props.form.setFieldsValue({ patCredTypeID: '1' });
                }

            }
        }
        //输入身份证号码 自动获取到出生日期 年龄
        validCard = (e, num) => {
            if (this.props.form.getFieldValue('patCredNo') && this.props.form.getFieldValue('patCredNo').length > 0 && this.props.form.getFieldValue('patCredTypeID') == "1") {
                this.posTip(e.target.value, num)
                return
            }
            if (this.props.form.getFieldValue('patCredTypeID') != "1" && this.props.form.getFieldValue('patCredNo') && this.props.form.getFieldValue('patCredNo').length > 0) {
                setTimeout(() => {
                    this.patBirthDate.current.focus();
                }, 300)
            }
            // if (this.state.posType == 1 && e.target.value.length == 0) {
            //     message.warning("请输入身份证号")
            //     return
            // }
        }
        onCityFocus = (provinceFlag, cityFlag) => {
            let city = this.state[cityFlag];
            let provinceID = this.props.form.getFieldValue(provinceFlag);
            if ((city.length === 0) && (provinceID)) {
                let newCity = []
                newCity = this.state.localCity.filter((item) => item.province == provinceID);
                this.setState({
                    [cityFlag]: newCity,
                })
            }
        }
        //选择乡时加载村数据
        getHamlets = (villageID, flag) => {
            let data = {
                params: [{
                    villageId: villageID
                }],
            }
            $http.post('urlS', this, {
                code: '03030008',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            [flag + "hamlets"]: res.result,
                        })
                    } else {
                        this.setState({
                            [flag + "hamlets"]: [],
                        })
                    }
                }
            })

        }
        //选择或清除省
        onProvinceChange(flag, value, option) {
            //   console.log(flag,flag+"City")
            if (value) {
                let city = []
                city = this.state.localCity.filter((item) => item.province == value);
                let patInfo = this.state.parms;
                let patFlag = this.firstToUp(flag);
                if (patInfo["pat" + patFlag + "ProvinceID"]) {
                    patInfo["pat" + patFlag + "ProvinceID"] = undefined;
                    patInfo["pat" + patFlag + "CityID"] = undefined;
                    patInfo["pat" + patFlag + "AreaID"] = undefined;
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                switch (flag) {
                    case "birth":
                        setTimeout(() => {
                            this.birthCity.current.focus();
                        }, 300)
                        break;
                    case "native":
                        setTimeout(() => {
                            this.nativeCity.current.focus();
                        }, 300)
                        break;
                    case "present":
                        setTimeout(() => {
                            this.city.current.focus();
                        }, 300)
                        break;
                    case "register":
                        setTimeout(() => {
                            this.houseCity.current.focus();
                        }, 300)
                        break;
                    case "company":
                        setTimeout(() => {
                            this.companyCity.current.focus();
                        }, 300)
                        break;
                    case "contact":
                        setTimeout(() => {
                            this.econCity.current.focus();
                        }, 300)
                        break;
                }
                this.setState({
                    [flag + "City"]: city,
                    [flag + "Areas"]: [],
                    [flag + "Villages"]: [],
                    [flag + "Hamlets"]: [],
                    parms: patInfo,
                })
            } else {
                //清除省
                this.props.form.setFieldsValue({
                    [flag + "CityID"]: undefined,
                    [flag + "AreaID"]: undefined,
                    [flag + "VillageID"]: undefined,
                    [flag + "HamletID"]: undefined
                });
                let patInfo = this.state.parms;
                let patFlag = this.firstToUp(flag);
                if (patInfo["pat" + patFlag + "ProvinceID"]) {
                    patInfo["pat" + patFlag + "ProvinceID"] = undefined;
                    patInfo["pat" + patFlag + "CityID"] = undefined;
                    patInfo["pat" + patFlag + "AreaID"] = undefined;
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                this.setState({
                    [flag + "City"]: [],
                    [flag + "Areas"]: [],
                    [flag + "Villages"]: [],
                    [flag + "Hamlets"]: [],
                    parms: patInfo,
                })
            }
        }
        //首字母大写
        firstToUp = (str) => {
            return str.substring(0, 1).toUpperCase() + str.substring(1);
            // 正则法
            // str = str.toLowerCase();
            // var reg = /\b(\w)|\s(\w)/g; //  \b判断边界\s判断空格
            // return str.replace(reg, function (m) {
            //     return m.toUpperCase()
            // });
        }
        onCityFocus = (provinceFlag, cityFlag) => {
            let city = this.state[cityFlag];
            let provinceID = this.props.form.getFieldValue(provinceFlag);
            if ((city.length === 0) && (provinceID)) {
                let newCity = []
                newCity = this.state.localCity.filter((item) => item.province == provinceID);
                this.setState({
                    [cityFlag]: newCity,
                })
            }

        }
        //选择或清除市
        onCityChange(flag, value, option) {
            if (value) {
                this.props.form.setFieldsValue({
                    [flag + "ProvinceID"]: option.props.provinceid,
                    [flag + "AreaID"]: undefined,
                    [flag + "VillageID"]: undefined,
                    [flag + "HamletID"]: undefined
                });
                switch (flag) {
                    case "birth":
                        setTimeout(() => {
                            this.bornCountry.current.focus();
                        }, 300)
                        break;
                    case "native":
                        setTimeout(() => {
                            this.nativeCountry.current.focus();
                        }, 300)
                        break;
                    case "present":
                        setTimeout(() => {
                            this.country.current.focus();
                        }, 300)
                        break;
                    case "register":
                        setTimeout(() => {
                            this.houseCountry.current.focus();
                        }, 300)
                        break;
                    case "company":
                        setTimeout(() => {
                            this.companyCountry.current.focus();
                        }, 300)
                        break;
                    case "contact":
                        setTimeout(() => {
                            this.econCountry.current.focus();
                        }, 300)
                        break;
                }
                let patInfo = this.state.parms;
                let patFlag = this.firstToUp(flag);
                if (patInfo["pat" + patFlag + "CityID"]) {
                    patInfo["pat" + patFlag + "CityID"] = undefined;
                    patInfo["pat" + patFlag + "AreaID"] = undefined;
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                this.setState({
                    parms: patInfo,
                })
                this.getAreas(value, flag, "1");
            } else {
                //清除市
                this.props.form.setFieldsValue({
                    [flag + "CityID"]: undefined,
                    [flag + "AreaID"]: undefined,
                    [flag + "VillageID"]: undefined,
                    [flag + "HamletID"]: undefined
                });
                let patInfo = this.state.parms;
                let patFlag = this.firstToUp(flag);
                if (patInfo["pat" + patFlag + "CityID"]) {
                    patInfo["pat" + patFlag + "CityID"] = undefined;
                    patInfo["pat" + patFlag + "AreaID"] = undefined;
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                this.setState({
                    [flag + "Areas"]: [],
                    [flag + "Villages"]: [],
                    [flag + "Hamlets"]: [],
                    parms: patInfo,
                })
            }
        }
        //选择市时加载县数据
        getAreas = (cityID, flag, cleanFlag) => {
            let data = {
                params: [{
                    cityId: cityID
                }],
            }
            $http.post('urlS', this, {
                code: '03030006',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        if (cleanFlag === "1") {
                            this.setState({
                                [flag + "Areas"]: res.result,
                                [flag + "Villages"]: [],
                                [flag + "Hamlets"]: [],
                            })
                        } else {
                            this.setState({
                                [flag + "Areas"]: res.result,
                            })
                        }
                    } else {
                        this.setState({
                            [flag + "Areas"]: [],
                            [flag + "Villages"]: [],
                            [flag + "Hamlets"]: [],
                        })
                    }
                }
            })

        }
        //选择或清除县
        onAreaChange(flag, value, option) {
            if (value) {
                this.props.form.setFieldsValue({
                    [flag + "VillageID"]: undefined,
                    [flag + "HamletID"]: undefined
                });
                this.getVillages(value, flag, "1");
                switch (flag) {
                    case "birth":
                        setTimeout(() => {
                            this.bornVillage.current.focus();
                        }, 300)
                        break;
                    case "native":
                        setTimeout(() => {
                            this.nativeVillage.current.focus();
                        }, 300)
                        break;
                    case "present":
                        setTimeout(() => {
                            this.village.current.focus();
                        }, 300)
                        break;
                    case "register":
                        setTimeout(() => {
                            this.houseVillage.current.focus()
                        }, 300)
                        break;
                    case "company":
                        setTimeout(() => {
                            this.companyVillage.current.focus()
                        }, 300)
                        break;
                    case "contact":
                        setTimeout(() => {
                            this.econVillage.current.focus()
                        }, 300)
                        break;
                }
            } else {
                //清除市
                this.props.form.setFieldsValue({
                    [flag + "VillageID"]: undefined,
                    [flag + "HamletID"]: undefined
                });
                let patInfo = this.state.parms;
                let patFlag = "";
                switch (flag) {
                    case "birth":
                        patFlag = "Birth";
                        break;
                    case "native":
                        patFlag = "Native";
                        break;
                    case "present":
                        patFlag = "Present";
                        break;
                    case "register":
                        patFlag = "Register";
                        break;
                    case "company":
                        patFlag = "Company";
                        break;
                    case "contact":
                        patFlag = "Contact";
                        break;
                }
                if (patInfo["pat" + patFlag + "AreaID"]) {
                    patInfo["pat" + patFlag + "AreaID"] = undefined;
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                this.setState({
                    [flag + "Villages"]: [],
                    [flag + "Hamlets"]: [],
                    parms: patInfo,
                })
            }
        }
        //县获取焦点
        onAreaFocus(cityFlag, areaFlag) {
            let area = this.state[areaFlag + "Areas"];
            let cityID = this.props.form.getFieldValue(cityFlag);
            if ((area.length === 0) && (cityID)) {
                this.getAreas(cityID, areaFlag, "0");
            }
        }
        //选择或清除乡
        onVillageChange(flag, value, option) {
            if (value) {
                this.props.form.setFieldsValue({
                    [flag + "HamletID"]: undefined
                });
                this.getHamlets(value, flag);
                switch (flag) {
                    case "birth":
                        setTimeout(() => {
                            this.bornHamlet.current.focus()
                        }, 300)
                        break;
                    case "native":
                        setTimeout(() => {
                            this.nativeHamlet.current.focus()
                        }, 300)
                        break;
                    case "present":
                        setTimeout(() => {
                            this.hamlet.current.focus()
                        }, 300)
                        break;
                    case "register":
                        setTimeout(() => {
                            this.houseHamlet.current.focus()
                        }, 300)
                        break;
                    case "company":
                        setTimeout(() => {
                            this.companyHamlet.current.focus()
                        }, 300)
                        break;
                    case "contact":
                        setTimeout(() => {
                            this.econHamlet.current.focus()
                        }, 300)
                        break;
                }
            } else {
                //清除市
                this.props.form.setFieldsValue({
                    [flag + "HamletID"]: undefined
                });
                let patInfo = this.state.parms;
                let patFlag = "";
                switch (flag) {
                    case "birth":
                        patFlag = "Birth";
                        break;
                    case "native":
                        patFlag = "Native";
                        break;
                    case "present":
                        patFlag = "Present";
                        break;
                    case "register":
                        patFlag = "Register";
                        break;
                    case "company":
                        patFlag = "Company";
                        break;
                    case "contact":
                        patFlag = "Contact";
                        break;
                }
                if (patInfo["pat" + patFlag + "VillageID"]) {
                    patInfo["pat" + patFlag + "VillageID"] = undefined;
                    patInfo["pat" + patFlag + "HamletID"] = undefined;
                }
                this.setState({
                    [flag + "Hamlets"]: [],
                    parms: patInfo,
                })
            }
        }
        //乡获取焦点时调用
        onVillageFocus(areaFlag, villageFlag) {
            let village = this.state[villageFlag + "Villages"];
            let areaID = this.props.form.getFieldValue(areaFlag);
            if ((village.length === 0) && (areaID)) {
                this.getVillages(areaID, villageFlag, "0");
            }
        }
        //选择县时加载乡数据
        getVillages = (countyID, flag, cleanFlag) => {
            let data = {
                params: [{
                    areaId: countyID,
                }],
            }
            $http.post('urlS', this, {
                code: '03030007',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        if (cleanFlag === "1") {
                            this.setState({
                                [flag + "Villages"]: res.result,
                                [flag + "Hamlets"]: [],
                            })
                        } else {
                            this.setState({
                                [flag + "Villages"]: res.result,
                            })
                        }
                    } else {
                        this.setState({
                            [flag + "Villages"]: [],
                            [flag + "Hamlets"]: [],
                        })
                    }
                }
            })

        }
        onHamletFocus(villageFlag, hamletsFlag) {
            let hamlets = this.state[hamletsFlag + "Hamlets"];
            let villageID = this.props.form.getFieldValue(villageFlag);
            if ((hamlets.length === 0) && (villageID)) {
                this.getHamlets(villageID, hamletsFlag);
            }
        }
        //选择国籍 -- 民族
        handleCountry = (data, dats) => {
            this.setState({
                credCountry: data
            })
            if (data != 44) {
                this.props.form.setFieldsValue({ patNationID: undefined });
            }
        }
        //获取到出生日期自动计算年龄
        autoAge = (patBirthDate) => {
            let data = {}
            data = {
                params: [{
                    birthday: patBirthDate
                }],
            }
            $http.post('urlS', this, {
                code: '03030013',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0) {
                        this.setState({
                            credAge: res.result
                        })
                    } else {

                    }
                }
            })
        }
        //选择日期面板 计算年龄
        onPanelChange = (strBirthday) => {
            this.patBirthTip()
            this.setState({
                patBirthVisible: false,
                credBirthday: moment(strBirthday).format("YYYY-MM-DD")
            })
            // console.log(moment(strBirthday).format('YYYY-MM-DD'),moment(strBirthday).format('YYYY-MM-DD').length)
            let strBirthdayArr = moment(strBirthday).format('YYYY-MM-DD');
            this.autoAge(strBirthdayArr);
        }
        //查找病人 --- 自动映射地址 
        //出生地  --- 市 --> 县
        autoCitys = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.bornCountry.current.focus();
                }, 300)
            } else {
                let datas = {}
                datas = {
                    params: [{
                        cityId: data
                    }],
                }
                if (data > 0) {
                    $http.post('urlS', this, {
                        code: '03030006',
                        data: datas,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.setState({
                                    bornCountys: res.result
                                })
                            } else {

                            }
                        }
                    })
                }
            }
        }
        //籍贯  --- 市 --> 县
        handleOneCountys = (data, num) => {
            console.log(data.length)
            if (num != 2) {
                setTimeout(() => {
                    this.nativeCountry.current.focus();
                }, 300)
            }

            // this.props.form.setFieldsValue({ nativeCityDr: data ? data : undefined });
            if (this.state.localArea && this.state.localArea.length > 0) {
                let area = this.state.localArea.filter((item) => item.city == data);
                this.setState({
                    nativeCountys: area,
                    nativeVillages: [],
                    nativehamlets: [],
                })
            } else {
                let datas = {}
                datas = {
                    params: [{
                        cityId: data
                    }],
                }
                if (data > 0) {
                    $http.post('urlS', this, {
                        code: '03030006',
                        data: datas,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                // console.log(res.result)
                                this.setState({
                                    nativeCountys: res.result
                                })
                            } else {

                            }
                        }
                    })
                }
            }
        }
        //--籍贯地址  --- 市 --> 县
        autoNativeCitys = (data, dats, num) => {
            setTimeout(() => {
                this.nativeCountry.current.focus();
            }, 300)
            if (dats != undefined) {
                let str = dats.props.className
                if (this.state.localArea && this.state.localArea.length > 0) {
                    this.props.form.setFieldsValue({ nativeAreaDr: undefined, nativeVillageDr: undefined, nativeHamletDr: undefined });
                    let area = this.state.localArea.filter((item) => item.city == data);
                    this.setState({
                        nativeCountys: area,
                        nativeVillages: [],
                        nativehamlets: [],
                        proviceNativeId: str.slice(1)
                    })
                    this.props.form.setFieldsValue({ nativeProvinceBDr: String(str.slice(1)) });
                    this.handleOneSelectProvince(str.slice(1), str.substr(0, 1))
                } else {
                    let datas = {}
                    datas = {
                        params: [{
                            cityId: data
                        }],
                    }
                    if (data > 0) {
                        $http.post('urlS', this, {
                            code: '03030006',
                            data: datas,
                            success: function (res) {
                                if (+res.errorCode === 0) {
                                    this.setState({
                                        nativeCountys: res.result,
                                        proviceNativeId: str.slice(1)
                                    })
                                    this.props.form.setFieldsValue({ nativeAreaDr: undefined, nativeVillageDr: undefined, nativeHamletDr: undefined });
                                    this.props.form.setFieldsValue({ nativeProvinceBDr: String(str.slice(1)) });
                                    this.handleOneSelectProvince(str.slice(1), str.substr(0, 1))
                                } else {

                                }
                            }
                        })
                    }

                }
            } else {
                if (num == '2') {
                    this.props.form.setFieldsValue({ nativeAreaDr: undefined, nativeVillageDr: undefined, nativeHamletDr: undefined });
                    this.setState({
                        nativeCountys: [],
                        nativeVillages: [],
                        nativehamlets: [],
                    })
                }
            }

        }
        //--户口地址  --- 市 --> 县
        autoHouseCitys = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.houseCountry.current.focus();
                }, 300)
            }
            if (this.state.localArea && this.state.localArea.length > 0) {
                let area = this.state.localArea.filter((item) => item.city == data);
                this.setState({
                    houseCountys: area,
                    houseVillages: [],
                    househamlets: [],
                })
            } else {
                let datas = {}
                datas = {
                    params: [{
                        cityId: data
                    }],
                }
                if (data.length > 0) {
                    $http.post('urlS', this, {
                        code: '03030006',
                        data: datas,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.setState({
                                    houseCountys: res.result
                                })
                            } else {

                            }
                        }
                    })
                }
            }
        }
        //单位地址 --- 市 --> 县
        autoCompanyCitys = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.companyCountry.current.focus();
                }, 300)
            }

            if (this.state.localArea && this.state.localArea.length > 0) {
                let area = this.state.localArea.filter((item) => item.city == data);
                this.setState({
                    workCountys: area,
                    workVillages: [],
                    workhamlets: [],
                })
            } else {
                let datas = {}
                datas = {
                    params: [{
                        cityId: data
                    }],
                }
                if (data > 0) {
                    $http.post('urlS', this, {
                        code: '03030006',
                        data: datas,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.setState({
                                    workCountys: res.result
                                })
                            } else {

                            }
                        }
                    })
                }
            }
        }
        //联系人地址 -- 市 --> 县
        autoContactsCitys = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.econCountry.current.focus();
                }, 300)
            }

            if (this.state.localArea && this.state.localArea.length > 0) {
                let area = this.state.localArea.filter((item) => item.city == data);
                this.setState({
                    eContactCountys: area,
                    eContactVillages: [],
                    eContacthamlets: [],
                })
            } else {
                let datas = {}
                datas = {
                    params: [{
                        cityId: data
                    }],
                }
                if (data > 0) {
                    $http.post('urlS', this, {
                        code: '03030006',
                        data: datas,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.setState({
                                    eContactCountys: res.result
                                })
                            } else {

                            }
                        }
                    })
                }
            }
        }

        //出生地地址 -- 县 --> 乡
        autoVillage = (data, dats, num) => {
            if (dats != undefined) {
                if (data != 'undefinedauto' && data != 'auto') {
                    data = {
                        params: [{
                            areaId: data ? parseInt(data) : ''
                        }],
                    }
                    $http.post('urlS', this, {
                        code: '03030007',
                        data: data,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.props.form.setFieldsValue({ villageBornDr: undefined, hamletBornDr: undefined });
                                this.setState({
                                    bornVillages: res.result
                                })
                            } else {

                            }
                        }, error: function (res) {
                        }
                    })
                }
            } else {
                if (num = '1') {
                    this.props.form.setFieldsValue({ villageBornDr: undefined, hamletBornDr: undefined });
                    this.setState({
                        bornVillages: [],
                        bornhamlets: [],
                    })
                }
            }
        }
        //籍贯  --县 --> 乡
        autoNativeVillage = (data, dats, num) => {
            if (dats != undefined) {
                if (data != 'undefinedauto' && data != 'auto') {
                    data = {
                        params: [{
                            areaId: data ? parseInt(data) : ''
                        }],
                    }
                    $http.post('urlS', this, {
                        code: '03030007',
                        data: data,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.props.form.setFieldsValue({ nativeVillageDr: undefined, nativeHamletDr: undefined });
                                this.setState({
                                    nativeVillages: res.result
                                })
                            } else {

                            }
                        }, error: function (res) {
                        }
                    })
                }
            } else {
                if (num == '2') {
                    this.props.form.setFieldsValue({ nativeVillageDr: undefined, nativeHamletDr: undefined });
                    this.setState({
                        nativeVillages: [],
                        nativehamlets: [],
                    })
                }
            }
        }

        //户口地址  --县 --> 乡
        autoHouseVillage = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.houseVillage.current.focus()
                }, 300)
            }

            if (data && data != "undefinedauto") {
                data = {
                    params: [{
                        areaId: data ? parseInt(data) : ''
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030007',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                houseVillages: res.result
                            })
                        } else {

                        }
                    }, error: function (res) {
                    }
                })

            }

        }
        //单位地址  --县 --> 乡
        autoCompanyVillage = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.companyVillage.current.focus()
                }, 300)
            }

            if (data && data != "undefinedauto") {
                data = {
                    params: [{
                        areaId: data ? parseInt(data) : ''
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030007',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                workVillages: res.result
                            })
                        } else {

                        }
                    }, error: function (res) {
                    }
                })
            }


        }
        //联系人地址  --县 --> 乡
        autoContactsVillage = (data, dats, num) => {
            // setTimeout(()=>{
            //     this.econVillage.current.focus()
            // },300)
            if (dats != undefined) {
                if (data == null || parseInt(data) == null) {
                    return
                }
                if (data != 'undefinedauto' && data != 'auto') {
                    data = {
                        params: [{
                            areaId: data && parseInt(data) != null ? parseInt(data) : ''
                        }],
                    }
                    $http.post('urlS', this, {
                        code: '03030007',
                        data: data,
                        success: function (res) {
                            if (+res.errorCode === 0) {
                                this.setState({
                                    eContactVillages: res.result
                                })
                            } else {

                            }
                        }, error: function (res) {
                        }
                    })
                }
            } else {
                if (num == '5') {
                    this.props.form.setFieldsValue({ contactsVillageDr: undefined, contactsHamletDr: undefined });
                    this.setState({
                        eContactVillages: [],
                        eContacthamlets: [],
                    })
                }
            }
        }
        //籍贯  乡镇 --> 村落
        autoNativeHamlet = (data, dats, num) => {
            // console.log("籍贯",dats)
            if (dats != undefined) {
                data = {
                    params: [{
                        villageId: data
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030008',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                nativehamlets: res.result
                            })
                        } else {

                        }
                    }
                })
            } else {
                if (num == '2') {
                    this.props.form.setFieldsValue({ hamletNativeDr: undefined });
                    this.setState({
                        nativehamlets: [],
                    })
                }
            }
        }
        //出生地  乡镇 --> 村落
        autoHamlet = (data, dats, num) => {
            if (dats != undefined) {
                data = {
                    params: [{
                        villageId: data
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030008',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                bornhamlets: res.result
                            })
                        } else {

                        }
                    }
                })
            } else {
                if (num == '1') {
                    this.props.form.setFieldsValue({ hamletBornDr: undefined });
                    this.setState({
                        bornhamlets: [],
                    })
                }
            }
        }
        //户口地址  乡镇 --> 村落
        autoHouseHamlet = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.houseHamlet.current.focus()
                }, 300)
            }

            this.props.form.setFieldsValue({ villageHouseDr: data ? data : undefined });
            if (data && data != "NaN") {
                data = {
                    params: [{
                        villageId: data
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030008',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                househamlets: res.result
                            })
                        } else {

                        }
                    }
                })
            }
        }
        //工作单位  乡镇 --> 村落
        autoCompanyHamlet = (data, num) => {
            if (num != 2) {
                setTimeout(() => {
                    this.companyHamlet.current.focus()
                }, 300)
            }

            this.props.form.setFieldsValue({ companyVillageDr: data ? data : undefined });
            if (data && data != "NaN") {
                data = {
                    params: [{
                        villageId: data
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030008',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                workhamlets: res.result
                            })
                        } else {

                        }
                    }
                })
            }

        }
        //联系人单位  乡镇 --> 村落
        autoContasHamlet = (data, dats, num) => {
            // console.log("联系人", dats)
            this.props.form.setFieldsValue({ contactsVillageDr: data ? data : undefined });
            if (dats != undefined) {
                data = {
                    params: [{
                        villageId: data
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030008',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0) {
                            this.setState({
                                eContacthamlets: res.result
                            })
                        } else {

                        }
                    }
                })
            } else {
                if (num == '5') {
                    this.props.form.setFieldsValue({ contactsHamletDr: undefined });
                    this.setState({
                        eContacthamlets: [],
                    })
                }
            }
        }
        //查找病人--子组件回调
        handleParms = (even) => {
            this.handleVail()
            this.props.form.setFieldsValue({ patCredTypeID: even.patCredTypeID })
            this.props.form.setFieldsValue({ patCredNo: even.patCredNo })
            //查找病人之后使用居民身份证调起病人关联信息 若有并点击了修改资料 才将信息回显 否则不做回显 不覆盖用户已输入内容
            // this.handleInmations(even.patCredNo)
            this.setState({
                patPresentOthID: even.patPresentOthID,
                patNativeOthID: even.patNativeOthID,
                patRegisterOthID: even.patRegisterOthID,
                patCompanyOthID: even.patCompanyOthID,
                patBirthOthID: even.patBirthOthID,
                patContactOthID: even.patContactOthID,
                patiId: even.patID
            })
            let data = {}
            data = {
                params: [{
                    cardTypeID: '',
                    cardNo: '',
                    credTypeID: even.patCredTypeID ? even.patCredTypeID : '',
                    credNo: typeof (even.patCredNo) != 'object' ? even.patCredNo : (this.props.form.getFieldValue('patCredNo') ? this.props.form.getFieldValue('patCredNo') : '')
                }],
            }
            $http.post('urlS', this, {
                code: '03030009',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0 && res.result.data.length > 0) {
                        if (res.result.patInfo.patNo) {
                            this.child.setValue(res.result.patInfo.patCredNo)
                            this.childs.showModals()
                            this.childs.getBasepatientInfo(res, this.state.baseParms.cardType, this.props.form.getFieldValue('cardNo'))
                        }
                    } else {
                        //只可绑定卡
                        this.handleVail()
                        if (even.cardInfo && even.cardInfo.length > 0) {
                            for (var i = 0; i < even.cardInfo.length; i++) {
                                if (even.cardInfo[i].cardTypeDesc == '退卡' || even.cardInfo[i].cardTypeDesc == '回收' || even.cardInfo[i].cardTypeDesc == '作废') {
                                    even.cardInfo.splice(i, 1)
                                }
                            }
                        }
                        //表单回显
                        // this.setForm(even)
                        if (this.props.form.getFieldValue('patCredTypeID') == '1') {
                            this.handleInmations(this.props.form.getFieldValue('patCredNo'))
                        }
                        this.autoAge(this.props.form.getFieldValue('patBirthDate')),
                            this.setState({
                                noCard: false,
                                isModefined: 1,
                                parms: even,
                                credCountry: even.patCountryID,
                                credBirthday: even.patBirthDate,
                                patiId: even.patID,
                                invoiceValue: this.state.baseParms.transactionNo,
                                initCardDr: this.state.baseParms.cardType[0].id,
                                nowRead: this.state.baseParms.cardType[0].readMode,
                                cardLength: this.state.baseParms.cardType[0].cardLength && this.state.baseParms.cardType[0].cardLength != "" ? this.state.baseParms.cardType[0].cardLength + "位" : "",
                                nowCost: this.state.baseParms.cardType[0].cardCost,
                                nowInv: this.state.baseParms.cardType[0].invFlag,

                            })
                    }
                },
                error: function () {
                }
            })
        }
        //病人关联 -- 子组件回调
        handleEdit = (record, even, patientInfo) => {
            //带回当前卡信息 以及 病人信息 已绑卡类
            console.log("--病人关联--record-", record, "--病人关联--even-", even, "--病人关联--patientInfo-", patientInfo)
            setTimeout(() => {
                this.patName.current.focus();
            }, 800)
            this.handleVail()
            const evens = even.patInfo
            const data = even.data
            // console.log(record,"even",even,"病人信息",patientInfo)
            this.setState({
                parms: evens,
                noCard: true,
                isModefined: 1,
                cardSatus: record,
                patientInfo: patientInfo,
                initCardDr: record.cardTypeID,
                cardPayMentID: record.cardPayMentID,
                nowCost: record.cardCost,
                repariFeeFlag: record.cardCost,
                replenishZero: record.zeroFlag,
                idCardCode: record.cardCode,
                // retrieveFlag:record.retrieveFlag,
            })
            if (record.cardStatusDesc == "正常" || record.cardStatusDesc == "挂失") {
                this.setState({
                    canRetarCard: "Y"
                })
            } else {
                this.setState({
                    canRetarCard: "N"
                })
            }
            if (record.cardStatusDesc == '挂失') {
                this.setState({
                    isCancel: 1
                })
            } else {
                this.setState({
                    isCancel: -1
                })
            }
            this.props.form.setFieldsValue({ cardTypeID: record.cardTypeID })
            this.props.form.setFieldsValue({ cardNo: record.cardNo })
            // this.setForm(evens)
            this.bingCardArr(data)
        }

        //获取身份证号年龄
        getAge(patCredNo) {
            var len = (patCredNo + "").length;
            if (len == 0) {
                return 0;
            } else {
                if ((len != 15) && (len != 18))//身份证号码只能为15位或18位其它不合法 ---18位
                {
                    return 0;
                }
            }
            var strBirthday = "";
            if (len == 18)//处理18位的身份证号码从号码中得到生日和性别代码
            {
                strBirthday = patCredNo.substr(6, 4) + "-" + patCredNo.substr(10, 2) + "-" + patCredNo.substr(12, 2);
            }
            if (len == 15) {
                strBirthday = "19" + patCredNo.substr(6, 2) + "-" + patCredNo.substr(8, 2) + "-" + patCredNo.substr(10, 2);
            }
            this.autoAge(strBirthday)
        }
        //获取身份证号出生日期
        getBirthday(patCredNo) {
            var birthdayno, birthdaytemp
            if (patCredNo.length == undefined) {
                return
            }
            if (patCredNo && patCredNo.length == 18) {
                birthdayno = patCredNo.substring(6, 14)
            } else if (patCredNo.length == 15) {
                birthdaytemp = patCredNo.substring(6, 12)
                patCredNo = "19" + birthdaytemp
            } else {
            }
            var birthday = birthdayno.substring(0, 4) + "-" + birthdayno.substring(4, 6) + "-" + birthdayno.substring(6, 8)
            return birthday
        }
        //获取身份证号性别 第17位代表性别，奇数为男，偶数为女
        getSex(patCredNo) {
            let sexno, sex
            if (patCredNo && patCredNo.length == 18) {
                sexno = patCredNo.substring(16, 17)
            } else if (patCredNo.length == 15) {
                sexno = patCredNo.substring(14, 15)
            } else {
                // alert("错误的身份证号码，请核对！")
                return false
            }
            var tempid = sexno % 2;
            if (tempid == 0) {
                sex = '2'
            } else {
                sex = '1'
            }
            return sex
        }
        //取地址栏传过来的数据
        getQueryString(name) {
            var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
            var r = this.props.location.search.substr(1).match(reg);
            if (r != null) {
                return decodeURIComponent(r[2]);
            }
            return null;
        }
        // 调用子组件的连接事件 -- 寻找病人
        OnChildrefs = (ref) => {
            this.child = ref
        }
        // 调用子组件的连接事件 -- 关联病人信息
        Onrefs = (ref) => {
            this.childs = ref
        }
        //查找病人
        handlePatients = () => {
            if (this.props.form.getFieldValue('cardTypeID') == "3" && this.props.form.getFieldValue('cardNo')) {
                this.child.setValue(this.props.form.getFieldValue('cardNo'))
            }
            if (this.props.form.getFieldValue('patCredTypeID') == '1' && this.props.form.getFieldValue('patCredNo')) {
                this.child.setValue(this.props.form.getFieldValue('patCredNo'))

            }
            this.child.showModal()
        }
        //病人姓名 格式验证 是否允许带空格
        validName = (rule, value, callback) => {
            if ((this.props.form.getFieldValue("patName") && this.props.form.getFieldValue("patName").length > 0)) {
                var reg = /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\s·?\u4e00-\u9fa5+]{2,30}$))/;
                if (!reg.test(value)) {
                    callback('姓名格式填写错误'); // 校验未通过
                    return;
                }
                callback();
            }
            callback();
        }
        validNames = (rule, value, callback) => {
            if (this.props.form.getFieldValue("patEContact") && this.props.form.getFieldValue("patEContact").length > 0) {
                var reg = /^(([a-zA-Z+\.?\·?a-zA-Z+]{2,30}$)|([\u4e00-\u9fa5+\s·?\u4e00-\u9fa5+]{2,30}$))/;
                if (!reg.test(value)) {
                    callback('姓名格式填写错误'); // 校验未通过
                    return;
                }
                callback();
            }
            callback();
        }
        //选择建卡类型 格式验证
        validFunction = (rule, value, callback) => {
            //身份证 18位  就诊卡 银医卡 条形码 根据配置合理提示 不根据固定的卡类型做判断 根据配置项是否可补0以及卡号长度进行检测 区分身份证 code == 12
            const { cardLength, cardLengthCard, idCardCode, idCardCodePop, replenishZero, popCardVis, } = this.state
            //控制选择建卡和卡操作选择绑卡id 正确提示 及 校验
            let diffLength = popCardVis ? cardLengthCard : cardLength
            let diffCode = popCardVis ? idCardCodePop : idCardCode
            if (diffCode == '12') {
                var city = { 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江 ", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南", 42: "湖北 ", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏 ", 61: "陕西", 62: "甘肃", 63: "青海", 64: "宁夏", 65: "新疆", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外 " };
                if (!value || !/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(value)) {
                    this.setState({
                        bindVail: true
                    })
                    callback('身份证号格式错误'); // 校验未通过
                    return;
                }

                else if (!city[value.substr(0, 2)]) {
                    this.setState({
                        bindVail: true
                    })
                    callback('身份证号格式错误'); // 校验未通过
                    return;
                }
                else {
                    //18位身份证需要验证最后一位校验位
                    if (value.length == 18) {
                        value = value.split('');
                        //∑(ai×Wi)(mod 11)
                        //加权因子
                        var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2];
                        //校验位
                        var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2];
                        var sum = 0;
                        var ai = 0;
                        var wi = 0;
                        for (var i = 0; i < 17; i++) {
                            ai = value[i];
                            wi = factor[i];
                            sum += ai * wi;
                        }
                        var last = parity[sum % 11];
                        //最后一位不区分大小写
                        if (value[17] == 'x') value[17] = value[17].toUpperCase();
                        if (parity[sum % 11] != value[17]) {
                            this.setState({
                                bindVail: true
                            })
                            callback('身份证号格式错误'); // 校验未通过
                            return;
                        } else {
                            this.checkIs()
                            // this.setState({
                            //   bindVail:false
                            // })
                        }
                    }
                }
                callback();
                // callback=()=>{
                //   this.setState({
                //     bindVail:false
                //   })
                // }; // 校验通过
            }
            if (replenishZero == "N" && parseInt(diffLength) > 0 && diffCode != '12') {
                // debugger;
                // console.log("要求输入的长度",parseInt(diffLength))
                let length = parseInt(diffLength)
                // var reg = new RegExp("!/^\d{"+length+"}$/");
                var reg = new RegExp('^\\d{' + length + '}$')
                if (!reg.test(value)) {
                    // debugger
                    this.setState({
                        bindVail: true
                    })
                    callback('该卡号长度不正确，请输入有效卡号'); // 校验未通过
                    return;
                } else {
                    // debugger;
                    this.checkIs()
                    // this.setState({
                    //   bindVail:false
                    // })
                }
            }
            if (replenishZero == "Y" && parseInt(diffLength) > 0) {
                let length = parseInt(diffLength)
                var reg = new RegExp("^\\d{" + length + "}$");
                if (!reg.test(value)) {
                    this.setState({
                        bindVail: true
                    })
                    callback('该卡号无效，请输入有效卡号,数字可自动补0'); // 校验未通过
                    return;
                } else {
                    this.checkIs()
                    // this.setState({
                    //   bindVail:false
                    // })
                }
            }
            if (replenishZero == "N" && !parseInt(diffLength) > 0) {
                // debugger;   
                if (!/^[0-9]*$/.test(value)) {
                    //  debugger;
                    this.setState({
                        bindVail: true
                    })
                    callback('请输入任意数字'); // 校验未通过
                    return;
                } else {
                    // debugger;
                    if (value.length != 0) {
                        //    console.log("不等于0")
                        this.checkIs()
                        // this.setState({
                        //   bindVail:false
                        // })
                    } else {
                        this.setState({
                            bindVail: true
                        })
                    }
                }
            }
            callback();
        }
        //输入完身份证进行读卡操作
        handleInmations = (credN) => {
            let data = {}
            data = {
                params: [{
                    cardTypeID: '',
                    cardNo: '',
                    credTypeID: this.props.form.getFieldValue('patCredTypeID') ? this.props.form.getFieldValue('patCredTypeID') : '',
                    credNo: typeof (credN) != 'object' ? credN : (this.props.form.getFieldValue('patCredNo') ? this.props.form.getFieldValue('patCredNo') : '')
                }],
            }
            $http.post('urlS', this, {
                code: '03030009',
                data: data,
                success: function (res) {
                    if (+res.errorCode === 0 && res.result.data.length > 0) {
                        //判断接口请求成功数据是否返回成功
                        if (this.state.isModefined == 1 && this.state.selfCredNo != this.props.form.getFieldValue('patCredNo')) {
                            this.setState({
                                credWarning: true
                            })
                            warning({
                                key: 'card',
                                centered: true,
                                maskClosable: true,
                                content: (
                                    <p style={{ color: 'rgba(0, 0, 0, 0.85)', fontSize: '16px', marginTop: '-8px' }}>证件号码已被使用,病人ID:<span style={{ marginRight: '6px' }}>{res.result ? res.result.patInfo.patNo : ''}</span><span style={{ marginRight: '6px' }}>{res.res ? status.cardType : ''}</span><span>{status ? status.cardNo : ''}</span></p>
                                ),
                                onOk() {
                                    Modal.destroyAll();
                                },
                            })
                        } else {
                            if (this.state.selfCredNo == this.props.form.getFieldValue('patCredNo')) {
                                return
                            } else {
                                if (res.result.patInfo.patNo) {
                                    this.child.setValue(res.result.patInfo.patCredNo)
                                    this.childs.showModals()
                                    this.childs.getBasepatientInfo(res, this.state.baseParms.cardType, this.props.form.getFieldValue('cardNo'))
                                }
                            }
                        }
                    } else {
                    }
                },
                error: function () {

                }
            })
        }
        //点击读卡  -----输入完卡号
        handleInmationChick = () => {
            this.setState({
                readLoading: true
            })
            if (this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length > 0) {
                let data = {}
                data = {
                    params: [{
                        cardTypeID: this.props.form.getFieldValue('cardTypeID') ? this.props.form.getFieldValue('cardTypeID') : '',
                        cardNo: this.props.form.getFieldValue('cardNo') ? this.props.form.getFieldValue('cardNo') : '',
                        credTypeID: '',
                        credNo: ''
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030009',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0 && res.result.data.length > 0) {
                            //判断接口请求成功数据是否返回成功
                            this.setState({
                                readLoading: false
                            })
                            if (res.result.patInfo.patNo) {
                                this.childs.showModals()
                                this.childs.getBasepatientInfo(res, this.state.baseParms.cardType, this.props.form.getFieldValue('cardNo'))
                                this.setState({
                                    readLoading: false
                                })
                            } else {
                                this.setState({
                                    readLoading: false
                                })
                            }
                        } else {
                            this.setState({
                                readLoading: false
                            })
                        }
                        if (this.popCardVis == "false") {
                            // setTimeout(() => {
                            //     this.patName.current.focus();
                            // }, 300)
                        }
                    },
                    error: function () {
                        this.setState({
                            readLoading: false
                        })
                    }
                })
            } else {
                this.setState({
                    readLoading: false,
                })
                message.warning('请输入卡号');
            }
        }
        //失去焦点读卡  -----输入完卡号
        handleInmation = () => {
            if (this.props.form.getFieldValue('cardNo') && this.props.form.getFieldValue('cardNo').length > 0) {
                let data = {}
                data = {
                    params: [{
                        cardTypeID: this.props.form.getFieldValue('cardTypeID') ? this.props.form.getFieldValue('cardTypeID') : '',
                        cardNo: this.props.form.getFieldValue('cardNo') ? this.props.form.getFieldValue('cardNo') : '',
                        credTypeID: '',
                        credNo: ''
                    }],
                }
                $http.post('urlS', this, {
                    code: '03030009',
                    data: data,
                    success: function (res) {
                        if (+res.errorCode === 0 && res.result.data.length > 0) {
                            // debugger;
                            //判断接口请求成功数据是否返回成功
                            if (this.state.isFlag == 3 || this.state.isFlag == 4 || isModefined == 3 || isModefined == 6) {
                                // console.log(res)
                                let self = this
                                warning({
                                    key: 'card',
                                    centered: true,
                                    maskClosable: true,
                                    content: (
                                        <p style={{ color: 'rgba(0, 0, 0, 0.85)', fontSize: '16px', marginTop: '-8px' }}>该卡号已被使用,病人ID:<span style={{ marginRight: '6px' }}>{res.result ? res.result.patInfo.patNo : ''}</span><span style={{ marginRight: '6px' }}>{res.res ? status.cardType : ''}</span><span>{status ? status.cardNo : ''}</span></p>
                                    ),
                                });
                                this.setState({
                                    readLoading: false
                                })
                            } else {
                                if (res.result.patInfo.patNo) {
                                    this.childs.showModals()
                                    this.childs.getBasepatientInfo(res, this.state.baseParms.cardType, this.props.form.getFieldValue('cardNo'))

                                } else {

                                }
                            }
                        } else {

                        }
                        if (this.popCardVis == "false") {
                            // setTimeout(() => {
                            //     this.patName.current.focus();
                            // }, 800)
                        }
                    },
                    error: function () {

                    }
                })
            } else {

                message.warning('请输入卡号');
            }
        }
        //2s后自动关闭提示
        timerStart = () => {
            timer = setInterval(() => {
                if (this.state.reciprocal > 0) {
                    this.setState({
                        reciprocal: this.state.reciprocal - 1
                    })
                } else {
                    this.handleCancelCard()
                    this.handleReset();
                    this.handleCancels()
                }
            }, 1000);
        }
        //关闭取消补卡弹窗
        handleCancels = () => {
            this.setState({ visibles: false });
            clearInterval(timer);
        }
        //提交表格内容
        handleSubmit = (e) => {
            this.props.form.validateFields((err, values) => {
                if (err) {
                    // this.cardTip()
                    // this.patNameTip()
                    // this.econNameTip()
                    // this.patBirthTip()
                    // this.posTip()
                    // this.patMobileTip()
                    // this.patTypeTip()
                    // this.patAdressTip()
                    // this.econPhoneTip()
                    var arr = []
                    for (let i in err) {
                        arr.push(err[i]); //属性
                        //arr.push(obj[i]); //值
                    }
                    let info = arr[0].errors[0].field
                    if (info == 'cardNo') {
                        setTimeout(() => {
                            this.cardNo.current.focus();
                        }, 300)
                        return
                    } if (info == 'patName') {
                        if (this.popCardVis == "false") {
                            setTimeout(() => {
                                this.patName.current.focus();
                            }, 800)
                        }
                        return
                    } if (info == 'patSexID') {
                        setTimeout(() => {
                            this.sex.current.focus();
                        }, 300)
                        return
                    } if (info == 'patCredTypeID ') {
                        setTimeout(() => {
                            this.credType.current.focus();
                        }, 300)
                        return
                    }
                    if (info == 'patCredNo') {
                        setTimeout(() => {
                            this.patCredNo.current.focus();
                        }, 300)
                        return
                    } if (info == 'patBirthDate') {
                        setTimeout(() => {
                            this.patBirthDate.current.focus();
                        }, 300)
                        return
                    } if (info == 'patMobile') {
                        setTimeout(() => {
                            this.patMobile.current.focus();
                        }, 300)
                        return
                    } if (info == 'patTypeID') {
                        setTimeout(() => {
                            this.patType.current.focus();
                        }, 300)
                        return
                    } if (info == 'patNationID') {
                        setTimeout(() => {
                            this.nation.current.focus();
                        }, 300)
                        return
                    } if (info == 'presentAddressDesc') {
                        setTimeout(() => {
                            this.patAddress.current.focus();
                        }, 300)
                        return
                    } if (info == 'cardPayMethodID') {
                        setTimeout(() => {
                            this.cardPayMethodID.current.focus();
                        }, 300)
                        return
                    } if (info == 'patEContact') {
                        setTimeout(() => {
                            this.econName.current.focus();
                        }, 300)
                        return
                    } if (info == 'presentZIP') {
                        setTimeout(() => {
                            this.presentZIP.current.focus();
                        }, 300)
                        return
                    } if (info == 'registerZIP') {
                        setTimeout(() => {
                            this.registerZIP.current.focus();
                        }, 300)
                        return
                    } if (info == 'companyZIP') {
                        setTimeout(() => {
                            this.companyZIP.current.focus();
                        }, 300)
                        return
                    }
                }
                if (!err) {
                    this.setState({
                        postLoading: true,
                        canSave: true,
                    })
                    if (this.props.form.getFieldValue('patCredTypeID') == '1' && moment(values.patBirthDate).format('YYYY-MM-DD') != this.getBirthday(values.patCredNo)) {
                        this.setState({
                            postLoading: false,
                            canSave: false
                        })
                        message.warning("请保持身份证号码中的出生日期与出生日期框一致")
                        return
                    }
                    // console.log('发送表格信息', values)
                    if (this.state.isModefined != 1 && this.state.isModefined != 2) {
                        let idCard = ''
                        if (values.patCredTypeID == '1') {
                            idCard = values.patCredNo
                        } else {
                            idCard = ''
                        }
                        let cardTypeId = values.cardTypeID;
                        let cardNum = values.cardNo;
                        let patName = values.patName;
                        let cardDec = "";
                        this.state.baseParms.cardType.map((item, index) => {
                            if (cardTypeId == item.id) {
                                cardDec = item.descripts
                                // console.log(this.state.baseParms.cardType[index])
                            }
                        })
                        let patDr = ''
                        if (this.state.patiId != '') {
                            patDr = this.state.patiId
                        } else {
                            this.setState({
                                patDr: ''
                            })
                        }
                        let data = {}
                        data = {
                            params: [{
                                userID: userData.userID,
                                hospID: userData.hospID,
                                groupID: userData.groupID,
                                locID: userData.locID,
                                patient: {
                                    active: "",
                                    telphone: "",
                                    contractUnitDr: "",
                                    patID: patDr,
                                    patName: values.patName,
                                    patSexID: values.patSexID,
                                    patBirthDate: moment(values.patBirthDate).format('YYYY-MM-DD'),
                                    patIDCardNo: idCard,
                                    patCredTypeID: values.patCredTypeID,
                                    patCredNo: values.patCredNo,
                                    patOccupationID: values.patOccupationID,
                                    patNationID: values.patNationID,
                                    patTypeID: values.patTypeID,
                                    patMobile: values.patMobile,
                                    patEContact: values.patEContact,
                                    patEContactMobile: values.patEContactMobile,
                                    patERelationID: values.patERelationID,
                                    patMaritalID: values.patMaritalID,
                                    patCompany: values.patCompany,
                                    patCountryID: values.patCountryID,
                                    patSocialStatusID: values.patSocialStatusID,
                                    patCreateUserID: userData.userID,
                                    patCompanyTel: values.patCompanyTel,
                                    addressInfo: [
                                        {
                                            addressTypeCode: 'Present',
                                            addressData: {
                                                patProvinceID: values.patProvinceID,
                                                patCityID: values.patCityID,
                                                patAreaID: values.patAreaID,
                                                patVillageID: values.patVillageID,
                                                patHamletID: values.patHamletID,
                                                patAddress: values.presentAddressDesc,
                                                patZIP: values.presentZIP
                                            },
                                        },
                                        {
                                            addressTypeCode: 'Birth',
                                            addressData: {
                                                patAddress: values.birthAddress,
                                                patProvinceID: values.birthProvinceID,
                                                patCityID: values.birthCityID,
                                                patAreaID: values.birthAreaID,
                                                patVillageID: values.birthVillageID,
                                                patHamletID: values.birthHamletID,
                                            },
                                        },
                                        {
                                            addressTypeCode: 'Native',
                                            addressData: {
                                                patAddress: values.nativeAddress,
                                                patProvinceID: values.nativeProvinceID,
                                                patCityID: values.nativeCityID,
                                                patAreaID: values.nativeAreaID,
                                                patVillageID: values.nativeVillageID,
                                                patHamletID: values.nativeHamletID,
                                            },
                                        }, {
                                            addressTypeCode: 'Register',
                                            addressData: {
                                                patAddress: values.registerAddress,
                                                patProvinceID: values.registerProvinceID,
                                                patCityID: values.registerCityID,
                                                patAreaID: values.registerAreaID,
                                                patVillageID: values.registerVillageID,
                                                patHamletID: values.registerHamletID,
                                                patZIP: values.registerZIP,
                                            },
                                        },
                                        {
                                            addressTypeCode: 'Company',
                                            addressData: {
                                                patAddress: values.companyAddress,
                                                patProvinceID: values.companyProvinceID,
                                                patCityID: values.companyCityID,
                                                patAreaID: values.companyAreaID,
                                                patVillageID: values.companyVillageID,
                                                patHamletID: values.companyHamletID,
                                                patZIP: values.companyZIP
                                            },
                                        }, {
                                            addressTypeCode: 'Contact',
                                            addressData: {
                                                patAddress: values.contactAddress,
                                                patProvinceID: values.contactProvinceID,
                                                patCityID: values.contactCityID,
                                                patAreaID: values.contactAreaID,
                                                patVillageID: values.contactVillageID,
                                                patHamletID: values.contactHamletID,
                                            },
                                        }
                                    ],
                                },
                                card: {
                                    cardTypeID: values.cardTypeID,
                                    cardNo: values.cardNo,
                                    user: userData.userID,
                                    cardCost: this.state.repariFeeFlag == "Y" ? "0" : this.state.nowCost,
                                    ip: React.$getSessionData('ipConfig')?.ipv4 || '',
                                    cardPayMethodID: values.cardPayMethodID,
                                },
                                accm: {
                                    passWord: "",
                                    deposit: "",
                                    groupFlag: "",
                                },

                            }]
                        }
                        $http.post('urlS', this, {
                            code: '03030003',
                            data: data,
                            success: function (res) {
                                if (+res.errorCode === 0) {
                                    message.success('提交成功');
                                    if (values.cardNo > 0) {
                                        this.updataTrans()
                                    }
                                    this.setState({
                                        isFlag: '',
                                        isModefined: -1,
                                        postLoading: false,
                                        canSave: false,
                                    })
                                    this.handleReset();
                                    //是否回到挂号页面
                                    if (this.getQueryString("cardTypeId") != null) {
                                        //弹窗 
                                        let self = this
                                        confirm({
                                            key: 10,
                                            title: "建卡完成,是否回到挂号页面",
                                            centered: true,
                                            content: (
                                                <p style={{ color: 'rgba(0, 0, 0, 0.85)', fontSize: '16px' }}>病人:<span style={{ marginRight: '6px' }}>{patName}</span><span style={{ marginRight: '6px' }}>{cardDec},</span><span>{cardNum}</span></p>
                                            ),
                                            onOk() {
                                                self.props.history.push('./03040001?cardTypeId=' + cardTypeId + "&cardNum=" + cardNum + "&posId=" + idCard)
                                                Modal.destroyAll()
                                            },
                                            onCancel() {
                                            },
                                        });
                                    }
                                } else {
                                    this.setState({
                                        postLoading: false,
                                        canSave: false,
                                    })
                                }
                            }
                        })
                    } if (this.state.isModefined == 1) {
                        let patDr = ''
                        if (this.state.patiId != '') {
                            patDr = this.state.patiId
                        } else {
                            this.setState({
                                patDr: ''
                            })
                        }

                        let data = {}
                        data = {
                            params: [{
                                active: "",
                                telphone: "",
                                contractUnitDr: "",
                                patID: patDr,
                                patName: values.patName,
                                patSexID: values.patSexID,
                                patBirthDate: moment(values.patBirthDate).format('YYYY-MM-DD'),
                                patCredTypeID: values.patCredTypeID,
                                patCredNo: values.patCredNo,
                                patOccupationID: values.patOccupationID,
                                patNationID: values.patNationID,
                                patTypeID: values.patTypeID,
                                patMobile: values.patMobile,
                                patEContact: values.patEContact,
                                patEContactMobile: values.patEContactMobile,
                                patERelationID: values.patERelationID,
                                patMaritalID: values.patMaritalID,
                                patCompany: values.patCompany,
                                patCountryID: values.patCountryID,
                                patSocialStatusID: values.patSocialStatusID,
                                patUpdateUserID: userData.userID,
                                patCompanyTel: values.patCompanyTel,
                                patIDCardNo: "",
                                addressInfo: [
                                    {
                                        addressTypeCode: 'Present',
                                        addressData: {
                                            patOthID: this.state.patPresentOthID,
                                            patProvinceID: values.patProvinceID,
                                            patCityID: values.patCityID,
                                            patAreaID: values.patAreaID,
                                            patVillageID: values.patVillageID,
                                            patHamletID: values.patHamletID,
                                            patAddress: values.presentAddressDesc,
                                            patZIP: values.presentZIP
                                        }
                                    },
                                    {
                                        addressTypeCode: 'Birth',
                                        addressData: {
                                            patOthID: this.state.patBirthOthID,
                                            patAddress: values.birthAddress,
                                            patProvinceID: values.birthProvinceID,
                                            patCityID: values.birthCityID,
                                            patAreaID: values.birthAreaID,
                                            patVillageID: values.birthVillageID,
                                            patHamletID: values.birthHamletID,
                                        }
                                    },
                                    {
                                        addressTypeCode: 'Native',
                                        addressData: {
                                            patOthID: this.state.patNativeOthID,
                                            patAddress: values.nativeAddress,
                                            patProvinceID: values.nativeProvinceID,
                                            patCityID: values.nativeCityID,
                                            patAreaID: values.nativeAreaID,
                                            patVillageID: values.nativeVillageID,
                                            patHamletID: values.nativeHamletID,
                                        }
                                    }, {
                                        addressTypeCode: 'Register',
                                        addressData: {
                                            patOthID: this.state.patRegisterOthID,
                                            patAddress: values.registerAddress,
                                            patProvinceID: values.registerProvinceID,
                                            patCityID: values.registerCityID,
                                            patAreaID: values.registerAreaID,
                                            patVillageID: values.registerVillageID,
                                            patHamletID: values.registerHamletID,
                                            patZIP: values.registerZIP,
                                        }
                                    },
                                    {
                                        addressTypeCode: 'Company',
                                        addressData: {
                                            patOthID: this.state.patCompanyOthID,
                                            patAddress: values.companyAddress,
                                            patProvinceID: values.companyProvinceID,
                                            patCityID: values.companyCityID,
                                            patAreaID: values.companyAreaID,
                                            patVillageID: values.companyVillageID,
                                            patHamletID: values.companyHamletID,
                                            patZIP: values.companyZIP
                                        }
                                    }, {
                                        addressTypeCode: 'Contact',
                                        addressData: {
                                            patOthID: this.state.patContactOthID,
                                            patAddress: values.contactAddress,
                                            patProvinceID: values.contactProvinceID,
                                            patCityID: values.contactCityID,
                                            patAreaID: values.contactAreaID,
                                            patVillageID: values.contactVillageID,
                                            patHamletID: values.contactHamletID,
                                        }
                                    }
                                ],

                            }]
                        }
                        $http.post('urlS', this, {
                            code: '03030012',
                            data: data,
                            success: function (res) {
                                if (+res.errorCode === 0) {
                                    message.success('保存成功');
                                    this.handleReset();
                                    this.setState({
                                        isModefined: -1,
                                        postLoading: false,
                                        canSave: false,
                                        isFlag: '',
                                    })
                                } else {
                                    this.setState({
                                        postLoading: false,
                                        canSave: false,
                                    })
                                }
                            },
                            error: function () {
                                message.warning('未知错误,请重试');
                                this.setState({
                                    postLoading: false,
                                    canSave: false,
                                })
                            }
                        })
                    } if (this.state.isModefined == 2) { //补卡 换卡
                        //查找病人后 只可以操作新建卡
                        this.props.form.setFieldsValue({ cardNo: undefined });
                        let patDr = ''
                        if (this.state.patiId != '') {
                            patDr = this.state.patiId
                        } else {
                            this.setState({
                                patDr: ''
                            })
                        }
                        let datas = {}
                        if (this.state.isFlag == 4) { //补卡
                            datas = {
                                params: [{
                                    cardID: this.state.cardId,
                                    flag: this.state.isFlag,
                                    newCard: {
                                        patID: patDr,
                                        cardTypeID: values.cardTypeID,
                                        cardNo: values.cardNo,
                                        userID: userData.userID,
                                        cardCost: this.state.nowCost,
                                        ip: React.$getSessionData('ipConfig')?.ipv4 || '',
                                        payMethodID: values.cardPayMethodID,
                                        tradeNum: this.state.baseParms.transactionNo,
                                    }
                                }],
                            }
                        } else {  //换卡
                            datas = {
                                params: [{
                                    cardID: this.state.cardId,
                                    flag: this.state.isFlag,
                                    newCard: {
                                        patID: patDr,
                                        cardTypeID: values.cardTypeID,
                                        cardNo: values.cardNo,
                                        userID: userData.userID,
                                    }
                                }],
                            }
                        }
                        $http.post('urlS', this, {
                            code: '03030010',
                            data: datas,
                            success: function (res) {
                                if (+res.errorCode === 0) {
                                    this.setState({
                                        isFlag: '',
                                        isModefined: -1,
                                        postLoading: false
                                    })
                                    message.success('卡操作成功');
                                    this.handleReset()
                                } else {
                                    this.setState({
                                        postLoading: false,
                                    })
                                }
                            }
                        })
                    }
                }
            })
        }
        //隐藏验证提示
        handleVail = () => {
            this.setState({
                cardNoVisible: false,
                patNameVisible: false,
                patAdressVisible: false,
                patAdressZipVisible: false,
                patBirthVisible: false,
                posVisible: false,
                patTypeVisible: false,
                patMobileVisible: false,
                econPhoneVisible: false,
                econNameVisible: false,
            })
        }
        //清空表格内容
        handleReset = () => {
            //卡号输入框高亮
            setTimeout(() => {
                this.cardNo.current.focus();
            }, 500)
            this.handleVail()
            this.props.form.resetFields()
            // for (var j = 0; j < this.state.baseParms.cardType.length; j++) {
            //     this.state.baseParms.cardType[j]['disabled'] = false
            // }
            this.state.baseParms.cardType.map((item, i) => {
                item['disabled'] = false
                if (item.defaultFlag == "Y") {
                    this.setState({
                        initCardDr: item.id,
                        nowRead: item.readMode,
                        idCardCode: item.code,
                        cardLength: item.cardLength && item.cardLength != "" ? item.cardLength + "位," : "",
                        cardLengthInput: item.cardLength,
                        replenishZero: item.replenishZero,
                        repariFeeFlag: item.repariFeeFlag,
                        nowCost: item.cardCost,
                        nowInv: item.invFlag,
                    })
                    if (item.readMode == "R") {
                        setTimeout(() => {
                            this.readOneButton.current.buttonNode.focus();
                        }, 300)
                    } else {
                        //卡号输入框高亮
                        setTimeout(() => {
                            this.cardNo.current.focus();
                        }, 600)
                    }
                }
            })
            this.props.form.setFieldsValue({
                cardNo: undefined,
                patProvinceID: undefined,
                cardPayMethodID: this.state.baseParms.payMethod && this.state.baseParms.payMethod.length > 0 ? this.state.baseParms.payMethod[0].id : undefined,
                payMethods: this.state.baseParms.payMethod && this.state.baseParms.payMethod.length > 0 ? this.state.baseParms.payMethod[0].id : undefined,
            })
            this.setState({
                proviceBornId: '',
                provinceId: '',
                proviceHouseId: '',
                proviceContactId: '',
                proviceNativeId: '',
                proviceWorkId: '',
                patiId: "",
                parms: {},
                credAge: '',
                cardNo: '',
                credBirthday: '',
                isFlag: '',
                credSex: '1',
                isModefined: -1,
                bindCardArr: [],
                allDis: false,
                noCard: true,
                cardSatus: [],
                bindDis: true,
                isCancel: -1,
                canRetarCard: "N",
                birthCity: [],//出生地市区信息
                birthAreas: [],//出生地县信息
                birthVillages: [],//出生地乡信息
                birthHamlets: [],//出生地村落信息

                nativeCity: [],//籍贯市区信息
                nativeAreas: [],//籍贯县信息
                nativeVillages: [],//籍贯乡信息
                nativeHamlets: [],//籍贯村落信息

                presentCity: [],//籍贯市区信息
                presentAreas: [],//籍贯县信息
                presentVillages: [],//籍贯乡信息
                presentHamlets: [],//籍贯村落信息

                registerCity: [],//户口地址市区信息
                registerAreas: [],//户口地址县信息
                registerVillages: [],//户口地址乡信息
                registerHamlets: [],//户口地址村落信息

                companyCity: [],//单位市区信息
                companyAreas: [],//单位县信息
                companyVillages: [],//单位乡信息
                companyHamlets: [],//单位村落信息

                contactCity: [],//紧急联系人市区信息
                contactAreas: [],//紧急联系人县信息
                contactVillages: [],//紧急联系人乡信息
                contactHamlets: [],//紧急联系人村落信息
            })
        }
        //修改发票号
        modifyInvoice = (e, value) => {
            this.showModal()
        }
        //修改发票弹窗
        showModal = () => {
            this.setState({
                visible: true,
            });
        }
        handleOk = () => {
            this.setState({ loading: true });
            setTimeout(() => {
                this.setState({ loading: false, visible: false });
            }, 3000);
        }
        handleCancel = () => {
            this.setState({ visible: false });
        }
        KeyDowns = (e) => {
            let currKey = 0;
            e = e || event || window.event;
            currKey = e.keyCode || e.which || e.charCode;
            //快捷键保存  shilt/alt/ctrl + s 
            if (currKey == 83 && (e.ctrlKey || e.metaKey || e.shiftKey)) {
                e.preventDefault();
                this.handleSubmit()
            }
            //快捷键清空 shilt/alt/ctrl + z
            if (currKey == 90 && (e.ctrlKey || e.metaKey || e.shiftKey)) {
                e.preventDefault();
                this.patName.current.blur();
                this.handleReset();
            }
        }

        componentWillUnmount() {
            let timer = undefined;
            clearInterval(timer);
            window.removeEventListener("keydown", this.KeyDowns())
        }
        render() {
            const { getFieldDecorator } = this.props.form;
            let { province, birthCity, nativeCity, presentCity, registerCity, companyCity, contactCity } = this.state; //省,市
            let { birthAreas, nativeAreas, presentAreas, registerAreas, companyAreas, contactAreas } = this.state;//县
            let { birthVillages, nativeVillages, presentVillages, registerVillages, companyVillages, contactVillages } = this.state;//乡
            let { birthHamlets, nativeHamlets, presentHamlets, registerHamlets, companyHamlets, contactHamlets } = this.state;//村

            let { readInfoLoading, nowAdressProvinceId, bornProvinceId, nativeProvinceId, houseProvinceId, workProvinceId,
                eContactProvinceId, replenishZero, nowCostCard, repariFeeFlag, repariFeeFlagCard, noCard, nowReadCard, cardLengthCard,
                cardNoMessage, posMessage, patNameMessage, patBirthMessage, patMobileMessage, patTypeMessage, patAdressMessage,
                patAdressMessageZip, patAdressHouseMessageZip, patAdressComMessageZip, econPhoneMessage, changeCardMessage,
                patchCardMessage, bindCardMessage, econNameMessage, credWarning, nowReadCardPop, canSave, parms, baseParms,
                bornCity, bornCountys, bornVillages, bornhamlets, houseCity, houseCountys, houseVillages,
                househamlets, workCity, workCountys, workVillages, workhamlets, eContactCity, eContactCountys, eContactVillages,
                eContacthamlets, nativeCountys, nativehamlets, municipals, countys, villages, hamlets,
                readLoading, postLoading, provinceId, patieParms, credSex, credBirthday, credAge, credCountry, nowCost, nowInv, posType,
                proviceBornId, proviceNativeId, proviceHouseId, proviceWorkId, proviceContactId, nowRead, cardLength, initCardDr, isModefined,
                isFlag, reciprocal, socialTag, cardNo, originalNo, localProvince, localCity, localArea, bindCardArr, allDis, bindDis, cardSatus, isCancel, popCardVis, cardInfo, patientInfo, initpatCardID, bindMoreInfo, bindVail, canRetarCard } = this.state
            let card = []
            baseParms.cardType && baseParms.cardType.map(item => {
                card.push(<Option key={item.id} disabled={item.disabled ? item.disabled : (isFlag == 3 || isFlag == 4 ? true : false)} value={String(item.id)}>{item.descripts}</Option>)
            })
            let sex = []
            baseParms.sex && baseParms.sex.map(item => {
                sex.push(<Option key={item.id} value={String(item.id)}>{item.descripts}</Option>)
            })
            let credType = []
            baseParms.credType && baseParms.credType.map(item => {
                credType.push(<Option key={item.id} value={String(item.id)} title={item.descripts} role={item.descripts + '^' + item.descriptsSPCode}>{item.descripts}</Option>)
            })
            let ageUnit = []
            baseParms.ageUnit && baseParms.ageUnit.map(item => {
                ageUnit.push(<Option key={item.id} value={String(item.id)}>{item.descripts}</Option>)
            })
            let patType = []
            baseParms.patType && baseParms.patType.map(item => {
                patType.push(<Option key={item.id} value={String(item.id)}>{item.descripts}</Option>)
            })
            let country = []
            baseParms.country && baseParms.country.map(item => {
                country.push(<Option key={item.id} title={item.descripts} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)}>{item.descripts}</Option>)
            })

            let firstCityItem = [], birthCityItem = [], nativeCityItem = [], presentCityItem = [], registerCityItem = [], companyCityItem = [], contactCityItem = []; //省,市Option
            let birthAreasItem = [], nativeAreasItem = [], presentAreasItem = [], registerAreasItem = [], companyAreasItem = [], contactAreasItem = [];//县Option
            let birthVillagesItem = [], nativeVillagesItem = [], presentVillagesItem = [], registerVillagesItem = [], companyVillagesItem = [], contactVillagesItem = [];//乡
            let birthHamletsItem = [], nativeHamletsItem = [], presentHamletsItem = [], registerHamletsItem = [], companyHamletsItem = [], contactHamletsItem = [];//村
            let patInfo = this.state.parms;
            let provinceItem = [];
            localProvince && localProvince.map(item => {
                provinceItem.push(<Option key={item.id} className={'1' + item.province} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
            });

            // let firstCityItem = []
            //第一次加载的城市;
            localCity && localCity.map(item => {
                firstCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
            });
            //出生城市
            if ((!birthCity) || (birthCity.length === 0)) {
                //出生城市下拉数据为空时加载所有城市
                birthCityItem = firstCityItem;
            } else {
                birthCity && birthCity.map(item => {
                    birthCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            birthAreas && birthAreas.map(item => {
                birthAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((birthAreas) && (birthAreas.length === 0) && (patInfo.patBirthAreaID)) {
                birthAreasItem.push(<Option key={patInfo.patBirthAreaID} role={patInfo.patBirthAreaDesc} title={patInfo.patBirthAreaDesc} value={String(patInfo.patBirthAreaID)}>{patInfo.patBirthAreaDesc}</Option>)
            }
            birthVillages && birthVillages.map(item => {
                birthVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((birthVillages) && (birthVillages.length === 0) && (patInfo.patBirthVillageID)) {
                birthVillagesItem.push(<Option key={patInfo.patBirthVillageID} role={patInfo.patBirthVillageDesc} title={patInfo.patBirthVillageDesc} value={String(patInfo.patBirthVillageID)}>{patInfo.patBirthVillageDesc}</Option>)
            }
            birthHamlets && birthHamlets.map(item => {
                birthHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((birthHamlets) && (birthHamlets.length === 0) && (patInfo.patBirthHamletID)) {
                birthHamletsItem.push(<Option key={patInfo.patBirthHamletID} role={patInfo.patBirthHamletDesc} title={patInfo.patBirthHamletDesc} value={String(patInfo.patBirthHamletID)}>{patInfo.patBirthHamletDesc}</Option>)
            }
            //籍贯
            if ((!nativeCity) || (nativeCity.length === 0)) {
                //籍贯城市下拉数据为空时加载所有城市
                nativeCityItem = firstCityItem;
            } else {
                nativeCity && nativeCity.map(item => {
                    nativeCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            nativeAreas && nativeAreas.map(item => {
                nativeAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((nativeAreas) && (nativeAreas.length === 0) && (patInfo.patNativeAreaID)) {
                nativeAreasItem.push(<Option key={patInfo.patNativeAreaID} role={patInfo.patNativeAreaDesc} title={patInfo.patNativeAreaDesc} value={String(patInfo.patNativeAreaID)}>{patInfo.patNativeAreaDesc}</Option>)
            }
            nativeVillages && nativeVillages.map(item => {
                nativeVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((nativeVillages) && (nativeVillages.length === 0) && (patInfo.patNativeVillageID)) {
                nativeVillagesItem.push(<Option key={patInfo.patNativeVillageID} role={patInfo.patNativeVillageDesc} title={patInfo.patNativeVillageDesc} value={String(patInfo.patNativeVillageID)}>{patInfo.patNativeVillageDesc}</Option>)
            }
            nativeHamlets && nativeHamlets.map(item => {
                nativeHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((nativeHamlets) && (nativeHamlets.length === 0) && (patInfo.patNativeHamletID)) {
                nativeHamletsItem.push(<Option key={patInfo.patNativeHamletID} role={patInfo.patNativeHamletDesc} title={patInfo.patNativeHamletDesc} value={String(patInfo.patNativeHamletID)}>{patInfo.patNativeHamletDesc}</Option>)
            }
            //现住址
            if ((!presentCity) || (presentCity.length === 0)) {
                //籍贯城市下拉数据为空时加载所有城市
                presentCityItem = firstCityItem;
            } else {
                presentCity && presentCity.map(item => {
                    presentCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            presentAreas && presentAreas.map(item => {
                presentAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((presentAreas) && (presentAreas.length === 0) && (patInfo.patPresentAreaID)) {
                presentAreasItem.push(<Option key={patInfo.patPresentAreaID} role={patInfo.patPresentAreaDesc} title={patInfo.patPresentAreaDesc} value={String(patInfo.patPresentAreaID)}>{patInfo.patPresentAreaDesc}</Option>)
            }
            presentVillages && presentVillages.map(item => {
                presentVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((presentVillages) && (presentVillages.length === 0) && (patInfo.patPresentVillageID)) {
                presentVillagesItem.push(<Option key={patInfo.patPresentVillageID} role={patInfo.patPresentVillageDesc} title={patInfo.patPresentVillageDesc} value={String(patInfo.patPresentVillageID)}>{patInfo.patPresentVillageDesc}</Option>)
            }
            presentHamlets && presentHamlets.map(item => {
                presentHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((presentHamlets) && (presentHamlets.length === 0) && (patInfo.patPresentHamletID)) {
                presentHamletsItem.push(<Option key={patInfo.patPresentHamletID} role={patInfo.patPresentHamletDesc} title={patInfo.patPresentHamletDesc} value={String(patInfo.patPresentHamletID)}>{patInfo.patPresentHamletDesc}</Option>)
            }
            //户口
            if ((!registerCity) || (registerCity.length === 0)) {
                //籍贯城市下拉数据为空时加载所有城市
                registerCityItem = firstCityItem;
            } else {
                registerCity && registerCity.map(item => {
                    registerCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            registerAreas && registerAreas.map(item => {
                registerAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((registerAreas) && (registerAreas.length === 0) && (patInfo.patRegisterAreaID)) {
                registerAreasItem.push(<Option key={patInfo.patRegisterAreaID} role={patInfo.patRegisterAreaDesc} title={patInfo.patRegisterAreaDesc} value={String(patInfo.patRegisterAreaID)}>{patInfo.patRegisterAreaDesc}</Option>)
            }
            registerVillages && registerVillages.map(item => {
                registerVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((registerVillages) && (registerVillages.length === 0) && (patInfo.patRegisterVillageID)) {
                registerVillagesItem.push(<Option key={patInfo.patRegisterVillageID} role={patInfo.patRegisterVillageDesc} title={patInfo.patRegisterVillageDesc} value={String(patInfo.patRegisterVillageID)}>{patInfo.patRegisterVillageDesc}</Option>)
            }
            registerHamlets && registerHamlets.map(item => {
                registerHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((registerHamlets) && (registerHamlets.length === 0) && (patInfo.patRegisterHamletID)) {
                registerHamletsItem.push(<Option key={patInfo.patRegisterHamletID} role={patInfo.patRegisterHamletDesc} title={patInfo.patRegisterHamletDesc} value={String(patInfo.patRegisterHamletID)}>{patInfo.patRegisterHamletDesc}</Option>)
            }
            //单位
            if ((!companyCity) || (companyCity.length === 0)) {
                //籍贯城市下拉数据为空时加载所有城市
                companyCityItem = firstCityItem;
            } else {
                companyCity && companyCity.map(item => {
                    companyCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            companyAreas && companyAreas.map(item => {
                companyAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((companyAreas) && (companyAreas.length === 0) && (patInfo.patCompanyAreaID)) {
                companyAreasItem.push(<Option key={patInfo.patCompanyAreaID} role={patInfo.patCompanyAreaDesc} title={patInfo.patCompanyAreaDesc} value={String(patInfo.patCompanyAreaID)}>{patInfo.patCompanyAreaDesc}</Option>)
            }
            companyVillages && companyVillages.map(item => {
                companyVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((companyVillages) && (companyVillages.length === 0) && (patInfo.patCompanyVillageID)) {
                companyVillagesItem.push(<Option key={patInfo.patCompanyVillageID} role={patInfo.patCompanyVillageDesc} title={patInfo.patCompanyVillageDesc} value={String(patInfo.patCompanyVillageID)}>{patInfo.patCompanyVillageDesc}</Option>)
            }
            companyHamlets && companyHamlets.map(item => {
                companyHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((companyHamlets) && (companyHamlets.length === 0) && (patInfo.patCompanyHamletID)) {
                companyHamletsItem.push(<Option key={patInfo.patCompanyHamletID} role={patInfo.patCompanyHamletDesc} title={patInfo.patCompanyHamletDesc} value={String(patInfo.patCompanyHamletID)}>{patInfo.patCompanyHamletDesc}</Option>)
            }
            //联系人
            if ((!contactCity) || (contactCity.length === 0)) {
                //籍贯城市下拉数据为空时加载所有城市
                contactCityItem = firstCityItem;
            } else {
                contactCity && contactCity.map(item => {
                    contactCityItem.push(<Option provinceid={item.province} key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} className={'2' + item.province} title={item.descripts}>{item.descripts}</Option>)
                });
            }
            contactAreas && contactAreas.map(item => {
                contactAreasItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((contactAreas) && (contactAreas.length === 0) && (patInfo.patContactAreaID)) {
                contactAreasItem.push(<Option key={patInfo.patContactAreaID} role={patInfo.patContactAreaDesc} title={patInfo.patContactAreaDesc} value={String(patInfo.patContactAreaID)}>{patInfo.patContactAreaDesc}</Option>)
            }
            contactVillages && contactVillages.map(item => {
                contactVillagesItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((contactVillages) && (contactVillages.length === 0) && (patInfo.patContactVillageID)) {
                contactVillagesItem.push(<Option key={patInfo.patContactVillageID} role={patInfo.patContactVillageDesc} title={patInfo.patContactVillageDesc} value={String(patInfo.patContactVillageID)}>{patInfo.patContactVillageDesc}</Option>)
            }
            contactHamlets && contactHamlets.map(item => {
                contactHamletsItem.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            });
            if ((contactHamlets) && (contactHamlets.length === 0) && (patInfo.patContactHamletID)) {
                contactHamletsItem.push(<Option key={patInfo.patContactHamletID} role={patInfo.patContactHamletDesc} title={patInfo.patContactHamletDesc} value={String(patInfo.patContactHamletID)}>{patInfo.patContactHamletDesc}</Option>)
            }

            let nation = []
            baseParms.nation && baseParms.nation.map(item => {
                nation.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} title={item.descripts} value={String(item.id)}>{item.descripts}</Option>)
            })

            let occupation = []
            baseParms.occupation && baseParms.occupation.map(item => {
                occupation.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
            })

            let marital = []
            baseParms.marital && baseParms.marital.map(item => {
                marital.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
            })

            let relation = []
            baseParms.relation && baseParms.relation.map(item => {
                relation.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
            })

            let socialStatus = []
            baseParms.socialStatus && baseParms.socialStatus.map(item => {
                socialStatus.push(<Option key={item.id} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
            })

            let payMethod = []
            baseParms.payMethod && baseParms.payMethod.map(item => {
                payMethod.push(<Option key={item.id} value={String(item.id)}>{item.descripts}</Option>)
            })

            let bindArr = []
            bindCardArr && bindCardArr.map(item => {
                bindArr.push(<span style={{ color: (item.light == true ? "#1999db" : "rgba(0, 0, 0, 0.75)") }}><span style={{ margin: '0 8px', }}>{item.cardTypeDesc}<span style={{ margin: "0 6px" }}>{item.cardNo}</span>({item.cardStatusDesc})</span></span>)
            })
            const mesIcon = <Icon type="exclamation-circle" />
            return (

                <Spin spinning={readInfoLoading}>
                    <div className="registerDom" style={{ height: "100%", overflow: "hidden" }}>
                        <Form style={{ height: "100%", overflow: "hidden auto" }}>
                            <div className="cardTitleDom">
                                <div className="bg1"></div>
                                <Row style={{ background: "#ffffff" }} gutter={12} className="cardTitle">
                                    <span className="title">当前卡信息</span>
                                </Row>
                                <Row gutter={12} style={{ paddingLeft: "52px" }}>
                                    <Col span={4} className="cardDom">
                                        <FormItem wrapperCol={{ span: 23 }}>
                                            {getFieldDecorator('cardTypeID', {
                                                initialValue: initCardDr,
                                                rules: [{ required: true, message: '请选择建卡类型' }],
                                            })(
                                                <Select disabled={isModefined == 1 || allDis || !noCard} placeholder='请选择卡类型' onSelect={this.handleCred}>
                                                    {card}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={6} className="cardNoDom">
                                        <Tooltip getPopupContainer={() => document.querySelector('.cardNoDom')} overlayStyle={{ zIndex: 999, }} overlayClassName="toolTipDom cardNo" title={<div className="titleIcon">{mesIcon}<span >{cardNoMessage}</span></div>} visible={this.state.cardNoVisible}>
                                            <FormItem wrapperCol={{ span: 30 }} style={{ width: '96%', }}>
                                                {getFieldDecorator('cardNo', {
                                                    validateTrigger: [""],
                                                    initialValue: cardNo ? cardNo : undefined,
                                                    rules: [{ required: noCard ? true : false, message: '请输入' },
                                                    { validator: noCard && isModefined != 1 ? this.validFunction : "" },],
                                                    getValueFromEvent: (event) => {
                                                        return initCardDr == '3' ? event.target.value.replace(/[^\d|Xx]/g, '') : event.target.value.replace(/\D/g, '')
                                                    },
                                                })(
                                                    <Input
                                                        allowClear={isModefined != 1}
                                                        onMouseOver={() => this.visibleTip(1)}
                                                        maxLength={initCardDr == '3' ? 18 : (initCardDr == '1' ? 12 : 99)}
                                                        ref={this.cardNo}
                                                        onPressEnter={() => this.handleKeydownM(1)}
                                                        onBlur={this.patCardBlur}
                                                        placeholder={
                                                            nowRead == 'R' ? '请点击读卡按钮查找病人' :
                                                                (nowRead == "" && replenishZero == "Y" ? cardLength + '刷卡/输入或点击读卡（卡号可自动补零）'
                                                                    : (nowRead == "" && replenishZero == "N" ? cardLength + '刷卡/输入或点击读卡' :
                                                                        (nowRead == 'I' && replenishZero == "Y" ? cardLength + '刷卡/输入卡号（卡号可自动补零）'
                                                                            : (nowRead == 'I' && replenishZero == "N" ? cardLength + '刷卡/输入卡号' : ""))))}
                                                        disabled={isModefined == 1 || nowRead == 'R' || !noCard}
                                                    />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                    <Col span={7} >
                                        <Form.Item wrapperCol={{ span: 16 }}>
                                            <Button ref={this.readOneButton} disabled={nowRead == "I" || !noCard} type="primary" loading={readLoading} onClick={this.handleNoPopInmation}>
                                                读卡
                                            </Button>
                                            <Button style={{ marginLeft: 10 }} onClick={() => this.handlePatients()}>
                                                查找病人
                                            </Button>
                                        </Form.Item>
                                    </Col>
                                </Row>
                            </div>
                            <Row gutter={12} className="cardTitle">
                                <div className="sCard">
                                    <img src="./src/assets/images/title-0.png" style={{ marginRight: "8px" }} />
                                    <span>病人基本信息</span>
                                </div>
                            </Row>
                            <div className="baseInfoDom oneConts" style={{ padding: "14px 54px" }}>
                                <Row gutter={60}>
                                    <Col span={5} style={style} className="patNameDom">
                                        <Tooltip getPopupContainer={() => document.querySelector('.patNameDom')} overlayClassName="toolTipDom patNameC" title={<div className="titleIcon">{mesIcon}<span >{patNameMessage}</span></div>} visible={this.state.patNameVisible} overlayStyle={{ zIndex: 999, }}>
                                            <FormItem {...formItemLayouAdress} label='病人姓名'>
                                                {getFieldDecorator('patName', {
                                                    validateTrigger: [""],
                                                    initialValue: parms.patName ? parms.patName : undefined,
                                                    rules: [{ required: true, message: '请输入', },
                                                    { validator: this.validName },],
                                                })(
                                                    <Input
                                                        onMouseOver={() => this.visibleTip(2)}
                                                        ref={this.patName}
                                                        onPressEnter={() => this.handleKeydownM(2)}
                                                        onBlur={this.patBlur}
                                                        disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                    />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                    <Col span={3} style={{ padding: '0 6px 0 0' }} className="sexConant leftLine">
                                        <FormItem  {...formItemLayoutSexy} label='性别'>
                                            {getFieldDecorator('patSexID', {
                                                initialValue: parms.patSexID ? String(parms.patSexID) : String(credSex),
                                                rules: [{ required: true, message: ' ' }],
                                            })(
                                                <Select ref={this.sex} onSelect={() => this.handleKeydownM(3)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}>
                                                    {sex}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} style={{ padding: "0 0 0 12px" }} className="leftLine">
                                        <FormItem {...formItemLayouAdress} label='证件类型'>
                                            {getFieldDecorator('patCredTypeID', {
                                                initialValue: parms.patCredTypeID ? parms.patCredTypeID : '1',
                                                rules: [{ required: socialTag == 4 ? false : true, message: '请选择' }],
                                            })(
                                                <Select ref={this.credType} onChange={() => this.handleKeydownM(4)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear placeholder='请选择证件类型' optionFilterProp="role" onSelect={this.handleCerdType}>
                                                    {credType}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} style={{ padding: '0' }} className="patNoDom">
                                        <Tooltip overlayClassName="toolTipDom patNoC" getPopupContainer={() => document.querySelector('.patNoDom')} title={<div className="titleIcon">{mesIcon}<span >{posMessage}</span></div>} visible={this.state.posVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem  {...formItemLayouAdress} label='证件号码' className="contentLeft">
                                                {getFieldDecorator('patCredNo', {
                                                    validateTrigger: ["onPressEnter", "onBlur"],
                                                    initialValue: parms.patCredNo ? parms.patCredNo : undefined,
                                                    rules: [{ required: posType == 1 ? true : false, message: '请输入' },
                                                    { validator: posType == 1 ? Util.vailIdCard : '' },],
                                                    getValueFromEvent: (event) => {
                                                        if (posType == 1) {
                                                            return event.target.value.replace(/[^\d|Xx]/g, '')
                                                        }
                                                        else {
                                                            return event.target.value.replace(/[^0-9a-zA-Z]/g, '')
                                                        }
                                                    },
                                                })(
                                                    <Input
                                                        style={{ padding: "0 2px", }}
                                                        onClick={this.fouceCredNo}
                                                        onMouseOver={() => this.visibleTip(3)}
                                                        maxLength={posType == 1 ? 18 : 99}
                                                        ref={this.patCredNo}
                                                        onPressEnter={this.validCard}
                                                        disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                        placeholder='完善证件,以便退款'
                                                        onBlur={(e) => this.validCard(e, 2)}
                                                    />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                    <Col span={4} style={{ padding: "0" }} className="patBirth leftLine">
                                        <Tooltip getPopupContainer={() => document.querySelector('.patBirth')} overlayClassName="toolTipDom patBir" title={<div className="titleIcon">{mesIcon}<span >{patBirthMessage}</span></div>} visible={this.state.patBirthVisible} overlayStyle={{ zIndex: 999 }}>
                                            <Form.Item {...formItemLayoutBirth} label={"出生日期"}>
                                                {getFieldDecorator('patBirthDate',
                                                    {
                                                        initialValue: credBirthday ? moment(credBirthday, 'YYYYMMDD') : (parms.patBirthDate ? moment(parms.patBirthDate, 'YYYYMMDD') : undefined),
                                                        rules: [{ required: true, message: '请选择' }],
                                                    })(
                                                        <DatePicker
                                                            showToday={false}
                                                            style={{ width: '100%' }}
                                                            format={this.state.formatType ? 'YYYY-MM-DD' : "YYYYMMDD"}
                                                            onBlur={() => this.onChangeTimeBlur()}
                                                            onFocus={() => this.visibleTip(10)}
                                                            ref={this.patBirthDate}
                                                            disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                            onChange={this.onPanelChange}
                                                            placeholder={'YYYY-MM-DD'}
                                                            separator="-"
                                                            allowClear
                                                            disabledDate={(curDate) => {
                                                                return curDate && curDate > moment().endOf('day');
                                                            }}
                                                        />
                                                    )}
                                            </Form.Item>
                                        </Tooltip>
                                    </Col>
                                    <Col span={4} style={{ padding: '0' }} className="lastLeft leftLine">
                                        <FormItem {...formItemLayouAdress} className="lastRightBorder" label={'年龄'}>
                                            {getFieldDecorator('age', {
                                                initialValue: credAge ? credAge : (parms.patAge ? parms.patAge : undefined),
                                                rules: [{ required: false, message: '年龄' },],
                                            })(
                                                <Input disabled readOnly="ture" style={{ marginRight: '4px', textAlign: 'center' }} />
                                            )}
                                        </FormItem>
                                    </Col>
                                </Row>
                                <Row gutter={60}>
                                    <Col span={5} style={style} className="patMobile">
                                        <Tooltip getPopupContainer={() => document.querySelector('.patMobile')} overlayClassName="toolTipDom patNoC" placement="right" title={<div className="titleIcon">{mesIcon}<span >{patMobileMessage}</span></div>} visible={this.state.patMobileVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem {...formItemLayouAdress} label='联系电话'>
                                                {getFieldDecorator('patMobile', {
                                                    validateTrigger: [""],
                                                    initialValue: parms.patMobile ? parms.patMobile : undefined,
                                                    rules: [{ required: true, message: '请输入', },
                                                    { pattern: new RegExp(/^1\d{10}$/), message: '请输入正确的手机号' }
                                                    ],
                                                    getValueFromEvent: (event) => {
                                                        return event.target.value.replace(/\D/g, '')
                                                    },
                                                })(
                                                    <Input
                                                        maxLength={11}
                                                        ref={this.patMobile}
                                                        onMouseOver={() => this.visibleTip(4)}
                                                        onBlur={this.patMobileBlur} onPressEnter={() => this.handleKeydownM(6)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                    <Col span={3} style={{ padding: '0' }} className="sexConant leftLine" id="patType">
                                        <Tooltip getPopupContainer={() => document.querySelector('#patType')} overlayClassName="toolTipDom patTypeC" title={<div className="titleIcon">{mesIcon}<span >{patTypeMessage}</span></div>} visible={this.state.patTypeVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem  {...formItemLayoutSexy} label='病人类型'>
                                                {getFieldDecorator('patTypeID', {
                                                    initialValue: parms.patTypeID ? parms.patTypeID : undefined,
                                                    rules: [{ required: true, message: '请选择' }],
                                                })(
                                                    <Select onMouseEnter={() => this.visibleTip(9)} ref={this.patType} onBlur={this.patTypeBlur} onSelect={() => this.handleKeydownM(7)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}>
                                                        {patType}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                    <Col span={4} style={style} className="leftLine">
                                        <FormItem {...formItemLayouAdress} label='国籍'>
                                            {getFieldDecorator('patCountryID', {
                                                initialValue: parms.patCountryID ? parms.patCountryID : "44",
                                                rules: [{ required: false, message: '请选择国籍' }],
                                            })(
                                                <Select disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" onChange={this.handleCountry}>
                                                    {country}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} style={style}>
                                        <FormItem {...formItemLayouAdress} label='民族' className="contentLeft">
                                            {getFieldDecorator('patNationID', {
                                                initialValue: parms.patNationID ? parms.patNationID : '1',
                                                rules: [{ required: credCountry == 44, message: '请选择民族' }],
                                            })(
                                                <Select ref={this.nation} onSelect={() => this.handleKeydownM(8)} disabled={credCountry != 44 || isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" >
                                                    {nation}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} style={style} className="leftLine">
                                        <FormItem {...formItemLayoutBirth} label='职业'>
                                            {getFieldDecorator('patOccupationID', {
                                                initialValue: parms.patOccupationID ? parms.patOccupationID : undefined,
                                                rules: [{ required: false, message: '请选择职业' }],
                                            })(
                                                <Select onSelect={() => this.handleKeydownM(20)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" >
                                                    {occupation}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} style={{ padding: '0' }} className="lastLeft leftLine">
                                        <FormItem {...formItemLayouAdress} className="lastRightBorder" label='婚姻状况'>
                                            {getFieldDecorator('patMaritalID', {
                                                initialValue: parms.patMaritalID ? parms.patMaritalID : undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Select ref={this.patMaritalID} onSelect={() => this.handleKeydownM(21)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" >
                                                    {marital}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={5}>
                                        <FormItem className="lastRightBorder birthLine" label={"出生地址"} {...formItemLayouAdress} >
                                            {getFieldDecorator('birthProvinceID',
                                                {
                                                    initialValue: parms.patBirthProvinceID ? parms.patBirthProvinceID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.bornProvince}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "birth")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('birthCityID',
                                                {
                                                    initialValue: parms.patBirthCityID ? parms.patBirthCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.birthCity}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onFocus={this.onCityFocus.bind(this, "birthProvinceID", "birthCity")}
                                                        onChange={this.onCityChange.bind(this, "birth")}
                                                    >
                                                        {birthCityItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('birthAreaID',
                                                {
                                                    initialValue: parms.patBirthAreaID ? parms.patBirthAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.bornCountry}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "birth")}
                                                        onFocus={this.onAreaFocus.bind(this, "birthCityID", "birth")}
                                                    >
                                                        {birthAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={adressStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('birthVillageID',
                                                {
                                                    initialValue: parms.patBirthVillageID ? parms.patBirthVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.bornVillage}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "birth")}
                                                        onFocus={this.onVillageFocus.bind(this, "birthAreaID", "birth")}
                                                    >
                                                        {birthVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('birthHamletID',
                                                {
                                                    initialValue: parms.patBirthHamletID ? parms.patBirthHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.bornHamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "birthVillageID", "birth")}
                                                    >
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('birthAddress',
                                                {
                                                    initialValue: parms.patBirthAddressDesc ? parms.patBirthAddressDesc : undefined,
                                                })(
                                                    <Input placeholder='详细地址(出生)' />
                                                )}
                                        </FormItem>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={5} >
                                        <FormItem className="lastRightBorder" label={"籍贯"} {...formItemLayouAdress}>
                                            {getFieldDecorator('nativeProvinceID',
                                                {
                                                    initialValue: parms.patNativeProvinceID ? parms.patNativeProvinceID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.nativeProvince}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "native")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('nativeCityID',
                                                {
                                                    initialValue: parms.patNativeCityID ? parms.patNativeCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.nativeCity}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onChange={this.onCityChange.bind(this, "native")}
                                                        onFocus={this.onCityFocus.bind(this, "nativeProvinceID", "nativeCity")}
                                                    >
                                                        {nativeCityItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('nativeAreaID',
                                                {
                                                    initialValue: parms.patNativeAreaID ? parms.patNativeAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.nativeCountry}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "native")}
                                                        onFocus={this.onAreaFocus.bind(this, "nativeCityID", "native")}
                                                    >
                                                        {nativeAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={adressStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('nativeVillageID',
                                                {
                                                    initialValue: parms.patNativeVillageID ? parms.patNativeVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.nativeVillage}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "native")}
                                                        onFocus={this.onVillageFocus.bind(this, "nativeAreaID", "native")}
                                                    >
                                                        {nativeVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('nativeHamletID',
                                                {
                                                    initialValue: parms.patNativeHamletID ? parms.patNativeHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.nativeHamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "nativeVillageID", "native")}
                                                    >
                                                        {nativeHamletsItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('nativeAddress',
                                                {
                                                    initialValue: parms.patNativeAddressDesc ? parms.patNativeAddressDesc : undefined,
                                                })(
                                                    <Input placeholder='详细地址(籍贯)' />
                                                )}
                                        </FormItem>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={4}>
                                        <FormItem className="lastRightBorder" label={"现住址"} {...formItemLayouNowAdress} >
                                            {getFieldDecorator('presentProvinceID',
                                                {
                                                    initialValue: parms.patPresentProvinceID ? parms.patPresentProvinceID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.province}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "present")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('presentCityID',
                                                {
                                                    initialValue: parms.patPresentCityID ? parms.patPresentCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.city}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onChange={this.onCityChange.bind(this, "present")}
                                                        onFocus={this.onCityFocus.bind(this, "presentProvinceID", "presentCity")}
                                                    >
                                                        {
                                                            presentCityItem
                                                        }
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('presentAreaID',
                                                {
                                                    initialValue: parms.patPresentAreaID ? parms.patPresentAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.country}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "present")}
                                                        onFocus={this.onAreaFocus.bind(this, "presentCityID", "present")}
                                                    >
                                                        {presentAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('presentVillageID',
                                                {
                                                    initialValue: parms.patPresentVillageID ? parms.patPresentVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.village}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "present")}
                                                        onFocus={this.onVillageFocus.bind(this, "presentAreaID", "present")}
                                                    >
                                                        {presentVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('presentHamletID',
                                                {
                                                    initialValue: parms.patPresentHamletID ? parms.patPresentHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.hamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "presentVillageID", "present")}
                                                    >
                                                        {presentHamletsItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={6} style={{ padding: '0', width: "25.8%", position: "relative", }} id="patAdress">
                                        <Tooltip getPopupContainer={() => document.querySelector('#patAdress')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressMessage}</span></div>} visible={this.state.patAdressVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem className="lastRightBorder nowStarDom" label={""}  {...formItemThreeAdress}>
                                                {getFieldDecorator('presentAddressDesc',
                                                    {
                                                        rules: [{ required: true, message: '请填写' }],
                                                        initialValue: parms.patPresentAddressDesc ? parms.patPresentAddressDesc : undefined,
                                                    })(
                                                        <Input
                                                            // ref={this.patAddress}
                                                            onMouseOver={() => this.visibleTip(5)}
                                                            ref={this.patAddress}
                                                            onBlur={this.patAdressBlur}
                                                            onPressEnter={() => this.handleKeydownM(9)}
                                                            // onBlur={this.onTipsItemBlur.bind(this, "presentAddressDesc", "请填写现住址详细地址")}
                                                            // onPressEnter={this.onTipsItemBlur.bind(this, "presentAddressDesc", "请填写现住址详细地址")}
                                                            placeholder='详细地址(现住址)'
                                                        // onFocus={this.onFocus.bind(this, "presentAddressDesc")}
                                                        />
                                                    )}
                                            </FormItem>
                                            <span className="star">
                                            </span>
                                        </Tooltip>
                                    </Col>
                                    <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressZip">
                                        <Tooltip getPopupContainer={() => document.querySelector('#patAdressZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressMessageZip}</span></div>} visible={this.state.patAdressZipVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                                {getFieldDecorator('presentZIP',
                                                    {
                                                        initialValue: parms.patPresentZIPDesc ? parms.patPresentZIPDesc : undefined,
                                                        rules: [{ required: false, message: '' },
                                                        { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                        getValueFromEvent: (event) => {
                                                            return event.target.value.replace(/\D/g, '')
                                                        },
                                                    })(
                                                        <Input
                                                            maxLength={6}
                                                            ref={this.presentZIP}
                                                            onPressEnter={() => this.handleKeydownM(27)}
                                                            onMouseOver={() => this.visibleTip(13)}
                                                            onBlur={() => this.handleKeydownM(27)}
                                                            disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                            placeholder='0-9 6位'
                                                        />
                                                    )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={4}>
                                        <FormItem className="lastRightBorder" label={"户口地址"} {...formItemLayouNowAdress}>
                                            {getFieldDecorator('registerProvinceID',
                                                {
                                                    initialValue: patInfo.patRegisterProvinceID ? patInfo.patRegisterProvinceID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.houseProvince}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "register")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('registerCityID',
                                                {
                                                    initialValue: patInfo.patRegisterCityID ? patInfo.patRegisterCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.houseCity}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onChange={this.onCityChange.bind(this, "register")}
                                                        onFocus={this.onCityFocus.bind(this, "registerProvinceID", "registerCity")}
                                                    >
                                                        {
                                                            registerCityItem
                                                        }
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('registerAreaID',
                                                {
                                                    initialValue: patInfo.patRegisterAreaID ? patInfo.patRegisterAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.houseCountry}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "register")}
                                                        onFocus={this.onAreaFocus.bind(this, "registerCityID", "register")}
                                                    >
                                                        {registerAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('registerVillageID',
                                                {
                                                    initialValue: patInfo.patRegisterVillageID ? patInfo.patRegisterVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.houseVillage}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "register")}
                                                        onFocus={this.onVillageFocus.bind(this, "registerAreaID", "register")}
                                                    >
                                                        {registerVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('registerHamletID',
                                                {
                                                    initialValue: patInfo.patRegisterHamletID ? patInfo.patRegisterHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.houseHamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "registerVillageID", "register")}
                                                    >
                                                        {registerHamletsItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={8} style={{ padding: '0', width: "25.8%" }} >
                                        <FormItem className="lastRightBorder"  {...formItemThreeAdress}>
                                            {getFieldDecorator('registerAddress',
                                                {
                                                    initialValue: patInfo.patRegisterAddressDesc ? patInfo.patRegisterAddressDesc : undefined,
                                                })(
                                                    <Input placeholder='详细地址(户口地址)' />
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressHouseZip">
                                        <Tooltip getPopupContainer={() => document.querySelector('#patAdressHouseZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressHouseMessageZip}</span></div>} visible={this.state.patAdressHouseZipVisible} overlayStyle={{ zIndex: 999 }}>
                                            <FormItem label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                                {getFieldDecorator('registerZIP',
                                                    {
                                                        initialValue: patInfo.patRegisterZIPDesc ? patInfo.patRegisterZIPDesc : undefined,
                                                        rules: [{ required: false, message: '' },
                                                        { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                        getValueFromEvent: (event) => {
                                                            return event.target.value.replace(/\D/g, '')
                                                        },
                                                    })(
                                                        <Input
                                                            maxLength={6}
                                                            onMouseOver={() => this.visibleTip(14)}
                                                            onPressEnter={() => this.handleKeydownM(30)}
                                                            onBlur={() => this.handleKeydownM(30)}
                                                            ref={this.registerZIP}
                                                            disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                            placeholder='0-9 6位'
                                                        />
                                                    )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={4}>
                                        <FormItem className="lastRightBorder" label={"单位地址"} {...formItemLayouNowAdress}>
                                            {getFieldDecorator('companyProvinceID',
                                                {
                                                    initialValue: patInfo.patCompanyProvinceID ? patInfo.patCompanyProvinceID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.companyProvince}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "company")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('companyCityID',
                                                {
                                                    initialValue: patInfo.patCompanyCityID ? patInfo.patCompanyCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.companyCity}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onChange={this.onCityChange.bind(this, "company")}
                                                        onFocus={this.onCityFocus.bind(this, "companyProvinceID", "companyCity")}
                                                    >
                                                        {companyCityItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('companyAreaID',
                                                {
                                                    initialValue: patInfo.patCompanyAreaID ? patInfo.patCompanyAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.companyCountry}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "company")}
                                                        onFocus={this.onAreaFocus.bind(this, "companyCityID", "company")}
                                                    >
                                                        {companyAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('companyVillageID',
                                                {
                                                    initialValue: patInfo.patCompanyVillageID ? patInfo.patCompanyVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.companyVillage}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "company")}
                                                        onFocus={this.onVillageFocus.bind(this, "companyAreaID", "company")}
                                                    >
                                                        {companyVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={nowAdStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('companyHamletID',
                                                {
                                                    initialValue: patInfo.patCompanyHamletID ? patInfo.patCompanyHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.companyHamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "companyVillageID", "company")}
                                                    >
                                                        {companyHamletsItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={8} style={{ padding: '0', width: "25.8%" }} >
                                        <FormItem className="lastRightBorder"  {...formItemThreeAdress}>
                                            {getFieldDecorator('companyAddress',
                                                {
                                                    initialValue: patInfo.patCompanyAddressDesc ? patInfo.patCompanyAddressDesc : undefined,
                                                })(
                                                    <Input placeholder='详细地址(单位地址)' />
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressComZip">
                                        <Tooltip getPopupContainer={() => document.querySelector('#patAdressComZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressComMessageZip}</span></div>} visible={this.state.patAdressComZipVisible} overlayStyle={{ zIndex: 999 }}>
                                            <Form.Item label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                                {getFieldDecorator('companyZIP',
                                                    {
                                                        validateTrigger: "",
                                                        initialValue: parms.patCompanyZIPDesc ? parms.patCompanyZIPDesc : undefined,
                                                        rules: [{ required: false, message: '' }, { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                        getValueFromEvent: (event) => {
                                                            return event.target.value.replace(/\D/g, '')
                                                        },
                                                    })(
                                                        <Input
                                                            maxLength={6}
                                                            //  ref={this.companyZIP}
                                                            onMouseOver={() => this.visibleTip(15)}
                                                            onPressEnter={() => this.handleKeydownM(19)}
                                                            onBlur={() => this.handleKeydownM(19)}
                                                            ref={this.companyZIP}
                                                            disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                            placeholder='0-9 6位'
                                                        />
                                                    )}
                                            </Form.Item>
                                        </Tooltip>
                                    </Col>
                                </Row>
                                <Row className="borderBottomRow">
                                    <Col span={5}>
                                        <FormItem className="lastRightBorder birthLine" label={"联系人地址"} {...formItemLayouAdress}>
                                            {getFieldDecorator('contactProvinceID',
                                                {
                                                    initialValue: patInfo.patContactProvinceID ? patInfo.patContactProvinceID : undefined,
                                                })(
                                                    <Select
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='省'
                                                        optionFilterProp="role"
                                                        onChange={this.onProvinceChange.bind(this, "contact")}
                                                    >
                                                        {provinceItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('contactCityID',
                                                {
                                                    initialValue: patInfo.patContactCityID ? patInfo.patContactCityID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.econCity}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='市'
                                                        optionFilterProp="role"
                                                        onChange={this.onCityChange.bind(this, "contact")}
                                                        onFocus={this.onCityFocus.bind(this, "contactProvinceID", "contactCity")}
                                                    >
                                                        {contactCityItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('contactAreaID',
                                                {
                                                    initialValue: patInfo.patContactAreaID ? patInfo.patContactAreaID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.econCountry}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='县'
                                                        optionFilterProp="role"
                                                        onChange={this.onAreaChange.bind(this, "contact")}
                                                        onFocus={this.onAreaFocus.bind(this, "contactCityID", "contact")}
                                                    >
                                                        {contactAreasItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('contactVillageID',
                                                {
                                                    initialValue: patInfo.patContactVillageID ? patInfo.patContactVillageID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.econVillage}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='乡'
                                                        optionFilterProp="role"
                                                        onChange={this.onVillageChange.bind(this, "contact")}
                                                        onFocus={this.onVillageFocus.bind(this, "contactAreaID", "contact")}
                                                    >
                                                        {contactVillagesItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={5} style={provinceStyle}>
                                        <FormItem className="lastRightBorder">
                                            {getFieldDecorator('contactHamletID',
                                                {
                                                    initialValue: patInfo.patContactHamletID ? patInfo.patContactHamletID : undefined,
                                                })(
                                                    <Select
                                                        ref={this.econHamlet}
                                                        allowClear={true}
                                                        showSearch={true}
                                                        placeholder='村'
                                                        optionFilterProp="role"
                                                        onFocus={this.onHamletFocus.bind(this, "contactVillageID", "contact")}
                                                    >
                                                        {contactHamletsItem}
                                                    </Select>
                                                )}
                                        </FormItem>
                                    </Col>
                                    <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                        <FormItem className="lastRightBorder" >
                                            {getFieldDecorator('contactAddress',
                                                {
                                                    initialValue: patInfo.patContactAddressDesc ? patInfo.patContactAddressDesc : undefined,
                                                })(
                                                    <Input placeholder='详细地址(联系人地址)' />
                                                )}
                                        </FormItem>
                                    </Col>
                                </Row>
                                {/* <Row gutter={60}>
                                <Col span={5}>
                                    <Form.Item className="lastRightBorder birthLine" label={"出生地址"} {...formItemLayouAdress} >
                                        {getFieldDecorator('birthProvinceID',
                                            {
                                                initialValue: parms.patBirthProvinceID ? parms.patBirthProvinceID : undefined,
                                                rules: [{ required: false, message: '请选择省会' }],
                                            })(
                                                // <Select ref={this.bornProvince} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={() => this.handleOneSelectProvince('1')} onChange={(value, Option) => this.handleOneCity(value, Option, '1')}>
                                                //     {provinceBorn}
                                                // </Select>
                                                <Select
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='省'
                                                optionFilterProp="role"
                                                onChange={this.onProvinceChange.bind(this, "birth")}
                                            >
                                                {proviceBorn}
                                            </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('cityBornDr',
                                            {
                                                initialValue: parms.patBirthCityID ? parms.patBirthCityID : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='市'
                                                optionFilterProp="role"
                                                onFocus={this.onCityFocus.bind(this, "birthProvinceID", "birthCity")}
                                                onChange={this.onCityChange.bind(this, "birth")}
                                            >
                                                {birthCityItem}
                                            </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('areaBornDr',
                                            {
                                                initialValue: parms.patBirthAreaID ? parms.patBirthAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select ref={this.bornCountry} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onChange={(value, Option) => this.autoVillage(value, Option, '1')} onSelect={this.handleOneVillages}>
                                                    {areaBorn}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={adressStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('villageBornDr',
                                            {
                                                initialValue: parms.patBirthVillageID ? parms.patBirthVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡' }],
                                            })(
                                                <Select ref={this.bornVillage} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='乡' onChange={(value, Option) => this.autoHamlet(value, Option, '1')} onSelect={this.handleOneHamlets}>
                                                    {villageBorn}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('hamletBornDr',
                                            {
                                                initialValue: parms.patBirthHamletID ? parms.patBirthHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select onSelect={() => this.handleKeydownM(22)} onDropdownVisibleChange={() => this.checkOption(1)} ref={this.bornHamlet} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='村'>
                                                    {hamletBorn}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('birthAddress',
                                            {
                                                initialValue: parms.patBirthAddressDesc ? parms.patBirthAddressDesc : undefined,
                                                rules: [{ required: false, message: '详细地址' }],
                                            })(
                                                <Input onPressEnter={() => this.handleKeydownM(23)} ref={this.birthAddress} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址' />
                                            )}
                                    </Form.Item>
                                </Col>
                            </Row> */}
                                {/* <Row gutter={60} >
                                <Col span={5} >
                                    <Form.Item className="lastRightBorder" label={"籍贯"} {...formItemLayouAdress}>
                                        {getFieldDecorator('nativeProvinceBDr',
                                            {
                                                initialValue: parms.patNativeProvinceID ? parms.patNativeProvinceID : (proviceNativeId ? proviceNativeId : undefined),
                                                rules: [{ required: false, message: '请选择省会' }]
                                            })(
                                                <Select ref={this.nativeProvince} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={() => this.handleOneSelectProvince("2")} onChange={(value, Option) => this.handleOneCity(value, Option, '2')}>
                                                    {proviceNative}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('nativeCityDr',
                                            {
                                                initialValue: parms.patNativeCityID ? parms.patNativeCityID : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select ref={this.nativeCity} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='市' onChange={(value, Option) => this.autoNativeCitys(value, Option, '2')} onSelect={this.handleOneCountys}>
                                                    {cityNative}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('nativeAreaDr',
                                            {
                                                initialValue: parms.patNativeAreaID ? parms.patNativeAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select ref={this.nativeCountry} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onChange={(value, Option) => this.autoNativeVillage(value, Option, '2')} onSelect={this.handleNativeVillages}>
                                                    {countyNative}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={adressStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('nativeVillageDr',
                                            {
                                                initialValue: parms.patNativeVillageID ? parms.patNativeVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡' }],
                                            })(
                                                <Select ref={this.nativeVillage} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='乡' onChange={(value, Option) => this.autoNativeHamlet(value, Option, '2')} onSelect={this.handleOneHamlet}>
                                                    {villgesNative}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('nativeHamletDr',
                                            {
                                                initialValue: parms.patNativeHamletID ? parms.patNativeHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select onSelect={() => this.handleKeydownM(24)} onDropdownVisibleChange={() => this.checkOption(2)} ref={this.nativeHamlet} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='村'>
                                                    {hamletsNative}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('nativeAddress',
                                            {
                                                initialValue: parms.patNativeAddressDesc ? parms.patNativeAddressDesc : undefined,
                                                rules: [{ required: false, message: '详细地址' }],
                                            })(
                                                <Input onPressEnter={() => this.handleKeydownM(25)} ref={this.nativeAddress} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址' />
                                            )}
                                    </Form.Item>
                                </Col>
                            </Row>
                            <Row gutter={60} >
                                <Col span={4}>
                                    <Form.Item className="lastRightBorder" label={"现住址"} {...formItemLayouNowAdress} >
                                        {getFieldDecorator('patProvinceID',
                                            {
                                                initialValue: parms.patPresentProvinceID ? Number(parms.patPresentProvinceID) : (provinceId ? provinceId : undefined),
                                                rules: [{ required: false, message: '请选择省' }],
                                            })(
                                                // { showSearch 支持搜索功能；allowClear 支持清除; optionFilterProp 搜索过滤的值 }
                                                <Select ref={this.province} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={this.handleProvince} onChange={this.handleClears}>
                                                    {provinces}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('patCityID',
                                            {
                                                initialValue: parms.patPresentCityID ? Number(parms.patPresentCityID) : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select ref={this.city} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='市' onSelect={this.autoCity} onChange={(value, Option) => this.changeCity(value, Option, '0')}>
                                                    {citys}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('patAreaID',
                                            {
                                                initialValue: parms.patPresentAreaID ? parms.patPresentAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select ref={this.country} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onSelect={this.handleCountys} onChange={() => this.handleClear(2)}>
                                                    {county}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('patVillageID',
                                            {
                                                initialValue: parms.patPresentVillageID ? parms.patPresentVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡镇' }],
                                            })(
                                                <Select ref={this.village} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} howSearch allowClear optionFilterProp="role" placeholder='乡' onSelect={this.handlevillages} onChange={() => this.handleClear(3)}>
                                                    {village}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('patHamletID',
                                            {
                                                initialValue: parms.patPresentHamletID ? parms.patPresentHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select onSelect={() => this.handleKeydownM(26)} onDropdownVisibleChange={() => this.checkOption(3)} ref={this.hamlet} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} howSearch allowClear optionFilterProp="role" placeholder='村'>
                                                    {hamlet}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={6} style={{ padding: '0', width: "25.8%",position: "relative",}} id="patAdress">
                                    <Tooltip getPopupContainer={() => document.querySelector('#patAdress')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressMessage}</span></div>} visible={this.state.patAdressVisible} overlayStyle={{ zIndex: 999 }}>
                                        <Form.Item className="lastRightBorder" label={""}  {...formItemMoreAdress}>
                                            {getFieldDecorator('presentAddressDesc',
                                                {
                                                    initialValue: parms.patPresentAddressDesc ? parms.patPresentAddressDesc : undefined,
                                                    rules: [{ required: true, message: '请输入' }],
                                                })(
                                                    <Input
                                                        style={{marginLeft:"10px"}}
                                                        onMouseOver={() => this.visibleTip(5)}
                                                        ref={this.patAddress}
                                                        onBlur={this.patAdressBlur}
                                                        onPressEnter={() => this.handleKeydownM(9)}
                                                        disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址 (必填)' />
                                                    // </div>
                                                )}
                                        </Form.Item>
                                        <span className="star">
                                        </span>
                                    </Tooltip>
                                </Col>
                                <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressZip">
                                <Tooltip getPopupContainer={() => document.querySelector('#patAdressZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressMessageZip}</span></div>} visible={this.state.patAdressZipVisible} overlayStyle={{ zIndex: 999 }}>
                                    <Form.Item label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                        {getFieldDecorator('presentZIP',
                                            {
                                                validateTrigger: "",
                                                initialValue: parms.patPresentZIPDesc ? parms.patPresentZIPDesc : undefined,
                                                rules: [{ required: false, message: '' }, 
                                                { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                getValueFromEvent: (event) => {
                                                    return event.target.value.replace(/\D/g, '')
                                                },
                                            })(
                                                <Input 
                                                maxLength={6}
                                                ref={this.presentZIP}
                                                onPressEnter={() => this.handleKeydownM(27)} 
                                                onMouseOver={() => this.visibleTip(13)}
                                                onBlur={() => this.handleKeydownM(27)} 
                                                disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} 
                                                placeholder='0-9 6位' 
                                                />
                                            )}
                                    </Form.Item>
                                </Tooltip>
                                </Col>
                            </Row>
                            <Row gutter={60} >
                                <Col span={4}>
                                    <Form.Item className="lastRightBorder" label={"户口地址"} {...formItemLayouNowAdress}>
                                        {getFieldDecorator('provinceHouseDr',
                                            {
                                                initialValue: parms.patRegisterProvinceID ? parms.patRegisterProvinceID : (proviceHouseId ? Number(proviceHouseId) : undefined),
                                                rules: [{ required: false, message: '请选择省会' }],
                                            })(
                                                <Select ref={this.houseProvince} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={() => this.handleOneSelectProvince("3")} onChange={(value, Option) => this.handleOneCity(value, Option, '3')}>
                                                    {provinceHouse}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('cityHouseDr',
                                            {
                                                initialValue: parms.patRegisterCityID ? Number(parms.patRegisterCityID) : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select ref={this.houseCity} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='市' onSelect={this.autoHouseCitys} onChange={(value, Option) => this.handleOneCounty(value, Option, '3')}>
                                                    {cityHouse}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('areaHouseDr',
                                            {
                                                initialValue: parms.patRegisterAreaID ? parms.patRegisterAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select ref={this.houseCountry} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onSelect={this.autoHouseVillage} onChange={(value, Option) => this.handleOneVillage(value, Option, '3')}>
                                                    {countyHouse}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('villageHouseDr',
                                            {
                                                initialValue: parms.patRegisterVillageID ? parms.patRegisterVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡' }],
                                            })(
                                                <Select ref={this.houseVillage} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='乡' onSelect={this.autoHouseHamlet} onChange={(value, Option) => this.handleOneHamlet(value, Option, '3')}>
                                                    {villgesHouse}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('hamletHouseDr',
                                            {
                                                initialValue: parms.patRegisterHamletID ? parms.patRegisterHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select onSelect={() => this.handleKeydownM(28)} onDropdownVisibleChange={() => this.checkOption(4)} ref={this.houseHamlet} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='村'>
                                                    {hamletsHouse}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={8} style={{ padding: '0', width: "25.8%" }} >
                                    <Form.Item className="lastRightBorder"  {...formItemMoreAdress}>
                                        {getFieldDecorator('houseAddress',
                                            {
                                                initialValue: parms.patRegisterAddressDesc ? parms.patRegisterAddressDesc : undefined,
                                                rules: [{ required: false, message: '详细地址' }],
                                            })(
                                                <Input onPressEnter={() => this.handleKeydownM(29)} ref={this.houseAddress} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址' />
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressHouseZip">
                                <Tooltip getPopupContainer={() => document.querySelector('#patAdressHouseZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressHouseMessageZip}</span></div>} visible={this.state.patAdressHouseZipVisible} overlayStyle={{ zIndex: 999 }}>
                                    <Form.Item label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                        {getFieldDecorator('registerZIP',
                                            {
                                                validateTrigger: "",
                                                initialValue: parms.patRegisterZIPDesc ? parms.patRegisterZIPDesc : undefined,
                                                rules: [{ required: false, message: '' }, { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                getValueFromEvent: (event) => {
                                                    return event.target.value.replace(/\D/g, '')
                                                },
                                            })(
                                                <Input maxLength={6} ref={this.registerZIP} onMouseOver={() => this.visibleTip(14)} onPressEnter={() => this.handleKeydownM(30)} onBlur={() => this.handleKeydownM(30)} ref={this.registerZIP} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='0-9 6位' />
                                            )}
                                    </Form.Item>
                                </Tooltip>
                                </Col>
                            </Row>
                            <Row gutter={60}>
                                <Col span={4}>
                                    <Form.Item className="lastRightBorder" label={"单位地址"} {...formItemLayouNowAdress}>
                                        {getFieldDecorator('companyProvinceID',
                                            {
                                                initialValue: parms.patCompanyProvinceID ? Number(parms.patCompanyProvinceID) : (proviceWorkId ? Number(proviceWorkId) : undefined),
                                                rules: [{ required: false, message: '请选择省会' }],
                                            })(
                                                <Select ref={this.companyProvince} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={() => this.handleOneSelectProvince("4")} onChange={(value, Option) => this.handleOneCity(value, Option, '4')}>
                                                    {provinceWork}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('companyCityDr',
                                            {
                                                initialValue: parms.patCompanyCityID ? Number(parms.patCompanyCityID) : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select ref={this.companyCity} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='市' onSelect={this.autoCompanyCitys} onChange={(value, Option) => this.handleOneCounty(value, Option, '4')}>
                                                    {cityWork}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('companyAreaDr',
                                            {
                                                initialValue: parms.patCompanyAreaID ? parms.patCompanyAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select   ref={this.companyCountry} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onSelect={this.autoCompanyVillage} onChange={(value, Option) => this.handleOneVillage(value, Option, '4')}>
                                                    {countyWork}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('companyVillageDr',
                                            {
                                                initialValue: parms.patCompanyVillageID ? parms.patCompanyVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡' }],
                                            })(
                                                <Select   ref={this.companyVillage} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='乡' onSelect={this.autoCompanyHamlet} onChange={(value, Option) => this.handleOneHamlet(value, Option, '4')}>
                                                    {villgesWork}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={nowAdStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('companyHamletDr',
                                            {
                                                initialValue: parms.patCompanyHamletID ? parms.patCompanyHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select   ref={this.companyHamlet} onSelect={() => this.handleKeydownM(17)} onDropdownVisibleChange={() => this.checkOption(6)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='村'>
                                                    {hamletsWork}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={8} style={{ padding: '0', width: "25.8%" }} >
                                    <Form.Item className="lastRightBorder"  {...formItemMoreAdress}>
                                        {getFieldDecorator('companyAddress',
                                            {
                                                initialValue: parms.patCompanyAddressDesc ? parms.patCompanyAddressDesc : undefined,
                                                rules: [{ required: false, message: '详细地址' }],
                                            })(
                                                <Input onPressEnter={() => this.handleKeydownM(18)} ref={this.companyAddress} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址' />
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={4} className="lastRightBorder lastLeft leftOLine" id="patAdressComZip">
                                <Tooltip getPopupContainer={() => document.querySelector('#patAdressComZip')} overlayClassName="toolTipDom patAd" title={<div className="titleIcon">{mesIcon}<span >{patAdressComMessageZip}</span></div>} visible={this.state.patAdressComZipVisible} overlayStyle={{ zIndex: 999 }}>
                                    <Form.Item label={"邮编"} {...formItemLayouAdress} className="zipBorder">
                                        {getFieldDecorator('companyZIP',
                                            {
                                                validateTrigger: "",
                                                initialValue: parms.patCompanyZIPDesc ? parms.patCompanyZIPDesc : undefined,
                                                rules: [{ required: false, message: '' }, { pattern: new RegExp(/^[0-9][0-9]{5}$/), message: '请输入正确的邮编' }],
                                                getValueFromEvent: (event) => {
                                                    return event.target.value.replace(/\D/g, '')
                                                },
                                            })(
                                                <Input maxLength={6} ref={this.companyZIP} onMouseOver={() => this.visibleTip(15)} onPressEnter={() => this.handleKeydownM(19)} onBlur={() => this.handleKeydownM(19)} ref={this.companyZIP} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='0-9 6位' />
                                            )}
                                    </Form.Item>
                                </Tooltip>
                                </Col>
                            </Row>
                            <Row gutter={60}>
                                <Col span={5}>
                                    <Form.Item className="lastRightBorder birthLine" label={"联系人地址"} {...formItemLayouAdress}>
                                        {getFieldDecorator('contactsProvinceBDr',
                                            {
                                                initialValue: parms.patContactProvinceID ? Number(parms.patContactProvinceID) : (proviceContactId ? Number(proviceContactId) : undefined),
                                                rules: [{ required: false, message: '请选择省会' }],
                                            })(
                                                <Select ref={this.econProvince}   disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='省' onSelect={() => this.handleOneSelectProvince("5")} onChange={(value, Option) => this.handleOneCity(value, Option, '5')}>
                                                    {provinceContact}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <FormItem className="lastRightBorder">
                                        {getFieldDecorator('contactsCityDr',
                                            {
                                                initialValue: parms.patContactCityID ? Number(parms.patContactCityID) : undefined,
                                                rules: [{ required: false, message: '请选择市级' }],
                                            })(
                                                <Select ref={this.econCity}   disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='市' onSelect={this.autoContactsCitys} onChange={(value, Option) => this.handleOneCounty(value, Option, '5')}>
                                                    {cityeContact}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('contactsAreaDr',
                                            {
                                                initialValue: parms.patContactAreaID ? parms.patContactAreaID : undefined,
                                                rules: [{ required: false, message: '请选择县级' }],
                                            })(
                                                <Select ref={this.econCountry}   disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='县' onChange={(value, Option) => this.autoContactsVillage(value, Option, '5')} onSelect={this.handleOneVillagess}>
                                                    {countyeContact}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('contactsVillageDr',
                                            {
                                                initialValue: parms.patContactVillageID ? parms.patContactVillageID : undefined,
                                                rules: [{ required: false, message: '请选择乡' }],
                                            })(
                                                <Select
                                                 ref={this.econVillage}  
                                                  disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} 
                                                  showSearch allowClear optionFilterProp="role" placeholder='乡'
                                                   onChange={(value, Option) => this.autoContasHamlet(value, Option, '5')} 
                                                   onSelect={() => this.handleKeydownM(14)}>
                                                    {villgeseContact}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={5} style={provinceStyle}>
                                    <Form.Item className="lastRightBorder">
                                        {getFieldDecorator('contactsHamletDr',
                                            {
                                                initialValue: parms.patContactHamletID ? parms.patContactHamletID : undefined,
                                                rules: [{ required: false, message: '请选择村' }],
                                            })(
                                                <Select   onDropdownVisibleChange={() => this.checkOption(5)} ref={this.econHamlet} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role" placeholder='村' onSelect={() => this.handleKeydownM(14.1)}>
                                                    {hamletseContact}
                                                </Select>
                                            )}
                                    </Form.Item>
                                </Col>
                                <Col span={6} style={{ padding: '0', width: "26.34%" }}>
                                    <Form.Item className="lastRightBorder" >
                                        {getFieldDecorator('contactsAddress',
                                            {
                                                initialValue: parms.patContactAddressDesc ? parms.patContactAddressDesc : undefined,
                                                rules: [{ required: false, message: '详细地址' }],
                                            })(
                                                <Input ref={this.contactsAddress} onPressEnter={() => this.handleKeydownM(14.2)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='详细地址' />
                                            )}
                                    </Form.Item>
                                </Col>
                            </Row> */}
                                <Row gutter={60} className="countryLine">
                                    <Col span={5} style={{ padding: '0' }} className="ecoNameDom">
                                        <Tooltip getPopupContainer={() => document.querySelector('.ecoNameDom')} overlayClassName="toolTipDom patNameC" title={<div className="titleIcon">{mesIcon}<span >{econNameMessage}</span></div>} visible={this.state.econNameVisible} overlayStyle={{ zIndex: 999, }}>
                                            <Form.Item label={'联系人姓名'} {...formItemLayouAdress} >
                                                {getFieldDecorator('patEContact',
                                                    {
                                                        validateTrigger: [""],
                                                        initialValue: parms.patEContact ? parms.patEContact : undefined,
                                                        rules: [{ required: false, message: '请输入', },
                                                        { validator: this.validNames }],
                                                    })(
                                                        <Input
                                                            onMouseOver={() => this.visibleTip(12)}
                                                            onPressEnter={() => this.handleKeydownM(11)}
                                                            ref={this.econName}
                                                            disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                            onBlur={this.patEconNameBlur}
                                                        />
                                                    )}
                                            </Form.Item>
                                        </Tooltip>
                                    </Col>
                                    <Col span={3} style={{ padding: '0' }} className="sexConant leftLine">
                                        <Form.Item label={'联系人关系'} {...formItemLayoutSexy} >
                                            {getFieldDecorator('patERelationID',
                                                {
                                                    initialValue: parms.patERelationID ? parms.patERelationID : undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Select ref={this.econRelation} onSelect={() => this.handleKeydownM(13)} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} showSearch allowClear optionFilterProp="role">
                                                        {relation}
                                                    </Select>
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={4} style={{ padding: "0 0 0 12px" }} className="econPhone leftLine">
                                        <Tooltip getPopupContainer={() => document.querySelector('.econPhone')} overlayClassName="toolTipDom patNoC" placement="right" title={<div className="titleIcon">{mesIcon}<span >{econPhoneMessage}</span></div>} visible={this.state.econPhoneVisible} overlayStyle={{ zIndex: 999 }}>
                                            <Form.Item label={'联系人手机'} {...formItemLayouAdress}>
                                                {getFieldDecorator('patEContactMobile',
                                                    {
                                                        validateTrigger: "",
                                                        initialValue: parms.patEContactMobile ? parms.patEContactMobile : undefined,
                                                        rules: [{
                                                            required: false
                                                        },
                                                        { pattern: new RegExp(/^1\d{10}$/), message: '请输入正确的手机号' }
                                                        ],
                                                        getValueFromEvent: (event) => {
                                                            return event.target.value.replace(/\D/g, '')
                                                        },
                                                    })(
                                                        <Input
                                                            onMouseOver={() => this.visibleTip(11)}
                                                            maxLength={11}
                                                            onPressEnter={() => this.handleKeydownM(12)}
                                                            onBlur={this.checkPatMobile}
                                                            ref={this.econMobile} disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                        />
                                                    )}
                                            </Form.Item>
                                        </Tooltip>
                                    </Col>
                                    <Col span={4} style={{ padding: '0' }} className="patNoDom">
                                        <Form.Item label={"工作单位"} {...formItemLayouAdress}>
                                            {getFieldDecorator('patCompany',
                                                {
                                                    initialValue: parms.patCompany ? parms.patCompany : undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Input
                                                        onPressEnter={() => this.handleKeydownM(15)}
                                                        ref={this.patCompany}
                                                        disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} />
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={4} style={{ padding: "0" }} className="patBirth leftLine">
                                        <Form.Item label={'单位电话'} {...formItemLayoutBirth}>
                                            {getFieldDecorator('patCompanyTel',
                                                {
                                                    validateTrigger: "onPressEnter",
                                                    validateTrigger: "onBlur",
                                                    initialValue: parms.patCompanyTel ? parms.patCompanyTel : undefined,
                                                    rules: [{ required: false, message: '' },
                                                    ],
                                                    getValueFromEvent: (event) => {
                                                        return event.target.value.replace(/[^0-9-]/g, '')
                                                    },
                                                })
                                                (
                                                    <Input
                                                        onPressEnter={() => this.handleKeydownM(16)}
                                                        ref={this.patCompanyTel}
                                                        disabled={isModefined == 2 || isModefined == 3 || isModefined == 6}
                                                    />
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={4} style={{ padding: '0' }} className="lastLeft leftLine">
                                        <Form.Item label={"身份标签"} {...formItemLayouAdress} className="lastRightBorder">
                                            {getFieldDecorator('patSocialStatusID',
                                                {
                                                    initialValue: parms.patSocialStatusID ? parms.patSocialStatusID : undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Select ref={this.patSocialStatusID} optionFilterProp="role" showSearch allowClear disabled={isModefined == 2 || isModefined == 3 || isModefined == 6} placeholder='三无人员可不输入证件' onSelect={this.handleposTag}>
                                                        {socialStatus}
                                                    </Select>
                                                )}
                                        </Form.Item>
                                    </Col>
                                </Row>
                            </div>
                            {/* <Divider /> */}
                            <Row gutter={12} className="cardTitle">
                                <div className="sCard">
                                    <img src="./src/assets/images/title-1.png" style={{ marginRight: "8px" }} />
                                    <span>其他信息</span>
                                </div>
                            </Row>
                            {/* <Divider /> */}
                            <div className="baseInfoDom countryLine oneConts rightLine" style={{ padding: "14px 54px" }}>
                                <Row gutter={60} style={{ borderBottom: "1px solid rgb(195, 195, 195)" }}>
                                    <Col span={5}>
                                        <Form.Item label={"账户余额(元)"} {...formItemLayouAdress}>
                                            {getFieldDecorator('balance',
                                                {
                                                    initialValue: "￥--",
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Input disabled />
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={4} className="sexConant" style={{ display: (nowCost == 0 || isModefined == 1 || isFlag == 3 ? 'none' : 'block') }}>
                                        <Form.Item label={"当前卡费"} {...formItemLayoutBirth}>
                                            {getFieldDecorator('currentBalance',
                                                {
                                                    initialValue: this.state.repariFeeFlag != "Y" && nowCost != 0 ? '￥' + nowCost : '￥' + nowCost + " " + "仅补卡时收费",
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Input disabled style={{ textAligh: 'center' }} />
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={5} style={{ display: (nowCost != 0 ? 'block' : 'none') }}>
                                        <Form.Item label={"当前发票"} wrapperCol={{ span: 17 }} labelCol={{ span: 7 }}>
                                            {getFieldDecorator('currentInvoice',
                                                {
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Input disabled placeholder={this.state.invoiceValue} type="text" />
                                                )}
                                        </Form.Item>
                                    </Col>
                                    <Col span={4} style={{ padding: '0', display: (repariFeeFlag == "Y" || nowCost == 0 || isModefined == 1 || isFlag == 3 || !noCard ? 'none' : 'block') }}>
                                        <FormItem label='支付方式' className="lastRightBorder" wrapperCol={{ span: 14 }} labelCol={{ span: 8 }}>
                                            {getFieldDecorator('cardPayMethodID', {
                                                initialValue: undefined,
                                                rules: [{ required: nowCost == 0 || isModefined == 1 || isFlag == 3 ? false : true, message: '请选择支付方式' }],
                                            })(
                                                <Select
                                                    disabled={allDis || !noCard}
                                                    ref={this.cardPayMethodID}
                                                    onSelect={() => this.handleKeydownM(10)}
                                                >
                                                    {payMethod}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col>
                                    <Col span={13} style={{ padding: "0 6px", display: (isModefined == -1 ? 'none' : 'block') }}>
                                        <Form.Item label={"已绑卡型"} {...formItemLayoutBind} className="lastRightBorder">
                                            {getFieldDecorator('patientType',
                                                {
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <div style={{
                                                        color: 'rgba(0, 0, 0, 0.25)',
                                                        height: "39px", borderRdius: '4px', borderRadius: '4px'
                                                    }}>
                                                        {bindArr}
                                                    </div>
                                                )}
                                        </Form.Item>
                                    </Col>
                                </Row>
                            </div>
                            <Row style={{ textAlign: "right", padding: "0 36px", borderBottom: "1px solid #EEEEEE", background: "#ffffff" }}>
                                <Col>
                                    <Form.Item wrapperCol={{ span: 24, offset: 18.5 }} >
                                        <Button
                                            disabled={allDis || canSave}
                                            ref={this.creadCard}
                                            type="primary"
                                            loading={postLoading}
                                            onClick={this.handleSubmit}>
                                            {isModefined == 1 ? '保存修改( ctrl + s )' : (isFlag == 3 ? '开始换卡' : (isFlag == 4 ? '开始补卡' : (isModefined == 6 ? '开始绑卡' : '开始建卡( ctrl + s )')))}
                                        </Button>
                                        <Button
                                            style={{ marginLeft: 8, display: (isModefined != 2 || isModefined != 3 || isModefined == 6 ? 'inline-block' : 'none') }}
                                            onClick={this.handleReset}>
                                            清空( ctrl + z )
                                        </Button>
                                        <Button title={bindDis && this.state.bindCardArr.length > 0 ? "已绑定全部卡类型，不能继续绑定" : (bindDis && this.state.bindCardArr.length == 0 ? false : false)} type={bindDis ? "" : "primary"} style={{ marginLeft: 8, border: "0", display: (noCard ? "inline-block" : "none") }} disabled={bindDis} onClick={() => this.handleCard(6, cardSatus)}>绑卡</Button>
                                        <Button style={{ marginLeft: 8, border: "0", display: (noCard ? "none" : "inline-block") }} type={noCard ? "" : "primary"} disabled={noCard} onClick={() => this.handleCard(6, cardSatus)}>绑卡</Button>
                                        <Button title={cardSatus.changeFlag && cardSatus.changeFlag == 'N' ? cardSatus.unChangeReson : (this.state.bindCardArr.length == 0 ? false : false)} style={{ marginLeft: 8, border: "0" }} type={!cardSatus.changeFlag || cardSatus.changeFlag == 'N' ? "" : "primary"} disabled={!cardSatus.changeFlag || cardSatus.changeFlag == 'N'} onClick={() => this.handleCard(3, cardSatus)} >换卡</Button>
                                        <Button title={cardSatus.lossFlag && cardSatus.lossFlag == 'N' ? cardSatus.unLossReson : (this.state.bindCardArr.length == 0 ? false : false)} style={{ marginLeft: 8, border: "0" }} type={!cardSatus.lossFlag || cardSatus.lossFlag == 'N' ? "" : "primary"} disabled={!cardSatus.lossFlag || cardSatus.lossFlag == 'N'} onClick={() => this.handleCard(2, cardSatus)}  >挂失</Button>
                                        <Button title={cardSatus.repairFlag && cardSatus.repairFlag == 'N' ? cardSatus.unRepairReson : (this.state.bindCardArr.length == 0 ? false : false)} style={{ margin: "0 8px 0 8px", border: "0" }} type={!cardSatus.repairFlag || cardSatus.repairFlag == 'N' ? "" : "primary"} disabled={!cardSatus.repairFlag || cardSatus.repairFlag == 'N'} onClick={() => this.handleCard(4, cardSatus)} >补卡</Button>
                                        <Button
                                            // style={{ margin: "0 8px 0 8px", border: "0" }} 
                                            type="primary"
                                            onClick={() => this.handleCard(1, cardSatus)}
                                            style={{ display: (isCancel == 1 ? 'inline-block' : 'none') }}
                                        >
                                            取消挂失
                                        </Button>
                                        <Button style={{ margin: "0 4px 0 0", background: (canRetarCard == "Y" ? "#f5222d" : "#f5f5f5"), color: (canRetarCard == "Y" ? "#ffffff" : "#cfcfcf"), border: "0" }} disabled={canRetarCard == "N"} onClick={() => this.handleCard(5, cardSatus)} >注销</Button>
                                    </Form.Item>
                                </Col>
                            </Row>
                        </Form>
                        <Modal
                            width='600px'
                            visible={reciprocal == 0 ? false : this.state.visibleCardTips}
                            title={[
                                <div>
                                    <p style={{ textAlign: 'center', height: '26px', fontSize: '18px' }}>
                                        <span>{isFlag == 1 ? '取消挂失成功' : (isFlag == 2 ? '挂失成功' : (isFlag == 5 ? '注销成功' : (isFlag == 3 ? "换卡成功" : (isFlag == 4) ? "补卡成功" : (isFlag == 7 ? "绑定成功" : "绑卡成功"))))}</span>
                                        <span style={{ color: 'red' }}>{reciprocal}S</span>
                                        <span>自动关闭</span>
                                    </p>
                                </div>
                            ]}
                            onCancel={this.closeCardPop}
                            centered={true}
                            footer={null}>
                            <p style={{ textAlign: 'center', color: 'rgba(0, 0, 0, 0.85)', fontSize: '16px' }}>病人:<span style={{ marginRight: '6px' }}>{this.props.form.getFieldValue('patName') ? this.props.form.getFieldValue('patName') : ''}</span><span style={{ marginRight: '6px' }}>{cardInfo.cardTypeDesc && cardInfo.cardTypeDesc ? cardInfo.cardTypeDesc : ""},</span>卡号：<span>{cardInfo.cardNo ? cardInfo.cardNo : this.props.form.getFieldValue('cardBindNo')}</span></p>
                        </Modal>
                        <Modal
                            key='2'
                            width='800px'
                            className="modalDom"
                            visible={popCardVis}
                            title={isFlag === 6 ? '绑定其他类型卡' : (isFlag === 4 ? '补卡' : (isFlag === 3 ? '换卡' : ' 绑定其他类型卡'))}
                            // onOk={this.handleOk}
                            onCancel={this.handleCancelCard}
                            footer={null}>
                            <div style={{ display: (isFlag == 6 || isFlag == 7) ? "block" : "none" }}>
                                <Form>
                                    <Row gutter={8}>
                                        <Col span={12} >
                                            <FormItem label='需绑定类型' wrapperCol={{ span: 16 }} labelCol={{ span: 8 }}>
                                                {getFieldDecorator('newCard', {
                                                    initialValue: initpatCardID && initpatCardID ? initpatCardID : undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Select ref={this.bindNewCard} style={{ width: '100%' }} onSelect={this.handleBindCardType}>
                                                        {card}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col >
                                        <Col span={5} style={{ display: (this.state.repariFeeFlagCard != "Y" && nowCostCard != 0 ? 'block' : 'none') }}>
                                            <FormItem label='新卡费用' {...formItemMoney}>
                                                {getFieldDecorator('newCardMoney', {
                                                    initialValue: this.state.repariFeeFlagCard != "Y" && nowCostCard != 0 ? '￥' + nowCostCard : '￥' + nowCostCard + " " + "仅补卡时收费",
                                                    rules: [{ required: false, message: '' },],
                                                })(
                                                    <Input disabled />
                                                )}
                                            </FormItem>
                                        </Col>
                                        <Col span={6} style={{ height: "40px", lineHeight: "40px" }}>
                                            <Button ref={this.bindCardButton} key="submits" type={nowReadCardPop == 'I' ? "" : "primary"} style={{ marginRight: '12px' }} disabled={nowReadCardPop == 'I'}>读卡</Button>
                                            <Button key="submit" disabled={bindVail} type={bindVail ? "" : "primary"} ref={this.bindOkButton} onKeyDown={this.handleOnKeydown} onClick={() => this.handleFlag(isFlag)}>绑定</Button>
                                        </Col >
                                    </Row>
                                    <Row gutter={8}>
                                        <Col span={19} className="cardBind">
                                            <Tooltip getPopupContainer={() => document.querySelector('.cardBind')} overlayClassName="toolTipDom cardBind" title={bindCardMessage} visible={this.state.bindCardVisible} overlayStyle={{ zIndex: 9999, }}>
                                                <FormItem label='卡号' wrapperCol={{ span: 16 }} labelCol={{ span: 5 }} >
                                                    {getFieldDecorator('cardBindNo', {
                                                        validateTrigger: [""],
                                                        initialValue: undefined,
                                                        rules: [{ required: false, message: '' },
                                                        { validator: popCardVis ? this.validFunction : '' },
                                                        ],
                                                        getValueFromEvent: (event) => {
                                                            return initpatCardID == '3' ? event.target.value.replace(/[^\d|Xx]/g, '')
                                                                : event.target.value.replace(/\D/g, '')
                                                        },
                                                    })(
                                                        <Input
                                                            ref={this.bindCardNu}
                                                            placeholder={nowReadCardPop == 'R' ? '请点击读卡按钮查找病人'
                                                                : (nowReadCardPop == "" && replenishZero == "Y" ? cardLengthCard + '刷卡/输入或点击读卡（卡号可自动补零）'
                                                                    : (nowReadCardPop == "" && replenishZero == "N" ? cardLengthCard + '刷卡/输入或点击读卡'
                                                                        : (nowReadCardPop == 'I' && replenishZero == "Y" ? cardLengthCard + '刷卡/输入卡号（卡号可自动补零）'
                                                                            : (nowReadCardPop == 'I' && replenishZero == "N" ? cardLengthCard + '刷卡/输入卡号' : ""))))}
                                                            disabled={nowReadCardPop == 'R'}
                                                            onMouseOver={() => this.visibleTip(8)}
                                                            maxLength={initpatCardID == '3' ? 18 : (initpatCardID == '1' ? 12 : 99)}
                                                            onPressEnter={this.bindCardBlur}
                                                            onBlur={this.bindCardBlur}
                                                            onChange={this.closeBindVail}
                                                        />
                                                    )}
                                                </FormItem>
                                            </Tooltip>
                                        </Col>
                                    </Row>
                                    <Row gutter={8} style={{ display: (repariFeeFlagCard != "Y" && nowCostCard != 0 && bindMoreInfo ? 'block' : 'none') }}>
                                        <Col span={19} >
                                            <FormItem label='支付方式' wrapperCol={{ span: 16 }} labelCol={{ span: 5 }}>
                                                {getFieldDecorator('payMethods', {
                                                    initialValue: '1',
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Select style={{ width: '100%' }}>
                                                        {payMethod}
                                                    </Select>
                                                )}
                                            </FormItem>
                                        </Col >
                                    </Row>
                                    <Row gutter={8} style={{ display: (repariFeeFlagCard != "Y" && nowCostCard != 0 && bindMoreInfo ? 'block' : 'none') }}>
                                        <Col span={19}>
                                            <FormItem label='当前发票' wrapperCol={{ span: 16 }} labelCol={{ span: 5 }}>
                                                {getFieldDecorator('transactionNo', {
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' }],
                                                })(
                                                    <Input style={{ width: '100%' }} disabled />
                                                )}
                                            </FormItem>
                                        </Col >
                                    </Row>
                                </Form>
                            </div>
                            <div style={{ display: isFlag === 4 ? "block" : "none" }}>
                                <Row>
                                    <Col span={6} >
                                        <FormItem label='新卡' {...formItemLayouAdress}>
                                            {getFieldDecorator('newCard', {
                                                initialValue: undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Select style={{ width: '100%' }} disabled>
                                                    {card}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col >
                                    <Col span={10} className="patchNu" style={{ margin: '0 14px', display: (isFlag != 7 ? 'inline-block' : 'none') }}>
                                        <Tooltip getPopupContainer={() => document.querySelector('.patchNu')} overlayClassName="toolTipDom patAd" placement="right" title={patchCardMessage} visible={this.state.patchCardVisible} overlayStyle={{ zIndex: 9999, }}>
                                            <FormItem  {...formItemMoreAdress}>
                                                {getFieldDecorator('patchNumber', {
                                                    validateTrigger: [""],
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' },
                                                    { validator: popCardVis ? this.validFunction : '' },
                                                    ],
                                                    getValueFromEvent: (event) => {
                                                        return initpatCardID == '3' ? event.target.value.replace(/[^\d|Xx]/g, '') : event.target.value.replace(/\D/g, '')
                                                    },
                                                })(
                                                    <Input
                                                        placeholder={nowReadCardPop == 'R' ? '请点击读卡按钮查找病人'
                                                            : (nowReadCardPop == "" && replenishZero == "Y" ? cardLengthCard + '刷卡/输入或点击读卡（卡号可自动补零）'
                                                                : (nowReadCardPop == "" && replenishZero == "N" ? cardLengthCard + '刷卡/输入或点击读卡'
                                                                    : (nowReadCardPop == 'I' && replenishZero == "Y" ? cardLengthCard + '刷卡/输入卡号（卡号可自动补零）'
                                                                        : (nowReadCardPop == 'I' && replenishZero == "N" ? cardLengthCard + '刷卡/输入卡号' : ""))))}
                                                        maxLength={initpatCardID == '3' ? 18 : (initpatCardID == '1' ? 12 : 99)}
                                                        onMouseOver={() => this.visibleTip(7)}
                                                        onPressEnter={() => this.changeCardBlur(2)}
                                                        onBlur={() => this.changeCardBlur(2)}
                                                        onChange={this.closeBindVail}
                                                        ref={this.patchCard}
                                                    />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col >
                                    <Col span={10} style={{ margin: '0 14px', display: (isFlag == 7 ? 'inline-block' : 'none') }}>
                                        <FormItem  {...formItemMoreAdress}>
                                            {getFieldDecorator('cardBindNom', {
                                                initialValue: undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Input disabled />
                                            )}
                                        </FormItem>
                                    </Col >
                                    <Col span={5} style={{ display: (isFlag != 7 ? 'block' : 'none') }}>
                                        <FormItem  {...formItemNewButton}>
                                            <Button disabled={nowReadCardPop == "I"} type={nowReadCardPop == "I" ? "" : "primary"} ref={this.creadCardPops}>读卡</Button>
                                            <Button style={{ marginLeft: "6px" }} ref={this.patchOkButton} disabled={bindVail} type={bindVail ? "" : "primary"} onKeyDown={this.handleOnKeydown} onClick={() => this.handleFlag(4)}>补卡</Button>
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row style={{ display: (nowCost != 0 ? 'block' : 'none') }}>
                                    <Col>
                                        <FormItem label={isFlag == 7 ? '绑卡费用' : '补卡费用'} {...formItemNew}>
                                            {getFieldDecorator('patchMoney', {
                                                initialValue: nowCost != 0 ? '￥' + nowCost : '￥' + 0,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Input disabled />
                                            )}
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row style={{ display: (nowCost != 0 ? 'block' : 'none') }}>
                                    <Col>
                                        <FormItem label='支付方式' {...formItemNew}>
                                            {getFieldDecorator('payMethods', {
                                                initialValue: '1',
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Select style={{ width: '100%' }}>
                                                    {payMethod}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row style={{ display: (nowCost != 0 ? 'block' : 'none') }}>
                                    <Col>
                                        <FormItem label='当前发票' {...formItemNew}>
                                            {getFieldDecorator('transactionNo', {
                                                initialValue: undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Input style={{ width: '100%' }} disabled />
                                            )}
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row style={{ display: (isFlag != 7 ? 'block' : 'none') }}>
                                    <Col>
                                        <FormItem label='原卡' {...formItemNew}>
                                            {getFieldDecorator('originalCard', {
                                                initialValue: undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Input disabled />
                                            )}
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row style={{ display: (isFlag != 7 ? 'flex' : 'none') }}>
                                    <Col>
                                        <p style={{ color: 'red', lineHeight: "28px" }}>补卡后，原卡将作废，停止使用，启用新卡。</p>
                                    </Col >
                                </Row>
                            </div>
                            <div style={{ display: (isFlag === 3) ? "block" : "none" }}>
                                <Row>
                                    <Col span={6} >
                                        <FormItem label='新卡' {...formItemLayouAdress}>
                                            {getFieldDecorator('newCard', {
                                                initialValue: undefined,
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Select style={{ width: '100%' }} disabled>
                                                    {card}
                                                </Select>
                                            )}
                                        </FormItem>
                                    </Col >
                                    <Col span={12} style={{ margin: '0 14px' }} className="cardNu">
                                        <Tooltip getPopupContainer={() => document.querySelector('.cardNu')} overlayClassName="toolTipDom patAd" title={changeCardMessage} visible={this.state.changeCardVisible} overlayStyle={{ zIndex: 9999, }}>
                                            <FormItem  {...formItemMoreAdress}>
                                                {getFieldDecorator('cardNumber', {
                                                    validateTrigger: [""],
                                                    initialValue: undefined,
                                                    rules: [{ required: false, message: '' },
                                                    { validator: popCardVis ? this.validFunction : '' },
                                                    ],
                                                    getValueFromEvent: (event) => {
                                                        return initpatCardID == '3' ? event.target.value.replace(/[^\d|Xx]/g, '') : event.target.value.replace(/\D/g, '')
                                                    },
                                                })(
                                                    <Input
                                                        placeholder={
                                                            nowReadCardPop == 'R' ? '请点击读卡按钮查找病人'
                                                                : (nowReadCardPop == "" && replenishZero == "Y" ? cardLengthCard + '刷卡/输入或点击读卡（卡号可自动补零）'
                                                                    : (nowReadCardPop == "" && replenishZero == "N" ? cardLengthCard + '刷卡/输入或点击读卡'
                                                                        : (nowReadCardPop == 'I' && replenishZero == "Y" ? cardLengthCard + '刷卡/输入卡号（卡号可自动补零）'
                                                                            : (nowReadCardPop == 'I' && replenishZero == "N" ? cardLengthCard + '刷卡/输入卡号' : ""))))}
                                                        disabled={nowReadCardPop == 'R'}
                                                        onMouseOver={() => this.visibleTip(6)}
                                                        onPressEnter={() => this.changeCardBlur(1)}
                                                        onBlur={() => this.changeCardBlur(1)}
                                                        onChange={this.closeBindVail}
                                                    />
                                                )}
                                            </FormItem>
                                        </Tooltip>
                                    </Col >
                                    <Col span={5} >
                                        <FormItem  {...formItemNewButton}>
                                            <Button ref={this.creadCardPop} disabled={nowReadCardPop == 'I'} type={nowReadCardPop == "I" ? "" : "primary"}>读卡</Button>
                                            <Button style={{ marginLeft: "6px" }} ref={this.changeOkButton} disabled={bindVail} type={bindVail ? "" : "primary"} onKeyDown={this.handleOnKeydown} onClick={() => this.handleFlag(3)}>换卡</Button>
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row>
                                    <Col>
                                        <FormItem label='原卡' {...formItemNew}>
                                            {getFieldDecorator('originalCard', {
                                                rules: [{ required: false, message: '' }],
                                            })(
                                                <Input disabled />
                                            )}
                                        </FormItem>
                                    </Col >
                                </Row>
                                <Row>
                                    <Col>
                                        <p style={{ color: 'red' }}>换卡后，原卡将被回收，停止使用，启用新卡。</p>
                                    </Col >
                                </Row>
                            </div>
                        </Modal>
                        <FindPatients handleParms={this.handleParms.bind(this)} OnChildrefs={this.OnChildrefs}></FindPatients>
                        <PatientInformation handleEdit={this.handleEdit.bind(this)} Onrefs={this.Onrefs}></PatientInformation>
                    </div>
                </Spin>
            )
        }
    })
export default registerPro
