Commit 8f7668e7 by gq777

'update'

parent 8bc2bb5d
import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
const FormItem = Form.Item;
export default class T40B extends Component {
name = '40B'
desp = "Form of Documentary Credit"
pattern = "24x 24x"
tno = -1
keys = [1, 2]
onChange = (index, value) => {
let obj = {};
if (!value)
value = ""
let objtemp = this.props.value
objtemp = objtemp && objtemp.length ? objtemp[0] : {}
objtemp["s" + index] = value;
this.keys.forEach(i => {
obj['s' + i] = objtemp['s' + i]
});
let mval = `${obj.s1}\r\n${obj.s2}`
this.props.onValue([obj, mval])
}
render() {
let value = this.props.value
let mval = value && value.length ? value[1] : ''
let errmsg = value && value.length == 3 ? value[2] : {}
value = value && value.length ? value[0] : {}
return (
<div>
<Row>
<Col span={10}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select allowClear={true} style={{ width: "100%" }} value={value.s1} onChange={val => {
this.onChange(1,val)
}
} >
<Option value="IRREVOC TRANS STANDBY" >IRREVOC TRANS STANDBY</Option>
<Option value="IRREVOCABLE" >IRREVOCABLE</Option>
</Select>
</FormItem>
</Col>
</Row>
<Row>
<Col span={10}>
<FormItem
help={errmsg.s2}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select allowClear={true} style={{ width: "100%" }} value={value.s2} onChange={val => {
this.onChange(2,val)
}
} >
<Option value="ADDING OUR CONFIRMATION" >ADDING OUR CONFIRMATION</Option>
<Option value="WITHOUT OUR CONFIRMATION" >WITHOUT OUR CONFIRMATION</Option>
</Select>
</FormItem>
</Col>
</Row>
</div>
)
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select,Switch} from 'antd';
import {InputSize,Currency} from "./Utils"
import TextArea from './ZTextArea'
const FormItem = Form.Item;
const Option = Select.Option
export default class T73 extends Component
{
name='73'
desp = "Details of Amounts Added"
pattern = "6*35x"
onChange=(val)=>{
this.props.onValue([{s1:val},val])
}
render()
{
let value =this.props.value
let mval = value && value.length? value[1] : ''
let errmsg = value && value.length==3?value[2]:{}
value = value && value.length? value[0] : {}
return (<Row>
<Col span={24}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<TextArea type= "textarea" maxLength={6*35} cols={35} rows={6} style={{imeMode:'disabled'}} placeholder="Narrative" value={value.s1} onChange={(e)=>this.onChange(e.target.value)}/>
</FormItem>
</Col>
</Row>)
}
}
import React,{Component} from 'react'
import React, { Component } from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
import {InputSize,Currency} from "./Utils"
import { InputSize, Currency } from "./Utils"
import YBIC from './YBIC'
......@@ -10,100 +10,97 @@ const FormItem = Form.Item;
const Option = Select.Option
export default class T96A extends Component
{
export default class T96A extends Component {
name='96A'
name = '96A'
desp = "Clearing Exception Party"
pattern = ""
tno = -1
keys=[1,2,3]
keys = [1, 2, 3]
onChange=(index,value)=>
{
onChange = (index, value) => {
let obj = {};
if(!value)
if (!value)
value = ""
let objtemp =this.props.value
objtemp = objtemp && objtemp.length? objtemp[0] : {}
let objtemp = this.props.value
objtemp = objtemp && objtemp.length ? objtemp[0] : {}
objtemp["s"+index] = value;
objtemp["s" + index] = value;
this.keys.forEach(i=>{
obj['s'+i] = objtemp['s'+i]
this.keys.forEach(i => {
obj['s' + i] = objtemp['s' + i]
});
let mval = ""
if(obj.s1)
mval = '/' + obj.s1
if(obj.s2)
mval = mval +'/' + obj.s2
if(obj.s3)
mval = mval?`${mval}\r\n${obj.s3}`:obj.s3
this.props.onValue([obj,mval])
if (obj.s1)
mval = '/' + obj.s1
if (obj.s2)
mval = mval + '/' + obj.s2
if (obj.s3)
mval = mval ? `${mval}\r\n${obj.s3}` : obj.s3
this.props.onValue([obj, mval])
}
render()
{
let value =this.props.value
render() {
let value = this.props.value
let mval = value && value.length? value[1] : ''
let errmsg = value && value.length==3?value[2]:{}
let mval = value && value.length ? value[1] : ''
let errmsg = value && value.length == 3 ? value[2] : {}
value = value && value.length ? value[0] : {}
value = value && value.length? value[0] : {}
return (
<div>
<Row>
<Col style={{"minWidth":'100px'}} span={16}>
<div>
<Row>
<Col style={{ "minWidth": '100px' }} span={16}>
<Col span={10}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
label="D/C"
>
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="D/C" onChange={(val)=>this.onChange(1,val)}>
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
label="D/C"
>
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="D/C" onChange={(val) => this.onChange(1, val)}>
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
</Col>
<Col span={14}>
<FormItem
help={errmsg.s2}
validateStatus={errmsg.s2 ? 'error' : null}
label="Account"
>
<Input addonBefore="/" maxLength={34} style={{ imeMode: 'disabled' }} placeholder="Account" value={value.s2} onChange={(e) => this.onChange(2, e.target.value)} />
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col>
<FormItem
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
label="Account"
label="Identifier Code"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s3}
validateStatus={errmsg.s3 ? 'error' : null}
>
<Input addonBefore="/" maxLength={34} style={{imeMode:'disabled'}} placeholder="Account" value={value.s2} onChange={(e)=>this.onChange(2,e.target.value)}/>
<Input addonAfter={<YBIC onSelect={obj => this.onChange(3, obj.bic)} />} maxLength={11} style={{ imeMode: 'disabled' }} placeholder="Identifier Code" value={value.s3} onChange={(e) => this.onChange(3, e.target.value)} />
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col>
<FormItem
label="Identifier Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input addonAfter={ <YBIC onSelect={obj=>this.onChange(3,obj.bic)} /> } maxLength={11} style={{imeMode:'disabled'}} placeholder="Identifier Code" value={value.s3} onChange={(e)=>this.onChange(3,e.target.value)}/>
</FormItem>
</Col>
</Row>
</div>
</Row>
</div>
)
}
}
\ No newline at end of file
......@@ -223,7 +223,6 @@ import T37L from './T37L';
import T23A from './T23A';
import T21B from './T21B';
import T14A from './T14A';
import T17A from './T17A';
import T37M from './T37M';
import T37N from './T37N';
import T32M from './T32M';
......@@ -266,7 +265,8 @@ import T33J from './T33J';
import T22Z from './T22Z';
import T37K from './T37K';
import T17R from './T17R';
import T40B from './T40B';
import T73 from './T73';
export default function(tag,props,onValue){
switch(tag)
......@@ -447,7 +447,6 @@ export default function(tag,props,onValue){
case "T15A" :return <T15A {...props} onValue={onValue} />;
case "T94A" :return <T94A {...props} onValue={onValue} />;
case "T22C" :return <T22C {...props} onValue={onValue} />;
case "T17A" :return <T17A {...props} onValue={onValue} />;
case "T17E" :return <T17E {...props} onValue={onValue} />;
case "T17F" :return <T17F {...props} onValue={onValue} />;
case "T17H" :return <T17H {...props} onValue={onValue} />;
......@@ -540,7 +539,8 @@ export default function(tag,props,onValue){
case "T22Z" :return <T22Z {...props} onValue={onValue} />;
case "T37K" :return <T37K {...props} onValue={onValue} />;
case "T17R" :return <T17R {...props} onValue={onValue} />;
case "T40B" :return <T40B {...props} onValue={onValue} />;
case "T73" :return <T73 {...props} onValue={onValue} />;
}
}
\ 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