// 医院押金

import React from 'react';
import { Select, Input, Row, Col, Button, Spin, Divider, Popconfirm, message, Icon, Form, DatePicker, Table, Tabs, Modal, Card, Pagination } from 'antd';
import { $http } from 'containers/config/https';
import { Keup, ArraySome } from '../../../tools/index';
import PassWordModal from './component/PassWordModal'
import TipHeader from './component/TipHeader'
import './style/style.less'
import store from '../../../store';
import CommonPagination from 'components/pagination/index';
import ColumnAuthoritysModel from 'pages/columnAuthority/ColumnAuthoritysModel';
import ReadCard from '../../../components/readcard/ReadCard';
import moment from 'moment';
import RangeDatePicker from 'components/rangePicker/index';

// 组件const
const { Option } = Select;
const { RangePicker } = DatePicker;
const dateFormat = 'YYYY-MM-DD' || undefined;
const { Search } = Input;

export default class HospitalDeposit extends React.Component {

  constructor(props) {
    super(props)
    this.state = {
      userInfo: {}, // 用户数据
      patID: '',
      dataTableTop: [], // table数据 上列表table
      dataTable1: [], // table数据 主列表table
      cardTypeData: [], // 卡类型
      cardType: '', // 卡类型
      StartDate: undefined,  // //开始日期
      EndDate: undefined,  // //结束日期
      total: 0,
      page: 1,
      pageSize: 10,
      statusDesc: '',
      opBalance: '0',
      ipLockAccount: '0',
      blance: '0',
      admYJAmt: '0',
      admID: '',
      findFlag: '',
      payType: '',
      cardNo: '',
      patNo: '',
      cardType: '',
      modalShow: false,
      modalPayTitle: '身份验证',
      payButtonNum: 0,
      record: {},
      languageTable1: {}, // 国际化Table1
      languageTable2: {}, // 国际化Table2
      languageData: {}, // 国际化语言包
      language: {},   // 国际化语言
      languageCode: JSON.parse(window.sessionStorage.userData).language, // 国际化语言标识
      readModeI: true,
      readModeR: true,
    }

    /*this.columnsTop = [
        {
            title: '入院时间',
            dataIndex: 'admDateTime',
            key: '1',
            align: "center",
            width: 100,
        }, {
            title: '科室',
            dataIndex: 'admLocDesc',
            width: 100,
            key: '3',
            align: "center",
        }, {
            title: '诊断',
            dataIndex: 'dinose',
            key: '4',
            align: "center",
            width: 100,
        }, {
            title: '总费用',
            dataIndex: 'patBillPatAmt',
            key: '5',
            align: "center",
            width: 100,
        }, {
            title: '统筹金额',
            dataIndex: 'patBillTCAmt',
            key: '6',
            align: "center",
            width: 100,
        }, {
            title: '自费金额',
            dataIndex: 'patBillZFAmt',
            key: '7',
            align: "center",
            width: 100,
        }, {
            title: '预交金',
            dataIndex: 'accYJJPayAmt',
            key: '8',
            align: "center",
            width: 100,
        }, {
            title: '当前余额',
            dataIndex: 'leftAmt',
            key: '9',
            align: "center",
            width: 100,
        }, {
            title: '状态',
            dataIndex: 'admStatusDesc',
            key: '10',
            align: "center",
            width: 100,
        }
    ]

    // 挂号table
    this.columns1 = [{
        title: '类型',
        dataIndex: 'accDPaymentType',
        key: '11',
        align: "center",
        width: 100,
    }, {
        title: '流水号',
        dataIndex: 'accDPTradeNo',
        key: '13',
        align: "center",
        width: 100,
    }, {
        title: '操作时间',
        dataIndex: 'accDPPayDateTime',
        key: '14',
        align: "center",
        width: 100,
    }, {
        title: '金额',
        dataIndex: 'addAllPayAmt',
        key: '15',
        align: "center",
        width: 100,
    }, {
        title: '支付渠道',
        dataIndex: 'accDPPaywDesc',
        key: '16',
        align: "center",
        width: 100,
    }, {
        title: '操作员',
        dataIndex: 'accDPayUser',
        key: '18',
        align: "center",
        width: 100,
    }, {
        title: '备注',
        dataIndex: 'accDPRemark',
        key: '21',
        align: "center",
        width: 100,
    },]*/


  }

