/***
 * 
 * 第一个 
 * 
***/

import React, { Component, Fragment } from 'react'
import {
	Page, Validator, Notification, FormItem, BottomBtn,
	InputItem, Input, Bind, SelectItem, Button, Label, DatePickerItem, Section, 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 ,Spin} from 'antd';
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 OvwpScreen extends Page {
	@observable
	formBlur = false

	constructor(props) {
		super(props)
		this.model = props.model
    this.bind = Bind.bind(this)
	}

	//交易内实现
	renderPage() {
		const bind = this.bind
		const { i18n } = this.props
		const { bchlevelLst } = this.props.extra
		//const {next,pre} = this.props.steps
		if(this.props.flag==true){
			return <Spin style={{width:"100%", justifyContent:"center"}} spinning={this.props.flag} />
		}
		return (
			<div style={{ position: 'relative' }}>
         <Business  wrappedComponentRef={ref => (this.com = ref)} page={this} steps={this.props.steps} extra={this.props.extra}  model={this.model} />
				{/* 第一行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="寄单索款编号" trn="bmtset" />
							</Col>
							<Col span={14}>
                <InputItem InputProps={bind("ownref")}  maxLength={16}  desp="Own Reference BE Number" path="/bmdgrp/rec/ownref"  disabled={true} />
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="概要描述" trn="bmtset" />
							</Col>
							<Col span={14}>
                <InputItem InputProps={bind("nam")}  maxLength={20}  desp="到单编号" path="/bmdgrp/rec/docref"  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第二行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="单据金额" trn="bmtset" />
							</Col>
							<Col span={6}>
                <SelectItem InputProps={bind("max_cur")} code={CodeTable.curtxt}  desp="Currency" path="/bmdgrp/cbs/max/cur"  disabled={true}/>
							</Col>
							<Col span={7} offset={1}>
								<InputItem   InputProps={ {...bind("max_amt"), type:"amount", cur:this.model.max_cur} } disabled={true} />
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="申请人" trn="bmtset" />
							</Col>
							<Col span={14}>
                <InputItem InputProps={bind("pts14_namcn")}  maxLength={100}  desp="客户中文名称" path="/dedgrp/apl/pts/namcn"  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第三行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="单据余额" trn="bmtset" />
							</Col>
							<Col span={6}>
                <SelectItem InputProps={bind("opn1_cur")} code={CodeTable.curtxt}  desp="Currency" path="/bmdgrp/cbs/opn1/cur"  disabled={true}/>
							</Col>
              <Col span={7} offset={1}>
								<InputItem   InputProps={ {...bind("opn1_amt"), type:"amount", cur:this.model.opn1_cur} } disabled={true} />
              </Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="受益人" trn="bmtset" />
							</Col>
							<Col span={14}>
                <InputItem InputProps={bind("pts15_namcn")}  maxLength={100}  desp="客户中文名称" path="/dedgrp/ben/pts/namcn"  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第四行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="单据类型" trn="bmtset" />
							</Col>
							<Col span={14}>
                <SelectItem InputProps={bind("doctypcod")} code={CodeTable.doc}  desp="Document Type" path="/bmdgrp/rec/doctypcod"  disabled={true}/>
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="开证行" trn="bmtset" />	
							</Col>
							<Col span={14}>
								<InputItem InputProps={bind("pts16_namcn")}  maxLength={100}  desp="客户中文名称" path="/dedgrp/iss/pts/namcn"  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第五行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="单据期限" trn="bmtset" />
							</Col>
							<Col span={14}>
                <DatePickerItem InputProps={bind("matdat")}  desp="Maturity Date" path="/bmdgrp/rec/matdat"  disabled={true} />
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="单据状态" trn="bmtset" />
							</Col>
							<Col span={14}>
                <InputItem InputProps={bind("docsta")}  maxLength={40}  desp="Document Set Status" path="/bmdgrp/rec/docsta"  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第六行 */}
				<Row>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="寄单日期" trn="bmtset" />
							</Col>
							<Col span={14}>
                <DatePickerItem InputProps={bind("predat")}  disabled={true} />
							</Col>
						</Row>
					</Col>
					<Col span={12}>
						<Row className="row">
							<Col span={5} offset={2}>
								<Label itext="承兑到期日" trn="bmtset" />
							</Col>
							<Col span={14}>
                <DatePickerItem InputProps={bind("accdat")}  disabled={true} />
							</Col>
						</Row>
					</Col>
				</Row>

				{/**第七行 */}
				<Row>
					<Col span={12}>
						<Col span={24}>
							<Row className="row">
								<Col span={5} offset={2}>
									<Label itext="付款金额" trn="bmtset" />
								</Col>
								<Col span={6}>
									<SelectItem InputProps={bind("setmod_doccur")} code={CodeTable.curtxt}  disabled={true} desp="document currency" path="/setmod/doccur"/>
								</Col>
								<Col span={7} offset={1}>
									<InputItem   InputProps={ {...bind("setmod_docamt"), type:"amount", cur:this.model.setmod_doccur} } />
								</Col>
							</Row>
						</Col>
						<Col span={24}>
							<Row className="row">
								<Col span={5} offset={2}>
									<Label itext="扣款金额" trn="bmtset" />
								</Col>
								<Col span={6}>
									<SelectItem InputProps={bind("setmod_doccur")} code={CodeTable.curtxt}  disabled={true} desp="document currency" path="/setmod/doccur"/>
								</Col>
								<Col span={7} offset={1}>
									<InputItem   InputProps={ {...bind("setmod_redamt"), type:"amount", cur:this.model.setmod_doccur} } />
								</Col>
							</Row>
						</Col>
						<Col span={24}>
							<Row className="row">
								<Col span={5} offset={2}>
									<Label itext="收款金额" trn="bmtset" />
								</Col>
								<Col span={6}>
									<SelectItem InputProps={bind("setmod_doccur")} code={CodeTable.curtxt} disabled={true}  desp="document currency" path="/setmod/doccur"/>
								</Col>
								<Col span={7} offset={1}>
									<InputItem   InputProps={ {...bind("rcvamt"), type:"amount", cur:this.model.setmod_doccur} } />
								</Col>
							</Row>
						</Col>
					</Col>
					<Col span={12}>
						
					</Col>
				</Row>

			
				{/* 底部按钮 */}
        <BottomBtn _this={this} />
			</div >
		)
	}
}
