Commit 33c0200e by gq777

'update'

parent 6c072830
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 T22Z extends Component {
name = '22Z'
desp = "Underlying Product Identifier"
pattern = "6a"
tno = -1
keys = [1]
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}`
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": '350px' }} span={3}>
<FormItem
label="Product Identifier"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s1}
validateStatus={errmsg.s1 ? 'error' : null}
>
<Input value={value.s1} onChange={e => this.onChange(1, e.target.value)} maxLength={6} style={{ imeMode: 'disabled' }} placeholder="Product Identifier" />
</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 TextArea from './ZTextArea'
const FormItem = Form.Item;
export default class T26D extends Component
{
name='26D'
desp = "Narrative"
pattern = ""
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={24}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<TextArea type= "textarea" maxLength={30*65} cols={30} rows={10} style={{imeMode:'disabled'}} placeholder="Narrative" value={value.s1} onChange={(e)=>this.onChange(e.target.value)}/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ export default class T32H extends Component {
tno = -1
keys = [1, 2]
keys = [1, 2, 3]
onChange = (index, value) => {
let obj = {};
if (!value)
......
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 T32R extends Component {
name = '32R'
desp = "Amount to be Settled"
pattern = "[N]3!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 = ""
mval = `${obj.s1}${temp}`
if (obj.s3)
mval = obj.s3 + mval
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="Sign"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s3}
validateStatus={errmsg.s3 ? 'error' : null}
>
<Select allowClear={true} value={value.s3} placeholder="Sign" style={{ width: "100%" }} onChange={val => this.onChange(3, val)}>
<Option value={'+'}>{"+"}</Option>
<Option value={'-'}>{"-"}</Option>
</Select>
</FormItem>
</Col>
<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} placeholder="Unit" style={{ width: "100%" }} 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 T33J extends Component {
name = '33J'
desp = "Transaction Currency and Net Interest Amount"
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 temp = FormatAmount(obj.s2);
let mval = ""
mval = `${obj.s1}${temp}`
if (obj.s3)
mval = obj.s3 + mval
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} placeholder="Unit" style={{ width: "100%" }} 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
......@@ -15,7 +15,7 @@ export default class T34E extends Component {
tno = -1
keys = [1, 2]
keys = [1, 2, 3]
onChange = (index, value) => {
let obj = {};
if (!value)
......
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 T34J extends Component {
name = '34J'
desp = "Currency and Interest Amount"
pattern = "[N]3!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 = ""
mval = `${obj.s1}${temp}`
if (obj.s3)
mval = obj.s3 + mval
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="Sign"
required={this.props.status == 'M' || mval ? 'required' : null}
help={errmsg.s3}
validateStatus={errmsg.s3 ? 'error' : null}
>
<Select allowClear={true} value={value.s3} placeholder="Sign" style={{ width: "100%" }} onChange={val => this.onChange(3, val)}>
<Option value={'+'}>{"+"}</Option>
<Option value={'-'}>{"-"}</Option>
</Select>
</FormItem>
</Col>
<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} placeholder="Unit" style={{ width: "100%" }} 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
......@@ -249,8 +249,6 @@ 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';
......@@ -258,6 +256,13 @@ import T26C from './T26C';
import T33G from './T33G';
import T71C from './T71C';
import T32F from './T32F';
import T26D from './T26D';
import T17R from './T17R';
import T32R from './T32R';
import T34J from './T34J';
import T33J from './T33J';
import T22Z from './T22Z';
export default function(tag,props,onValue){
......@@ -514,7 +519,6 @@ 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} />;
......@@ -522,7 +526,12 @@ export default function(tag,props,onValue){
case "T33G" :return <T33G {...props} onValue={onValue} />;
case "T71C" :return <T71C {...props} onValue={onValue} />;
case "T32F" :return <T32F {...props} onValue={onValue} />;
case "T26D" :return <T26D {...props} onValue={onValue} />;
case "T17R" :return <T17R {...props} onValue={onValue} />;
case "T32R" :return <T32R {...props} onValue={onValue} />;
case "T34J" :return <T34J {...props} onValue={onValue} />;
case "T33J" :return <T33J {...props} onValue={onValue} />;
case "T22Z" :return <T22Z {...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