  componentDidMount() {
    this.tableList();
    this.tableList2();
    // 数据加载成功关闭loading
    //this.child.handleLoading()

    this.cardTypeList() //卡类型

  }

  // 获取上列表columns
  tableList = () => {
    var data = {
      params: [{
        "reactCode": ["HospitalDeposit"],
        "compontName": "HospitalDeposit",
        "type": "C"
      }]
    }
    $http.post('urlS', this, {
      code: '01040073',
      data: data,
      success: function (res) {
        if (+res.errorCode === 0) {
          let resC = res.result.C
          let { languageCode } = this.state
          for (var i = 0; i < resC.length; i++) {
            resC[i].key = i;
          }
          if (languageCode === "EN") {
            resC.map((item, i) => {
              item.title = item.enDescripts
            })
          }

          if (languageCode === "CN") {
            resC.map((item, i) => {
              item.title = item.descripts
            })
          }
          let arr = res.result && resC.length > 0 ? JSON.parse(JSON.stringify(resC)).map(item => {
            return {
              align: item.align,
              widthNum: parseInt(item.width),
              width: item.width,
              dataIndex: item.dataIndex,
              title: <div onDoubleClick={() => this.columnRef.onOpenModel()}>{item.title}</div>,
              display: item.display,
              key: item.seqNo
            }
          }) : '';
          let filterArr = arr.filter(function (item) { return item.display === 'Y' });
          this.setState({
            columns: filterArr,
            languageTable1: res.result.B || {},  // 国际化Table1
            languageTable2: res.result.C || {},  // 国际化Table2
            languageData: res.result.language || {},  // 国际化语言包
          }, () => {
            this.LanCNEN(this.state.languageCode)
          })
        }
      }
    })
  }

  // 获取主列表columns
  tableList2 = () => {
    var data = {
      params: [{
        "reactCode": ["HospitalDepositlist"],
        "compontName": "HospitalDepositlist",
        "type": "C"
      }]
    }
    $http.post('urlS', this, {
      code: '01040073',
      data: data,
      success: function (res) {
        if (+res.errorCode === 0) {
          let resC = res.result.C
          let { languageCode } = this.state
          for (var i = 0; i < resC.length; i++) {
            resC[i].key = i;
          }
          if (languageCode === "EN") {
            resC.map((item, i) => {
              item.title = item.enDescripts
            })
          }

          if (languageCode === "CN") {
            resC.map((item, i) => {
              item.title = item.descripts
            })
          }
          let arr = res.result && resC.length > 0 ? JSON.parse(JSON.stringify(resC)).map(item => {
            return {
              align: item.align,
              widthNum: parseInt(item.width),
              width: item.width,
              dataIndex: item.dataIndex,
              title: <div onDoubleClick={() => this.columnRef.onOpenModel()}>{item.title}</div>,
              display: item.display,
              key: item.seqNo
            }
          }) : '';
          let filterArr = arr.filter(function (item) { return item.display === 'Y' });
          this.setState({
            columns: filterArr,
            languageTable1: res.result.B || {},  // 国际化Table1
            languageTable2: res.result.C || {},  // 国际化Table2
            languageData: res.result.language || {},  // 国际化语言包
          })
        }
      }
    })
  }

  LanCNEN = (code) => {
    let { languageData } = this.state
    this.setState({
      language: languageData[code]
    })
  }

  //卡类型
  cardTypeList = () => {
    var data = {
      params: [{
        hospID: JSON.parse(window.sessionStorage.userData).hospID, //医院id 
      }]
    }

    $http.post('urlS', this, {
      code: "01040059",
      data: data,
      success: function (res) {
        let errorCode = res.errorCode;
        if (errorCode === '0') {
          let cardDeffault = res.cardType.filter((item) => {
            return item.defaultFlag === 'Y';
          })
          this.setState({
            cardType: cardDeffault[0].id, // 默认卡
            cardTypeData: res.cardType,  // 用户数据
          }, () => {
            this.CardTypeChange(this.state.cardType)
          });
        }
      }
    });
  }

