Commit c5cccc9d by snail

更新MT600

parent 23f52380
...@@ -39,6 +39,7 @@ export const mty=[ ...@@ -39,6 +39,7 @@ export const mty=[
{mty:"mt600",desp:"MT 600 Commodity Trade Confirmation"}, {mty:"mt600",desp:"MT 600 Commodity Trade Confirmation"},
{mty:"mt605",desp:"MT 605 Commodity Notice to Receive"}, {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:"mt620",desp:"MT 620 Commodity Fixed Loan/Deposit Confirmation"},
{mty:"mt700",desp:"MT 700 Issue of a Documentary Credit"}, {mty:"mt700",desp:"MT 700 Issue of a Documentary Credit"},
...@@ -71,6 +72,8 @@ export const mty=[ ...@@ -71,6 +72,8 @@ export const mty=[
{mty:"mt768",desp:"MT 768 Acknowledgement of a Guarantee/Standby Message"}, {mty:"mt768",desp:"MT 768 Acknowledgement of a Guarantee/Standby Message"},
{mty:"mt769",desp:"MT 769 Advice of Reduction or Release"}, {mty:"mt769",desp:"MT 769 Advice of Reduction or Release"},
{mty:"mt799",desp:"MT 799 Free Format Message"}, {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"}, {mty:"mt999",desp:"MT 999 Free Format Message"},
......
const M='M' const M='M'
const O='O' const O='O'
const Tags=[ const Tags=[
{tag:'60M',status:0,tno:1,letter:[],label:"TEST"}, {tag:'22',status:0,tno:1,letter:[],label:"TEST"},
{tag:'90A',status:0,tno:2,letter:[],label:"TEST"}, {tag:'31G',status:0,tno:2,letter:[],label:"TEST"},
{tag:'90B',status:0,tno:3,letter:[],label:"TEST"}, {tag:'26F',status:0,tno:3,letter:[],label:"TEST"},
{tag:'90C',status:0,tno:4,letter:[],label:"TEST"}, {tag:'34P',status:0,tno:4,letter:[],label:"TEST"},
{tag:'90D',status:0,tno:5,letter:[],label:"TEST"}, {tag:'34R',status:0,tno:5,letter:[],label:"TEST"},
{tag:'90E',status:0,tno:6,letter:[],label:"TEST"}, {tag:'26C',status:0,tno:6,letter:[],label:"TEST"},
{tag:'91A',status:0,tno:7,letter:[],label:"TEST"}, {tag:'71C',status:0,tno:7,letter:[],label:"TEST"},
{tag:'91D',status:0,tno:8,letter:[],label:"TEST"}, {tag:'32F',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"},
] ]
const Title="TEST" const Title="TEST"
......
...@@ -43,7 +43,7 @@ import MT747 from './MT747' ...@@ -43,7 +43,7 @@ import MT747 from './MT747'
import MT769 from './MT769' import MT769 from './MT769'
import MT605 from './MT605' import MT605 from './MT605'
import MT707 from './MT707' import MT707 from './MT707'
import MT1000 from './MT1000'
export default function MTFactory(mty) export default function MTFactory(mty)
{ {
...@@ -126,7 +126,9 @@ export default function MTFactory(mty) ...@@ -126,7 +126,9 @@ export default function MTFactory(mty)
return MT605 return MT605
if(mty=="mt707") if(mty=="mt707")
return MT707 return MT707
if(mty=="mt1000")
return MT1000
if(/mt\d92/.test(mty)) if(/mt\d92/.test(mty))
return MTn92 return MTn92
if(/mt\d91/.test(mty)) if(/mt\d91/.test(mty))
......
...@@ -246,7 +246,7 @@ T21E:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,35}","line":1,"length ...@@ -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"}}, 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"}}, 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"}}, 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:{"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"},"s3":{"reg":"[\\d,]{1,5}","line":1,"length":5,"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"}}, 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"}}, 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"}}, 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"}},
......
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 React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd'; import { Form, Input, DatePicker, Row, Col, TimePicker, Button, Icon, Select } from 'antd';
import { InputSize, Currency, FormatAmount } from "./Utils" import { InputSize, Currency, FormatAmount } from "./Utils"
const FormItem = Form.Item; const FormItem = Form.Item;
const Option = Select.Option const Option = Select.Option
export default class T22 extends Component { export default class T31G extends Component {
name = 'T22' name = 'T31G'
desp = "(Code)(Common Reference)" desp = "(Code)(Common Reference)"
pattern = "8a/4!a2!c4!n4!a2!c" pattern = " 6!n/4!n/12a"
tno = -1 tno = -1
keys = [1, 2] keys = [1, 2, 3]
onChange = (index, value) => { onChange = (index, value) => {
let obj = {}; let obj = {};
if (!value) if (!value)
...@@ -30,9 +30,10 @@ export default class T22 extends Component { ...@@ -30,9 +30,10 @@ export default class T22 extends Component {
this.keys.forEach(i => { this.keys.forEach(i => {
obj['s' + i] = objtemp['s' + i] obj['s' + i] = objtemp['s' + i]
}); });
let mval = "";
let mval = `${obj.s1}${obj.s2}` mval = `${obj.s1 || ''}${obj.s2 ? `/${obj.s2}` : ''}${obj.s3 ? `/${obj.s3}` : ''}`
this.props.onValue([obj, mval]) this.props.onValue([obj, mval])
} }
...@@ -52,19 +53,97 @@ export default class T22 extends Component { ...@@ -52,19 +53,97 @@ export default class T22 extends Component {
help={errmsg.s1} help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null} validateStatus={errmsg.s1 ? 'error' : null}
> >
<DatePicker size={InputSize} defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} /> <DatePicker defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString) => this.onChange(1, dateString)} />
</FormItem> </FormItem>
</Col> </Col>
<Col span={12}> <Col style={{ "minWidth": '100px' }} span={3}>
<FormItem <FormItem
label="Common Reference" label="Time"
required={this.props.status == 'M' || mval ? 'required' : null} required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s2} help={errmsg.s2}
validateStatus={errmsg.s2 ? 'error' : null} 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" /> <TimePicker defaultValue="" format="HHmm" value={value.s2} onChange={(date, dateString) => this.onChange(2, dateString)} />
</FormItem>
</Col>
<Col span={4}>
<FormItem
label="Location"
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="Location" onChange={(val) => this.onChange(3, val)}>
<Option value="ARBA">ARBA</Option>
<Option value="ATVI">ATVI</Option>
<Option value="AUME">AUME</Option>
<Option value="AUSY">AUSY</Option>
<Option value="BEBR">BEBR</Option>
<Option value="BRSP">BRSP</Option>
<Option value="CAMO">CAMO</Option>
<Option value="CATO">CATO</Option>
<Option value="CHGE">CHGE</Option>
<Option value="CHZU">CHZU</Option>
<Option value="CLSA">CLSA</Option>
<Option value="CNBE">CNBE</Option>
<Option value="CZPR">CZPR</Option>
<Option value="DECB">DECB</Option>
<Option value="DEFR">DEFR</Option>
<Option value="DKCO">DKCO</Option>
<Option value="EETA">EETA</Option>
<Option value="ESMA">ESMA</Option>
<Option value="EUTA">EUTA</Option>
<Option value="FIHE">FIHE</Option>
<Option value="FRPA">FRPA</Option>
<Option value="GBLO">GBLO</Option>
<Option value="GRAT">GRAT</Option>
<Option value="HKHK">HKHK</Option>
<Option value="HUBU">HUBU</Option>
<Option value="IDJA">IDJA</Option>
<Option value="IEDU">IEDU</Option>
<Option value="ILTA">ILTA</Option>
<Option value="INMU">INMU</Option>
<Option value="ITMI">ITMI</Option>
<Option value="ITRO">ITRO</Option>
<Option value="JPTO">JPTO</Option>
<Option value="KRSE">KRSE</Option>
<Option value="LBBE">LBBE</Option>
<Option value="LKCO">LKCO</Option>
<Option value="LULU">LULU</Option>
<Option value="MXMC">MXMC</Option>
<Option value="MYKL">MYKL</Option>
<Option value="NLAM">NLAM</Option>
<Option value="NOOS">NOOS</Option>
<Option value="NYFD">NYFD</Option>
<Option value="NYSE">NYSE</Option>
<Option value="NZAU">NZAU</Option>
<Option value="NZWE">NZWE</Option>
<Option value="PAPC">PAPC</Option>
<Option value="PHMA">PHMA</Option>
<Option value="PLWA">PLWA</Option>
<Option value="PTLI">PTLI</Option>
<Option value="ROBU">ROBU</Option>
<Option value="RUMO">RUMO</Option>
<Option value="SARI">SARI</Option>
<Option value="SEST">SEST</Option>
<Option value="SGSI">SGSI</Option>
<Option value="SKBR">SKBR</Option>
<Option value="THBA">THBA</Option>
<Option value="TRAN">TRAN</Option>
<Option value="TRIS">TRIS</Option>
<Option value="TWTA">TWTA</Option>
<Option value="USCH">USCH</Option>
<Option value="USGS">USGS</Option>
<Option value="USLA">USLA</Option>
<Option value="USNY">USNY</Option>
<Option value="VNHA">VNHA</Option>
<Option value="ZAJO">ZAJO</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
</Row>) </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 T32F extends Component {
name = '32F'
desp = " Quantity of the Commodity"
pattern = " 3!a15d"
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 || ''}${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 (<Row>
<Col style={{ "minWidth": '100px' }} span={3}>
<FormItem
label="Unit"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<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 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>
</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 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 ...@@ -9,7 +9,7 @@ const Option = Select.Option
export default class T61 extends Component export default class T61 extends Component
{ {
name='64' name='61'
desp = "Value Date/Currency/Interbank Settled Amount" desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d" 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
...@@ -215,6 +215,15 @@ import T86A from './T86A' ...@@ -215,6 +215,15 @@ import T86A from './T86A'
import T86D from './T86D' import T86D from './T86D'
import T86J from './T86J' import T86J from './T86J'
import T22 from './T22' 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){ export default function(tag,props,onValue){
switch(tag) switch(tag)
...@@ -435,6 +444,14 @@ export default function(tag,props,onValue){ ...@@ -435,6 +444,14 @@ export default function(tag,props,onValue){
case "T86D" :return <T86D {...props} onValue={onValue} />; case "T86D" :return <T86D {...props} onValue={onValue} />;
case "T86J" :return <T86J {...props} onValue={onValue} />; case "T86J" :return <T86J {...props} onValue={onValue} />;
case "T22" :return <T22 {...props} onValue={onValue} />; case "T22" :return <T22 {...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} />;
} }
......
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