/**
 *个人基本信息

 */
import React from 'react';
import {
    Card, Table, Input, Form, Select, Row, Col, Checkbox, Tabs,
    DatePicker, Button, Popconfirm, Icon, Divider, message, Modal, Upload
} from 'antd';
import { Util, dayFormat } from 'tools/index';
import { $http } from 'containers/config/https';
import RangeDatePicker from 'components/rangePicker/index';
import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
import ShowSignModal from './ShowSignModal';
import ShowSignDoctorListModal from './ShowSignDoctorListModal';
import CommonPagination from 'components/pagination/index';
import store from 'store';
import moment from 'moment';
import '../style/index.less';

const { RangePicker } = DatePicker;
const Option = Select.Option;
const Search = Input.Search;
const TabPane = Tabs.TabPane;
const { TextArea } = Input;

class InformationTabPane extends React.Component {
    constructor(props) {
        super(props)
        var userData = JSON.parse(sessionStorage.getItem('userData'))
        var patID = JSON.parse(sessionStorage.getItem('patID'))
        this.state = {
            dataSource: [],
            total: 0,
            page: 1,
            pageSize: 10,
            userData: userData,
            fileList: [],
            familyData: [],
            patID: patID
        }
    }

    componentDidMount() {
        this.initData()
        this.loadData()
        this.loadCardType()
        this.loadSelectData()
        this.loadPayWay()//医疗支付方式
        this.loadMedicalType()
        this.loadPopulation()
        this.loadDoctor()//查询患者医生
        this.getDepartment(this.state.userData.hospID)
        this.loadSignList()//查询签约记录
    }
    loadSignList() {
        var params = {
            params: [{
                patID: this.state.patID,
                signRecordID: this.state.signRecordID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070059",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        signList: res.result.data,
                    })
                }
            }
        });
    }

    loadDoctor() {
        var params = {
            params: [{
                patID: this.state.patID,
                identity: ''
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070014",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        doctorList: res.result.data,
                    })
                }
            }
        });
    }

    //医疗支付
    loadPayWay() {
        var params = {
            params: [{

            }]
        }
        $http.post('urlDeault', this, {
            code: "03070038",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        payWay: res.data,
                    })
                }
            }
        });
    }

    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,
                    })
                }
            }
        });
    }

    //获取卡类型
    loadCardType() {
        var params = {
            params: [{
                cardTypeFlag: '1',//卡类型
                patTypeFlag: '1',
                credTypeFlag: '1',//证件类型
                nationFlag: '1',//民族
                occupationFlag: '1',//职业
                maritalFlag: '1',	//婚姻
                eduFlag: '1',//学历
                relationFlag: '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,
                    })
                }
            }
        });
    }

    initData() {
        this.familyColumns = [
            {
                title: <span><span className='shuld-choose-btn'>*</span>姓名</span>,
                dataIndex: 'name',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    return this.state.tableStatus == true ? <Input style={{ width: '95%' }}
                        onChange={this.changeCommonInput.bind(this, 'name', index)}
                        disabled={this.state.tableStatus == true ? false : true}
                        value={data.name} /> : <span>{data.name}</span>
                }
            },
            {
                title: <span><span className='shuld-choose-btn'>*</span>关系</span>,
                dataIndex: 'relationID',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    //关系
                    var relationDataOption = []
                    this.state.relationData && this.state.relationData.map((item, index) => {
                        relationDataOption.push(<Option key={index} value={String(item.id)} code={item.descripts}
                            name={item.descriptsSPCode}>{item.descripts}</Option>)
                    })
                    return this.state.tableStatus == true ? <Select style={{ width: '95%' }} onChange={this.changeCommonSelect.bind(this, 'relaID', index)}
                        disabled={this.state.tableStatus == true ? false : true}
                        value={data.relaID || data.relationID} showSearch allowClear filterOption={(input, option) =>
                            option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                            || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                        }>{relationDataOption}</Select> : <span>{data.relaDesc}</span>
                }
            },
            {
                title: <span><span className='shuld-choose-btn'>*</span>性别</span>,
                dataIndex: 'sexID',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    //性别
                    var sexOption = []
                    this.state.sex && this.state.sex.map((item, index) => {
                        sexOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
                    })
                    return this.state.tableStatus == true ? <Select style={{ width: '95%' }} onChange={this.changeCommonSelect.bind(this, 'sexID', index)}
                        disabled={this.state.tableStatus == true ? false : true}
                        value={data.sexID}>{sexOption}</Select> : <span>{data.sexDesc}</span>
                }
            },
            {
                title: '身份证号码',
                dataIndex: 'iDCardNo',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    return this.state.tableStatus == true ? <Input style={{ width: '95%' }} onChange={this.changeCommonInput.bind(this, 'iDCardNo', index)}
                        disabled={this.state.tableStatus == true ? false : true}
                        onKeyDown={this.onKeyDownCardNo.bind(this, 'iDCardNo', data, index)}
                        onBlur={this.onBlurCardNo.bind(this, 'iDCardNo', data, index)}
                        value={data.iDCardNo} /> : <span>{data.iDCardNo}</span>
                }
            },
            {
                title: <span><span className='shuld-choose-btn'>*</span>联系方式</span>,
                dataIndex: 'phone',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    return this.state.tableStatus == true ? <Input style={{ width: '95%' }} onChange={this.changeCommonInput.bind(this, 'phone', index)}
                        disabled={this.state.tableStatus == true ? false : true}
                        value={data.phone} /> : <span>{data.phone}</span>
                }
            },
            // {
            //     title: '是否医保',
            //     dataIndex: 'iNSUTypeID',
            //     width: 100,
            //     align: 'left',
            //     render: (text, data, index) => {

            //         var medicalTypeOption = []
            //         this.state.medicalType && this.state.medicalType.map((item, index) => {
            //             medicalTypeOption.push(<Option key={index} value={item.id} code={item.descripts}
            //                 name={item.descriptsSPCode}>{item.descripts}</Option>)
            //         })
            //         return this.state.tableStatus == true ? <Select style={{ width: '95%' }} onChange={this.changeCommonSelect.bind(this, 'iNSUTypeID', index)}
            //             disabled={this.state.tableStatus == true ? false : true}
            //             showSearch allowClear filterOption={(input, option) =>
            //                 option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
            //                 || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
            //             }
            //             value={data.typeID || data.iNSUTypeID}>{medicalTypeOption}</Select> : <span>{data.typeDesc}</span>
            //     }
            // },
            // {
            //     title: '人群分类',
            //     dataIndex: 'classificationID',
            //     width: 100,
            //     align: 'left',
            //     render: (text, data, index) => {
            //         var populationOption = []
            //         this.state.population && this.state.population.map((item, index) => {
            //             populationOption.push(<Option key={index} value={item.id} code={item.descripts}
            //                 name={item.descriptsSPCode}>{item.descripts}</Option>)
            //         })
            //         return this.state.tableStatus == true ? <Select style={{ width: '95%' }} onChange={this.changeCommonSelect.bind(this, 'classificationID', index)}
            //             disabled={this.state.tableStatus == true ? false : true}
            //             showSearch allowClear filterOption={(input, option) =>
            //                 option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
            //                 || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
            //             }
            //             value={data.classID || data.classificationID}>{populationOption}</Select> : <span>{data.classDesc}</span>
            //     }
            // }, {
            //     title: '医保卡号',
            //     dataIndex: 'iNSUNo',
            //     width: 100,
            //     align: 'left',
            //     render: (text, data, index) => {
            //         return this.state.tableStatus == true ? <Input style={{ width: '95%' }} onChange={this.changeCommonInput.bind(this, 'iNSUNo', index)}
            //             disabled={this.state.tableStatus == true ? false : true}
            //             value={data.iNSUNo} /> : <span>{data.iNSUNo}</span>
            //     }
            // },
            {
                title: '操作',
                dataIndex: 'opertion',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    return <span>
                        <Icon type="delete" style={{ color: 'rgba(240,65,52,1)' }}></Icon>
                        <Popconfirm title="确定删除成员信息吗?" onConfirm={this.handleDel.bind(this, data, index)} >
                            <span className='span' style={{ color: 'rgba(240,65,52,1)' }}>删除</span>
                        </Popconfirm></span>
                }
            },
        ],
            this.doctorColumns = [
                {
                    title: '机构',
                    dataIndex: 'hospital',
                    width: 100,
                    align: 'left',
                    // render: (text, data, index) => {
                    //     //家庭医生团队
                    //     let familyDoctorOption = []
                    //     this.state.familyDoctor && this.state.familyDoctor.map((item, index) => {
                    //         familyDoctorOption.push(<Option key={index} value={item.hospID}>{item.hospDesc}</Option>)
                    //     })
                    //     return <Select style={{ width: '95%' }} onSelect={this.changeDoctorCommonSelect.bind(this, 'hospitalID', index)}
                    //         value={data.hospitalID}>{familyDoctorOption}</Select>
                    // }
                },
                {
                    title: '科室',
                    dataIndex: 'loc',
                    width: 100,
                    align: 'left',
                    // render: (text, data, index) => {
                    //     //性别
                    //     var departmentDataOption = []
                    //     this.state.departmentData && this.state.departmentData.map((item, index) => {
                    //         departmentDataOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
                    //     })
                    //     return <Select style={{ width: '95%' }} onChange={this.changeDoctorCommonSelect.bind(this, 'locID', index)}
                    //         value={data.locID}>{departmentDataOption}</Select>
                    // }
                },
                {
                    title: '姓名',
                    dataIndex: 'doctor',
                    width: 100,
                    align: 'left',
                    // render: (text, data, index) => {
                    //     //性别
                    //     var sexOption = []
                    //     this.state.sex && this.state.sex.map((item, index) => {
                    //         sexOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
                    //     })
                    //     return <Select style={{ width: '95%' }} onChange={this.changeDoctorCommonSelect.bind(this, 'doctorID', index)}
                    //         value={data.doctorID}>{sexOption}</Select>
                    // }
                },
                {
                    title: '人员类型',
                    dataIndex: 'signDoctorType',
                    width: 100,
                    align: 'left',
                },
                {
                    title: '服务状态',
                    dataIndex: 'serviceStatus',
                    width: 100,
                    align: 'left',
                },
                {
                    title: '服务时间',
                    dataIndex: 'startDate',
                    width: 100,
                    align: 'left',
                },
                {
                    title: '操作',
                    dataIndex: 'opertion',
                    width: 100,
                    align: 'left',
                    render: (text, data, index) => {
                        return <div>
                            {data.markID == '1' ?
                                <Popconfirm title="确定解约吗?解约后，团队全部退出，请慎重操作。" onConfirm={this.handleRescission.bind(this, data)} >
                                    <span className='span' style={{ color: 'rgba(240,65,52,1)' }}>{data.mark}</span>
                                </Popconfirm> :
                                <Popconfirm title="确定退出吗?" onConfirm={this.handleSignOut.bind(this, data)} >
                                    <span className='span' style={{ color: 'rgba(240,65,52,1)' }}>{data.mark}</span>
                                </Popconfirm>}
                        </div>
                    }
                },
            ]
        this.signColumns = [
            {
                title: '签约机构',
                dataIndex: 'hospDesc',
                width: 100,
                align: 'left',
            },
            {
                title: '签约医生',
                dataIndex: 'docName',
                width: 100,
                align: 'left',
            },
            {
                title: '开始日期',
                dataIndex: 'signDate',
                width: 100,
                align: 'left',
            },
            {
                title: '结束日期',
                dataIndex: 'signStopDate',
                width: 100,
                align: 'left',
            },
            {
                title: '状态',
                dataIndex: 'signStatusDesc',
                width: 100,
                align: 'left',
            },
            {
                title: '操作',
                dataIndex: 'opertion',
                width: 100,
                align: 'left',
                render: (text, data, index) => {
                    return <span className='span' style={{ color: '#0099FF' }}
                        onClick={this.showSignModal.bind(this, data)}>查看签约协议</span>
                }
            },
        ]
    }

    onKeyDownCardNo(name, data, index, e) {
        if (e.keyCode == '13') {
            var idCard = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
            var cardNo = data.iDCardNo;
            if (!Util.isEmpty(cardNo) && !idCard.test(cardNo)) {
                message.error('身份证号码输入格式不正确，请重新输入')
                return
            }
        }
    }
    onBlurCardNo(name, data, index, e) {
        var idCard = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
        var cardNo = data.iDCardNo;
        if (!Util.isEmpty(cardNo) && !idCard.test(cardNo)) {
            message.error('身份证号码输入格式不正确，请重新输入')
            return
        }
    }

    showSignModal(data) {
        this.setState({
            isShowSignModal: true,
            signData: data
        })
    }

    handleSignOut(data) {
        var params = {
            params: [{
                userID: this.state.userData.userID,
                data: [data.ID]
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070015",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('退出成功')
                    this.loadDoctor()
                }
            }
        });
    }

    changeCommonInput(name, index, e) {
        this.state.family[index][name] = e.target.value;
        this.setState({})
    }

    changeCommonSelect(name, index, e) {
        this.state.family[index][name] = e;
        this.setState({})
    }

    changeDoctorCommonSelect(name, index, e) {
        if (name == 'hospitalID') {
            this.getDepartment(e)
        }
        if (name == 'locID') {
            this.loadDoctorData(e)
        }
        this.state.doctorList[index][name] = e;
        this.setState({})
    }

    loadDoctorData(value) {
        var params = {
            params: [{
                hospID: value,
                locID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070033",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        doctorData: res.result.data,
                    })
                }
            }
        });
    }

    getDepartment(e) {
        var params = {
            params: [{
                hospID: e,
            }]
        }
        $http.post('urlS', this, {
            code: "03020046",
            data: params,
            success: function (res) {
                if (res.errorCode === '0') {
                    this.setState({
                        departmentData: res.result.Data
                    })
                }
            }
        })
    }

    handleDel(data, index) {
        if (!Util.isEmpty(data.ID)) {
            this.handleDelfamily(data)
        }
        this.state.family.splice(index, 1);
        this.setState({})
    }

    handleDelfamily(data) {
        var params = {
            params: [{
                ID: data.ID,
                updateUserID: this.state.userData.userID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070009",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('删除成功')
                    this.loadData()
                    this.setState({
                        tableStatus: false
                    })
                }
            }
        });
    }

    //医保类型
    loadMedicalType() {
        var params = {
            params: [{}]
        }
        $http.post('urlDeault', this, {
            code: "03070052",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        medicalType: res.result,
                    })
                }
            }
        });
    }

    //人群分类
    loadPopulation() {
        var params = {
            params: [{}]
        }
        $http.post('urlDeault', this, {
            code: "03070039",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        population: res.result,
                    })
                }
            }
        });
    }

    getProviceOther(value) {
        let data = {}
        data = {
            params: [{
                provinceFlag: 1,	//省
                cityFlag: 1,  //市
                countryFlag: 1,	//国家
            }]
        }
        $http.post('urlS', this, {
            code: '03030005',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    if (this.state.patProvinceID || value) {
                        let city = []
                        city = res.city.filter((item) => item.province == (this.state.patProvinceID ? this.state.patProvinceID : value));
                        this.setState({
                            localCity: city,
                            localProvince: res.province,
                            // patCityID: undefined,
                            // patAreaID: undefined,
                            // patVillageID: undefined,
                        })
                    } else {
                        this.setState({
                            localProvince: res.province,
                            localCity: [],
                            // patCityID: undefined,
                            // patAreaID: undefined,
                            // patVillageID: undefined,
                        })
                    }
                }
            }
        })
    }

    getProviceOtherNow(value) {
        let data = {}
        data = {
            params: [{
                provinceFlag: 1,	//省
                cityFlag: 1,  //市
                countryFlag: 1,	//国家
            }]
        }
        $http.post('urlS', this, {
            code: '03030005',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    if (this.state.receiveProvinceID || value) {
                        let code = []
                        code = res.city.filter((item) => item.province == (this.state.receiveProvinceID ? this.state.receiveProvinceID : value));
                        this.setState({
                            localCityNow: code,
                            localProvinceNow: res.province,
                            // patCityID: undefined,
                            // patAreaID: undefined,
                            // patVillageID: undefined,
                        })
                    } else {
                        this.setState({
                            localProvinceNow: res.province,
                            localCityNow: [],
                            // patCityID: undefined,
                            // patAreaID: undefined,
                            // patVillageID: undefined,
                        })
                    }
                }
            }
        })
    }

    //选择或清除省
    onProvinceChange(name, value) {
        this.setState({
            [name]: value,
            areaData: []
        }, () => {
            this.getProviceOther(value)
        })

    }
    //选择市
    changeReceiveCity(name, value) {
        this.setState({
            [name]: value,
            patAreaID: undefined,
            patVillageID: undefined,
        }, () => {
            this.getAreas(value)
        })
    }
    //选择县
    changeAreaCity(name, value) {
        this.setState({
            [name]: value,
            patVillageID: undefined
        }, () => {
            this.getVillages(value)
        })
    }
    //选择乡
    changeVillageCity(name, value) {
        this.setState({
            [name]: value
        })
    }

    getVillages(value) {
        let data = {
            params: [{
                areaId: this.state.patAreaID ? this.state.patAreaID : value
            }],
        }
        $http.post('urlS', this, {
            code: '03030007',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        villageData: res.result
                    })
                }
            }
        })
    }

    getAreas(value) {
        let data = {
            params: [{
                cityId: this.state.patCityID ? this.state.patCityID : value
            }],
        }
        $http.post('urlS', this, {
            code: '03030006',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        areaData: res.result
                    })
                }
            }
        })
    }

    //首字母大写
    firstToUp = (str) => {
        return str.substring(0, 1).toUpperCase() + str.substring(1);
    }

    //选择或清除省
    onProvinceChangeNow(name, value) {
        this.setState({
            [name]: value,
            areaDataNow: []
        }, () => {
            this.getProviceOtherNow(value)
        })

    }
    //选择市
    changeNowReceiveCity(name, value) {
        this.setState({
            [name]: value,
            receiveAreaID: undefined,
            receiveVillageID: undefined,
        }, () => {
            this.getAreasNow(value)
        })
    }
    //选择县
    changeNowAreaCity(name, value) {
        this.setState({
            [name]: value,
            receiveVillageID: undefined
        }, () => {
            this.getVillagesNow(value)
        })
    }
    //选择乡
    changeNowVillageCity(name, value) {
        this.setState({
            [name]: value
        })
    }

    getVillagesNow(value) {
        let data = {
            params: [{
                areaId: this.state.receiveAreaID ? this.state.receiveAreaID : value
            }],
        }
        $http.post('urlS', this, {
            code: '03030007',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        villageDataNow: res.result
                    })
                }
            }
        })
    }

    getAreasNow(value) {
        let data = {
            params: [{
                cityId: this.state.receiveCityID ? this.state.receiveCityID : value
            }],
        }
        $http.post('urlS', this, {
            code: '03030006',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    this.setState({
                        areaDataNow: res.result
                    })
                }
            }
        })
    }

    loadData() {
        var params = {
            params: [{
                patID: this.state.patID
            }]
        }
        $http.post('urlDeault', this, {
            code: "03070019",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    var source = res.result[0];
                    var editData = {}
                    editData = {
                        patName: source.personInfo && source.personInfo.patName,
                        signRecordID: source.personInfo && source.personInfo.signRecordID,
                        patSexID: source.personInfo && source.personInfo.patSexID,
                        patNo: source.personInfo && source.personInfo.patNo,
                        patAge: source.personInfo && source.personInfo.patAge,
                        patCredTypeID: source.personInfo && source.personInfo.patCredTypeID,
                        patCredNo: source.personInfo && source.personInfo.patCredNo,
                        patBirthDate: source.personInfo && source.personInfo.patBirthDate,
                        patNationID: source.personInfo && source.personInfo.patNationID,
                        patMobile: source.personInfo && source.personInfo.patMobile,
                        patCityID: source.personInfo && source.personInfo.nativeCityID,
                        patAreaID: source.personInfo && source.personInfo.nativeAreaID,
                        patAddress: source.personInfo && source.personInfo.nativeAddress,
                        patVillageID: source.personInfo && source.personInfo.nativeVillageID,
                        patProvinceID: source.personInfo && source.personInfo.nativeProvinceID,
                        receiveCityID: source.personInfo && source.personInfo.presentCityID,
                        receiveAreaID: source.personInfo && source.personInfo.presentAreaID,
                        receiveVillageID: source.personInfo && source.personInfo.presentVillageID,
                        receiveProvinceID: source.personInfo && source.personInfo.presentProvinceID,
                        receiveAddress: source.personInfo && source.personInfo.presentAddress,
                        patMaritalID: source.personInfo && source.personInfo.patMaritalID ? parseInt(source.personInfo.patMaritalID) : '',
                        patEduID: source.personInfo && source.personInfo.patEduID ? parseInt(source.personInfo.patEduID) : '',
                        patOccupationID: source.personInfo && source.personInfo.patOccupationID ? parseInt(source.personInfo.patOccupationID) : '',
                        patCompany: source.personInfo && source.personInfo.patCompany,
                        payWayID: source.personInfo && source.personInfo.payWayID,
                        patInsuNo: source.personInfo && source.personInfo.patInsuNo,
                        healthRecord: source.ohterInfo && source.ohterInfo.healthRecord,
                        signHospID: source.ohterInfo && source.ohterInfo.signHospID,
                        signDoctorID: source.signDocInfo && source.signDocInfo.signDoctorID,
                        family: source.familyInfo && source.familyInfo,
                        problom: source.problemsInfo && source.problemsInfo,
                        signDocInfo: source.signDocInfo && source.signDocInfo,
                    }
                    this.setState({
                        ...editData
                    }, () => {
                        this.getProviceOther(this.state.patProvinceID)
                        this.getAreas(this.state.patCityID)
                        this.getVillages(this.state.patAreaID)
                        this.getProviceOtherNow(this.state.receiveProvinceID)
                        this.getVillagesNow(this.state.receiveAreaID)
                        this.getAreasNow(this.state.receiveCityID)
                    })
                }
            }
        });
    }

    handleCancel = () => this.setState({ previewVisible: false });

    handlePreview = async file => {
        if (!file.url && !file.preview) {
            file.preview = await getBase64(file.originFileObj);
        }

        this.setState({
            previewImage: file.url || file.preview,
            previewVisible: true,
        });
    };

    handleChange = ({ fileList }) => this.setState({ fileList });

    //编辑个人信息
    changeEditStatus() {
        this.setState({
            editStatus: true
        })
    }

    //解约
    handleRescission(code) {
        let data = {
            params: [{
                userID: this.state.userData.userID,
                ID: code.signID
            }],
        }
        $http.post('urlS', this, {
            code: '03070013',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('解约成功！')
                    this.loadDoctor()
                    //重查title
                    var { loadTitleMessage } = this.props;
                    loadTitleMessage && loadTitleMessage()
                }
            }
        })
    }

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

    //新增
    addMersiom() {
        this.state.family.push({})
        this.setState({ tableStatus: true })
    }

    editTable() {
        this.setState({
            tableStatus: true
        })
    }

    cannelTable() {
        this.setState({
            tableStatus: false
        }, () => {
            this.loadData()
        })
    }

    //保存个人信息
    handleSaveInformation() {
        var family = this.state.family;
        if (!Util.isEmpty(family)) {
            for (var i = 0; i < family.length; i++) {
                if (Util.isEmpty(family[i].relationID) && Util.isEmpty(family[i].relaID)
                 || Util.isEmpty(family[i].name) || Util.isEmpty(family[i].phone) || Util.isEmpty(family[i].sexID)) {
                    message.error('家庭成员必填信息不能为空')
                    return
                }
            }
        }
        var source = []
        if (!Util.isEmpty(this.state.family)) {
            for (var i = 0; i < family.length; i++) {
                source.push({
                    name: family[i].name,
                    relationID: family[i].relaID,
                    sexID: family[i].sexID,
                    iDCardNo: family[i].iDCardNo,
                    phone: family[i].phone,
                    iNSUTypeID: family[i].typeID || family[i].iNSUTypeID,
                    classificationID: family[i].classificationID,
                    iNSUNo: family[i].iNSUNo,
                    ID: family[i].familyID,
                })
            }
        }
        let data = {
            params: [{
                patID: this.state.patID,
                userID: this.state.userData.userID,
                patName: this.state.patName,
                patSexID: this.state.patSexID,
                patAge: this.state.patAge,
                patCredTypeID: this.state.patCredTypeID,
                patCredNo: this.state.patCredNo,
                patBirthDate: this.state.patBirthDate ? moment(this.state.patBirthDate).format(dayFormat) : '',
                patNationID: this.state.patNationID,
                patMobile: this.state.patMobile,
                healthRecord: this.state.healthRecord,
                signHospID: this.state.signHospID,
                signDoctorID: this.state.signDoctorID,
                patInsuNo:this.state.patInsuNo,
                addressInfo: [
                    {
                        addressTypeCode: "Native",
                        addressData: {
                            patProvinceID: this.state.patProvinceID,
                            patCityID: this.state.patCityID,
                            patAreaID: this.state.patAreaID,
                            patVillageID: this.state.patVillageID,
                            patAddress: this.state.patAddress,
                        }

                    },
                    {
                        addressTypeCode: "Present",
                        addressData: {
                            patProvinceID: this.state.receiveProvinceID,
                            patCityID: this.state.receiveCityID,
                            patAreaID: this.state.receiveAreaID,
                            patVillageID: this.state.receiveVillageID,
                            patAddress: this.state.receiveAddress,
                        }

                    }],
                patMaritalID: this.state.patMaritalID,
                patEduID: this.state.patEduID,
                patOccupationID: this.state.patOccupationID,
                patCompany: this.state.patCompany,
                payWayID: this.state.payWayID,
                family: source
            }],
        }
        $http.post('urlS', this, {
            code: '03070031',
            data: data,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('保存成功')
                    this.loadData()
                    this.setState({
                        editStatus: false,
                        tableStatus: false
                    }, () => {
                        //重查title
                        var { loadTitleMessage } = this.props;
                        loadTitleMessage && loadTitleMessage()
                    })
                }
            }
        })
    }

    hideModal(name, e) {
        this.setState({
            [name]: false
        })
    }

    //新增签约医生
    addSignDoctorList() {
        this.setState({
            isShowSignDoctorList: true
        })
    }

    //添加签约医生
    onSubmitDoctorSign(data) {
        var params = {
            params: [{
                userID: this.state.userData.userID,
                data: [{
                    hospitalID: this.state.userData.hospID,//data.hospitalID,
                    locID: data.locID,
                    doctorID: data.doctorID,
                    signRecordID: this.state.signRecordID
                }]
            }]
        }
        $http.post('urlS', this, {
            code: "03070016",
            data: params,
            success: function (res) {
                if (res.errorCode == '0') {
                    message.success('添加成功')
                    this.hideModal('isShowSignDoctorList')
                    this.loadDoctor()
                }
            }
        })
    }

    changecannelStatus() {
        this.setState({
            editStatus: false
        }, () => {
            this.loadData()
        })
    }

    render() {
        var { sex, previewImage, fileList, previewVisible } = this.state;
        //性别
        var sexOption = []
        sex && sex.map((item, index) => {
            sexOption.push(<Option key={index} value={item.id}>{item.descripts}</Option>)
        })

        //卡类型
        let cardTypeOption = []
        this.state.cardTypeData && this.state.cardTypeData.map((item, index) => {
            cardTypeOption.push(<Option key={index} value={item.id} code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //证件类型
        let credTypeDataOption = []
        this.state.credTypeData && this.state.credTypeData.map((item, index) => {
            credTypeDataOption.push(<Option key={index} value={item.id} 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>)
        })
        /**
         * occupationData: res.occupation,//职业
                        maritalData: res.marital,//婚姻
                        eduData: res.edu,//学历
         */
        //职业
        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 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 localProvinceOption = []
        this.state.localProvince && this.state.localProvince.map((item, index) => {
            localProvinceOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //市
        let localCityOption = []
        this.state.localCity && this.state.localCity.map((item, index) => {
            localCityOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //县
        let areaDataOption = []
        this.state.areaData && this.state.areaData.map((item, index) => {
            areaDataOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //乡
        let villageDataOption = []
        this.state.villageData && this.state.villageData.map((item, index) => {
            villageDataOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //现住省
        let localProvinceNowOption = []
        this.state.localProvinceNow && this.state.localProvinceNow.map((item, index) => {
            localProvinceNowOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //现住市
        let localCityNowOption = []
        this.state.localCityNow && this.state.localCityNow.map((item, index) => {
            localCityNowOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //现住县
        let areaDataNowOption = []
        this.state.areaDataNow && this.state.areaDataNow.map((item, index) => {
            areaDataNowOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //现住乡
        let villageDataNowOption = []
        this.state.villageDataNow && this.state.villageDataNow.map((item, index) => {
            villageDataNowOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        //家庭医生
        let doctorDataOption = []
        this.state.doctorData && this.state.doctorData.map((item, index) => {
            doctorDataOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })
        //医疗支付
        let payWayOption = []
        this.state.payWay && this.state.payWay.map((item, index) => {
            payWayOption.push(<Option key={index} value={item.id} name={item.descripts}
                code={item.descriptsSPCode}>{item.descripts}</Option>)
        })

        var problomOption = []
        this.state.problom && this.state.problom.map((item, index) => {
            problomOption.push(<h4 key={index} value={item}>{item}</h4>)
        })


        const uploadButton = (
            <div>
                {/* <PlusOutlined /> */}
                <div className="ant-upload-text">上传</div>
            </div>
        );

        return <div className='information-basic-body'>
            {/**查看协议 */}
            <ShowSignModal isShow={this.state.isShowSignModal}
                signData={this.state.signData}
                onHide={this.hideModal.bind(this, 'isShowSignModal')}>
            </ShowSignModal>

            {/**新增签约医生 */}
            <ShowSignDoctorListModal isShow={this.state.isShowSignDoctorList}
                onSubmit={this.onSubmitDoctorSign.bind(this)}
                onHide={this.hideModal.bind(this, 'isShowSignDoctorList')}>
            </ShowSignDoctorListModal>

            <div style={{ float: 'right', width: '100%', height: store.getState().tableHeight.y + 125, overflow: 'auto', background: '#F0F2F5' }}>
                <Card title={<span><span className='imformation-label-left'></span>个人资料</span>} extra={<div style={{ textAlign: 'right' }}>
                    {this.state.editStatus == true ?
                        <Button size='small' type='primary' onClick={this.changecannelStatus.bind(this)}>
                            {'取消'}</Button> :
                        <Button size='small' type='primary' onClick={this.changeEditStatus.bind(this)}>
                            {'编辑'}</Button>}
                    <Button size='small' type='primary' style={{ marginLeft: 10 }}
                        onClick={this.handleSaveInformation.bind(this)}
                        disabled={this.state.editStatus == true ? false : true}>保存</Button>
                </div>}>
                    <div style={{ display: 'flex' }}>
                        {/* <div>
                            <Upload
                                action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
                                listType="picture-card"
                                onPreview={this.handlePreview}
                                onChange={this.handleChange}
                            >
                                {this.state.fileList.length <= 1 ? uploadButton : null}
                            </Upload>
                            <Modal visible={this.state.previewVisible} footer={null} onCancel={this.handleCancel}>
                                <img alt="example" style={{ width: '100%' }} src={this.state.previewImage} />
                            </Modal>
                        </div> */}
                        <div>
                            <div>
                                <span className='information-label'>病人ID：</span>
                                <span style={{ marginLeft: 10 }}><Input value={this.state.patNo} style={{ width: '180px' }}
                                    disabled />
                                </span><Divider type="vertical" />

                                <span className='information-label'>姓名：</span>
                                <span style={{ marginLeft: 10 }}><Input value={this.state.patName} style={{ width: '180px' }}
                                    onChange={Util.commonInputChange.bind(this, 'patName')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span><Divider type="vertical" />

                                <span className='information-label'>证件类型：</span>
                                <span style={{ marginLeft: 10 }}><Select value={this.state.patCredTypeID} style={{ width: '180px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'patCredTypeID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {credTypeDataOption}</Select>
                                </span><Divider type="vertical" />

                                <span className='information-label'>证件号码：</span>
                                <span style={{ marginLeft: 10 }}><Input value={this.state.patCredNo} style={{ width: '180px' }}
                                    onChange={Util.commonInputChange.bind(this, 'patCredNo')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span><Divider type="vertical" />

                                <span className='information-label'>出生日期：</span>
                                <span><DatePicker format={dayFormat} value={this.state.patBirthDate ? moment(this.state.patBirthDate, dayFormat) : ''}
                                    onChange={this.changeDate.bind(this, 'patBirthDate')}
                                    style={{ width: '16.6%' }} disabled={this.state.editStatus == true ? false : true} />
                                </span><br />

                                &nbsp;&nbsp;&nbsp;<span className='information-label' style={{ marginLeft: 2 }}>民族：</span>
                                <span style={{ marginLeft: 10 }}><Select value={this.state.patNationID} style={{ width: '180px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'patNationID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {nationDataOption}</Select>
                                </span><Divider type="vertical" />

                                <span className='information-label'>性别：</span>
                                <span style={{ marginLeft: 10 }}><Select value={this.state.patSexID} style={{ width: '180px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'patSexID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {sexOption}</Select>
                                </span><Divider type="vertical" />

                                &nbsp;&nbsp;&nbsp;<span className='information-label' style={{ marginLeft: 16 }}>年龄：</span>
                                <span style={{ marginLeft: 10 }}><Input value={this.state.patAge} style={{ width: '180px', marginTop: 5 }}
                                    onChange={Util.commonInputChange.bind(this, 'patAge')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span><Divider type="vertical" />

                                <span className='information-label'>婚姻状况：</span>
                                <span style={{ marginLeft: 10 }}><Select value={this.state.patMaritalID} style={{ width: '180px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'patMaritalID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {maritalOption}</Select><Divider type="vertical" />
                                </span>

                                <span className='information-label'>联系电话：</span>
                                <span><Input value={this.state.patMobile} style={{ width: '16.6%', marginTop: 5 }}
                                    onChange={Util.commonInputChange.bind(this, 'patMobile')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span>
                            </div>
                            <div>
                                <span className='information-label'>文化程度：</span>
                                <span ><Select value={this.state.patEduID} style={{ width: '180px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'patEduID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {eduOption}</Select><Divider type="vertical" />
                                </span>

                                <span className='information-label'>付费方式：</span>
                                <span ><Select value={this.state.payWayID} style={{ width: '160px' }}
                                    onChange={Util.handleSelectChange.bind(this, 'payWayID')}
                                    disabled={this.state.editStatus == true ? false : true}>
                                    {payWayOption}</Select><Divider type="vertical" />
                                </span>

                                <span className='information-label'>社保卡号：</span>
                                <span style={{ marginLeft: 10 }}><Input value={this.state.patInsuNo} style={{ width: '180px', marginTop: 5 }}
                                    onChange={Util.commonInputChange.bind(this, 'patInsuNo')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span><Divider type="vertical" />


                                <span className='information-label' style={{ marginLeft: 10 }}>退休前职业：</span>
                                <span > <Select getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    onChange={Util.handleSelectChange.bind(this, "patOccupationID")}
                                    value={this.state.patOccupationID} disabled={this.state.editStatus == true ? false : true} style={{ width: 160 }}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {occupationOption}
                                </Select>
                                </span><Divider type="vertical" />

                                <span className='information-label' style={{ marginLeft: 10 }}>退休前工作单位：</span>
                                <span><Input value={this.state.patCompany} style={{ width: '13%', marginTop: 5 }}
                                    onChange={Util.commonInputChange.bind(this, 'patCompany')}
                                    disabled={this.state.editStatus == true ? false : true} />
                                </span>
                            </div>
                            <div style={{ marginTop: 5 }}>
                                <span className='information-label'>户籍地址：</span>
                                <span > <Select placeholder='请选择省市/其他' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    onChange={this.onProvinceChange.bind(this, "patProvinceID")} disabled={this.state.editStatus == true ? false : true} style={{ width: 200 }}
                                    value={this.state.patProvinceID}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {localProvinceOption}
                                </Select>
                                </span>

                                <Select placeholder='请选择城市' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.patCityID} disabled={this.state.editStatus == true ? false : true} style={{ marginLeft: 10, width: 200 }}
                                    onChange={this.changeReceiveCity.bind(this, 'patCityID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {localCityOption}</Select>

                                <Select placeholder='请选择区/县' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.patAreaID} disabled={this.state.editStatus == true ? false : true} style={{ marginLeft: 10, width: 200 }}
                                    onChange={this.changeAreaCity.bind(this, 'patAreaID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {areaDataOption}
                                </Select>

                                <Select placeholder='请选乡/镇' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.patVillageID} disabled={this.state.editStatus == true ? false : true} style={{ marginLeft: 10, width: 200 }}
                                    onChange={this.changeVillageCity.bind(this, 'patVillageID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {villageDataOption}
                                </Select>

                                <TextArea rows={1} disabled={this.state.editStatus == true ? false : true} style={{ marginLeft: 10, width: 300 }}
                                    value={this.state.patAddress} onChange={Util.commonInputChange.bind(this, 'patAddress')}
                                    placeholder='请输入具体的地址，无需重复填写省市县乡信息' />

                            </div>
                            <div style={{ marginTop: 5 }}>
                                <span className='information-label'>现住地址：</span>
                                <span > <Select placeholder='请选择省市/其他' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    onChange={this.onProvinceChangeNow.bind(this, "receiveProvinceID")}
                                    value={this.state.receiveProvinceID} disabled={this.state.editStatus == true ? false : true} style={{ width: 200 }}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {localProvinceNowOption}
                                </Select>
                                </span>

                                <Select placeholder='请选择城市' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.receiveCityID} disabled={this.state.editStatus == true ? false : true} style={{ width: 200, marginLeft: 10 }}
                                    onChange={this.changeNowReceiveCity.bind(this, 'receiveCityID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {localCityNowOption}
                                </Select>

                                <Select placeholder='请选择区/县' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.receiveAreaID} disabled={this.state.editStatus == true ? false : true} style={{ width: 200, marginLeft: 10 }}
                                    onChange={this.changeNowAreaCity.bind(this, 'receiveAreaID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {areaDataNowOption}
                                </Select>

                                <Select placeholder='请选乡/镇' getPopupContainer={triggerNode => triggerNode.parentNode} allowClear showSearch
                                    value={this.state.receiveVillageID} disabled={this.state.editStatus == true ? false : true} style={{ width: 200, marginLeft: 10 }}
                                    onChange={this.changeNowVillageCity.bind(this, 'receiveVillageID')}
                                    filterOption={(input, option) =>
                                        option.props.code.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                        || option.props.name.toLowerCase().indexOf(input.toLowerCase()) >= 0
                                    }>
                                    {villageDataNowOption}
                                </Select>

                                <TextArea rows={1} disabled={this.state.editStatus == true ? false : true} style={{ marginLeft: 10, width: 300 }}
                                    value={this.state.receiveAddress} onChange={Util.commonInputChange.bind(this, 'receiveAddress')}
                                    placeholder='请输入具体的地址，无需重复填写省市县乡信息' />


                            </div>
                        </div>
                    </div>

                </Card>

                <Card style={{ marginTop: 5 }} title={<span><span className='imformation-label-left'></span>家庭成员</span>} className='family-table'
                    extra={<div style={{ textAlign: 'right' }}>
                        <Button size='small' type='primary' onClick={this.addMersiom.bind(this)}>新增</Button>
                        {this.state.tableStatus == true ?
                            <Button size='small' type='primary' style={{ marginLeft: 10 }} onClick={this.cannelTable.bind(this)}>取消</Button> :
                            <Button size='small' type='primary' style={{ marginLeft: 10 }} onClick={this.editTable.bind(this)}>编辑</Button>}
                        <Button size='small' type='primary' style={{ marginLeft: 10 }} disabled={this.state.tableStatus == true ? false : true}
                            onClick={this.handleSaveInformation.bind(this)}>保存</Button>
                    </div>}>
                    <Table columns={this.familyColumns} style={{ textAlign: 'center' }}
                        dataSource={this.state.family}
                        scroll={{ y: 150 }}
                        pagination={false} bordered>

                    </Table>
                </Card>
                <Card style={{ marginTop: 5 }} title={<div>
                    {/* <div>签约医生：{!Util.isEmpty(this.state.signDocInfo) ? (this.state.signDocInfo.docDesc || '--') : '--'}
                        {!Util.isEmpty(this.state.signDocInfo) && this.state.signDocInfo.signDoctorID ? <Button size='small' type='primary' style={{ marginLeft: 10 }} disabled={Util.isEmpty(this.state.signRecordID)}
                            onClick={this.handleRescission.bind(this)}>解约</Button> : null}
                    </div> */}

                    <div><span className='imformation-label-left'></span>健康管理团队</div>
                </div>} className='doctor-table'
                    extra={<div style={{ textAlign: 'right' }}>
                        <Button size='small' type='primary' onClick={this.addSignDoctorList.bind(this)}
                            disabled={Util.isEmpty(this.state.signRecordID)}>新增</Button>

                    </div>}>
                    <Table columns={this.doctorColumns} style={{ textAlign: 'center' }}
                        dataSource={this.state.doctorList}
                        scroll={{ y: 150 }}
                        pagination={false} bordered>

                    </Table>
                </Card>
                <Card style={{ marginTop: 5 }} title={<span><span className='imformation-label-left'></span>签约记录</span>} className='health-table-body'>
                    <Table columns={this.signColumns} style={{ textAlign: 'center' }} className='health-customer'
                        dataSource={this.state.signList}
                        pagination={false} bordered scroll={{ y: 150 }}>

                    </Table>
                </Card>

                <Card style={{ marginTop: 5 }} title={<span><span className='imformation-label-left'></span>现存问题</span>}>
                    {!Util.isEmpty(this.state.problom) ? problomOption : <div style={{ marginLeft: 10, marginTop: 10 }}>暂无数据~</div>}
                </Card>
            </div>
        </div>
    }

}

export default InformationTabPane;