  // 回车查询登记号
  patNodownE = (e, type) => {
    if (e.keyCode === 13) {
      this.searchUser(type)
    }
  }

  // 读卡 --- 根据卡号取病人信息
  handleReadCard = (value, event) => {
    let { readModeI, readModeR, cardType } = this.state
    if (event.keyCode) {
      if (readModeI) {
        this.searchUser('cardNo'); // 重新调用查询接口
      }
      return false
    }
    if (readModeR) {
      this.readCard.ReadCard(cardType, "R", (json) => {
        let patNo = json && json.patInfo ? json.patInfo.patNo : ''
        this.setState({ patNo , cardNo: json.cardNo }, () => {

          //this.searchUser('cardNo'); // 重新调用查询接口
          if (patNo)
					{
						this.searchUser('patNo'); // 重新调用查询接口
					}else{
						this.searchUser('cardNo'); // 重新调用查询接口
					}
        })
      })
    }

  }

  // // 回车读卡 --- 根据卡号取病人信息
  // handleReadCarddownE = (e, type) => {
  //     if (e.keyCode === 13) {

  //         this.searchUser('cardNo') // 读卡 --- 根据卡号取病人信息
  //     }
  // }


  // 读卡
  searchUser = (type) => {
    var data;
    let { cardType, cardNo, patNo, cardTypeData } = this.state
    if (!type) {   // 查询全部
      data = {
        params: [{
          "number": patNo || '', // 登记号/身份证号
          "cardTypeID": cardType,   //卡类型id
          "cardNo": cardNo,    //卡号
        }]
      }
    }

    if (type === 'patNo') {
      data = {
        params: [{
          "number": patNo || '', // 登记号/身份证号
          "cardTypeID": "",   //卡类型id
          "cardNo": "",    //卡号
        }]
      }

      if (patNo === '') {
        return false
      }
    }

    if (type === 'cardNo') {
      data = {
        params: [{
          "number": '', // 登记号/身份证号
          "cardTypeID": cardType || '',     //卡类型id
          "cardNo": cardNo || '', //卡号
        }]
      }

      if (cardNo === '') {
        return false
      }
      if (cardType === '') {
        message.error('请选择卡类型')
        return false
      }


      let cardTypeFilter = cardTypeData.filter(function (item) {
        return item.id == cardType;
      })

      let zeroLength = cardTypeFilter[0].cardLength

      if (zeroLength && zeroLength != '' && parseFloat(zeroLength) != 0) {
        this.setState({
          cardNo: ArraySome.addPreZero(cardNo, zeroLength)
        })
        data = {
          params: [{
            "number": '', // 登记号/身份证号
            "cardTypeID": cardType || '',     //卡类型id
            "cardNo": ArraySome.addPreZero(cardNo, zeroLength) || '', //卡号
          }]
        }
      }
    }



    $http.post('urlS', this, {
      code: "03040004",
      data: data,
      success: function (res) {
        let errorCode = res.errorCode;
        if (errorCode === '0') {

          this.setState({
            userInfo: res.data || [],  // 用户数据
            patNo: res.data.patNo || '',  // ID
            patID: res.data.patID || '',  // ID
            accmanID: res.data.accTSubID.split('||')[0],//账户ID
          }, () => {
            this.dataTableTopDataLeft() // 就诊信息
          });

        }
      }
    });
  }

  dataTableTopDataLeft = () => {
    var data = {
      params: [{
        "patID": this.state.patID,
        "hospID": JSON.parse(window.sessionStorage.userData).hospID, //医院id 
      }]
    }

    $http.post('urlS', this, {
      code: "05210030",
      data: data,
      success: function (res) {
        let errorCode = res.errorCode;
        if (errorCode === '0') {

          this.setState({
            dataTableTop: res.data || [],  // 用户数据
          });

        }
      }
    });

  }

