/*
* 个人基本信息
 * Creator:     FJP初始 ML改版
 * CreatDate:   2020-04-
 * descripts：  高级查询 个人基本信息
* */
import React, { Component } from 'react';
import {
    Input, Form, Select, Modal, Button, Progress, Upload, message, Tooltip, Icon, Table,
    Card, Row, Col, DatePicker, Popconfirm, Checkbox
} from 'antd';
import { Util, dayFormat } from 'tools/index';
import { $http } from 'containers/config/https';
import '../style/index.less';
import moment from 'moment';

const Option = Select.Option;
const Search = Input.Search;
const FormItem = Form.Item;
const { TextArea } = Input;
const searchData = [
    {
        descripts: "姓名",
        descriptsSPCode: "XM^xm^xinming^姓名^姓^名",
        title: "BaseInfo",
        fieldCode: "name",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "Y"
    },
    {
        descripts: "证件类型",
        descriptsSPCode: "ZJLX^zjlx^zhengjianleixing^证件类型^证件^类型^证^件^类^型",
        title: "BaseInfo",
        fieldCode: "CredType_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "证件号码",
        descriptsSPCode: "ZJHM^zjhm^zhengjianhaoma^证件号码^证件^号码^号^码",
        title: "BaseInfo",
        fieldCode: "CredNo",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "民族",
        descriptsSPCode: "MZ^mz^minzu^民族^民^族",
        title: "BaseInfo",
        fieldCode: "Nation_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "性别",
        descriptsSPCode: "XB^xb^xingbie^民族^民^族",
        title: "BaseInfo",
        fieldCode: "Sex_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "年龄",
        descriptsSPCode: "NL^nl^nianlin^年龄^年^龄",
        title: "BaseInfo",
        fieldCode: "Age",
        rangeFlag: "Y",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "出生日期",
        descriptsSPCode: "CSRQ^csrq^chushengriqi^出生日期^出生^日期^出^生^日^期",
        title: "BaseInfo",
        fieldCode: "BirthDate",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "婚姻状况",
        descriptsSPCode: "HYZK^hyzk^hunyinzhuangkuang^婚姻状况^婚姻^状况^婚^姻^状^况",
        title: "BaseInfo",
        fieldCode: "Marital_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "手机号码",
        descriptsSPCode: "SJHM^sjhm^shoujihaoma^手机号码^手机^号码^手^机^号^码",
        title: "BaseInfo",
        fieldCode: "Mobile",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"

    }, {
        descripts: "文化程度",
        descriptsSPCode: "WHCD^whcd^wenhuachengdu^文化程度^文化^程度^文^化^程^度",
        title: "BaseInfo",
        fieldCode: "Education_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "退休前职业",
        descriptsSPCode: "TXQZY^txqzy^tuixiuqianzhiye^退休前职业^退休前^职业^退^休^前",
        title: "BaseInfo",
        fieldCode: "Occupation_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "退休单位",
        descriptsSPCode: "TXDW^txdw^tuixiudanwei^退休单位^退休^单位^退^休^单^位",
        title: "BaseInfo",
        fieldCode: "Company",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "医疗费支付方式",
        descriptsSPCode: "YLFZFFS^ylfzfff^yiliaozhifufangshi^医疗费支付方式^医疗费^支付方式^方式^支付^医",
        title: "BaseInfo",
        fieldCode: "PayWay_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "户籍地址",
        descriptsSPCode: "HJDZ^hjdz^hujidizhi^户籍地址^户籍^地址^户",
        title: "BaseInfo",
        fieldCode: "nativeAdress",
    }, {
        descripts: "现住址",
        descriptsSPCode: "XZZ^xzz^xianzhuzhi^现住址^现住^址^现",
        title: "BaseInfo",
        fieldCode: "presentAdress",
    },
    {
        descripts: "家庭医生团队",
        descriptsSPCode: "JTYSTD^jtystd^jiatingyishengtuandui^家庭医生团队^家庭^医生^团队",
        title: "FamilyTeam",
        fieldCode: "hosp_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    }, {
        descripts: "签约状态",
        descriptsSPCode: "QYZT^qyzt^qianyuezhuangtai^签约状态^签约^状态^签",
        title: "FamilyTeam",
        fieldCode: "qy_Dr",
        rangeFlag: "N",
        value: "",
        valueTo: "",
        fuzzySearch: "N"
    },
    {

    }, {

    }, {

    }, {

    }, {

    }, {

    }, {

    }
]
class ShowInformationPage extends Component {
    constructor(props) {
        super(props);
        var date = new Date();
        var userData = JSON.parse(sessionStorage.getItem('userData'));
        this.state = {
            searchData,
            leftData: [],
            rightData: [],
            userData,
            nativeCity: [],//籍贯市区信息
            nativeAreas: [],//籍贯县信息
            nativeVillages: [],//籍贯乡信息
            nativeHamlets: [],//籍贯村落信息

            presentCity: [],//现住址市区信息
            presentAreas: [],//现住址县信息
            presentVillages: [],//现住址乡信息
            presentHamlets: [],//现住址村落信息
            patInfo: {},
            nativeDoor: true,
            presentDoor: true,
            parms: {},
            checkboxData: [],
            patData: [],
            adressData: [],
            checkArr: [],
            formatType: true
        }
    }
    componentWillReceiveProps(nextProp) {
        if (nextProp.isShow === true) {
            this.loadSelectData()
        } else if (this.props.isShow === false) {
            // this.cleanInput();
        }
    }

