import React, { Component, Fragment } from 'react'
import {
	Page, Validator, Notification, FormItem, BottomBtn,
	InputItem, Input, Bind, SelectItem, Button, Label, DatePickerItem, Section, Table, TextArea,ConfirmButton,Steps
} from '@/components/Common-Library'
import Api from '@/service/api'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable } from 'mobx'
import { Row, Col, Popconfirm, Modal } from 'antd';
import {ButtonModal,ModalTest} from '@/components/Business-Library'
import {Link,withRouter} from 'react-router-dom'
import Business from '@/views/Public/Business'

const {Pre,Next,StepWrapper} = Steps
const CodeTable = CodeTableFactory.getInstance()
const confirm = Modal.confirm

@withRouter
@inject('UserContext')
@inject('i18n')
@observer
export default class Cmt100Screen extends Page {
	@observable
	formBlur = false
		
	constructor(props) {
		super(props)
		this.model = props.model
		this.bind = Bind.bind(this)
	}
	
	async componentWillMount() {	
	}
	
	componentWillUnmount() {
		//this.model.closeValidate()//关闭校验
	}
	
	// 退出按钮
	onRtn = async () => {
		this.com.wrappedInstance.wrappedInstance.onRtn();
	}
	// 暂存按钮
	onPed = async () => {
		 this.com.wrappedInstance.wrappedInstance.onPed();
	}
	// 校验 按钮
	onChk = () => {
		this.com.wrappedInstance.wrappedInstance.onChk();
	}
	
	//交易内实现
	renderPage() {
		const bind = this.bind
		const { i18n } = this.props
		
		return (
			<div style={{ position: 'relative' }}>
			 <Business  wrappedComponentRef={ref => (this.com = ref)}  steps={this.props.steps}  extra={this.props.extra}  model={this.model} />	
			<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label value="大额支付类型" />
							</Col>
							<Col span={14}>
							    	<SelectItem InputProps={bind("msgmod_buscod")} code={CodeTable.buscod}  desp="大额支付类型" path="/setmod/msgmod/buscod"/>
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label value="收款人开户行联行行号" />
							</Col>
							<Col span={14}>
							    		<InputItem InputProps={bind("pts4_ref")}  maxLength={16}  desp="参考号" path="/setmod/msgmod/pyb/pts/ref" />
							</Col>
						</Row>
					</Col>
				</Row>
				
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
									<Label value="业务种类" />
							</Col>
							<Col span={14}>
									<SelectItem InputProps={bind("msgmod_bustyp")} code={CodeTable.bustyp}  desp="业务种类" path="/setmod/msgmod/bustyp"/>
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label value="收款人开户行名称" />
							</Col>
							<Col span={14}>
							    	<InputItem InputProps={bind("pts4_namcn")}  maxLength={60}  desp="客户中文名称" path="/setmod/msgmod/pyb/pts/namcn" />
							</Col>
						</Row>
					</Col>
				</Row>
				
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
									<Label value="收款人名称" />
							</Col>
							<Col span={14}>
								<InputItem InputProps={bind("pts5_namcn")}  maxLength={60}  desp="客户中文名称" path="/setmod/msgmod/pye/pts/namcn" />
                           </Col>
						</Row>
					</Col>
					
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
									<Label value="费用承担方" />
							</Col>
							<Col span={14}>
							<SelectItem InputProps={bind("msgmod_chato")} code={CodeTable.chato}  desp="费用承担方" path="/setmod/msgmod/chato"/>
							</Col>
						</Row>
					</Col>
					
					
				</Row>
				
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								{/* 汇款类型 */}
								<Label value="收款人地址" />
							</Col>
							<Col span={14}>
							   	<TextArea InputProps={bind("pts5_adrcn")} rows={4} style={{resize:"none"}} desp="中文地址" path="/setmod/msgmod/pye/pts/adrcn"/>
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label value="发报行收费" />
							</Col>
							<Col span={14}>
								<InputItem InputProps={bind("msgmod_sndfee")}   desp="发报行收费" path="/setmod/msgmod/sndfee" />
							</Col>
						</Row>
					</Col>
				</Row>
				
					
	
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
									<Label value="收款人账号" />
							</Col>
							<Col span={14}>
							<InputItem InputProps={bind("pts5_extact")}  maxLength={32}  desp="结算账号" path="/setmod/msgmod/pye/pts/extact" />
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
									<Label value="收报行收费" />
							</Col>
							<Col span={14}>
							<InputItem InputProps={bind("msgmod_rcvfee")}   desp="收报行收费" path="/setmod/msgmod/rcvfee" />
							</Col>
						</Row>
					</Col>
				</Row>
				
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label value="附言" />
							</Col>
							<Col span={14}>
								<TextArea rows={4} style={{resize:"none"}} InputProps={bind("msgmod_commet")} desp="附言" path="/setmod/msgmod/commet"/>
							</Col>
						</Row>
					</Col>
				</Row>
				
				<br />
				{/* 底部按钮 */}
        <BottomBtn _this={this} />
			</div >
		)
	}
}