  dataTableTopDataRight = () => {

    var data = {
      params: [{
        "admID": this.state.admID,
        "hospID": JSON.parse(window.sessionStorage.userData).hospID, //医院id 
      }]
    }

    $http.post('urlS', this, {
      code: "05300001",
      data: data,
      success: function (res) {
        let errorCode = res.errorCode;
        if (errorCode === '0') {

          this.setState({
            statusDesc: res.statusDesc,
            opBalance: res.opBalance,
            ipLockAccount: res.ipLockAccount,
            blance: res.blance,
            admYJAmt: res.admYJAmt,
          });

        }
      }
    });

  }

  dataTableTopDataBottom = () => {
    let { pageSize, page } = this.state
    var data = {
      params: [{
        "admID": this.state.admID,
        "hospID": JSON.parse(window.sessionStorage.userData).hospID, //医院id 
        stDate: this.state.StartDate,
        endDate: this.state.EndDate,
        oprateType: this.state.findFlag,
      }],
      pagination: [{
        pageSize: pageSize,
        currentPage: page,
      }]
    }

    $http.post('urlS', this, {
      code: "05300002",
      data: data,
      success: function (res) {
        let errorCode = res.errorCode;
        if (errorCode === '0') {

          this.setState({
            dataTable1: res.data,
          });

        }
      }
    });

  }


  // 操作行
  onClickRowPublicTop = (record) => {
    this.setState({ admID: record.admID, record: record }, () => {
      this.dataTableTopDataRight()
      this.dataTableTopDataBottom()
    })
  }

  // 选中行操作
  setRowClassNamePublicTop = (record) => {
    return record.admID === this.state.admID ? 'clickRowStyle' : '';
  }

  // 操作行
  onClickRowPublic1 = (record) => {
    return {
      // 单击行选中
      onClick: () => {
        this.setState({ ordID: record.ordID }, () => {

        })

      }
    }
  }

  // 选中行操作
  setRowClassNamePublic1 = (record) => {
    return record.ordID === this.state.ordID ? 'clickRowStyle' : '';
  }




  // 查询条件 --- 登记号
  patNo = (e) => {
    this.setState({ patNo: e.target.value });
  }


  // 查询条件 --- 卡类型·
  cardType = (e) => {
    this.setState({ cardType: e }, () => {
      this.CardTypeChange(e)
    });
  }
  // 查询条件 --- 卡号
  cardNo = (e) => {
    let { readModeI } = this.state
    if (!readModeI) {
      return false
    }
    this.setState({ cardNo: e.target.value });
  }

  // Card
  CardTypeChange = (e) => {
    if (!e) {
      return false
    }
    let { cardTypeData } = this.state
    let readMode = cardTypeData.filter((item, i) => {
      return item.id == e;
    })

    switch (readMode[0] && readMode[0].readMode) {
      // 只可input
      case 'I':
        this.setState({
          readModeI: true,
          readModeR: false,
          cardNo: "",

        })
        break;
      // 只可读卡
      case 'R':
        this.setState({
          readModeR: true,
          readModeI: false,
          cardNo: "",
        })
        break;
      // 皆可
      default:
        this.setState({
          readModeI: true,
          readModeR: true,
          cardNo: "",
        })
        break;
    }

  }

  // 查询条件 --- 类型
  payType = (e) => {
    this.setState({ payType: e });
  }

  // 调用公共组件的连接事件
  onRef = (ref) => {
    this.child = ref
  }

  onRef2 = (ref) => {
    this.child2 = ref
  }
  onColumnRef = (ref) => {
    this.columnRef = ref;
  }
  // 显示分页总条数
  showTotal(total) {
    return `共 ${total} 条`;
  }


  // 页码改变的回调，参数是改变后的页码及每页条数
  appPageChange = (page, pageSize) => {
    this.setState({
      page: page,
      pageSize: pageSize,
    }, () => {
      // 重新调用查询方法
      this.dataTableTopDataBottom();
    });
  }