    componentDidMount() {
        this.props.onRef(this)
        this.loadCardType()
        this.loadDoctorData()
        this.getDefaultAdress()
        this.loadHospitalDactor()//获取家庭医生
        this.loadPayWay()//医疗支付方式
        this.loadStatus()
        const { searchData } = this.state

        searchData && searchData.map((i, s) => {
            let str = i.descripts
            if (str) {
                let arr = []
                arr = i.descriptsSPCode.split("^")
                this.setState({
                    ["show" + arr[0]]: true,
                })
            }
        })
    }
    //默认取医院地址
    getDefaultAdress = () => {
        let data = {}
        data = {
            params: [{
                hospID: sessionStorage.userData ? JSON.parse(sessionStorage.userData).hospID : "",
            }]
        }
        $http.post('urlS', this, {
            code: '04150018',
            data: data,
            success: function (res) {
                if (+res.errorCode === 0) {
                    this.setState({
                        parms: res.result
                    })
                    this.getAreas(res.result.patPresentCityID, "native", "0");
                    this.getAreas(res.result.patPresentCityID, "present", "0");
                    this.getVillages(res.result.patPresentAreaID, "native", "0");
                    this.getVillages(res.result.patPresentAreaID, "present", "0");
                }
            }
        })
    }
    //搜索组件
    getCompent = (name) => {
        const { searchData } = this.state
        let arr1 = []
        this.setState({
            noDateStatus: false
        })
        searchData && searchData.map((i, s) => {
            let str = i.descripts
            let str1 = i.descriptsSPCode
            if (str) {
                let arr = []
                arr = i.descriptsSPCode.split("^")
                if (str1.indexOf(name) == -1 && str.indexOf(name) == -1) {
                    this.setState({
                        ["show" + arr[0]]: false,
                    })
                    arr1.push(arr[0])
                    // console.log(arr1.length)
                    if (arr1.length == 17) {
                        this.setState({
                            noDateStatus: true
                        })
                    }
                } else {
                    this.setState({
                        ["show" + arr[0]]: true,
                    })
                }
            }
        })
    }
    //签约状态
    loadStatus() {
        var params = {
            params: [{

            }]
        }
        $http.post('urlDeault', this, {
            code: "03070017",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        sigStatus: res.result,
                    })
                }
            }
        });
    }
    //医疗支付
    loadPayWay() {
        var params = {
            params: [{

            }]
        }
        $http.post('urlDeault', this, {
            code: "03070038",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        payMethod: res.data,
                    })
                }
            }
        });
    }
    changeCommonData(name, e) {
        this.setState({
            [name]: e
        }, () => {
            this.loadDoctorData()
        })
    }
    loadDoctorData(value) {
        var params = {
            params: [{
                hospID: this.state.signHospID ? this.state.signHospID : (value ? value : this.state.userData.hospID)
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070033",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        doctorData: res.result.data,
                    })
                }
            }
        });
    }
    //获取卡类型
    loadCardType() {
        var params = {
            params: [{
                cardTypeFlag: '1',//卡类型
                patTypeFlag: '1',
                credTypeFlag: '1',//证件类型
                nationFlag: '1',//民族
                occupationFlag: '1',//职业
                maritalFlag: '1',	//婚姻
                eduFlag: '1',//学历
                relationFlag: '1',
                sexFlag: "1",
                provinceFlag: 1,	//省
                cityFlag: 1,  //市
            }]
        }
        $http.post('urlDeault', this, {
            code: "03030005",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    var cardStatus = ''
                    var replaceZero = ''
                    var cardLength = 0
                    var readMode = ''
                    if (res.cardType && res.cardType.length > 0) {
                        var cardType = res.cardType;
                        for (var i = 0; i < cardType.length; i++) {
                            if (cardType[i].defaultFlag == 'Y') {
                                cardStatus = cardType[i].id,
                                    replaceZero = cardType[i].replenishZero
                                cardLength = cardType[i].cardLength
                                readMode = cardType[i].readMode
                            }
                        }
                    }
                    this.setState({
                        cardTypeData: res.cardType,
                        credTypeData: res.credType,//证件类型
                        nationData: res.nation,//民族
                        occupationData: res.occupation,//职业
                        maritalData: res.marital,//婚姻
                        eduData: res.education,//学历
                        sexData: res.sex,
                        relationData: res.relation,//关系
                        socialStatusData: res.patSocialStatusDesc,
                        cardStatus: cardStatus,
                        readMode: readMode,
                        cardLength: cardLength,
                        replaceZero: replaceZero,
                        localProvince: res.province,
                        localCity: res.city,
                    })
                }
            }
        });
    }
    loadSelectData() {
        var params = {
            params: [{
                logonHospID: this.state.userData.hospID,
                logonGroupID: this.state.userData.groupID,
                sexFlag: 'Y'
            }]
        }
        $http.post('urlDeault', this, {
            code: "03010037",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        sex: res.result.sex,
                    })
                }
            }
        });
    }

    closeModal(name) {
        let { onHide } = this.props;
        onHide && onHide();
        this.cleanInput();
    }

    //清空输入框
    cleanInput() {
        this.props.form.resetFields();
        this.setState({
            detailData: {}
        })
    }

    changeCommonDate(name, e) {
        this.setState({
            [name]: e ? moment(e).format(dayFormat) : ''
        })
    }

    //提交
    onSubmit() {
        let { onSubmit } = this.props;
        onSubmit && onSubmit(this.state.data, this.state.newCode);
    }
    //选择或清除省
    onProvinceChange(flag, value, option) {
        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;
            }
            if (city && city.length == 0) {
                this.setState({
                    [flag + "Door"]: false
                })
            } else {
                this.setState({
                    [flag + "Door"]: true
                })
            }
            this.setState({
                [flag + "City"]: city,
                [flag + "Areas"]: [],
                [flag + "Villages"]: [],
                [flag + "Hamlets"]: [],
                parms: patInfo,
            })
            this.props.form.setFieldsValue({
                [flag + "CityID"]: undefined,
                [flag + "AreaID"]: undefined,
                [flag + "VillageID"]: undefined,
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: undefined
            });
        } else {
            //清除省
            this.props.form.setFieldsValue({
                [flag + "CityID"]: undefined,
                [flag + "AreaID"]: undefined,
                [flag + "VillageID"]: undefined,
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: 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()
        // });
    }
    //选择或清除市
    onCityChange(flag, value, option) {
        if (value) {
            this.props.form.setFieldsValue({
                [flag + "ProvinceID"]: option.props.provinceid,
                [flag + "AreaID"]: undefined,
                [flag + "VillageID"]: undefined,
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: 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({
                parms: patInfo,
            })
            this.getAreas(value, flag, "1");
        } else {
            //清除市
            this.props.form.setFieldsValue({
                [flag + "CityID"]: undefined,
                [flag + "AreaID"]: undefined,
                [flag + "VillageID"]: undefined,
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: 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,
            })
        }
    }
    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,
            })
        }

    }
    //选择市时加载县数据
    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,
                [flag + "ZIP"]: undefined
            });
            this.getVillages(value, flag, "1");
        } else {
            //清除市
            this.props.form.setFieldsValue({
                [flag + "VillageID"]: undefined,
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: 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) {
        // console.log("flag",flag,"value",value,"option",option)
        // presentZIP
        if (value) {
            this.props.form.setFieldsValue({
                [flag + "HamletID"]: undefined
            });
        } else {
            //清除市
            this.props.form.setFieldsValue({
                [flag + "HamletID"]: undefined,
                [flag + "ZIP"]: 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"]: [],
                    })
                }
            }
        })

    }
    //清空证件类型 卡号不必填
    handleCredNo = (code) => {
        if (!code) {
            this.setState({
                posType: "",
                credTypeID: ""
            })
        } else {
            this.setState({
                posType: code
            })
        }
    }
    handleStartValue = (e, name) => {
        this.setState({
            [name + "Value"]: e.target.value
        })
    }
    //获取家庭医生
    loadHospitalDactor() {
        var params = {
            params: [{
                hospID: this.state.userData.hospID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070032",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        familyDoctor: res.result,
                    })
                }
            }
        });
    }
    //选中条件
    onChangeCheckArr = (e) => {
        this.setState({
            checkboxData: e,
        },()=>{
        })
    }
    //选中数据传递
    toSearchData = () => {
        const { checkboxData, searchData } = this.state
        let searchDatas = searchData
        // if (checkboxData && checkboxData.length == 0) {
        //     message.warning("请勾选筛选条件")
        //     return
        // }
        let newArr = []
        let addressField = []
        let addressField1 = []
        let otherAll = []
        let pressData = [
            {
                fieldCode: "Province_Dr",
                key: 0
            },
            {
                fieldCode: "City_Dr",
                key: 1
            },
            {
                fieldCode: "Area_Dr",
                key: 2
            },
            {
                fieldCode: "Village_Dr",
                key: 3
            }, {
                fieldCode: "Address",
                key: 4
            },
        ]
        pressData && pressData.map((item, index) => {
            item.addressType = ""
            item.rangeFlag = "N"
            item.valueTo = ""
            item.fuzzySearch = "N"
        })
        let addressAll = []
        searchDatas && searchDatas.map((item, index) => {
            checkboxData && checkboxData.map((i, s) => {
                if (i == item.fieldCode) {
                    let addressData = []
                    if (i == "nativeAdress") {
                        if (this.props.form.getFieldValue("nativeProvinceID")) {
                            let obj = {
                                addressType: "native",
                                fieldCode: "Province_Dr",
                                key: 0,
                                value: this.props.form.getFieldValue("nativeProvinceID"),
                                rangeFlag: "N",
                                valueTo: "",
                                fuzzySearch: "N",
                            }
                            addressField.push(obj)
                            this.setState({
                                addressField,
                            })
                        } if (this.props.form.getFieldValue("nativeCityID")) {
                            let obj = {
                                addressType: "native",
                                fieldCode: "Province_Dr",
                                key: 0,
                                value: this.props.form.getFieldValue("nativeCityID"),
                                rangeFlag: "N",
                                valueTo: "",
                                fuzzySearch: "N",
                            }
                            addressField.push(obj)
                            this.setState({
                                addressField,
                            })
                        } if (this.props.form.getFieldValue("nativeAreaID")) {
                            let obj = {
                                addressType: "native",
                                fieldCode: "Province_Dr",
                                key: 0,
                                value: this.props.form.getFieldValue("nativeAreaID"),
                                rangeFlag: "N",
                                valueTo: "",
                                fuzzySearch: "N",
                            }
                            addressField.push(obj)
                            this.setState({
                                addressField,
                            })
                        } if (this.props.form.getFieldValue("nativeVillageID")) {
                            let obj = {
                                addressType: "native",
                                fieldCode: "Province_Dr",
                                key: 0,
                                value: this.props.form.getFieldValue("nativeVillageID"),
                                rangeFlag: "N",
                                valueTo: "",
                                fuzzySearch: "N",
                            }

                            addressField.push(obj)

                            this.setState({
                                addressField,
                            })
                        } if (this.props.form.getFieldValue("AddressNativeDec")) {
                            let obj = {
                                addressType: "native",
                                fieldCode: "Province_Dr",
                                key: 0,
                                value: this.props.form.getFieldValue("AddressNativeDec"),
                                rangeFlag: "N",
                                valueTo: "",
                                fuzzySearch: "N",
                            }

                            addressField.push(obj)


                            this.setState({
                                addressField,
                            })
                        }
                    }
                    if (i == "presentAdress") {
                        if (this.props.form.getFieldValue("presentProvinceID")) {
                            pressData[0].value = this.props.form.getFieldValue("presentProvinceID")
                            pressData[0].addressType = "present"
                            addressField1.push(pressData[0])
                        } if (this.props.form.getFieldValue("presentCityID")) {
                            pressData[1].value = this.props.form.getFieldValue("presentCityID")
                            pressData[1].addressType = "present"
                            addressField1.push(pressData[1])
                        } if (this.props.form.getFieldValue("presentAreaID")) {
                            pressData[2].value = this.props.form.getFieldValue("presentAreaID")
                            pressData[2].addressType = "present"
                            addressField1.push(pressData[2])
                        } if (this.props.form.getFieldValue("presentVillageID")) {
                            pressData[3].value = this.props.form.getFieldValue("presentVillageID")
                            pressData[3].addressType = "present"
                            addressField1.push(pressData[3])
                        } if (this.props.form.getFieldValue("presentAdressDec")) {
                            pressData[4].value = this.props.form.getFieldValue("presentAdressDec")
                            pressData[4].addressType = "present"
                            addressField1.push(pressData[4])
                        }
                    }
                    //处理其他
                    if (i == "PayWay_Dr") {
                        let obj = {
                            fieldCode: "PayWay_Dr",
                            key: 0,
                            value: this.props.form.getFieldValue("PayWay_Dr"),
                            rangeFlag: "N",
                            valueTo: "",
                            fuzzySearch: "N",
                        }
                        if (this.props.form.getFieldValue("PayWay_Dr")) {
                            otherAll.push(obj)
                        }
                    } if (i == "hosp_Dr") {
                        let obj = {
                            fieldCode: "",
                            key: 0,
                            value: "",
                            rangeFlag: "N",
                            valueTo: "",
                            fuzzySearch: "N",
                        }
                        if (this.props.form.getFieldValue("hosp_Dr")) {
                            obj.fieldCode = "hosp_Dr"
                            obj.value = this.props.form.getFieldValue("hosp_Dr")
                            otherAll.push(obj)
                        } if (this.props.form.getFieldValue("Doctor_Dr")) {
                            obj.fieldCode = "Doctor_Dr"
                            obj.value = this.props.form.getFieldValue("Doctor_Dr")
                            otherAll.push(obj)
                        }
                    }
                    //预留
                    if (i == "qy_Dr") {
                        let obj = {
                            fieldCode: "qy_Dr",
                            key: 0,
                            value: this.props.form.getFieldValue("qy_Dr"),
                            rangeFlag: "N",
                            valueTo: "",
                            fuzzySearch: "N",
                        }
                        if (this.props.form.getFieldValue("qy_Dr")) {
                            otherAll.push(obj)
                        }

                    }

                    //处理范围
                    if (i == "Age") {
                        item.value = this.state.startValue
                        item.valueTo = this.state.endValue
                    }
                    //处理日期
                    else if (i == "BirthDate") {
                        item.value = moment(this.props.form.getFieldValue(i)).format('YYYY-MM-DD')
                    }
                    //处理正常输入框 选择框
                    else {
                        item.value = this.props.form.getFieldValue(i)
                    }
                    if (this.props.form.getFieldValue(i)) {
                        newArr.push(item)
                    }
                    if ((addressField && addressField.length > 0) || (addressField1 && addressField1.length > 0)) {
                        addressAll = [...addressField, ...addressField1]
                    }

                }
            })
        })
        this.setState({
            searchData: searchDatas,
        }, () => {
            this.props.getInfoData(newArr, otherAll, addressAll,checkboxData)
            // this.props.getData(newArr, otherAll, [], undefined, addressAll)
        })

    }
    //清空查询条件
    handleRest = () => {
        //  console.log("6")
        this.setState({
            checkboxData: [],
            startValue: "",
            endValue: "",
            BirthDate: undefined
        })
        this.props.form.resetFields()
    }
    //日期面板打开/关闭
    handleOnOpenChangeData = (status, name) => {
        this.setState({
            [name]: !status
        })
    }
    render() {
        var { sex, previewImage, fileList, previewVisible, sexData, nativeAreas, patInfo, localProvince, localCity, posType, parms } = this.state;
        let { getFieldDecorator } = this.props.form;
        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 { province, birthCity, nativeCity, presentCity, registerCity, companyCity, contactCity } = this.state; //省,市
        let { birthAreas, presentAreas, registerAreas, companyAreas, contactAreas } = this.state;//县
        let { birthVillages, nativeVillages, presentVillages, registerVillages, companyVillages, contactVillages } = this.state;//乡
        let { birthHamlets, nativeHamlets, presentHamlets, registerHamlets, companyHamlets, contactHamlets } = this.state;//村

        var date = new Date()
        let formItemLayout = {
            labelCol: { span: 8 },
            wrapperCol: { span: 15 }
        };
        let formItemLayoutAddress = {
            labelCol: { span: 5 },
            wrapperCol: { span: 19 }
        };
        let formItemLongLayout = {
            labelCol: { span: 10 },
            wrapperCol: { span: 12 }
        };
        let formItemLongLayout11 = {
            labelCol: { span: 11 },
            wrapperCol: { span: 12 }
        };
        let formItem517 = {
            labelCol: { span: 5 },
            wrapperCol: { span: 18 }
        };
        let formItem515 = {
            labelCol: { span: 5 },
            wrapperCol: { span: 15 }
        };
        let formItem617 = {
            labelCol: { span: 6 },
            wrapperCol: { span: 17 }
        };
        let formItem715 = {
            labelCol: { span: 7 },
            wrapperCol: { span: 16 }
        };

        let formItemSexLayout = {
            labelCol: { span: 8 },
            wrapperCol: { span: 22 }
        };

        let searchColConfig = {
            xs: { span: 24 },
            sm: { span: 12 },
            md: { span: 8 },
            lg: { span: 10 }
        }
        //性别
        var sexOption = []
        sexData && sexData.map((item, index) => {
            sexOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
        })
        //证件类型
        let credTypeDataOption = []
        this.state.credTypeData && this.state.credTypeData.map((item, index) => {
            credTypeDataOption.push(<Option key={index} value={item.id} onClick={() => this.handleCredNo(item.code)} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //民族
        let nationDataOption = []
        this.state.nationData && this.state.nationData.map((item, index) => {
            nationDataOption.push(<Option key={index} value={item.id} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //医疗支付
        let payWayOption = []
        this.state.payMethod && this.state.payMethod.map((item, index) => {
            payWayOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //职业
        let occupationOption = []
        this.state.occupationData && this.state.occupationData.map((item, index) => {
            occupationOption.push(<Option key={index} value={item.id} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //签约状态
        let sigStatusOp = []
        this.state.sigStatus && this.state.sigStatus.map((item, index) => {
            sigStatusOp.push(<Option key={index} value={item.id} name={item.descriptsSPCode} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //婚姻
        let maritalOption = []
        this.state.maritalData && this.state.maritalData.map((item, index) => {
            maritalOption.push(<Option key={index} value={item.id} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //学历
        let eduOption = []
        this.state.eduData && this.state.eduData.map((item, index) => {
            eduOption.push(<Option key={index} value={item.id} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        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>)
        });
        //第一次加载的城市;
        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 ((!nativeCity && this.state.nativeDoor) || (nativeCity.length === 0 && this.state.nativeDoor)) {
            //籍贯城市下拉数据为空时加载所有城市
            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 && this.state.presentDoor) || (presentCity.length === 0 && this.state.presentDoor)) {
            //现住址城市下拉数据为空时加载所有城市
            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>)
        }
        //家庭医生团队
        let familyDoctorOption = []
        this.state.familyDoctor && this.state.familyDoctor[0].subHospList && this.state.familyDoctor[0].subHospList.map((item, index) => {
            familyDoctorOption.push(<Option key={index} value={item.hospID}>{item.hospDesc}</Option>)
        })
        //家庭医生
        let doctorDataOption = []
        this.state.doctorData && this.state.doctorData.map((item, index) => {
            doctorDataOption.push(<Option key={index} value={String(item.id)} name={item.descriptsSPCode}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        return <div className='show-information-modal'>
            <div style={{ display: (this.state.noDateStatus ? "block" : "none"), textAlign: "center", lineHeight: "80px" }}>
                <p>该字段不存在,请重新检索</p>
            </div>
            <div style={{ display: (this.state.noDateStatus ? "none" : "block") }}>
                <Checkbox.Group style={{ width: '100%' }} value={this.state.checkboxData} onChange={(e) => this.onChangeCheckArr(e)}>
                    <Card style={{
                        marginTop: 5, display: (this.state.showXM
                            || this.state.showZJLX
                            || this.state.showZJHM
                            || this.state.showMZ
                            || this.state.showXB
                            || this.state.showNL
                            || this.state.showCSRQ
                            || this.state.showHYZK
                            || this.state.showSJHM
                            || this.state.showWHCD
                            || this.state.showTXQZY
                            || this.state.showTXDW
                            || this.state.showHJDZ
                            || this.state.showXZZ
                            ? "block" : "none")
                    }}>
                        <p>
                            基本信息
                        </p>
                        <Form>
                            <Row>
                                <Col span={6} style={{ display: (this.state.showXM ? "block" : "none") }}>
                                    <FormItem {...formItem517} label={<span>
                                        <Checkbox value="name" />
                                        <span style={{ marginLeft: 5 }}>姓名</span></span>}>
                                        {getFieldDecorator('name', {
                                            // initialValue: this.state.name,
                                        })(
                                            <Input placeholder='请输入姓名' />
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showZJLX ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="CredType_Dr"></Checkbox>
                                        <span style={{ marginLeft: 5 }}>证件类型</span></span>}>
                                        {getFieldDecorator('CredType_Dr', {
                                            initialValue: this.state.type,
                                        })(
                                            <Select style={{ width: '180px' }}
                                                allowClear
                                                showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                            >
                                                {credTypeDataOption}</Select>
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showZJHM ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="CredNo"></Checkbox>
                                        <span style={{ marginLeft: 5 }}>证件号码</span></span>}>
                                        {getFieldDecorator('CredNo', {
                                            // initialValue: this.state.,
                                            rules: [{ required: false, message: '请输入' },
                                            { validator: posType == "01" ? Util.vailIdCard : '' },],
                                            getValueFromEvent: (event) => {
                                                if (posType == "01") {
                                                    return event.target.value.replace(/[^\d|Xx]/g, '')
                                                }
                                                else {
                                                    return event.target.value.replace(/[^0-9a-zA-Z]/g, '')
                                                }
                                            },
                                        })(
                                            <Input style={{ width: "180px" }} placeholder='请输入证件号码' />
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showMZ ? "block" : "none") }}>
                                    <FormItem {...formItem515} label={<span>
                                        <Checkbox value="Nation_Dr" />
                                        <span style={{ marginLeft: 5 }}>民族</span></span>}>
                                        {getFieldDecorator('Nation_Dr', {
                                            initialValue: this.state.name,
                                        })(
                                            <Select style={{ width: '180px' }}
                                                allowClear
                                                showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                            >
                                                {nationDataOption}</Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={6} style={{ display: (this.state.showXB ? "block" : "none") }}>
                                    <FormItem {...formItem517} label={<span>
                                        <Checkbox value="Sex_Dr" />
                                        <span style={{ marginLeft: 5 }}>性别</span></span>}>
                                        {getFieldDecorator('Sex_Dr', {
                                            // initialValue: this.state.sex,
                                        })(
                                            <Select
                                                // style={{ width: '184px' }}
                                                getPopupContainer={triggerNode => triggerNode.parentNode}
                                                allowClear
                                                showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                            >
                                                {sexOption}</Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <div>
                                    <Col span={6} style={{ display: (this.state.showHYZK ? "block" : "none") }}>
                                        <FormItem {...formItemLayout} label={<span>
                                            <Checkbox value="Marital_Dr" />
                                            <span style={{ marginLeft: 5 }}>婚姻状况</span></span>}>
                                            {getFieldDecorator('Marital_Dr', {
                                                // initialValue: this.state.name,
                                            })(
                                                <Select style={{ width: '180px' }}
                                                    getPopupContainer={triggerNode => triggerNode.parentNode}
                                                    allowClear
                                                    showSearch
                                                    filterOption={(input, option) =>
                                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                        || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                                >
                                                    {maritalOption}</Select>
                                            )}
                                        </FormItem>
                                    </Col>

                                </div>

                                <Col span={6} style={{ display: (this.state.showCSRQ ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="BirthDate" />
                                        <span style={{ marginLeft: 5 }}>出生日期</span></span>}>
                                        {getFieldDecorator('BirthDate', {
                                            // moment(date, dayFormat)
                                            initialValue: this.state.BirthDate ? moment(this.state.BirthDate, dayFormat) : undefined,
                                        })(
                                            <DatePicker
                                                placeholder={'例:20010101'}
                                                format={this.state.formatType ? 'YYYY-MM-DD' : 'YYYYMMDD'}
                                                separator="-"
                                                onOpenChange={(e) => this.handleOnOpenChangeData(e, "formatType")}
                                                onChange={this.changeCommonDate.bind(this, 'BirthDate')} style={{ width: '180px' }} />
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showNL ? "block" : "none") }}>
                                    <FormItem {...formItem515} label={<span>
                                        <Checkbox value="Age" />
                                        <span style={{ marginLeft: 5 }}>年龄</span></span>}>
                                        {getFieldDecorator('Age', {
                                            // initialValue: this.state.,
                                        })(
                                            <span><Input placeholder='开始值' title="开始值" type="number" value={this.state.startValue} min={1} onChange={(e) => this.handleStartValue(e, "start")} style={{ width: '44%' }} /><span style={{ margin: "0px 4px 0 3px" }}>到</span>
                                                <Input placeholder='结束值' title="结束值" type="number" value={this.state.endValue} min={1} onChange={(e) => this.handleStartValue(e, "end")} style={{ width: '42%' }} /></span>
                                        )}
                                    </FormItem>
                                </Col>


                                <Col span={6} style={{ display: (this.state.showSJHM ? "block" : "none") }}>
                                    <FormItem {...formItem715} label={<span>
                                        <Checkbox value="Mobile" />
                                        <span style={{ marginLeft: 5 }}>手机号码</span></span>}>
                                        {getFieldDecorator('Mobile', {
                                            // initialValue: this.state.name,
                                        })(
                                            <Input min={1} type="number" placeholder='请输入本人手机号码' />
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={6} style={{ display: (this.state.showWHCD ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="Education_Dr" />
                                        <span style={{ marginLeft: 5 }}>文化程度</span></span>}>
                                        {getFieldDecorator('Education_Dr', {
                                            // initialValue: this.state.name,
                                        })(
                                            <Select style={{ width: '180px' }}
                                                allowClear
                                                showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                            >
                                                {eduOption}</Select>
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showTXDW ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="Company" />
                                        <span style={{ marginLeft: 5 }}>退休单位</span></span>}>
                                        {getFieldDecorator('Company', {
                                            // initialValue: this.state.name,
                                        })(
                                            <Input style={{ width: "180px" }} placeholder='请输入退休前工作单位' />
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showTXQZY ? "block" : "none") }}>
                                    <FormItem {...formItemLayout} label={<span>
                                        <Checkbox value="Occupation_Dr" />
                                        <span style={{ marginLeft: 5 }}>退休前职业</span></span>}>
                                        {getFieldDecorator('Occupation_Dr', {
                                            // initialValue: this.state.name,
                                        })(
                                            <Select
                                                style={{ width: 143 }}
                                                getPopupContainer={triggerNode => triggerNode.parentNode}
                                                allowClear
                                                showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                            >
                                                {occupationOption}
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>


                            </Row>

                            <Row>
                                <Col span={6} style={{ display: (this.state.showHJDZ ? "block" : "none") }}>
                                    <FormItem {...formItem715} label={<span>
                                        <Checkbox value="nativeAdress" /><span style={{ marginLeft: 5 }}>户籍地址</span></span>}>
                                        {getFieldDecorator('nativeProvinceID', {
                                            initialValue: parms.patPresentProvinceID ? parms.patPresentProvinceID : undefined,
                                        })(
                                            <Select placeholder='请选择省市/其他' getPopupContainer={triggerNode => triggerNode.parentNode}
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='省'
                                                optionFilterProp="role"
                                                onChange={this.onProvinceChange.bind(this, "native")}
                                            >
                                                {
                                                    localProvince && localProvince.map(item => {
                                                        return (<Option key={item.id + "native"} className={'1' + item.province} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
                                                    })
                                                }
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={4} style={{ display: (this.state.showHJDZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('nativeCityID', {
                                            initialValue: parms.patPresentCityID ? parms.patPresentCityID : undefined,
                                        })(
                                            <Select placeholder='请选择城市' getPopupContainer={triggerNode => triggerNode.parentNode}
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='市'
                                                optionFilterProp="role"
                                                onChange={this.onCityChange.bind(this, "native")}
                                            >
                                                {nativeCityItem}
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={4} style={{ display: (this.state.showHJDZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('nativeAreaID', {
                                            initialValue: parms.patPresentAreaID ? String(parms.patPresentAreaID) : undefined,
                                        })(
                                            <Select
                                                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={4} style={{ display: (this.state.showHJDZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('nativeVillageID', {
                                            initialValue: parms.patPresentVillageID ? String(parms.patPresentVillageID) : undefined,
                                        })(
                                            <Select
                                                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={21} style={{ display: (this.state.showHJDZ ? "block" : "none") }}>
                                    <FormItem {...formItemLayoutAddress}>
                                        {getFieldDecorator('AddressNativeDec', {
                                            // initialValue: this.state.sex,
                                        })(
                                            <TextArea rows={1} style={{ marginLeft: '10.6%', width: "95.7%" }} placeholder='请输入具体的地址，无需重复填写省市县乡信息' />
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={6} style={{ display: (this.state.showXZZ ? "block" : "none") }}>
                                    <FormItem {...formItem617} label={<span><Checkbox value="presentAdress" /><span style={{ marginLeft: 5 }}>现住址</span></span>}>
                                        {getFieldDecorator('presentProvinceID', {
                                            initialValue: parms.patPresentProvinceID ? parms.patPresentProvinceID : undefined,
                                        })(
                                            <Select
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='省'
                                                optionFilterProp="role"
                                                onChange={this.onProvinceChange.bind(this, "present")}
                                            >
                                                {
                                                    localProvince && localProvince.map(item => {
                                                        return (<Option key={item.id + "present"} className={'1' + item.province} role={item.descripts + '^' + item.descriptsSPCode} value={String(item.id)} title={item.descripts}>{item.descripts}</Option>)
                                                    })
                                                }
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={4} style={{ display: (this.state.showXZZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('presentCityID', {
                                            initialValue: parms.patPresentCityID ? parms.patPresentCityID : undefined,
                                        })(
                                            <Select
                                                allowClear={true}
                                                showSearch={true}
                                                placeholder='市'
                                                optionFilterProp="role"
                                                onChange={this.onCityChange.bind(this, "present")}
                                            >
                                                {
                                                    presentCityItem
                                                }
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>

                                <Col span={4} style={{ display: (this.state.showXZZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('presentAreaID', {
                                            initialValue: parms.patPresentAreaID ? parms.patPresentAreaID : undefined,
                                        })(
                                            <Select
                                                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={4} style={{ display: (this.state.showXZZ ? "block" : "none") }}>
                                    <FormItem {...formItemSexLayout}>
                                        {getFieldDecorator('presentVillageID', {
                                            initialValue: parms.patPresentVillageID ? parms.patPresentVillageID : undefined,
                                        })(
                                            <Select
                                                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={21} style={{ display: (this.state.showXZZ ? "block" : "none") }}>
                                    <FormItem {...formItemLayoutAddress}>
                                        {getFieldDecorator('presentAdressDec', {
                                            // initialValue: this.state.sex,
                                        })(
                                            <TextArea rows={1} style={{ marginLeft: '9.2%', width: "97.2%" }} placeholder='请输入具体的地址，无需重复填写省市县乡信息' />
                                        )}
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </Card>
                    <Card style={{ marginTop: 5, display: (this.state.showJTYSTD || this.state.showQYZT ? "block" : "none") }}>
                        <p>签约信息</p>
                        <Form>
                            <Row>
                                <Col span={6} style={{ display: (this.state.showJTYSTD ? "block" : "none") }}>
                                    <FormItem {...formItemLongLayout} label={<span>
                                        <Checkbox value="hosp_Dr" />
                                        <span style={{ marginLeft: 5 }}>家庭医生团队</span></span>}>
                                        {getFieldDecorator('hosp_Dr', {
                                            // initialValue: this.state.sex,
                                        })(
                                            <Select style={{ width: '174px' }} placeholder='请选择家庭医生团队'
                                                getPopupContainer={triggerNode => triggerNode.parentNode} allowClear>
                                                {familyDoctorOption}
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>
                                <Col span={6} style={{ display: (this.state.showJTYSTD ? "block" : "none") }}>
                                    <FormItem {...formItemLongLayout}>
                                        {getFieldDecorator('Doctor_Dr', {
                                            // initialValue: this.state.sex,Doctor_Dr
                                        })(
                                            <Select style={{ width: '168px', marginLeft: 10 }} placeholder='请选择医生名称'
                                                getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }>
                                                {doctorDataOption}
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>
                            </Row>
                            <Row style={{ marginLeft: "-30px" }}>
                                <Col span={6} style={{ display: (this.state.showQYZT ? "block" : "none") }}>
                                    <FormItem {...formItemLongLayout} label={<span>
                                        <Checkbox value="qy_Dr" /><span style={{ marginLeft: 5 }}>签约状态</span></span>}>
                                        {getFieldDecorator('qy_Dr', {
                                            // initialValue: this.state.sex,
                                        })(
                                            <Select style={{ width: '202px', }} placeholder='请选择签约状态'
                                                getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                                filterOption={(input, option) =>
                                                    option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                    || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                }>
                                                {sigStatusOp}
                                            </Select>
                                        )}
                                    </FormItem>
                                </Col>
                            </Row>
                        </Form>
                    </Card>
                    <Card style={{ marginTop: 5, display: (this.state.showYLFZFFS ? "block" : "none") }}>
                        <p>支付信息</p>
                        <Row style={{ marginLeft: "3px" }}>
                            <Col span={6} style={{ display: (this.state.showYLFZFFS ? "block" : "none") }}>
                                <FormItem {...formItemLongLayout11} label={<span>
                                    <Checkbox value="PayWay_Dr" />
                                    <span style={{ marginLeft: 5 }}>医疗费支付方式</span></span>}>
                                    {getFieldDecorator('PayWay_Dr', {
                                        // initialValue: this.state.sex,
                                    })(
                                        <Select style={{ width: '158px' }}
                                            allowClear
                                            showSearch
                                            filterOption={(input, option) =>
                                                option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                                || option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0}
                                        >
                                            {payWayOption}</Select>
                                    )}
                                </FormItem>
                            </Col>
                        </Row>
                    </Card>
                </Checkbox.Group>
            </div>
        </div>
    }
}

export default Form.create()(ShowInformationPage);