Commit 6c072830 by gq777

'update'

parents 0502e58d 7fcdd523
......@@ -39,6 +39,7 @@ export const mty=[
{mty:"mt600",desp:"MT 600 Commodity Trade Confirmation"},
{mty:"mt605",desp:"MT 605 Commodity Notice to Receive"},
{mty:"mt607",desp:"MT 607 Commodity Credit Advice"},
{mty:"mt620",desp:"MT 620 Commodity Fixed Loan/Deposit Confirmation"},
{mty:"mt700",desp:"MT 700 Issue of a Documentary Credit"},
......@@ -71,6 +72,8 @@ export const mty=[
{mty:"mt768",desp:"MT 768 Acknowledgement of a Guarantee/Standby Message"},
{mty:"mt769",desp:"MT 769 Advice of Reduction or Release"},
{mty:"mt799",desp:"MT 799 Free Format Message"},
{mty:"mt940",desp:"MT 940 Customer Statement Message"},
{mty:"mt950",desp:"MT 950 Statement Message"},
{mty:"mt999",desp:"MT 999 Free Format Message"},
......
const M='M'
const O='O'
const Tags=[
{tag:'60M',status:0,tno:1,letter:[],label:"TEST"},
{tag:'90A',status:0,tno:2,letter:[],label:"TEST"},
{tag:'90B',status:0,tno:3,letter:[],label:"TEST"},
{tag:'90C',status:0,tno:4,letter:[],label:"TEST"},
{tag:'90D',status:0,tno:5,letter:[],label:"TEST"},
{tag:'90E',status:0,tno:6,letter:[],label:"TEST"},
{tag:'91A',status:0,tno:7,letter:[],label:"TEST"},
{tag:'91D',status:0,tno:8,letter:[],label:"TEST"},
{tag:'98D',status:0,tno:9,letter:[],label:"TEST"},
{tag:'98G',status:0,tno:10,letter:[],label:"TEST"},
{tag:'98H',status:0,tno:11,letter:[],label:"TEST"},
{tag:'89A',status:0,tno:12,letter:[],label:"TEST"},
{tag:'34C',status:0,tno:13,letter:[],label:"TEST"},
{tag:'22Q',status:0,tno:14,letter:[],label:"TEST"},
{tag:'22W',status:0,tno:15,letter:[],label:"TEST"},
{tag:'22V',status:0,tno:16,letter:[],label:"Execution Venue"},
{tag:'35B',status:0,tno:17,letter:[],label:"TEST"},
{tag:'22U',status:0,tno:18,letter:[],label:"TEST"},
{tag:'22T',status:0,tno:19,letter:[],label:"TEST"},
{tag:'22S',status:0,tno:20,letter:[],label:"TEST"},
{tag:'22R',status:0,tno:21,letter:[],label:"Prior Transaction Identifier"},
{tag:'22P',status:0,tno:22,letter:[],label:"TEST"},
{tag:'22N',status:0,tno:23,letter:[],label:"Transaction Identifier"},
{tag:'22M',status:0,tno:24,letter:[],label:"TEST"},
{tag:'91J',status:0,tno:25,letter:[],label:"TEST"},
{tag:'22L',status:0,tno:26,letter:[],label:"TEST"},
{tag:'15E',status:0,tno:27,letter:[],label:"New Sequence"},
{tag:'24D',status:0,tno:28,letter:[],label:"TEST"},
{tag:'14S',status:0,tno:29,letter:[],label:"TEST"},
{tag:'22',status:0,tno:1,letter:[],label:"TEST"},
{tag:'31G',status:0,tno:2,letter:[],label:"TEST"},
{tag:'26F',status:0,tno:3,letter:[],label:"TEST"},
{tag:'34P',status:0,tno:4,letter:[],label:"TEST"},
{tag:'34R',status:0,tno:5,letter:[],label:"TEST"},
{tag:'26C',status:0,tno:6,letter:[],label:"TEST"},
{tag:'71C',status:0,tno:7,letter:[],label:"TEST"},
{tag:'32F',status:0,tno:8,letter:[],label:"TEST"},
]
const Title="TEST"
......
const Tags = [
{"tag":"20","status":"M","tno":1,"letter":[],"label":"Transaction Reference Number","tagValue":[{},null]},
{"tag":"21","status":"M","tno":2,"letter":[],"label":"Related Reference","tagValue":[{},null]},
{"tag":"26C","status":"M","tno":3,"letter":[],"label":"Identification of the Commodity and the Commodity Account","tagValue":[{},null]},
{"tag":"25","status":"O","tno":4,"letter":[],"label":"Further Account Identification","tagValue":[{},null]},
{"tag":"26D","status":"O","tno":5,"letter":[],"label":"Certificate Number(s) and/or Bar Number(s)","tagValue":[{},null]},
{"tag":"30","status":"M","tno":6,"letter":[],"label":"Value Date","tagValue":[{},null]},
{"tag":"32F","status":"M","tno":7,"letter":[],"label":"Quantity of the Commodity","tagValue":[{},null]},
{"tag":"82A","status":"O","tno":8,"letter":["82A","82D"],"label":"Instructing Party","tagValue":[{},null]},
{"tag":"86A","status":"O","tno":9,"letter":["86A","86B","86D"],"label":"Intermediary","tagValue":[{},null]},
{"tag":"87A","status":"O","tno":10,"letter":["87A","87D"],"label":"Deliverer of the Commodity","tagValue":[{},null]},
{"tag":"88A","status":"O","tno":11,"letter":["88A","88B","88D"],"label":"Beneficiary of the Commodity","tagValue":[{},null]},
{"tag":"72","status":"O","tno":12,"letter":[],"label":"Sender to Receiver Information","tagValue":[{},null]}
]
const Title="MT 607 Commodity Credit Advice"
export default { Tags,Title}
\ No newline at end of file
......@@ -42,8 +42,10 @@ import MT768 from './MT768'
import MT747 from './MT747'
import MT769 from './MT769'
import MT605 from './MT605'
import MT707 from './MT707'
import MT607 from './MT607'
import MT707 from './MT707'
import MT1000 from './MT1000'
export default function MTFactory(mty)
{
......@@ -124,8 +126,12 @@ export default function MTFactory(mty)
return MT769
if(mty=="mt605")
return MT605
if(mty=="mt607")
return MT607
if(mty=="mt707")
return MT707
if(mty=="mt1000")
return MT1000
if(/mt\d92/.test(mty))
return MTn92
......
......@@ -246,7 +246,7 @@ T21E:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,35}","line":1,"length
T33F:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"FUNC","content":"CUR","option":"M"},"s2":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"AMOUNT","option":"M"}},
T21F:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"}},
T69J:{"s1":{"reg":"[A-Z0-9]{4}","line":1,"length":4,"fixed":true,"type":"c","option":"M"},"s2":{"reg":"[A-Z0-9]{4}","line":1,"length":4,"fixed":true,"type":"c","option":"M"}},
T33G:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"FUNC","content":"CUR","option":"M"},"s2":{"reg":"[\\d,]{1,5}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T33G:{"s3":{"reg":"[A-Z0-9]{5}","line":1,"length":5,"fixed":true,"type":"c","option":"O"},"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"FUNC","content":"CUR","option":"M"},"s2":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T57J:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{0,40}","line":5,"length":40,"fixed":false,"type":"x","option":"M"}},
T21G:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"}},
T33H:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"FUNC","content":"CUR","option":"M"},"s2":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"AMOUNT","option":"M"}},
......@@ -322,7 +322,7 @@ T35S:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option
T23S:{"s1":{"reg":"[A-Z]{6}","line":1,"length":6,"fixed":true,"type":"a","option":"M"}},
T11R:{"s3":{"reg":"\\d{4}","line":1,"length":4,"fixed":true,"type":"n","option":"O"},"s4":{"reg":"\\d{6}","line":1,"length":6,"fixed":true,"type":"n","option":"O"},"s1":{"reg":"[1-9]\\d{2}","line":1,"length":2,"fixed":true,"type":"FUNC","content":"MT","option":"M"},"s2":{"reg":"\\d{6}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE2","option":"M"}},
T11S:{"s3":{"reg":"\\d{4}","line":1,"length":4,"fixed":true,"type":"n","option":"O"},"s4":{"reg":"\\d{6}","line":1,"length":6,"fixed":true,"type":"n","option":"O"},"s1":{"reg":"[1-9]\\d{2}","line":1,"length":2,"fixed":true,"type":"FUNC","content":"MT","option":"M"},"s2":{"reg":"\\d{6}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE2","option":"M"}},
T35U:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option":"M"},"s2":{"reg":"[\\d,]{1,1}","line":1,"length":1,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T35U:{"s3":{"reg":"[A-Z]{1}","line":1,"length":1,"fixed":false,"type":"a","option":"O"},"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option":"M"},"s2":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T23X:{"s1":{"reg":"[A-Z0-9]{4}","line":1,"length":4,"fixed":true,"type":"c","option":"M"},"s2":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,65}","line":1,"length":65,"fixed":false,"type":"x","option":"M"}},
T20:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"}},
T36B:{"s3":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"},"s1":{"reg":"[A-Z0-9]{4}","line":1,"length":4,"fixed":true,"type":"c","option":"M"},"s2":{"reg":"[A-Z0-9]{4}","line":1,"length":4,"fixed":true,"type":"c","option":"M"}},
......
import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
import { InputSize, Currency } from "./Utils"
import YBIC from './YBIC'
const FormItem = Form.Item;
const Option = Select.Option
export default class T17R extends Component {
name = '17R'
desp = "Party A's Role"
pattern = "1!a"
tno = -1
onChange = (index, 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 (
<div>
<Row>
<Col span={3}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="N/Y" onChange={(val) => this.onChange(1, val)}>
<Option value="B">B</Option>
<Option value="L">L</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 } from 'antd';
import { InputSize, Currency, FormatAmount } from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T26C extends Component {
name = '26C'
desp = "Identification of the Commodity"
pattern = "[3!a]/15x/5!a4!a[4x][//8x]"
tno = -1
keys = [1, 2, 3, 4, 5, 6]
onChange = (index, value) => {
let obj = {};
if (!value)
value = ""
let objtemp = this.props.value
objtemp = objtemp && objtemp.length ? objtemp[0] : {}
objtemp["s" + index] = value;
let mval = ''
this.keys.forEach(i => {
obj['s' + i] = objtemp['s' + i]
});
mval = `${obj.s1 || ''}${obj.s2 ? `/${obj.s2}` : ''}${obj.s3 ? `/${obj.s3}` : ''}${obj.s4 || ''}${obj.s5 || ''}${obj.s6 ? `//${obj.s6}` : ''}`
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] : {}
// let CD = ['C','D','RC','RD']
// if(this.props.mty == 'mt608')
// CD = ['C','D']
return (
<div>
<Row>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Delivery Details"
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="Delivery Details" onChange={(val) => this.onChange(1, val)}>
<Option value="CFR">CFR</Option>
<Option value="CIF">CIF</Option>
<Option value="CIP">CIP</Option>
<Option value="CPT">CPT</Option>
<Option value="DAF">DAF</Option>
<Option value="DDP">DDP</Option>
<Option value="DDU">DDU</Option>
<Option value="DEQ">DEQ</Option>
<Option value="DES">DES</Option>
<Option value="DTD">DTD</Option>
<Option value="EXW">EXW</Option>
<Option value="FAS">FAS</Option>
<Option value="FCA">FCA</Option>
<Option value="FOB">FOB</Option>
<Option value="LOC">LOC</Option>
<Option value="OTH">OTH</Option>
</Select>
</FormItem>
</Col>
<Col style={{ "minWidth": '100px' }} span={7}>
<FormItem
label="Delivery Location"
help={errmsg.s2}
required={this.props.status == 'M' || mval ? 'required' : null}
validateStatus={errmsg.s2 ? 'error' : null}
>
<Input addonBefore="/" maxLength={15} style={{ imeMode: 'disabled' }} placeholder="Delivery Location" value={value.s2} onChange={(e) => this.onChange(2, e.target.value)} />
</FormItem>
</Col>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Allocation"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s3}
validateStatus={errmsg.s3 ? 'error' : null}
>
<Select allowClear={true} value={value.s3} style={{ width: "100%" }} placeholder="" onChange={(val) => this.onChange(3, val)}>
<Option value="ALLOC">ALLOC</Option>
<Option value="UNALL">UNALL</Option>
</Select>
</FormItem>
</Col>
</Row>
<Row>
<Col style={{ "minWidth": '100px' }} span={4}>
<FormItem
label="Type"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s4}
validateStatus={errmsg.s4 ? 'error' : null}
>
<Select allowClear={true} value={value.s4} style={{ width: "100%" }} placeholder="" onChange={(val) => this.onChange(4, val)}>
<Option value="AMEG">AMEG</Option>
<Option value="ANUG">ANUG</Option>
<Option value="BRIT">BRIT</Option>
<Option value="COIN">COIN</Option>
<Option value="CORO">CORO</Option>
<Option value="DUCA">DUCA</Option>
<Option value="FRFR">FRFR</Option>
<Option value="GECU">GECU</Option>
<Option value="KRUG">KRUG</Option>
<Option value="LBTY">LBTY</Option>
<Option value="MAPL">MAPL</Option>
<Option value="MEXP">MEXP</Option>
<Option value="NBUF">NBUF</Option>
<Option value="NOBL">NOBL</Option>
<Option value="NSOV">NSOV</Option>
<Option value="OSOV">OSOV</Option>
<Option value="SAEG">SAEG</Option>
<Option value="SECU">SECU</Option>
<Option value="STAT">STAT</Option>
<Option value="VREN">VREN</Option>
<Option value="ALUM">ALUM</Option>
<Option value="COPP">COPP</Option>
<Option value="GOLD">GOLD</Option>
<Option value="IRID">IRID</Option>
<Option value="LEAD">LEAD</Option>
<Option value="NICK">NICK</Option>
<Option value="OSMI">OSMI</Option>
<Option value="OTHR">OTHR</Option>
<Option value="PALL">PALL</Option>
<Option value="PLAT">PLAT</Option>
<Option value="POIL">POIL</Option>
<Option value="RHOD">RHOD</Option>
<Option value="RUTH">RUTH</Option>
<Option value="SILV">SILV</Option>
<Option value="STEE">STEE</Option>
<Option value="TINA">TINA</Option>
<Option value="TITA">TITA</Option>
<Option value="ZINC">ZINC</Option>
</Select>
</FormItem>
</Col>
<Col span={3}>
<FormItem
label="Denomination"
help={errmsg.s5}
validateStatus={errmsg.s5 ? 'error' : null}
>
<Input value={value.s5} onChange={e => this.onChange(5, e.target.value)} maxLength={4} style={{ imeMode: 'disabled' }} placeholder="Denomination" />
</FormItem>
</Col>
<Col style={{ "minWidth": '100px' }} span={6}>
<FormItem
label="Form"
help={errmsg.s6}
validateStatus={errmsg.s6 ? 'error' : null}
>
<Input value={value.s6} onChange={e => this.onChange(6, e.target.value)} maxLength={8} style={{ imeMode: 'disabled' }} placeholder="Form" />
</FormItem>
</Col>
</Row>
</div>
)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
const FormItem = Form.Item;
export default class T26F extends Component {
name = '26F'
desp = "Settlement Type"
pattern = " 9a"
tno = -1
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={5}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="type" onChange={(val) => this.onChange(val)}>
<Option value="NETCASH">NETCASH</Option>
<Option value="PRINCIPAL">PRINCIPAL</Option>
</Select>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
import { InputSize, Currency, FormatAmount } from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T31 extends Component {
name = 'T31G'
desp = "(Code)(Common Reference)"
export default class T32F extends Component {
pattern = "8a/4!a2!c4!n4!a2!c"
name = '32F'
desp = " Quantity of the Commodity"
pattern = " 3!a15d"
tno = -1
......@@ -30,9 +30,7 @@ export default class T31 extends Component {
this.keys.forEach(i => {
obj['s' + i] = objtemp['s' + i]
});
let mval = `${obj.s1}/${obj.s2}`
let mval = `${obj.s1 || ''}${obj.s2 || ''}`
this.props.onValue([obj, mval])
}
......@@ -44,27 +42,42 @@ export default class T31 extends Component {
value = value && value.length ? value[0] : {}
return (<Row>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Date"
label="Unit"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<DatePicker size={InputSize} defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
<Select allowClear={true} value={value.s1} style={{ width: "100%" }} placeholder="D/C" onChange={(val) => this.onChange(1, val)}>
<Option value="FOZ">FOZ</Option>
<Option value="GOZ">GOZ</Option>
<Option value="GRM">GRM</Option>
<Option value="KLO">KLO</Option>
<Option value="LIT">LIT</Option>
<Option value="LOT">LOT</Option>
<Option value="OTH">OTH</Option>
<Option value="PND">PND</Option>
<Option value="TAL">TAL</Option>
<Option value="TOL">TOL</Option>
<Option value="TON">TON</Option>
<Option value="TOZ">TOZ</Option>
<Option value="UNT">UNT</Option>
</Select>
</FormItem>
</Col>
<Col span={12}>
<Col style={{ "minWidth": '200px' }} span={3}>
<FormItem
label="Common Reference"
label="Amount"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s2}
validateStatus={errmsg.s2 ? 'error' : null}
>
<Input value={value.s2} addonBefore="/" onChange={e => this.onChange(2, e.target.value)} maxLength={16} style={{ imeMode: 'disabled' }} placeholder="Common Reference" />
<Input value={value.s2} onChange={e => this.onChange(2, e.target.value)} maxLength={15} style={{ imeMode: 'disabled' }} placeholder="Amount" />
</FormItem>
</Col>
</Row>)
......
import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
import { InputSize, Currency, FormatAmount } from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T33G extends Component {
name = '33G'
desp = " Price per Unit"
pattern = "3!a15d[5!c]"
tno = -1
keys = [1, 2,3]
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 temp = FormatAmount(obj.s2);
let mval = `${obj.s1 || ''}${temp||''}${obj.s3 || ''}`
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 (<Row>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Currency"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val => this.onChange(1, val)} >
{
Currency.map(cur => <Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col style={{ "minWidth": '200px' }} span={3}>
<FormItem
label="Amount"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s2}
validateStatus={errmsg.s2 ? 'error' : null}
>
<Input value={value.s2} onChange={e => this.onChange(2, e.target.value)} maxLength={15} style={{ imeMode: 'disabled' }} placeholder="Amount" />
</FormItem>
</Col>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Code"
help={errmsg.s3}
validateStatus={errmsg.s3 ? 'error' : null}
>
<Select allowClear={true} value={value.s3} placeholder="Code" style={{ width: "100%" }} onChange={val => this.onChange(3, val)}>
<Option value="SEE72">SEE72</Option>
</Select>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import {InputSize,Currency,FormatAmount} from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T34P extends Component
{
name='34P'
desp = "(Date)(Currency)(Amount)"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3]
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 temp = FormatAmount(obj.s3);
let mval = `${obj.s1}${obj.s2}${temp}`.replace(/\//g,'')
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 (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s2} onChange={val=>this.onChange(2,val)} >
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={15} style={{imeMode:'disabled'}} placeholder="Rate"/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import {InputSize,Currency,FormatAmount} from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T34R extends Component
{
name='34R'
desp = "(Date)(Currency)(Amount)"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3]
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 temp = FormatAmount(obj.s2);
let mval = `${obj.s1}${temp}${obj.s3}`.replace(/\//g,'')
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 (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s2} onChange={val=>this.onChange(2,val)} >
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={15} style={{imeMode:'disabled'}} placeholder="Rate"/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ const Option = Select.Option
export default class T61 extends Component
{
name='64'
name='61'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
......
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import TextArea from './ZTextArea'
const FormItem = Form.Item;
export default class T71C extends Component
{
name='71C'
desp = "Details of Adjustments"
pattern = "6*35x"
tno = -1
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>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<TextArea wrap="physical" type= "textarea" maxLength={6*35} cols={35} rows={6} style={{imeMode:'disabled'}} placeholder="Narrative Description of the Original Message to Which the Answer Relates" value={value.s1} onChange={(e)=>this.onChange(e.target.value)}/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
......@@ -249,6 +249,15 @@ import T56B from './T56B';
import T87B from './T87B';
import T86B from './T86B';
import T37R from './T37R';
import T22 from './T22'
import T31G from './T31G'
import T26F from './T26F';
import T34P from './T34P';
import T34R from './T34R';
import T26C from './T26C';
import T33G from './T33G';
import T71C from './T71C';
import T32F from './T32F';
export default function(tag,props,onValue){
......@@ -505,6 +514,15 @@ export default function(tag,props,onValue){
case "T87B" :return <T87B {...props} onValue={onValue} />;
case "T86B" :return <T86B {...props} onValue={onValue} />;
case "T37R" :return <T37R {...props} onValue={onValue} />;
case "T31G" :return <T31G {...props} onValue={onValue} />;
case "T26F" :return <T26F {...props} onValue={onValue} />;
case "T34P" :return <T34P {...props} onValue={onValue} />;
case "T34R" :return <T34R {...props} onValue={onValue} />;
case "T26C" :return <T26C {...props} onValue={onValue} />;
case "T33G" :return <T33G {...props} onValue={onValue} />;
case "T71C" :return <T71C {...props} onValue={onValue} />;
case "T32F" :return <T32F {...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