  // 条数改变的回调
  apponShowSizeChange = (current, size) => {
    this.setState({
      page: current,
      pageSize: size,
    }, () => {
      // 重新调用查询方法
      this.dataTableTopDataBottom();
    });
  }

  // 时间
  onChangeTime = (date, dateString) => {
    this.setState({
      StartDate: dateString[0],    //开始日期
      EndDate: dateString[1],  //结束日期
    })

  }

  startChange(date) {
    this.setState({
      StartDate: date,
    })
  }

  endChange(date) {
    this.setState({
      EndDate: date,
    })
  }


  // 查询条件 --- 操作类型
  doType = (e) => {
    this.setState({ findFlag: e })

  }

  // 清空
  clearnFile = () => {
    this.setState({
      userInfo: {}, // 用户数据
      dataTableTop: [], // table数据 上列表table
      dataTable1: [], // table数据 主列表table
      StartDate: undefined,  // //开始日期
      EndDate: undefined,  // //结束日期
      total: 0,
      page: 1,
      pageSize: 10,
      statusDesc: '',
      opBalance: '0',
      ipLockAccount: '0',
      blance: '0',
      admYJAmt: '0',
      admID: '',
      findFlag: '',
      payType: '',
      cardNo: '',
      patNo: '',
      cardType: '',
      patID: '',
      modalShow: false,
      modalPayTitle: '身份验证',
      payButtonNum: 0,
      readModeI: true,
      readModeR: true,
    })

  }


  //  充值退款

  //弹框打开
  modal = (type) => {
    if (!this.state.patID || this.state.patID === '') {
      message.error('无病人数据')
      return false
    }
    if (!this.state.admID || this.state.admID === '') {
      message.error('请选择一条数据')
      return false
    }
    this.setState({
      modalShow: true,
      payButtonNum: 0,
      modalPayTitle: '身份验证',
      modalType: type
    })
  }

  payButtonOk = () => {
    let { modalType, modalPayTitle } = this.state
    switch (modalType) {
      case '0':
        modalPayTitle = '充值'
        break;
      case '1':
        modalPayTitle = '请确认病人身份，选择设置类型'
        break;
      case '2':
        modalPayTitle = '补打凭条'
        break;
      case '3':
        modalPayTitle = '设置退款金额'
        break;
      case '4':
        modalPayTitle = '确认取消冻结'
        break;
      default:
        break;
    }
    this.setState({
      modalPayTitle: modalPayTitle,
    })
    this.child2.payButtonOk()
  }

