Commit c8b0d3ea by YuMengShuai

出口保函开例

parent 41901fc4
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page, Validator, Notification, BottomBtn,FormItem, DatePickerItem, TextAreaItem, CheckboxItem, Checkbox,
InputItem, Input, Bind, SelectItem, Button, Label, Image, Table} from '@/components/Common-Library'
import Api from '@/service/api'
import Business from '@/views/Public/Business'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable,runInAction } from 'mobx'
import { Row, Col } from 'antd'
import Ptspta2 from '@/views/Public/Ptspta2'
const CodeTable = CodeTableFactory.getInstance()
@inject('UserContext')
@inject('i18n')
@observer
export default class GetopnScreen extends Page
{
static childContextTypes = {
trn: PropTypes.string,
}
getChildContext () {
return {trn:'getopn'}
}
@observable
formBlur=false
constructor(props)
{
super(props)
this.model = props.model
this.bind = Bind.bind(this)
}
async componentWillMount()
{
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('getopn/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
runInAction(()=>{
Object.assign(this.model,data)
})
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
//交易内实现
renderPage(){
const bind = this.bind
const {i18n} = this.props
return (
<div className="transPage">
<Business wrappedComponentRef={ref => (this.com = ref)} extra={this.props.extra} model={this.model} />
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Confirming Bank's Ref. " trn="getopn" />
</Col>
<Col span={14} >
<InputItem InputProps={bind("pts3_ref")} maxLength={16} desp="参考号" path="/gidgrp/con/pts/ref" />
</Col>
</Row>
<Row className='row'>
<Col >
<Ptspta2 model={this.model} argArr={{ desc: "客户编号",desc1:"SWIFT地址",prefix: 'pts3', url: 'getopn/conp_sel', flg: 'B', datakey: '\\gitp\\conp\\ptslst' }} formBlur={this.formBlur}/>
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Confirming Bank's Ref. " trn="getopn" />
</Col>
<Col span={14} >
<InputItem InputProps={bind("pts4_ref")} maxLength={16} desp="参考号" path="/gidgrp/iss/pts/ref" />
</Col>
</Row>
<Row className="row">
<Col >
<Ptspta2 model={this.model} argArr={{ desc: "客户编号",desc1:"SWIFT地址",prefix: 'pts4', url: 'getopn/issp_sel', flg: 'B', datakey: '\\gitp\\issp\\ptslst' }} formBlur={this.formBlur}/>
</Col>
</Row>
</Col>
</Row>
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Guarantee Text" trn="getopn" />
</Col>
<Col span={14} >
<TextAreaItem rows={2} InputProps={bind("blk_gidtxt")} desp="Guarantee Text" path="/gidgrp/blk/gidtxt" />
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Modify Guarantee Text" trn="getopn" />
</Col>
<Col span={1} >
<CheckboxItem InputProps={bind("gitp_gidtxtmodflg")} desp="Modify Guarantee Text" path="/gitp/gidtxtmodflg" />
</Col>
</Row>
</Col>
</Row>
{/* 底部按钮 */}
<BottomBtn _this={this} />
</div>
)
}
}
\ No newline at end of file
import React,{Component,Fragment} from 'react'
import PropTypes from 'prop-types'
import {Page, Validator, Notification, BottomBtn,FormItem, DatePickerItem, TextAreaItem, CheckboxItem, Checkbox,
InputItem, Input, Bind, SelectItem, Button, Label, Image, Table} from '@/components/Common-Library'
import Api from '@/service/api'
import Business from '@/views/Public/Business'
import CodeTableFactory from '@/components/CodeTable'
import "./index.less"
import { inject, observer } from 'mobx-react'
import { action, observable,runInAction } from 'mobx'
import { Row, Col } from 'antd'
const CodeTable = CodeTableFactory.getInstance()
@inject('UserContext')
@inject('i18n')
@observer
export default class GetopnScreen extends Page
{
static childContextTypes = {
trn: PropTypes.string,
}
getChildContext () {
return {trn:'getopn'}
}
@observable
formBlur=false
constructor(props)
{
super(props)
this.model = props.model
this.bind = Bind.bind(this)
}
async componentWillMount()
{
/*
*添加初始化代码
*/
const rtnmsg = await Api.post('getopn/init',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
const {data} = rtnmsg
runInAction(()=>{
Object.assign(this.model,data)
})
}
//快照模式下,不必开启校验,否则,静默校验,和记录变动
!this.loadDisplay() && this.model.openMonitor && this.model.openMonitor() //开启校验
}
componentWillUnmount()
{
this.model.stopMonitor&&this.model.stopMonitor()//关闭校验
}
onConp_sel= ()=>{
this.formBlur=true //已触发表单提交处理
Validator.validate(this.model,this.model.descriptor,async(errors,values)=>{
if(errors)
return
const rtnmsg = await Api.post('getopn/conp_sel',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
Notification.success({message:'数据提交成功!'})
}
else
{
Notification.error({message:'服务端请求失败!'})
}
//余下逻辑处理
})
}
onIssp_sel= ()=>{
this.formBlur=true //已触发表单提交处理
Validator.validate(this.model,this.model.descriptor,async(errors,values)=>{
if(errors)
return
const rtnmsg = await Api.post('getopn/issp_sel',{data:this.model})
if(rtnmsg.retcod == SUCCESS)
{
Notification.success({message:'数据提交成功!'})
}
else
{
Notification.error({message:'服务端请求失败!'})
}
//余下逻辑处理
})
}
//交易内实现
renderPage(){
const bind = this.bind
const {i18n} = this.props
return (
<div className="transPage">
<Business wrappedComponentRef={ref => (this.com = ref)} extra={this.props.extra} model={this.model} />
<Row>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Confirming Bank's Ref. " trn="getopn" />
</Col>
<Col span={14} >
<InputItem InputProps={bind("pts3_ref")} maxLength={16} desp="参考号" path="/gidgrp/con/pts/ref" />
</Col>
</Row>
<Row className='row'>
<Col span={11} offset={7} >
<InputItem InputProps={bind("pts3_extkey")} maxLength={16} desp="客户编号" path="/gidgrp/con/pts/extkey" />
</Col>
<Col span={2} offset={1} >
<Button type="primary" icon="search" onClick={this.onConp_sel} desp="查询" path="/gitp/conp/sel">
<Label itext="查询" />
</Button>
</Col>
</Row>
<Row className='row'>
<Col span={11} offset={7}>
<TextAreaItem InputProps={bind("pts3_adrblk")} desp="SWIFT地址" path="/gidgrp/con/pts/adrblk"/>
</Col>
</Row>
</Col>
<Col span={12}>
<Row className="row">
<Col span={5} offset={2}>
<Label itext="Confirming Bank's Ref. " trn="getopn" />
</Col>
<Col span={14} >
<InputItem InputProps={bind("pts4_ref")} maxLength={16} desp="参考号" path="/gidgrp/iss/pts/ref" />
</Col>
</Row>
<Row className="row">
<Col span={11} offset={7}>
<InputItem InputProps={bind("pts4_extkey")} maxLength={16} desp="客户编号" path="/gidgrp/iss/pts/extkey" />
</Col>
<Col span={2} offset={1}>
<Button type="primary" icon="search" onClick={this.onIssp_sel} desp="查询" path="/gitp/issp/sel">
<Label itext="查询" />
</Button>
</Col>
</Row>
<Row className="row">
<Col span={11} offset={7}>
<TextAreaItem InputProps={bind("pts4_adrblk")} desp="SWIFT地址" path="/gidgrp/iss/pts/adrblk"/>
</Col>
</Row>
</Col>
</Row>
{/* 底部按钮 */}
<BottomBtn _this={this} />
</div>
)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment