Commit 06aa0b39 by fukai

完成940,950编辑支持

parent afbbf42f
const Tags = [
{"tag":"20","status":"M","tno":1,"letter":[],"label":"Transaction Reference Number","tagValue":[{},null]},
{"tag":"21","status":"O","tno":2,"letter":[],"label":"Related Reference","tagValue":[{},null]},
{"tag":"25","status":"M","tno":3,"letter":["25","25P"],"label":"Account Identification","tagValue":[{},null]},
{"tag":"28C","status":"M","tno":4,"letter":[],"label":"Statement Number/Sequence Number","tagValue":[{},null]},
{"tag":"60F","status":"M","tno":5,"letter":["60F","60M"],"label":"Opening Balance","tagValue":[{},null]},
{"cyclist":"6","cycs":[[
{"tag":"61","status":"O","tno":6,"letter":[],"label":"Statement Line","tagValue":[{},null]},
{"tag":"86","status":"O","tno":7,"letter":[],"label":"Information to Account Owner","tagValue":[{},null]}
]],
"pattern":[
{"tag":"61","status":"O","tno":6,"letter":[],"label":"Statement Line","tagValue":[{},null]},
{"tag":"86","status":"O","tno":7,"letter":[],"label":"Information to Account Owner","tagValue":[{},null]}
]
},
{"tag":"62F","status":"M","tno":8,"letter":["62F","62M"],"label":"Closing Balance (Booked Funds)","tagValue":[{},null]},
{"tag":"64","status":"O","tno":9,"letter":[],"label":"Closing Available Balance (Available Funds)","tagValue":[{},null]},
{"cyclist":"10","cycs":[[
{"tag":"65","status":"O","tno":10,"letter":[],"label":"Forward Available Balance","tagValue":[{},null]}
]],
"pattern":[
{"tag":"65","status":"O","tno":10,"letter":[],"label":"Forward Available Balance","tagValue":[{},null]}
]
},
{"tag":"86","status":"O","tno":11,"letter":[],"label":"Information to Account Owner","tagValue":[{},null]}
]
const Title = "MT 940 Customer Statement Message"
export default { Tags,Title}
\ No newline at end of file
const Tags = [
{"tag":"20","status":"M","tno":1,"letter":[],"label":"Transaction Reference Number","tagValue":[{},null]},
{"tag":"25","status":"M","tno":2,"letter":[],"label":"Account Identification","tagValue":[{},null]},
{"tag":"28C","status":"M","tno":3,"letter":[],"label":"Statement Number/Sequence Number","tagValue":[{},null]},
{"tag":"60F","status":"M","tno":4,"letter":["60F","60M"],"label":"Opening Balance","tagValue":[{},null]},
{"cyclist":"5","cycs":[
[{"tag":"61","status":"O","tno":5,"letter":[],"label":"Statement Line","tagValue":[{},null]} ]
],
"pattern":[
{"tag":"61","status":"O","tno":5,"letter":[],"label":"Statement Line","tagValue":[{},null]}
]
},
{"tag":"62F","status":"M","tno":6,"letter":["62F","62M"],"label":"Closing Balance (Booked Funds)","tagValue":[{},null]},
{"tag":"64","status":"O","tno":7,"letter":[],"label":"Closing Available Balance (Available Funds)","tagValue":[{},null]}
]
const Title = "MT 950 Statement Message"
export default { Tags,Title}
\ No newline at end of file
......@@ -22,6 +22,9 @@ import MT747 from './MT747'
import MT769 from './MT769'
import MT707 from './MT707'
import MT759 from './MT759'
import MT940 from './MT940'
import MT950 from './MT950'
import MT202COV from './MT202COV'
export default function MTFactory(mty)
{
......@@ -70,6 +73,10 @@ export default function MTFactory(mty)
return MT769
if(mty=="mt707")
return MT707
if(mty=='mt940')
return MT940
if(mty=='mt950')
return MT950
if(/mt\d96/.test(mty))
return MTn96
if(/mt\d95/.test(mty))
......
......@@ -233,7 +233,7 @@ T33A:{"s3":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC"
T57D:{"s3":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{0,35}","line":4,"length":35,"fixed":false,"type":"x","option":"M"},"s1":{"reg":"C|D|RC|RD","line":1,"length":2,"fixed":true,"type":"FUNC","content":"DC","option":"O"},"s2":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,34}","line":1,"length":34,"fixed":false,"type":"x","option":"O"}},
T21A:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"}},
T69E:{"s3":{"reg":"\\d{8}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE4","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"}},
T33B:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option":"M"}},
T33B:{"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":false,"type":"d","option":"M"}},
T21B:{"s1":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"}},
T45D:{"s1":{"reg":"[\\w\\.,\\-\\(\\)/\u003d\u0027\\+:\\?!\"%\u0026\\*\\\u003c\\\u003e;\\{\\s@#]{0,65}","line":150,"length":65,"fixed":false,"type":"z","option":"M"}},
T69F:{"s3":{"reg":"\\d{8}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE4","option":"M"},"s4":{"reg":"\\d{6}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"TIME2","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"}},
......@@ -359,7 +359,7 @@ T13D:{"s3":{"reg":"\\+|\\-","line":1,"length":4,"fixed":true,"type":"FUNC","cont
T37F:{"s3":{"reg":"D|M","line":1,"length":2,"fixed":true,"type":"FUNC","content":"DM","option":"O"},"s4":{"reg":"\\d{1,3}","line":1,"length":3,"fixed":false,"type":"n","option":"O"},"s5":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"O"},"s1":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"},"s2":{"reg":"\\d{6}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE2","option":"O"}},
T49H:{"s1":{"reg":"[\\w\\.,\\-\\(\\)/\u003d\u0027\\+:\\?!\"%\u0026\\*\\\u003c\\\u003e;\\{\\s@#]{0,65}","line":100,"length":65,"fixed":false,"type":"z","option":"M"}},
T37G:{"s1":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T36:{},
T36:{"s1":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":false,"type":"d","option":"M"}},
T37H:{"s1":{"reg":"C|D|RC|RD","line":1,"length":2,"fixed":true,"type":"FUNC","content":"DC","option":"M"},"s2":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T37J:{"s1":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
T37K:{"s1":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option":"M"},"s2":{"reg":"[\\d,]{1,12}","line":1,"length":12,"fixed":true,"type":"FUNC","content":"NUMBER","option":"M"}},
......@@ -423,7 +423,7 @@ T15N:{},
T15O:{},
T15P:{},
T60:{"s3":{"reg":"[A-Z]{3}","line":1,"length":3,"fixed":true,"type":"a","option":"M"},"s4":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":true,"type":"FUNC","content":"AMOUNT","option":"M"},"s1":{"reg":"C|D|RC|RD","line":1,"length":2,"fixed":true,"type":"FUNC","content":"DC","option":"M"},"s2":{"reg":"\\d{6}","line":1,"length":5,"fixed":true,"type":"FUNC","content":"DATE2","option":"M"}},
T61:{"s3":{"reg":"[A-Z]{1,2}","line":1,"length":2,"fixed":false,"type":"a","option":"M"},"s4":{"reg":"[A-Z]{1}","line":1,"length":1,"fixed":true,"type":"a","option":"O"},"s5":{"reg":"[A-Z]{151}","line":1,"length":151,"fixed":true,"type":"a","option":"M"},"s6":{"reg":"[A-Z0-9]{3}","line":1,"length":3,"fixed":true,"type":"c","option":"M"},"s7":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"},"s8":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"O"},"s9":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,34}","line":1,"length":34,"fixed":false,"type":"x","option":"O"},"s1":{"reg":"\\d{6}","line":1,"length":6,"fixed":true,"type":"n","option":"M"},"s2":{"reg":"\\d{4}","line":1,"length":4,"fixed":true,"type":"n","option":"O"}},
T61:{"s3":{"reg":"[A-Z]{1,2}","line":1,"length":2,"fixed":false,"type":"a","option":"M"},"s4":{"reg":"[A-Z]{1}","line":1,"length":1,"fixed":true,"type":"a","option":"O"},"s5":{"reg":"[\\d,]{1,15}","line":1,"length":15,"fixed":false,"type":"d","option":"M"},"s6":{"reg":"[A-Z]{1}","line":1,"length":1,"fixed":true,"type":"a","option":"M"},"s10":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,34}","line":1,"length":34,"fixed":false,"type":"x","option":"O"},"s7":{"reg":"[A-Z0-9]{3}","line":1,"length":3,"fixed":true,"type":"c","option":"M"},"s8":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"M"},"s9":{"reg":"[\\w/\\-\\?:\\(\\)\\.,\u0027+\\{\\} ]{1,16}","line":1,"length":16,"fixed":false,"type":"x","option":"O"},"s1":{"reg":"\\d{6}","line":1,"length":6,"fixed":true,"type":"n","option":"M"},"s2":{"reg":"\\d{4}","line":1,"length":4,"fixed":true,"type":"n","option":"O"}},
T16A:{"s1":{"reg":"\\d{1,5}","line":1,"length":5,"fixed":false,"type":"n","option":"M"}},
T28C:{"s1":{"reg":"\\d{1,5}","line":1,"length":5,"fixed":false,"type":"n","option":"M"},"s2":{"reg":"\\d{1,5}","line":1,"length":5,"fixed":false,"type":"n","option":"O"}},
T28D:{"s1":{"reg":"\\d{1,5}","line":1,"length":5,"fixed":false,"type":"n","option":"M"},"s2":{"reg":"\\d{1,5}","line":1,"length":5,"fixed":false,"type":"n","option":"M"}},
......
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import YBIC from './YBIC'
const FormItem = Form.Item;
export default class T25P extends Component
{
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.s2}`
if(obj.s1)
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 style={{"minWidth":'100px'}} span={16}>
<FormItem
label="Account"
help={errmsg.s1}
required={this.props.status=='M' || mval?'required':null}
validateStatus={errmsg.s1?'error':null}
>
<Input value={value.s1} onChange={e=>this.onChange(1,e.target.value)} maxLength={35} style={{imeMode:'disabled'}} placeholder="Account"/>
</FormItem>
</Col>
</Row>
<Row>
<Col>
<FormItem
label="Identifier Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input addonAfter={ <YBIC onSelect={obj=>this.onChange(2,obj.bic)} /> } maxLength={11} value={value.s2} onChange={e=>this.onChange(2,e.target.value)} style={{imeMode:'disabled'}} placeholder="Identifier Code"/>
</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 T28C extends Component
{
name='27'
desp = "Sequence of Total"
pattern = ""
tno = -1
keys=[1,2]
constructor(props)
{
super(props)
}
componentWillMount()
{
}
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?`/${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 span={6}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
label="Statement Number"
>
<Input readOnly={this.readonly} type= "text" maxLength={5} style={{imeMode:'disabled'}} placeholder="Number" value={value.s1} onChange={(e)=>this.onChange(1,e.target.value)}/>
</FormItem>
</Col>
<Col span={6}>
<FormItem
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
label="Sequence Number"
>
<Input readOnly={this.readonly} type= "text" addonBefore="/" maxLength={5} style={{imeMode:'disabled'}} placeholder="Sequence Number" value={value.s2} onChange={(e)=>this.onChange(2,e.target.value)}/>
</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 T60F extends Component
{
name='60F'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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 T60M extends Component
{
name='60M'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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 T60M extends Component
{
name='60M'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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 T60M extends Component
{
name='60M'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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 T61 extends Component
{
name='61'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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 T61 extends Component
{
name='61'
desp = "Value Date/Currency/Interbank Settled Amount"
pattern = "6!n3!a15d"
tno = -1
keys=[1,2,3,4]
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.s4);
let mval = `${obj.s1}${obj.s2}${obj.s3}${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="D/C Mark"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="D/C Mark"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<DatePicker defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,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.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={16} 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';
const FormItem = Form.Item;
export default class T86 extends Component
{
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}
>
<Input 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>)
}
}
\ No newline at end of file
......@@ -116,6 +116,16 @@ import T73A from "./T73A"
import T58A from "./T58A"
import T46A from "./T46A"
import T77T from "./T77T"
import T28C from './T28C'
import T60F from './T60F'
import T60M from './T60M'
import T62F from './T62F'
import T62M from './T62M'
import T61 from './T61'
import T64 from './T64'
import T86 from './T86'
import T65 from './T65'
import T25P from './T25P'
export default function(tag,props,onValue){
switch(tag)
......@@ -235,6 +245,16 @@ export default function(tag,props,onValue){
case "T58A" :return <T58A {...props} onValue={onValue} />;
case "T46A" :return <T46A {...props} onValue={onValue} />;
case "T77T" :return <T77T {...props} onValue={onValue} />;
case "T28C" :return <T28C {...props} onValue={onValue} />;
case "T60F" :return <T60F {...props} onValue={onValue} />;
case "T60M" :return <T60M {...props} onValue={onValue} />;
case "T62F" :return <T62F {...props} onValue={onValue} />;
case "T62M" :return <T62M {...props} onValue={onValue} />;
case "T64" :return <T64 {...props} onValue={onValue} />;
case "T61" :return <T61 {...props} onValue={onValue} />;
case "T65" :return <T65 {...props} onValue={onValue} />;
case "T86" :return <T86 {...props} onValue={onValue} />;
case "T25P" :return <T25P {...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