  handleCancel = () => {
    this.setState({
      modalShow: false,
    })
  }
  handOk = () => {
    this.handleCancel()
    this.dataTableTopDataLeft()
    this.dataTableTopDataBottom()
  }
  render() {
    let { language } = this.state
    return (
      <div>
        <ReadCard ref={r => this.readCard = r} />
        <div >
          <TipHeader userInfo={this.state.userInfo} key={this.state.userInfo.patID + this.state.userInfo.accTSubID} />
        </div>
        <div className="table-operations">
          <Row style={{ minHeight: '80px', padding: '0 24px 24px 24px' }}>
            <Col span={24}>
              <Select allowClear style={{ width: '100px', margin: '23px 15px 0 0' }} placeholder="请选择卡类型" value={this.state.cardType} onChange={(event) => { this.cardType(event) }}  >
                <Option value=''>请选择</Option>
                {this.state.cardTypeData.map(item => <Option title={item.descripts + '^' + item.descriptsSPCode} key={item.id} value={item.id}  >{item.descripts}</Option>)}
              </Select>
              <Search className={`search ${!this.state.readModeI ? 'disabled' : ''}`} style={{ width: '260px', margin: '23px 15px 0 0' }} allowClear placeholder="请输入卡号" disabled={this.state.disabledInput} value={this.state.cardNo} enterButton={language.HospitalDepositdk && language.HospitalDepositdk.descripts} onChange={(event) => { this.cardNo(event) }} onSearch={this.handleReadCard} /> {/* onKeyUp={(e) => { this.handleReadCarddownE(e, 'cardNo'); }}*/}
              {/* <Input allowClear style={{ width: '200px', margin: '23px 15px 0 0' }} placeholder="请输入卡号" className='input' value={this.state.cardNo} onChange={(event) => { this.cardNo(event) }} onKeyUp={(e) => { this.patNodownE(e, 'cardNo'); }} />
                            <Button style={{ background: 'rgba(66,185,131,1)', color: '#fff', margin: '23px 15px 0 0' }} onClick={() => { this.searchUser('cardNo') }}>读卡</Button> */}
              <Input allowClear style={{ width: '200px', margin: '23px 15px 0 0' }} placeholder="输入病人id/证件号码回车查询" className='input' value={this.state.patNo} onChange={(event) => { this.patNo(event) }} onKeyUp={(e) => { this.patNodownE(e, 'patNo'); }} />
              <Input allowClear style={{ width: '200px', margin: '23px 15px 0 0' }} placeholder="输入病人住院号回车查询" className='input' value={this.state.patNo} onChange={(event) => { this.patNo(event) }} onKeyUp={(e) => { this.patNodownE(e, 'patNo'); }} />
              <Select allowClear style={{ width: '100px', margin: '23px 15px 0 0' }} placeholder="住院" value={this.state.payType} onChange={(event) => { this.payType(event) }}  >
                <Option value=''>请选择</Option>
                <Option value='0'>住院</Option>
                <Option value='1'>退款</Option>
              </Select>
              <span className='spanHref'>{language.HospitalDepositsm && language.HospitalDepositsm.descripts}</span>
            </Col>
          </Row>
        </div>
        <Row>
          <div style={{ padding: '0 10px 10px 10px' }}>
            <Col span={18}>
              <Table
                style={{ height: '200px' }}
                dataSource={this.state.dataTableTop}
                columns={this.state.columns}
                className='TableA'
                //rowClassName="editable-row"
                pagination={false}
                scroll={{ x: 900, y: store.getState().tableHeight.y }}
                bordered
                loading={this.state.loading}
                onRow={(record) => {
                  return {
                    onClick: (event) => {
                      this.onClickRowPublicTop(record)
                    },
                  };
                }}
                rowClassName={(record) => this.setRowClassNamePublicTop(record)}
              />
              <ColumnAuthoritysModel
                clientWidth='900px'
                compontName='HospitalDeposit'
                configType="C"
                onRef={this.onColumnRef}
                reloadData={this.tableList}
              />
            </Col>

            <Col span={6} >
              <Card style={{ width: '100%', height: '214px', boxSizing: 'border-box', padding: '20px' }} className='pd0' >
                <Row>
                  <Col span={24}>
                    <p>{language.HospitalDepositzhzt && language.HospitalDepositzhzt.descripts}：<span style={{ color: '#666666' }}>{this.state.statusDesc}</span></p>
                  </Col>
                  <Col span={12}>
                    <p>{language.HospitalDepositkyyjj && language.HospitalDepositkyyjj.descripts}：<span style={{ color: '#666666' }}>{this.state.opBalance}</span></p>
                  </Col>
                  <Col span={12}>
                    <p>{language.HospitalDepositzysyj && language.HospitalDepositzysyj.descripts}：<span style={{ color: '#666666' }}>{this.state.ipLockAccount}</span></p>
                  </Col>
                  <Col span={12}>
                    <p>{language.HospitalDeposityjjze && language.HospitalDeposityjjze.descripts}：<span style={{ color: '#666666' }}>{this.state.blance}</span></p>
                  </Col>
                  <Col span={12}>
                    <p>{language.HospitalDepositjzyj && language.HospitalDepositjzyj.descripts}：<span style={{ color: '#666666' }}>{this.state.admYJAmt}</span></p>
                  </Col>
                </Row>
              </Card>
            </Col>
          </div>
        </Row>
        <div>
          <Row style={{ minHeight: '80px', padding: '24px 0' }} >
            <Col span={24}>
              <div style={{ float: 'left', marginLeft: '20px' }}>
                {/* 操作日期 <RangePicker allowClear style={{ width: '200px', margin: '0 15px 0 0' }}
                                    value={this.state.StartDate === undefined || this.state.EndDate === undefined || this.state.StartDate === "" || this.state.EndDate === "" ? null : [moment(this.state.StartDate, dateFormat), moment(this.state.EndDate, dateFormat)]}
                                    onChange={this.onChangeTime} /> */}
                <span style={{ display: 'inline-block', margin: '0 15px 0 0' }}><RangeDatePicker label={language.HospitalDepositczrq && language.HospitalDepositczrq.descripts} format='YYYY-MM-DD' width={260}
                  startChange={this.startChange.bind(this)} endChange={this.endChange.bind(this)} /></span>
                <Select allowClear style={{ width: '100px', margin: '0 15px 0 0' }} placeholder="请选择操作类型" value={this.state.findFlag} onChange={(event) => { this.doType(event) }}  >
                  <Option value=''>请选择</Option>
                  <Option value='1'>消费</Option>
                  <Option value='2'>退费</Option>
                  <Option value='3'>充值</Option>

                </Select>
                <Button style={{ margin: '0 15px 0 0', background: 'rgba(255,255,255,1)' }} onClick={this.dataTableTopDataBottom}>{language.HospitalDepositcx && language.HospitalDepositcx.descripts}</Button>
              </div>
              <div style={{ float: 'right' }}>
                <Button onClick={() => this.modal('0')} style={{ float: 'left', border: 'none', marginLeft: ' 20px', }}><i className="f1"></i>{language.HospitalDepositcz && language.HospitalDepositcz.descripts}</Button>
                <Button onClick={() => { this.clearnFile() }} style={{ float: 'left', border: 'none', marginLeft: ' 20px', }}><i className="clearn"></i>{language.HospitalDepositqk && language.HospitalDepositqk.descripts}</Button>
                <Button onClick={() => this.modal('1')} style={{ float: 'left', border: 'none', marginLeft: ' 20px', }}>{language.HospitalDepositmmsz && language.HospitalDepositmmsz.descripts}</Button>
                <Button onClick={() => this.modal('3')} style={{ float: 'left', border: 'none', marginLeft: ' 20px', }}><i className="money1"></i>{language.HospitalDeposittk && language.HospitalDeposittk.descripts}</Button>
                <Button onClick={() => this.modal('4')} style={{ float: 'left', border: 'none', marginLeft: ' 20px', }} >{language.HospitalDepositdjzh && language.HospitalDepositdjzh.descripts}</Button>
              </div>
            </Col>

          </Row>
          <Row style={{ padding: '0 24px 24px 24px' }}>
            <Col span={24}>
              <div>
                <Table
                  style={{ height: '398px' }}
                  dataSource={this.state.dataTable1}
                  columns={this.state.columns}
                  className='TableA'
                  //rowClassName="editable-row"
                  pagination={false}
                  scroll={{ x: 900, y: store.getState().tableHeight.y }}
                  bordered
                  loading={this.state.loading}
                />
                <CommonPagination size="small" current={this.state.page} total={this.state.total} search='search'
                  onShowSizeChange={this.apponShowSizeChange} complete={true} dataSource={this.state.dataTable1}
                  onChange={this.appPageChange} />
                <ColumnAuthoritysModel
                  clientWidth='900px'
                  compontName='HospitalDepositlist'
                  configType="C"
                  onRef={this.onColumnRef}
                  reloadData={this.tableList2}
                />
              </div>
            </Col>

          </Row>
          <Modal
            visible={this.state.modalShow}
            title={this.state.modalPayTitle}
            onCancel={this.handleCancel}
            onOk={this.payButtonOk}
            className='modalPay'
            width={this.state.modalWidth}
          >
            <PassWordModal onRef={this.onRef2} record={this.state.record} modalType={this.state.modalType} payButtonNum={this.state.payButtonNum} patID={this.state.patID} accmanID={this.state.accmanID} userInfo={this.state.userInfo} key={this.state.modalType} handOk={this.handOk} />
          </Modal>

        </div>

      </div >
    )
  }
}