Commit 8bff7671 by fukai

提交报文编辑0.6.0版本

parent 7e1d4a59
......@@ -3,6 +3,7 @@
"entry": {},
"dependencies": {
"antd": "^1.1.0",
"antd-iconfont": "^3.0.3",
"atool-build": "0.7.x",
"babel-plugin-antd": "0.4.x",
"babel-plugin-transform-runtime": "^6.8.0",
......@@ -34,8 +35,8 @@
},
"devDependencies": {
"atool-test-mocha": "^0.1.4",
"babel-eslint": "^6.0.0",
"babel-core": "^6.4.0",
"babel-eslint": "^6.0.0",
"babel-loader": "~6.2.1",
"babel-polyfill": "^6.3.14",
"babel-preset-es2015": "^6.3.13",
......@@ -49,10 +50,10 @@
"dora-plugin-proxy": "0.6.x",
"dora-plugin-webpack": "0.6.x",
"enzyme": "^1.2.0",
"expect": "^1.20.1",
"eslint": "^2.7.0",
"eslint-config-airbnb": "6.x",
"eslint-plugin-react": "4.x",
"expect": "^1.20.1",
"glob": "^7.0.3",
"jsdom": "^9.4.1",
"karma": "^0.13.19",
......@@ -61,7 +62,7 @@
"karma-phantomjs-launcher": "^0.2.3",
"karma-sourcemap-loader": "^0.3.6",
"karma-spec-reporter": "0.0.23",
"karma-webpack": "^1.7.0",
"karma-webpack": "^1.7.0",
"mocha": "^2.3.4",
"react-addons-test-utils": "^0.14.6",
"sinon": "^1.17.2"
......@@ -71,7 +72,7 @@
"lint": "eslint --ext .js,.jsx src",
"start": "dora -p 8001 --plugins \"webpack,proxy,livereload?enableJs=false&injectHost=127.0.0.1,browser-history?index=/src/entries/index.html\"",
"test-antd": "atool-test-mocha ./src/**/__tests__/*-test.js",
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive",
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive",
"test:watch": "npm test -- --watch"
}
}
......@@ -35,7 +35,7 @@ class _Api {
request.send(data);
}
request.end((err, { body } = {}) => err ? reject(body || err) : resolve(body));
request.end((err, { body,text } = {}) => err ? reject(body || err) : resolve(body||text));
})
);
......
import Api from './api';
const api = new Api({
baseURI: '/',
baseURI: window.serviceURL,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
"Content-Type": "application/x-www-form-urlencoded"
}
})
......
*{margin: 0;padding: 0;list-style: none;}
/*
KISSY CSS Reset
理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
特色:1. 适应中文;2. 基于最新主流浏览器。
维护:玉伯<lifesinger@gmail.com>, 正淳<ragecarrier@gmail.com>
*/
/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
pre, /* text formatting elements 文本格式元素 */
form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
th, td /* table elements 表格元素 */ {
margin: 0;
padding: 0;
}
/** 设置默认字体 **/
body,
button, input, select, textarea /* for ie */ {
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
}
h1, h2, h3, h4, h5, h6 { font-size: 100%; }
address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
/** 重置列表元素 **/
ul, ol { list-style: none; }
/** 重置文本格式元素 **/
a { text-decoration: none; }
a:hover { text-decoration: underline; }
/** 重置表单元素 **/
legend { color: #000; } /* for ie6 */
fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
/* 注:optgroup 无法扶正 */
/** 重置表格元素 **/
table { border-collapse: collapse; border-spacing: 0; }
/* 清除浮动 */
.ks-clear:after, .clear:after {
content: '\20';
display: block;
height: 0;
clear: both;
}
.ks-clear, .clear {
*zoom: 1;
}
.main {padding: 30px 100px;}
.main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
.helps{margin-top:40px;}
.helps pre{
padding:20px;
margin:10px 0;
border:solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists li{
float:left;
width: 100px;
height:180px;
text-align: center;
}
.icon_lists .icon{
font-size: 42px;
line-height: 100px;
margin: 10px 0;
color:#333;
-webkit-transition: font-size 0.25s ease-out 0s;
-moz-transition: font-size 0.25s ease-out 0s;
transition: font-size 0.25s ease-out 0s;
}
.icon_lists .icon:hover{
font-size: 100px;
}
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1470281018'); /* IE9*/
src: url('iconfont.eot?t=1470281018#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff?t=1470281018') format('woff'), /* chrome, firefox */
url('iconfont.ttf?t=1470281018') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1470281018#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
.icon-arrowleft:before { content: "\e620"; }
.icon-arrowright:before { content: "\e621"; }
.icon-arrowup:before { content: "\e622"; }
.icon-arrowdown:before { content: "\e623"; }
.icon-caretcircleleft:before { content: "\e604"; }
.icon-caretcircleright:before { content: "\e605"; }
.icon-caretcircleup:before { content: "\e606"; }
.icon-caretcircledown:before { content: "\e607"; }
.icon-forward:before { content: "\e608"; }
.icon-backward:before { content: "\e609"; }
.icon-caretcircleoleft:before { content: "\e60b"; }
.icon-caretcircleoright:before { content: "\e60d"; }
.icon-caretcircleodown:before { content: "\e60e"; }
.icon-caretright:before { content: "\e60a"; }
.icon-caretleft:before { content: "\e60f"; }
.icon-caretup:before { content: "\e610"; }
.icon-caretdown:before { content: "\e611"; }
.icon-fastforward:before { content: "\e612"; }
.icon-fastbackward:before { content: "\e613"; }
.icon-stepbackward:before { content: "\e614"; }
.icon-stepforward:before { content: "\e615"; }
.icon-circleodown:before { content: "\e617"; }
.icon-circleoup:before { content: "\e618"; }
.icon-circleoleft:before { content: "\e619"; }
.icon-circleoright:before { content: "\e616"; }
.icon-circleright:before { content: "\e61a"; }
.icon-circleup:before { content: "\e61c"; }
.icon-playcircle:before { content: "\e61e"; }
.icon-playcircleo:before { content: "\e61f"; }
.icon-circleleft:before { content: "\e61b"; }
.icon-right:before { content: "\e600"; }
.icon-left:before { content: "\e601"; }
.icon-up:before { content: "\e602"; }
.icon-down:before { content: "\e603"; }
.icon-reload:before { content: "\e626"; }
.icon-doubleleft:before { content: "\e624"; }
.icon-doubleright:before { content: "\e625"; }
.icon-retweet:before { content: "\e627"; }
.icon-shrink:before { content: "\e628"; }
.icon-arrowsalt:before { content: "\e629"; }
.icon-rollback:before { content: "\e62a"; }
.icon-verticleleft:before { content: "\e62b"; }
.icon-verticleright:before { content: "\e62c"; }
.icon-cross:before { content: "\e62d"; }
.icon-check:before { content: "\e62e"; }
.icon-checkcircle:before { content: "\e62f"; }
.icon-checkcircleo:before { content: "\e630"; }
.icon-crosscircle:before { content: "\e631"; }
.icon-crosscircleo:before { content: "\e632"; }
.icon-exclamation:before { content: "\e633"; }
.icon-exclamationcircle:before { content: "\e634"; }
.icon-exclamationcircleo:before { content: "\e635"; }
.icon-info:before { content: "\e636"; }
.icon-infocircle:before { content: "\e637"; }
.icon-infocircleo:before { content: "\e638"; }
.icon-minuscircle:before { content: "\e639"; }
.icon-minuscircleo:before { content: "\e63a"; }
.icon-minus:before { content: "\e63b"; }
.icon-pluscircleo:before { content: "\e63c"; }
.icon-pluscircle:before { content: "\e63d"; }
.icon-plus:before { content: "\e63e"; }
.icon-swapleft:before { content: "\e63f"; }
.icon-swapright:before { content: "\e640"; }
.icon-swap:before { content: "\e641"; }
.icon-clockcircle:before { content: "\e642"; }
.icon-clockcircleo:before { content: "\e643"; }
.icon-pausecircle:before { content: "\e644"; }
.icon-pausecircleo:before { content: "\e645"; }
.icon-pause:before { content: "\e646"; }
.icon-questioncircle:before { content: "\e647"; }
.icon-questioncircleo:before { content: "\e648"; }
.icon-question:before { content: "\e649"; }
.icon-areachart:before { content: "\e64c"; }
.icon-appstore:before { content: "\e64d"; }
.icon-apple:before { content: "\e64e"; }
.icon-android:before { content: "\e64f"; }
.icon-bars:before { content: "\e650"; }
.icon-barchart:before { content: "\e651"; }
.icon-calendar:before { content: "\e654"; }
.icon-book:before { content: "\e655"; }
.icon-chrome:before { content: "\e65c"; }
.icon-code:before { content: "\e65d"; }
.icon-creditcard:before { content: "\e65f"; }
.icon-customerservice:before { content: "\e65e"; }
.icon-copy:before { content: "\e660"; }
.icon-delete:before { content: "\e661"; }
.icon-ellipsis:before { content: "\e667"; }
.icon-edit:before { content: "\e668"; }
.icon-exception:before { content: "\e66a"; }
.icon-file:before { content: "\e66b"; }
.icon-filter:before { content: "\e66f"; }
.icon-folder:before { content: "\e670"; }
.icon-frowncircle:before { content: "\e672"; }
.icon-frown:before { content: "\e673"; }
.icon-smilecircle:before { content: "\e676"; }
.icon-smile:before { content: "\e677"; }
.icon-mehcircle:before { content: "\e678"; }
.icon-meh:before { content: "\e679"; }
.icon-github:before { content: "\e674"; }
.icon-laptop:before { content: "\e67a"; }
.icon-inbox:before { content: "\e67b"; }
.icon-ie:before { content: "\e67c"; }
.icon-home:before { content: "\e67d"; }
.icon-linechart:before { content: "\e67f"; }
.icon-link:before { content: "\e67e"; }
.icon-logout:before { content: "\e681"; }
.icon-mail:before { content: "\e682"; }
.icon-menuunfold:before { content: "\e683"; }
.icon-menufold:before { content: "\e684"; }
.icon-mobile:before { content: "\e685"; }
.icon-notification:before { content: "\e686"; }
.icon-paperclip:before { content: "\e687"; }
.icon-phone:before { content: "\e688"; }
.icon-picture:before { content: "\e689"; }
.icon-piechart:before { content: "\e68a"; }
.icon-poweroff:before { content: "\e68b"; }
.icon-setting:before { content: "\e68d"; }
.icon-sharealt:before { content: "\e68e"; }
.icon-search:before { content: "\e690"; }
.icon-poweroff1:before { content: "\e691"; }
.icon-solution:before { content: "\e68f"; }
.icon-tablet:before { content: "\e695"; }
.icon-team:before { content: "\e680"; }
.icon-totop:before { content: "\e69a"; }
.icon-videocamera:before { content: "\e69b"; }
.icon-user:before { content: "\e69c"; }
.icon-save:before { content: "\e69e"; }
.icon-unlock:before { content: "\e69f"; }
.icon-shoppingcart:before { content: "\e692"; }
.icon-windows:before { content: "\e6a0"; }
.icon-aliwangwango:before { content: "\e64a"; }
.icon-aliwangwang:before { content: "\e64b"; }
.icon-camerao:before { content: "\e652"; }
.icon-camera:before { content: "\e653"; }
.icon-eyeo:before { content: "\e66d"; }
.icon-eye:before { content: "\e66e"; }
.icon-enviroment:before { content: "\e665"; }
.icon-enviromento:before { content: "\e666"; }
.icon-staro:before { content: "\e693"; }
.icon-star:before { content: "\e694"; }
.icon-tags:before { content: "\e656"; }
.icon-tagso:before { content: "\e657"; }
.icon-tag:before { content: "\e658"; }
.icon-tago:before { content: "\e659"; }
.icon-cloud:before { content: "\e65a"; }
.icon-clouddownload:before { content: "\e65b"; }
.icon-cloudupload:before { content: "\e696"; }
.icon-clouduploado:before { content: "\e697"; }
.icon-clouddownloado:before { content: "\e698"; }
.icon-cloudo:before { content: "\e699"; }
.icon-iconfontcaretcircleoup:before { content: "\e60c"; }
.icon-loading:before { content: "\e6a1"; }
.icon-dislike:before { content: "\e6a2"; }
.icon-like:before { content: "\e6a3"; }
.icon-message:before { content: "\e6a4"; }
.icon-download:before { content: "\e663"; }
.icon-upload:before { content: "\e664"; }
.icon-paycircle:before { content: "\e6a8"; }
.icon-paycircleo:before { content: "\e6a9"; }
.icon-exclefile:before { content: "\e6ac"; }
.icon-pdffile:before { content: "\e6ab"; }
.icon-pptfile:before { content: "\e6a7"; }
.icon-jpgfile:before { content: "\e6aa"; }
.icon-unknowfile:before { content: "\e6a6"; }
.icon-minussquareo:before { content: "\e6ad"; }
.icon-plussquareo:before { content: "\e6ae"; }
.icon-iconfontdesktop:before { content: "\e662"; }
.icon-hdd:before { content: "\e675"; }
.icon-folderopen:before { content: "\e671"; }
.icon-circledown:before { content: "\e61d"; }
.icon-scan:before { content: "\e6af"; }
.icon-heart:before { content: "\e68c"; }
.icon-hearto:before { content: "\e6b0"; }
.icon-calculator:before { content: "\e6b1"; }
.icon-appstoreo:before { content: "\e6b2"; }
.icon-lock:before { content: "\e69d"; }
.icon-filetext:before { content: "\e66c"; }
.icon-export:before { content: "\e669"; }
.icon-export2:before { content: "\e6b4"; }
.icon-pushpino:before { content: "\e6b3"; }
.icon-pushpin:before { content: "\e6b5"; }
.icon-enter:before { content: "\e6b6"; }
.icon-qrcode:before { content: "\e6a5"; }
......@@ -4,13 +4,30 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="./index.css"/>
<!--[if lt IE 10]>
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
<![endif]-->
<title>报文编辑系统</title>
</head>
<body>
<div id="root"></div>
</body>
<!--[if lt IE 10]>
<script src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,es5-shim/4.5.7/es5-shim.min.js,es5-shim/4.5.7/es5-sham.min.js,html5shiv/3.7.2/html5shiv.min.js,media-match/2.0.2/media.match.min.js"></script>
<![endif]-->
<script>
window.serviceURL="http://39.107.232.54:8000/SF2Server";
window.CUR =[ 'EUR',
'USD',
'AUD',
'CAD',
'JPY',
'CHF',
'GBP',
'HKD',
'CNY'
];
</script>
<script src="./common.js"></script>
<script src="./index.js"></script>
</html>
......@@ -2,7 +2,7 @@ import './index.html';
import './index.less';
import ReactDOM from 'react-dom';
import React from 'react';
import { browserHistory } from 'react-router';
import { browserHistory ,hashHistory} from 'react-router';
import Routes from '../routes/index';
const Provider = require('react-redux').Provider;
const configureStore = require('../store/configureStore');
......@@ -10,7 +10,7 @@ const store = configureStore()
ReactDOM.render(
<Provider store={store}>
<Routes history={browserHistory} />
<Routes history={hashHistory} />
</Provider>,
document.getElementById('root')
);
......@@ -6,4 +6,4 @@
body {
background: #fafafa;
}
}
}
\ No newline at end of file
......@@ -33,6 +33,13 @@ module.exports.caseMenu = [
icon: 'poweroff',
num: '12',
dot: false
},
{
key: 'swift/mt103',
name: 'SWIFT编辑器',
icon: 'poweroff',
num: '12',
dot: false
}
]
......
......@@ -9,21 +9,32 @@ import Feature1_1 from '../feature/Feature1-1';
import Feature1_3 from '../feature/Feature1-3';
import NotFound from '../components/NotFound';
import Loding from '../components/Loding';
import SWFPage from "../swift/SWFPage2"
import LeadPage from "../swift/LeadPage"
import Preview from "../swift/Preview"
import Result from "../swift/Result"
function validate() {
// 在路由群载入时做 filter 处理
}
const Routes = ({ history }) =>
<Router history={history}>
<Route path="/login" component={Login}/>
<Router history={history} basename="/swiftedit">
{/*<Route path="/login" component={Login}/>*/}
<Route path="/" onEnter={validate}>
<IndexRedirect to="home" />
<Route component={App}>
<Route path="home" component={Home}/>
<Route path="home" component={LeadPage}/>
<Route path="home/:mctid" component={LeadPage}/>
<Route path="lead/:mctid" component={LeadPage}/>
<Route path="swift/:action/:mctid/:key" component={SWFPage}/>
<Route path="swift/:action/:mctid/:key/:rcvbic" component={SWFPage}/>
<Route path="swift/:action/:mctid/:key/:sndbic/:rcvbic" component={SWFPage}/>
<Route path="app" component={App}/>
<Route path="test" component={Test}/>
<Route path="loding" component={Loding}/>
<Route path="preview/:kind" component={Preview}/>
<Route path="result/:kind" component={Result}/>
<Route path="feature1" component={Feature1}/>
<Route path="feature1_1" component={Feature1_1}/>
<Route path="feature1_3" component={Feature1_3}/>
......
import types from '../../types';
export function updateTreeValue()
{
return {type:types.SWIFT_UPDATE_TREE_VALUE}
}
export function updateRcvBic(rcv_bic_info)
{
return {type:types.SWIFT_UPDATE_RCV_BIC,payload:{rcv_bic_info}}
}
export function updateSndBic(snd_bic_info)
{
return {type:types.SWIFT_UPDATE_SND_BIC,payload:{snd_bic_info}}
}
export function initSwiftMessageTree(tree)
{
return {type:types.SWIFT_INIT_TREE_VALUE,payload:{tree}}
}
export function updateSwiftMessage(swift_message)
{
return {type:types.SWIFT_UPDATE_SWIFT_MESSAGE,payload:{swift_message}}
}
\ No newline at end of file
import _ from 'lodash';
import { message } from 'antd';
import { createReducer } from '../../../util';
import types from '../../types';
import initialState from './swift_state';
import objectAssign from 'object-assign';
export default createReducer(initialState, {
[`${types.SWIFT_INIT_TREE_VALUE}`]: (state,{tree})=>{
return objectAssign({},state,{swift_message_tree:tree})
},
[`${types.SWIFT_UPDATE_TREE_VALUE}`]: (state)=>{
// let str = JSON.stringify(state)
// return JSON.parse(str)
return objectAssign({},state,{swift_message_tree:{...state.swift_message_tree}})
},
[`${types.SWIFT_STORE_TEMPLATE}`]: (state)=>state,
[`${types.SWIFT_STORE_MESSAGE}`]: (state)=>state,
[`${types.SWIFT_UPDATE_RCV_BIC}`]: (state,{rcv_bic_info})=>{
return objectAssign({},state,{rcv_bic_info})
},
[`${types.SWIFT_UPDATE_SND_BIC}`]: (state,{snd_bic_info})=>{
return objectAssign({},state,{snd_bic_info})
} ,
[`${types.SWIFT_UPDATE_SWIFT_MESSAGE}`]: (state,{swift_message})=>{
return objectAssign({},state,{swift_message})
},
})
\ No newline at end of file
const InitState = {
swift_message:"",
rcv_bic_info:{rcv_bic:'',err_msg:''},
snd_bic_info:{snd_bic:'',err_msg:''},
swift_message_tree:null,
extra:{}
}
export default InitState
\ No newline at end of file
......@@ -3,6 +3,7 @@ import { combineReducers } from 'redux';
import user from './modules/user/user_reducer';
import menu from './modules/menu/menu_reducer';
import swift from './modules/swift/swift_reducer'
/**
* combineReducers(reducers)
......@@ -39,5 +40,6 @@ import menu from './modules/menu/menu_reducer';
export default combineReducers({
user,
menu,
swift,
// routing: routerReducer
});
......@@ -20,5 +20,16 @@ export default keyMirror({
UID_NOT_FOUND : null,
FETCH_PROFILE : null,
LOGIN : null,
LOGOUT : null
LOGOUT : null,
//SWIFT
SWIFT_UPDATE_TREE_VALUE:null,
SWIFT_STORE_TEMPLATE:null,
SWIFT_STORE_MESSAGE:null,
SWIFT_UPDATE_RCV_BIC:null,
SWIFT_UPDATE_SND_BIC:null,
SWIFT_INIT_TREE_VALUE:null,
SWIFT_UPDATE_SWIFT_MESSAGE:null,
})
import React,{Component} from 'react'
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {Table,Steps,Row,Col} from 'antd'
import { updateTreeValue,updateRcvBic,initSwiftMessageTree ,updateSwiftMessage} from '../store/modules/swift/swift_action';
const Step = Steps.Step;
export const mty=[
{mty:"mt103",desp:"MT 103 Single Customer Credit Transfer"},
{mty:"mt195",desp:"MT 195 Queries"},
{mty:"mt196",desp:"MT 196 Answers"},
{mty:"mt199",desp:"MT 199 Free Format Message"},
{mty:"mt202",desp:"MT 202 General Financial Institution Transfer"},
{mty:"mt295",desp:"MT 295 Queries"},
{mty:"mt296",desp:"MT 296 Answers"},
{mty:"mt299",desp:"MT 299 Free Format Message"},
{mty:"mt410",desp:"MT 410 Acknowledgement"},
{mty:"mt420",desp:"MT 420 Tracer"},
{mty:"mt422",desp:"MT 422 Advice of Fate and Request for Instructions"},
{mty:"mt499",desp:"MT 499 Free Format Message"},
{mty:"mt700",desp:"MT 700 Issue of a Documentary Credit"},
{mty:"mt701",desp:"MT 701 General Financial Institution Transfer"},
{mty:"mt707",desp:"MT 707 Amendment to a Documentary Credit"},
{mty:"mt732",desp:"MT 732 Advice of Discharge"},
{mty:"mt740",desp:"MT 740 Authorisation to Reimburse"},
{mty:"mt747",desp:"MT 747 Amendment to an Authorisation to Reimburse"},
{mty:"mt750",desp:"MT 750 Advice of Discrepancy"},
{mty:"mt752",desp:"MT 752 Authorisation to Pay, Accept or Negotiate"},
{mty:"mt754",desp:"MT 754 Advice of Payment/Acceptance/Negotiation"},
{mty:"mt759",desp:"MT 759 Ancillary Trade Structured Message"},
{mty:"mt760",desp:"MT 760 Guarantee/Standby Letter of Credit"},
{mty:"mt767",desp:"MT 767 Guarantee/Standby Letter of Credit Amendment"},
{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:"mt999",desp:"MT 999 Free Format Message"},
]
// const columns = [{
// title: '创建报文',
// dataIndex: 'desp',
// key: 'desp',
// render:(text,record)=>{
// return <a href="javascript:void(0);" onClick={()=>{this.props.history.push(`swift/${record.mty}`)}}>Create {record.desp}</a>
// }
// },
// ]
export class LeadPage extends Component
{
columns = [{
title: '创建报文',
dataIndex: 'desp',
key: 'desp',
render:(text,record)=>{
return <a href="javascript:void(0);" onClick={()=>{
this.props.actions.initSwiftMessageTree(null) //清空
this.props.history.push(`swift/edit/${this.props.params.mctid||'NONE'}/${record.mty}/NONE`)
}
}>Create {record.desp}</a>
}
},
]
render()
{
return (
<div>
<Row style={{marginTop:'3em'}}>
<Col span={3}/>
<Col span={18}>
<Steps current={0}>
<Step title="选择类型" description="选择报文类型" />
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
<Step title="编辑完成" description="已完成提交" />
</Steps>
</Col>
<Col span={3}/>
</Row>
<Row>
<Col span={3}/>
<Col span={18}>
<Table columns={this.columns} dataSource={mty} />
</Col>
<Col span={3}/>
</Row>
</div>
)
}
}
const mapStateToProps = (state) => {
const {swift_message} = state.swift;
return {
value:swift_message
};
};
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({ initSwiftMessageTree }, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(LeadPage)
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,label:"Sender's Reference"},
{cyclist:'2',cycs:[
[{tag:'13C',status:O,tno:2,label:"Time Indication"}]
],
pattern:[{tag:'13C',status:O,tno:2,label:"Time Indication"}]
},
{tag:'23B',status:M,tno:3,label:'Bank Operation Code'},
{cyclist:'4',cycs:[
[
{tag:'23E',status:O,tno:4,label:"Instruction Code"}
],
],
pattern:[
{tag:'23E',status:O,tno:4,label:"Instruction Code"}
]
},
{tag:'26T',status:O,tno:5,label:'Transaction Type Code'},
{tag:'32A',status:M,tno:6,label:'Value Date/Currency/Interbank Settled Amount'},
{tag:'33B',status:O,tno:7,label:'Currency/Instructed Amount'},
{tag:'36',status:O,tno:8,label:'Exchange Rate'},
{tag:'50A',status:M,tno:9,letter:['50A','50F','50K'],label:'Ordering Customer'},
{tag:'51A',status:O,tno:10,label:'Sending Institution'},
{tag:'52A',status:O,tno:11,letter:['52A','52D'],label:"Ordering Institution"},
{tag:'53A',status:O,tno:12,letter:['53A','53B','53D'],label:"Sender's Correspondent"},
{tag:'54A',status:O,tno:13,letter:['54A','54B','54D'],label:"Receiver's Correspondent"},
{tag:'55A',status:O,tno:14,letter:['55A','55B','55D'],label:'Third Reimbursement Institution'},
{tag:'56A',status:O,tno:15,letter:['56A','56C','56D'],label:'Intermediary Institution'},
{tag:'57A',status:O,tno:16,letter:['57A','57B','57C','57D'],label:'Account With Institution'},
{tag:'59',status:M,tno:17,letter:['59','59A','59F'],label:'Beneficiary Customer'},
{tag:'70',status:O,tno:18,label:'Remittance Information'},
{tag:'71A',status:M,tno:19,label:'Details of Charges'},
{cyclist:'20',cycs:[
[
{tag:'71F',status:O,tno:20,label:"Sender's Charges"}
],
],
pattern:[
{tag:'71F',status:O,tno:20,label:"Sender's Charges"}
],
},
{tag:'71G',status:O,tno:21,label:"Receiver's Charges"},
{tag:'72',status:O,tno:22,label:'Sender to Receiver Information'},
{tag:'77B',status:O,tno:23,label:'Regulatory Reporting'},
// {tag:'77T',status:M,tno:24,label:'Envelope Contents'},
]
const Title = "MT 103 Single Customer Credit Transfer"
export default { Tags,Title} ;
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{cyclist:'3',cycs:[[
{tag:'13C',status:O,tno:3,letter:[],label:"Time Indication"},
]],
pattern:[
{tag:'13C',status:O,tno:3,letter:[],label:"Time Indication"},
] },
{tag:'32A',status:M,tno:4,letter:[],label:"Value Date, Currency Code, Amount"},
{tag:'52A',status:O,tno:5,letter:["52A","52D"],label:"Ordering Institution"},
{tag:'53A',status:O,tno:6,letter:["53A","53B","53D"],label:"Sender's Correspondent"},
{tag:'54A',status:O,tno:7,letter:["54A","54B","54D"],label:"Receiver's Correspondent"},
{tag:'56A',status:O,tno:8,letter:["56A","56D"],label:"Intermediary"},
{tag:'57A',status:O,tno:9,letter:["57A","57B","57D"],label:"Account With Institution"},
{tag:'58A',status:M,tno:10,letter:["58A","58D"],label:"Beneficiary Institution"},
{tag:'72',status:O,tno:11,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 202 General Financial Institution Transfer"
export default { Tags,Title}
\ No newline at end of file
const Tags =[
{"seqlist":"A","cyccnt":0,"status":"M","seqs":[[
{"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]},
{"cyclist":"3","cycs":[[
{"tag":"13C","status":"O","tno":3,"letter":[],"label":"Time Indication","tagValue":[{},null]}
]],
"pattern":[
{"tag":"13C","status":"O","tno":3,"letter":[],"label":"Time Indication","tagValue":[{},null]}
] },
{"tag":"32A","status":"M","tno":4,"letter":[],"label":"Value Date, Currency Code, Amount","tagValue":[{},null]},
{"tag":"52A","status":"O","tno":5,"letter":["52A","52D"],"label":"Ordering Institution","tagValue":[{},null]},
{"tag":"53A","status":"O","tno":6,"letter":["53A","53B","53D"],"label":"Sender's Correspondent","tagValue":[{},null]},
{"tag":"54A","status":"O","tno":7,"letter":["54A","54B","54D"],"label":"Receiver's Correspondent","tagValue":[{},null]},
{"tag":"56A","status":"O","tno":8,"letter":["56A","56D"],"label":"Intermediary","tagValue":[{},null]},
{"tag":"57A","status":"O","tno":9,"letter":["57A","57B","57D"],"label":"Account With Institution","tagValue":[{},null]},
{"tag":"58A","status":"M","tno":10,"letter":["58A","58D"],"label":"Beneficiary Institution","tagValue":[{},null]},
{"tag":"72","status":"O","tno":11,"letter":[],"label":"Sender to Receiver Information","tagValue":[{},null]}
]],
"pattern":[
{"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]},
{"cyclist":"3","cycs":[[
{"tag":"13C","status":"O","tno":3,"letter":[],"label":"Time Indication","tagValue":[{},null]}
]],
"pattern":[
{"tag":"13C","status":"O","tno":3,"letter":[],"label":"Time Indication","tagValue":[{},null]}
] },
{"tag":"32A","status":"M","tno":4,"letter":[],"label":"Value Date, Currency Code, Amount","tagValue":[{},null]},
{"tag":"52A","status":"O","tno":5,"letter":["52A","52D"],"label":"Ordering Institution","tagValue":[{},null]},
{"tag":"53A","status":"O","tno":6,"letter":["53A","53B","53D"],"label":"Sender's Correspondent","tagValue":[{},null]},
{"tag":"54A","status":"O","tno":7,"letter":["54A","54B","54D"],"label":"Receiver's Correspondent","tagValue":[{},null]},
{"tag":"56A","status":"O","tno":8,"letter":["56A","56D"],"label":"Intermediary","tagValue":[{},null]},
{"tag":"57A","status":"O","tno":9,"letter":["57A","57B","57D"],"label":"Account With Institution","tagValue":[{},null]},
{"tag":"58A","status":"M","tno":10,"letter":["58A","58D"],"label":"Beneficiary Institution","tagValue":[{},null]},
{"tag":"72","status":"O","tno":11,"letter":[],"label":"Sender to Receiver Information","tagValue":[{},null]}
],
"desp":"Mandatory Sequence A General Information" },
{"seqlist":"B","cyccnt":0,"status":"M","seqs":[[
{"tag":"50A","status":"M","tno":12,"letter":["50A","50F","50K"],"label":"Ordering Customer","tagValue":[{},null]},
{"tag":"52A","status":"O","tno":13,"letter":["52A","52D"],"label":"Ordering Institution","tagValue":[{},null]},
{"tag":"56A","status":"O","tno":14,"letter":["56A","56C","56D"],"label":"Intermediary Institution","tagValue":[{},null]},
{"tag":"57A","status":"O","tno":15,"letter":["57A","57B","57C","57D"],"label":"Account With Institution","tagValue":[{},null]},
{"tag":"59","status":"M","tno":16,"letter":["59","59A","59F"],"label":"Beneficiary Customer","tagValue":[{},null]},
{"tag":"70","status":"O","tno":17,"letter":[],"label":"Remittance Information","tagValue":[{},null]},
{"tag":"72","status":"O","tno":18,"letter":[],"label":"Sender to Receiver Information","tagValue":[{},null]},
{"tag":"33B","status":"O","tno":19,"letter":[],"label":"Currency/Instructed Amount","tagValue":[{},null]}
]],
"pattern":[
{"tag":"50A","status":"M","tno":12,"letter":["50A","50F","50K"],"label":"Ordering Customer","tagValue":[{},null]},
{"tag":"52A","status":"O","tno":13,"letter":["52A","52D"],"label":"Ordering Institution","tagValue":[{},null]},
{"tag":"56A","status":"O","tno":14,"letter":["56A","56C","56D"],"label":"Intermediary Institution","tagValue":[{},null]},
{"tag":"57A","status":"O","tno":15,"letter":["57A","57B","57C","57D"],"label":"Account With Institution","tagValue":[{},null]},
{"tag":"59","status":"M","tno":16,"letter":["59","59A","59F"],"label":"Beneficiary Customer","tagValue":[{},null]},
{"tag":"70","status":"O","tno":17,"letter":[],"label":"Remittance Information","tagValue":[{},null]},
{"tag":"72","status":"O","tno":18,"letter":[],"label":"Sender to Receiver Information","tagValue":[{},null]},
{"tag":"33B","status":"O","tno":19,"letter":[],"label":"Currency/Instructed Amount","tagValue":[{},null]}
],
"desp":"Mandatory Sequence B Underlying Customer Credit Transfer Details" }
]
const Title="MT 202 COV General Financial Institution Transfer"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{cyclist:'1',cycs:[[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount Acknowledged"},
]],
pattern:[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount Acknowledged"},
] },
{tag:'72',status:O,tno:4,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 410 Acknowledgement"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{cyclist:'1',cycs:[[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount Traced"},
]],
pattern:[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount Traced"},
] },
{tag:'30',status:O,tno:4,letter:[],label:"Date of Collection Instruction"},
{tag:'59',status:O,tno:5,letter:[],label:"Drawee"},
{tag:'72',status:O,tno:6,letter:[],label:"Sender to Receiver Information"},
]
const Title="Tracer"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{cyclist:'1',cycs:[[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount of Collection"},
]],
pattern:[
{tag:'20',status:M,tno:1,letter:[],label:"Sending Bank's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B","32K"],label:"Amount of Collection"},
] },
{tag:'72',status:O,tno:4,letter:[],label:"Sender to Receiver Information"},
{tag:'75',status:O,tno:5,letter:[],label:"Queries"},
{tag:'76',status:O,tno:6,letter:[],label:"Answers"},
]
const Title="Advice of Fate and Request for Instructions"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:O,tno:2,letter:[],label:"Related Reference"},
{cyclist:'3',cycs:[[
{tag:'79',status:M,tno:3,letter:[],label:"Narrative"},
]],
pattern:[
{tag:'79',status:M,tno:3,letter:[],label:"Narrative"},
] },
]
const Title="Free Format Message"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'40A',status:M,tno:2,letter:[],label:"Form of Documentary Credit"},
{tag:'20',status:M,tno:3,letter:[],label:"Documentary Credit Number"},
{tag:'23',status:O,tno:4,letter:[],label:"Reference to Pre-Advice"},
{tag:'31C',status:M,tno:5,letter:[],label:"Date of Issue"},
{tag:'40E',status:M,tno:6,letter:[],label:"Applicable Rules"},
{tag:'31D',status:M,tno:7,letter:[],label:"Date and Place of Expiry"},
{tag:'51A',status:O,tno:8,letter:["51A","51D"],label:"Applicant Bank"},
{tag:'50',status:M,tno:9,letter:[],label:"Applicant"},
{tag:'59',status:M,tno:10,letter:[],label:"Beneficiary"},
{tag:'32B',status:M,tno:11,letter:[],label:"Currency Code, Amount"},
{tag:'39A',status:O,tno:12,letter:[],label:"Percentage Credit Amount Tolerance"},
{tag:'39C',status:O,tno:13,letter:[],label:"Additional Amounts Covered"},
{tag:'41A',status:M,tno:14,letter:["41A","41D"],label:"Available With ... By ..."},
{tag:'42C',status:O,tno:15,letter:[],label:"Drafts at ..."},
{tag:'42A',status:O,tno:16,letter:["42A","42D"],label:"Drawee"},
{tag:'42M',status:O,tno:17,letter:[],label:"Mixed Payment Details"},
{tag:'42P',status:O,tno:18,letter:[],label:"Negotiation/Deferred Payment Details"},
{tag:'43P',status:O,tno:19,letter:[],label:"Partial Shipments"},
{tag:'43T',status:O,tno:20,letter:[],label:"Transhipment"},
{tag:'44A',status:O,tno:21,letter:[],label:"Place of Taking in Charge/Dispatch from .../Place of Receipt"},
{tag:'44E',status:O,tno:22,letter:[],label:"Port of Loading/Airport of Departure"},
{tag:'44F',status:O,tno:23,letter:[],label:"Port of Discharge/Airport of Destination"},
{tag:'44B',status:O,tno:24,letter:[],label:"Place of Final Destination/For Transportation to .../Place of Delivery"},
{tag:'44C',status:O,tno:25,letter:[],label:"Latest Date of Shipment"},
{tag:'44D',status:O,tno:26,letter:[],label:"Shipment Period"},
{tag:'45A',status:O,tno:27,letter:[],label:"Description of Goods and/or Services"},
{tag:'46A',status:O,tno:28,letter:[],label:"Documents Required"},
{tag:'47A',status:O,tno:29,letter:[],label:"Additional Conditions"},
{tag:'49G',status:O,tno:30,letter:[],label:"Special Payment Conditions for Beneficiary"},
{tag:'49H',status:O,tno:31,letter:[],label:"Special Payment Conditions for Receiving Bank"},
{tag:'71D',status:O,tno:32,letter:[],label:"Charges"},
{tag:'48',status:O,tno:33,letter:[],label:"Period for Presentation in Days"},
{tag:'49',status:M,tno:34,letter:[],label:"Confirmation Instructions"},
{tag:'58A',status:O,tno:35,letter:["58A","58D"],label:"Requested Confirmation Party"},
{tag:'53A',status:O,tno:36,letter:["53A","53D"],label:"Reimbursing Bank"},
{tag:'78',status:O,tno:37,letter:[],label:"Instructions to the Paying/Accepting/Negotiating Bank"},
{tag:'57A',status:O,tno:38,letter:["57A","57B","57D"],label:"'Advise Through' Bank"},
{tag:'72Z',status:O,tno:39,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 700 Issue of a Documentary Credit"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'20',status:M,tno:2,letter:[],label:"Documentary Credit Number"},
{tag:'45A',status:O,tno:3,letter:[],label:"Description of Goods and/or Services"},
{tag:'46A',status:O,tno:4,letter:[],label:"Documents Required"},
{tag:'47A',status:O,tno:5,letter:[],label:"Additional Conditions"},
{tag:'49G',status:O,tno:6,letter:[],label:"Special Payment Conditions for Beneficiary"},
{tag:'49H',status:O,tno:7,letter:[],label:"Special Payment Conditions for Receiving Bank"},
]
const Title="MT 701 General Financial Institution Transfer"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'20',status:M,tno:2,letter:[],label:"Sender's Reference"},
{tag:'21',status:M,tno:3,letter:[],label:"Receiver's Reference"},
{tag:'23',status:M,tno:4,letter:[],label:"Issuing Bank's Reference"},
{tag:'52A',status:O,tno:5,letter:["52A","52D"],label:"Issuing Bank"},
{tag:'50B',status:O,tno:6,letter:[],label:"Non-Bank Issuer"},
{tag:'31C',status:M,tno:7,letter:[],label:"Date of Issue"},
{tag:'26E',status:M,tno:8,letter:[],label:"Number of Amendment"},
{tag:'30',status:M,tno:9,letter:[],label:"Date of Amendment"},
{tag:'22A',status:M,tno:10,letter:[],label:"Purpose of Message"},
{tag:'23S',status:O,tno:11,letter:[],label:"Cancellation Request"},
{tag:'40A',status:O,tno:12,letter:[],label:"Form of Documentary Credit"},
{tag:'40E',status:O,tno:13,letter:[],label:"Applicable Rules"},
{tag:'31D',status:O,tno:14,letter:[],label:"Date and Place of Expiry"},
{tag:'50',status:O,tno:15,letter:[],label:"Changed Applicant Details"},
{tag:'59',status:O,tno:16,letter:[],label:"Beneficiary"},
{tag:'32B',status:O,tno:17,letter:[],label:"Increase of Documentary Credit Amount"},
{tag:'33B',status:O,tno:18,letter:[],label:"Decrease of Documentary Credit Amount"},
{tag:'39A',status:O,tno:19,letter:[],label:"Percentage Credit Amount Tolerance"},
{tag:'39C',status:O,tno:20,letter:[],label:"Additional Amounts Covered"},
{tag:'41A',status:O,tno:21,letter:["41A","41D"],label:"Available With ... By ..."},
{tag:'42C',status:O,tno:22,letter:[],label:"Drafts at ..."},
{tag:'42A',status:O,tno:23,letter:["42A","42D"],label:"Drawee"},
{tag:'42M',status:O,tno:24,letter:[],label:"Mixed Payment Details"},
{tag:'42P',status:O,tno:25,letter:[],label:"Negotiation/Deferred Payment Details"},
{tag:'43P',status:O,tno:26,letter:[],label:"Partial Shipments"},
{tag:'43T',status:O,tno:27,letter:[],label:"Transhipment"},
{tag:'44A',status:O,tno:28,letter:[],label:"Place of Taking in Charge/Dispatch from .../Place of Receipt"},
{tag:'44E',status:O,tno:29,letter:[],label:"Port of Loading/Airport of Departure"},
{tag:'44F',status:O,tno:30,letter:[],label:"Port of Discharge/Airport of Destination"},
{tag:'44B',status:O,tno:31,letter:[],label:"Place of Final Destination/For Transportation to .../Place of Delivery"},
{tag:'44C',status:O,tno:32,letter:[],label:"Latest Date of Shipment"},
{tag:'44D',status:O,tno:33,letter:[],label:"Shipment Period"},
{tag:'45B',status:O,tno:34,letter:[],label:"Description of Goods and/or Services"},
{tag:'46B',status:O,tno:35,letter:[],label:"Documents Required"},
{tag:'47B',status:O,tno:36,letter:[],label:"Additional Conditions"},
{tag:'49M',status:O,tno:37,letter:[],label:"Special Payment Conditions for Beneficiary"},
{tag:'49N',status:O,tno:38,letter:[],label:"Special Payment Conditions for Receiving Bank"},
{tag:'71D',status:O,tno:39,letter:[],label:"Charges"},
{tag:'71N',status:O,tno:40,letter:[],label:"Amendment Charge Payable By"},
{tag:'48',status:O,tno:41,letter:[],label:"Period for Presentation in Days"},
{tag:'49',status:O,tno:42,letter:[],label:"Confirmation Instructions"},
{tag:'58A',status:O,tno:43,letter:["58A","58D"],label:"Requested Confirmation Party"},
{tag:'53A',status:O,tno:44,letter:["53A","53D"],label:"Reimbursing Bank"},
{tag:'78',status:O,tno:45,letter:[],label:"Instructions to the Paying/Accepting/Negotiating Bank"},
{tag:'57A',status:O,tno:46,letter:["57A","57B","57D"],label:"'Advise Through' Bank"},
{tag:'72Z',status:O,tno:47,letter:[],label:"Sender to Receiver Information"},
]
const Title="Amendment to a Documentary Credit"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Sender's TRN"},
{tag:'21',status:M,tno:2,letter:[],label:"Presenting Bank's Reference"},
{tag:'30',status:M,tno:3,letter:[],label:"Date of Advice of Payment/Acceptance/Negotiation"},
{tag:'32B',status:M,tno:4,letter:[],label:"Amount of Utilisation"},
{tag:'72Z',status:O,tno:5,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 732 Advice of Discharge"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Documentary Credit Number"},
{tag:'25',status:O,tno:2,letter:[],label:"Account Identification"},
{tag:'40F',status:M,tno:3,letter:[],label:"Applicable Rules"},
{tag:'31D',status:O,tno:4,letter:[],label:"Date and Place of Expiry"},
{tag:'58A',status:O,tno:5,letter:["58A","58D"],label:"Negotiating Bank"},
{tag:'59',status:O,tno:6,letter:[],label:"Beneficiary"},
{tag:'32B',status:M,tno:7,letter:[],label:"Credit Amount"},
{tag:'39A',status:O,tno:8,letter:[],label:"Percentage Credit Amount Tolerance"},
{tag:'39C',status:O,tno:9,letter:[],label:"Additional Amounts Covered"},
{tag:'41A',status:M,tno:10,letter:["41A","41D"],label:"Available With ... By ..."},
{tag:'42C',status:O,tno:11,letter:[],label:"Drafts at ..."},
{tag:'42A',status:O,tno:12,letter:["42A","42D"],label:"Drawee"},
{tag:'42M',status:O,tno:13,letter:[],label:"Mixed Payment Details"},
{tag:'42P',status:O,tno:14,letter:[],label:"Negotiation/Deferred Payment Details"},
{tag:'71A',status:O,tno:15,letter:[],label:"Reimbursing Bank's Charges"},
{tag:'71D',status:O,tno:16,letter:[],label:"Other Charges"},
{tag:'72Z',status:O,tno:17,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 740 Authorisation to Reimburse"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Documentary Credit Number"},
{tag:'21',status:O,tno:2,letter:[],label:"Reimbursing Bank's Reference"},
{tag:'30',status:M,tno:3,letter:[],label:"Date of the Original Authorisation to Reimburse"},
{tag:'31E',status:O,tno:4,letter:[],label:"New Date of Expiry"},
{tag:'32B',status:O,tno:5,letter:[],label:"Increase of Documentary Credit Amount"},
{tag:'33B',status:O,tno:6,letter:[],label:"Decrease of Documentary Credit Amount"},
{tag:'34B',status:O,tno:7,letter:[],label:"New Documentary Credit Amount After Amendment"},
{tag:'39A',status:O,tno:8,letter:[],label:"Percentage Credit Amount Tolerance"},
{tag:'39C',status:O,tno:9,letter:[],label:"Additional Amounts Covered"},
{tag:'72Z',status:O,tno:10,letter:[],label:"Sender to Receiver Information"},
{tag:'77',status:O,tno:11,letter:[],label:"Narrative"},
]
const Title="MT 747 Amendment to an Authorisation to Reimburse"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Sender's Reference"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32B',status:M,tno:3,letter:[],label:"Principal Amount"},
{tag:'33B',status:O,tno:4,letter:[],label:"Additional Amount"},
{tag:'71D',status:O,tno:5,letter:[],label:"Charges to be Deducted"},
{tag:'73A',status:O,tno:6,letter:[],label:"Charges to be Added"},
{tag:'34B',status:O,tno:7,letter:[],label:"Total Amount to be Paid"},
{tag:'57A',status:O,tno:8,letter:["57A","57B","57D"],label:"Account With Bank"},
{tag:'72Z',status:O,tno:9,letter:[],label:"Sender to Receiver Information"},
{tag:'77J',status:M,tno:10,letter:[],label:"Discrepancies"},
]
const Title="MT 750 Advice of Discrepancy"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Documentary Credit Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Presenting Bank's Reference"},
{tag:'23',status:M,tno:3,letter:[],label:"Further Identification"},
{tag:'30',status:M,tno:4,letter:[],label:"Date of Advice of Discrepancy or Mailing"},
{tag:'32B',status:O,tno:5,letter:[],label:"Total Amount Advised"},
{tag:'71D',status:O,tno:6,letter:[],label:"Charges Deducted"},
{tag:'33A',status:O,tno:7,letter:["33A","33B"],label:"Net Amount"},
{tag:'53A',status:O,tno:8,letter:["53A","53B","53D"],label:"Sender's Correspondent"},
{tag:'54A',status:O,tno:9,letter:["54A","54B","54D"],label:"Receiver's Correspondent"},
{tag:'72Z',status:O,tno:10,letter:[],label:"Sender to Receiver Information"},
{tag:'79Z',status:O,tno:11,letter:[],label:"Narrative"},
]
const Title="MT 752 Authorisation to Pay, Accept or Negotiate"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Sender's Reference"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'32A',status:M,tno:3,letter:["32A","32B"],label:"Principal Amount Paid/Accepted/Negotiated"},
{tag:'33B',status:O,tno:4,letter:[],label:"Additional Amounts"},
{tag:'71D',status:O,tno:5,letter:[],label:"Charges Deducted"},
{tag:'73A',status:O,tno:6,letter:[],label:"Charges Added"},
{tag:'34A',status:O,tno:7,letter:["34A","34B"],label:"Total Amount Claimed"},
{tag:'53A',status:O,tno:8,letter:["53A","53B","53D"],label:"Reimbursing Bank"},
{tag:'57A',status:O,tno:9,letter:["57A","57B","57D"],label:"Account With Bank"},
{tag:'58A',status:O,tno:10,letter:["58A","58D"],label:"Beneficiary Bank"},
{tag:'72Z',status:O,tno:11,letter:[],label:"Sender to Receiver Information"},
{tag:'77',status:O,tno:12,letter:[],label:"Narrative"},
]
const Title="MT 754 Advice of Payment/Acceptance/Negotiation"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'20',status:M,tno:2,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:O,tno:3,letter:[],label:"Related Reference Number"},
{tag:'22D',status:M,tno:4,letter:[],label:"Form of Undertaking"},
{tag:'23',status:O,tno:5,letter:[],label:"Undertaking Number"},
{tag:'52A',status:O,tno:6,letter:['52A','52D'],label:"Issuer"},
{tag:'23H',status:M,tno:7,letter:[],label:"Function of Message"},
{tag:'45D',status:M,tno:8,letter:[],label:"Narrative"},
{tag:'23X',status:O,tno:9,letter:[],label:"File Identification"},
]
const Title="MT 759 Ancillary Trade Structured Message"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'20',status:M,tno:2,letter:[],label:"Transaction Reference Number"},
{tag:'23',status:M,tno:3,letter:[],label:"Further Identification"},
{tag:'30',status:O,tno:4,letter:[],label:"Date"},
{tag:'40C',status:M,tno:5,letter:[],label:"Applicable Rules"},
{tag:'77C',status:M,tno:6,letter:[],label:"Details of Guarantee"},
{tag:'72',status:O,tno:7,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 760 Guarantee/Standby Letter of Credit"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'27',status:M,tno:1,letter:[],label:"Sequence of Total"},
{tag:'20',status:M,tno:2,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:3,letter:[],label:"Related Reference"},
{tag:'23',status:M,tno:4,letter:[],label:"Further Identification"},
{tag:'30',status:O,tno:5,letter:[],label:"Date"},
{tag:'26E',status:O,tno:6,letter:[],label:"Number of Amendment"},
{tag:'31C',status:M,tno:7,letter:[],label:"Date of Issue or Request to Issue"},
{tag:'77C',status:M,tno:8,letter:[],label:"Amendment Details"},
{tag:'72',status:O,tno:9,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 767 Guarantee/Standby Letter of Credit Amendment"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'25',status:O,tno:3,letter:[],label:"Account Identification"},
{tag:'30',status:M,tno:4,letter:[],label:"Date of Message Being Acknowledged"},
{tag:'32B',status:O,tno:5,letter:["32B","32D"],label:"Amount of Charges"},
{tag:'57A',status:O,tno:6,letter:["57A","57B","57D"],label:"Account With Bank"},
{tag:'71B',status:O,tno:7,letter:[],label:"Details of Charges"},
{tag:'72',status:O,tno:8,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 768 Acknowledgement of a Guarantee/Standby Message"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'25',status:O,tno:3,letter:[],label:"Account Identification"},
{tag:'30',status:O,tno:4,letter:[],label:"Date of Reduction or Release"},
{tag:'32B',status:O,tno:5,letter:["32B","32D"],label:"Amount of Charges"},
{tag:'33B',status:O,tno:6,letter:[],label:"Amount Reduced or Released"},
{tag:'34B',status:O,tno:7,letter:[],label:"Amount Outstanding"},
{tag:'39C',status:O,tno:8,letter:[],label:"Amount Specification"},
{tag:'57A',status:O,tno:9,letter:["57A","57B","57D"],label:"Account With Bank"},
{tag:'71B',status:O,tno:10,letter:[],label:"Details of Charges"},
{tag:'72',status:O,tno:11,letter:[],label:"Sender to Receiver Information"},
]
const Title="MT 769 Advice of Reduction or Release"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:O,tno:2,letter:[],label:"Related Reference"},
{cyclist:'3',cycs:[[
{tag:'79',status:M,tno:3,letter:[],label:"Narrative"},
]],
pattern:[
{tag:'79',status:M,tno:3,letter:[],label:"Narrative"},
] },
]
const Title="Free Format Message"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'75',status:M,tno:3,letter:[],label:"Queries"},
{tag:'77A',status:O,tno:4,letter:[],label:"Narrative"},
{tag:'11R',status:O,tno:5,letter:["11R","11S"],label:"MT and Date of the Original Message"},
{tag:'79',status:O,tno:6,letter:[],label:"Narrative Description of the Message to Which the Query Relates"},
{tag:'',status:O,tno:7,letter:[],label:"Copy of at least the Mandatory Fields of the Original Message"},
]
const Title="Queries"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:M,tno:2,letter:[],label:"Related Reference"},
{tag:'76',status:M,tno:3,letter:[],label:"Answers"},
{tag:'77A',status:O,tno:4,letter:[],label:"Narrative"},
{tag:'11R',status:O,tno:5,letter:["11R","11S"],label:"MT and Date of the Original Message"},
{tag:'79',status:O,tno:6,letter:[],label:"Narrative Description of the Original Message to Which the Answer Relates"},
{tag:'',status:O,tno:7,letter:[],label:"Copy of at least the Mandatory Fields of the Original Message"},
]
const Title="Answers"
export default { Tags,Title}
\ No newline at end of file
const M='M'
const O='O'
const Tags=[
{tag:'20',status:M,tno:1,letter:[],label:"Transaction Reference Number"},
{tag:'21',status:O,tno:2,letter:[],label:"Related Reference"},
{tag:'79',status:M,tno:3,letter:[],label:"Narrative"},
]
const Title="Free Format Message"
export default { Tags,Title}
\ No newline at end of file
import MTn96 from './MTn96'
import MTn95 from './MTn95'
import MTn99 from './MTn99'
import MT760 from './MT760'
import MT420 from './MT420'
import MT750 from './MT750'
import MT410 from './MT410'
import MT740 from './MT740'
import MT103 from './MT103'
import MT202 from './MT202'
import MT422 from './MT422'
import MT499 from './MT499'
import MT752 from './MT752'
import MT732 from './MT732'
import MT754 from './MT754'
import MT700 from './MT700'
import MT799 from './MT799'
import MT701 from './MT701'
import MT767 from './MT767'
import MT768 from './MT768'
import MT747 from './MT747'
import MT769 from './MT769'
import MT707 from './MT707'
import MT759 from './MT759'
import MT202COV from './MT202COV'
export default function MTFactory(mty)
{
if(mty=="mt202cov")
return MT202COV
if(mty=="mt760")
return MT760
if(mty=="mt759")
return MT759
if(mty=="mt420")
return MT420
if(mty=="mt750")
return MT750
if(mty=="mt410")
return MT410
if(mty=="mt740")
return MT740
if(mty=="mt103")
return MT103
if(mty=="mt202")
return MT202
if(mty=="mt422")
return MT422
if(mty=="mt499")
return MT499
if(mty=="mt752")
return MT752
if(mty=="mt732")
return MT732
if(mty=="mt754")
return MT754
if(mty=="mt700")
return MT700
if(mty=="mt799")
return MT799
if(mty=="mt701")
return MT701
if(mty=="mt767")
return MT767
if(mty=="mt768")
return MT768
if(mty=="mt747")
return MT747
if(mty=="mt769")
return MT769
if(mty=="mt707")
return MT707
if(/mt\d96/.test(mty))
return MTn96
if(/mt\d95/.test(mty))
return MTn95
if(/mt\d99/.test(mty))
return MTn99
}
\ No newline at end of file
export default function (mty,swift_message_tree)
{
let vali_func = FUNC_SET[mty]
if(!vali_func)
return
return vali_func(swift_message_tree)
}
function mt700({Tags}){
let count = 0
new Array(27,28,29,30,31).forEach(i=>{
let {tagValue:itemValue} = Tags[i-1]
if(!itemValue || itemValue.length < 2 || !itemValue[1])
return
count+=itemValue[1].replace(/[\r\n]{1,2}/g,'').length
});
if(count > 63400)
return `45A,46A,47A,49G,49H总长度不得超过63400个字符`
}
function mt707({Tags}){
let count = 0
new Array(34,35,36,37,38).forEach(i=>{
let {tagValue:itemValue} = Tags[i-1]
if(!itemValue || itemValue.length < 2 || !itemValue[1])
return
count+=itemValue[1].replace(/[\r\n]{1,2}/g,'').length
});
if(count > 63400)
return `45B,46B,47B,49M,49N总长度不得超过63400个字符`
}
const FUNC_SET={mt700,mt707}
\ No newline at end of file
import React,{Component} from 'react'
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {Input,Table,Steps,Row,Col,Button} from 'antd'
import { updateTreeValue,updateRcvBic,initSwiftMessageTree,updateSwiftMessage } from '../store/modules/swift/swift_action';
const Step = Steps.Step;
class PreView extends Component{
render()
{
return (<div>
<Row style={{marginTop:'3em'}}>
<Col span={3}/>
<Col span={18}>
{
this.props.params.kind=='0'?
<Steps current={1}>
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
<Step title="编辑完成" description="已完成提交" />
</Steps>
:
<Steps current={2}>
<Step title="选择类型" description="选择报文类型" />
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
<Step title="编辑完成" description="已完成提交" />
</Steps>
}
</Col>
<Col span={3}/>
</Row>
<Row>
<Col span={3}>
</Col>
<Col span={18}>
{/*onChange={e=>this.props.actions.updateSwiftMessage(e.target.value)}*/}
<Input type="textarea" readOnly="readonly" value={this.props.value} rows={20} cols={50} />
</Col>
<Col span={3}>
</Col>
</Row>
<Row style={{marginTop:'3em'}}>
<Col span={24} style={{textAlign:'center'}}>
<Button type="primary" icon="check" title="save" style={{marginRight:'1em'}} onClick={()=>this.props.history.push(`result/${this.props.params.kind}`)} >Save</Button>
<Button type="dangerous" icon="cross" title="cancel" onClick={()=>this.props.history.goBack()}>Return</Button>
</Col>
</Row>
</div>
)
}
}
const mapStateToProps = (state) => {
const {swift_message} = state.swift;
return {
value:swift_message
};
};
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({ updateTreeValue,updateRcvBic,initSwiftMessageTree,updateSwiftMessage }, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(PreView)
\ No newline at end of file
import React,{Component} from 'react'
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {Input,Table,Steps,Row,Col,Progress,Spin} from 'antd'
import { updateTreeValue,updateRcvBic,initSwiftMessageTree } from '../store/modules/swift/swift_action';
import ServiceAPI from './ServiceAPI'
const Step = Steps.Step;
class Result extends Component{
constructor(props)
{
super(props)
this.state={isOK:-1}
}
componentWillMount()
{
//提交报文
let datas = {MSGTYP:this.props.extra.msgtyp.substring(2),SNDKEY:this.props.sndkey,MCTSWTID:this.props.extra.mctid}
//取出20,21
let tags = this.props.swift_message_tree.Tags
if(tags.length && tags[0].tag == '20')
datas.F20=tags[0].tagValue[1]
if(tags.length > 1 && tags[1].tag == '21')
datas.F21=tags[1].tagValue[1]
ServiceAPI.saveMessage(
// {
// smhinr:this.props.extra.smhinr,
// sf2msg:this.props.swift_message,
// datas:{
// msgtyp:this.props.extra.msgtyp,
// sndkey:this.props.rcv_bic
// }
// }
`smhinr=${this.props.extra.smhinr?this.props.extra.smhinr:''}&sf2msg=${encodeURIComponent(this.props.swift_message)}&datas=${encodeURIComponent(JSON.stringify(datas))}`
).then(data=>{
if(typeof data=='string')
{
data = JSON.parse(data)
}
if(data.errorCode == '0000')
this.setState({isOK:0})
else
this.setState({isOK:0,error:"保存失败!"})
}).catch(reason=>{
console.log(reason)
this.setState({isOK:0,error:'保存失败!'})
});
}
render()
{
return (<div>
<Row style={{marginTop:'3em'}}>
<Col span={3}/>
<Col span={18}>
{
this.props.params.kind=='0'?
<Steps current={2}>
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
<Step title="编辑完成" description="已完成提交" />
</Steps>
:
<Steps current={3}>
<Step title="选择类型" description="选择报文类型" />
<Step title="报文编辑" description="编辑报文栏位值" />
<Step title="预览报文" description="预览报文" />
<Step title="编辑完成" description="已完成提交" />
</Steps>
}
</Col>
<Col span={3}/>
</Row>
<Row>
<Col span={3}></Col>
<Col span={18} style={{textAlign:'center',paddingTop:'5em'}}>
{
this.state.isOK!==0?
<Spin size="large" />:
<Progress type="circle" percent={!this.state.error?100:70} status={this.state.error?"exception":null} format={() => !this.state.error?'Success!':'Error!'} />
}
{/*<h3 style={{display:this.state.error?'block':'none',color:'red'}}>{this.state.error}</h3>*/}
</Col>
<Col span={3}></Col>
</Row>
</div>
)
}
}
const mapStateToProps = (state) => {
const {swift_message,extra,snd_bic_info,swift_message_tree} = state.swift;
return {
swift_message,extra,sndkey:snd_bic_info.snd_bic,swift_message_tree
};
};
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({ updateTreeValue,updateRcvBic,initSwiftMessageTree }, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(Result)
\ No newline at end of file
import API from "../api"
export default class ServiceAPI{
static getSMH(smhinr){
return API.get("",{params:{action:'getsmh',smhinr}})
}
static getBIC(biccod,bicnam)
{
let data = {}
if(biccod)
data.biccod = biccod
if(bicnam)
data.bicnam = bicnam
return API.get("",{params:{action:'getbic',...data}})
}
static getBIC_JZ(biccod,bicnam)
{
let data = {}
if(biccod)
data.biccod = biccod
if(bicnam)
data.bicnam = bicnam
return API.get("",{params:{action:'getbic_jz',...data}})
}
static saveMessage(data) //拼接好的报文相关数据
{
return API.post("",{params:{action:'savsf2'},data})
}
}
import {RegMap} from './TagRegMap'
export function TagV(tag,status,value,tno,mty)
{
let regobj = RegMap[tag]
let obj = value[0]
let mval = value[1]
let errmsg = null
if(value.length == 3)
errmsg = value[2] || {}
else
{
errmsg = {}
value.push(errmsg)
}
let isAllEmpty = true
for(let key in regobj)
{
if(!regobj[key])
{
errmsg[key]=""
continue
}
let reg = regobj[key]
let val = obj[key]
if(!val)
obj[key]=undefined
else
{
isAllEmpty = false
//val = FormatAdr(val)
}
if(reg.option=='O')
{
if(!val)
{
errmsg[key]=""
if(!val && (tag=='T11R' || tag=='T11S') && (key=='s3' || key=='s4') )
{
if(obj.s3||obj.s4)
errmsg[key]="Session Number 、ISN必须同时填写"
}
continue
}
//校验值
if(reg.line>1)
{
val = formatAdr(val,reg.line,reg.length)
obj[key] = val
let line_temp = reg.line
if(mty== "mt700") //特殊化处理,放开至800
{
if(tag == 'T45A' || tag == 'T46A' || tag == 'T47A' ||tag == 'T49G' ||tag == 'T49H')
line_temp = 800
}
else if(mty=="mt707")
{
if(tag == 'T45B' || tag == 'T46B' || tag == 'T47B' ||tag == 'T49M' ||tag == 'T49N')
line_temp = 800
}
errmsg[key]=TestAdr(val,reg.reg,line_temp,reg.length)
continue
}
if(reg.content == 'AMOUNT' || reg.content == 'NUMBER' || reg.type=='d')
{
errmsg[key]=TestAmt(val,reg.length)
continue
}
if(!new RegExp(`^${reg.reg}$`).test(val))
{
errmsg[key]="请输入正确的格式"
}
continue
}
//必填
if(!val)
{
if(status=='M') //栏位已经填了值,或者该栏位必填
errmsg[key]="请填写必输项"
else if(mval)
errmsg[key]="请填写完整"
}
else
{
//校验值
if(reg.line>1)
{
val = formatAdr(val,reg.line,reg.length)
obj[key] = val
let line_temp = reg.line
if(mty== "mt700") //特殊化处理,放开至800
{
if(tag == 'T45A' || tag == 'T46A' || tag == 'T47A' ||tag == 'T49G' ||tag == 'T49H')
line_temp = 800
}
else if(mty=="mt707")
{
if(tag == 'T45B' || tag == 'T46B' || tag == 'T47B' ||tag == 'T49M' ||tag == 'T49N')
line_temp = 800
}
errmsg[key]=TestAdr(val,reg.reg,line_temp,reg.length)
continue
}
if(reg.content == 'AMOUNT' || reg.content == 'NUMBER' || reg.type=='d')
{
errmsg[key]=TestAmt(val,reg.length)
continue
}
if(!new RegExp(`^${reg.reg}$`).test(val))
{
errmsg[key]="请输入正确的格式"
}
}
}
if(isAllEmpty)
{
value[1] = ''
}
for(let ek in errmsg)
{
if(errmsg[ek])
return false
}
return true
}
function FormatAdr(val)
{
val = val.replace(/[\\r\\n]{1,2}/g,'\r\n')
let val_bak = ""
let lineCount = 0
let begIndex = 0
let cur = 0
while(cur < val.length)
{
}
return val
}
function TestAmt(amt,length)
{
if(!/^\d+(\.\d*)?$/.test(amt))
{
return "请填写正确的金额"
}
let idx = amt.indexOf('.')
if(idx >= 0)
{
if(amt.length > length + 1)
return "数字长度过长"
}else
{
if(amt.length > length)
return "数字长度过长"
}
return ""
}
function formatAdr(adr,line,length){
return adr
}
function formatAdr2(adr,line,length)
{
let arr = []
let i =0
let cols = 0
let wordBegin = 0
let wordEnd = 0
let lines = 0
let lastLineEnd = -1
adr = adr.replace(/[\r\n]{1,2}/g,'\n')
while(i<adr.length)
{
let c = adr.charAt(i)
if(c=='\n')
{
lines++
if(lines >= line) //行数达到
break;
arr.push(c)
cols = 0 //换行列数清零
wordBegin = arr.length - 1
lastLineEnd = wordBegin - 1
}
else if(!/[0-9A-Za-z]/.test(c))
{
wordBegin = -1 //没有捕获到单词
arr.push(c)
cols++
}
else{
//其他字符
if(wordBegin < 0)
wordBegin = arr.length
arr.push(c)
cols++
}
if(cols == length+1)
{
lines++
if(wordBegin - lastLineEnd == 1) //行开始的单词,超长单词
{
if(lines >=line)
break;
arr.splice(arr.length-1,0,'\n')
wordBegin=arr.length - 1
lastLineEnd = wordBegin - 1
cols = 0
}
else if(wordBegin > 0)
{
cols = arr.length - wordBegin //回溯部分长度
if(lines >=line)
{
arr.splice(wordBegin,arr.length-wordBegin) //最后一行了,直接不要了
break;
}
arr.splice(wordBegin,0,'\n') //插入一个换行符
lastLineEnd = wordBegin
wordBegin+=1
}
else
{
if(lines >=line)
break;
arr.splice(arr.length-1,0,'\n')
wordBegin=arr.length
lastLineEnd = wordBegin - 1
cols = 0
}
}
i++
}
return arr.join('')
// return adr
}
function TestAdr(adr,reg,line,length)
{
let arr = adr.split(/[\r\n]{1,2}/g)
let a1 = []
let a2 = []
for(let i=0;i<arr.length;i++)
{
if(arr[i].length > length)
a1.push(i+1)
if(arr[i].length <= length && !new RegExp(`^${reg}$`).test(arr[i]))
a2.push(i+1)
}
let linemsg = ''
if(arr.length > line)
linemsg = `最多${line}行`
let msg = []
if(a1.length)
{
msg.push( `第${a1.join(',')}行超过${length}个字符`)
}
if(a2.length)
msg.push(`第${a2.join(',')}行格式非法`)
if(linemsg)
msg.push(linemsg)
return msg.join(';')
}
\ 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 T11R extends Component
{
name='11R'
desp = "MT and Date of the Original Message"
pattern = ""
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 = "";
if(obj.s3)
temp ="\r\n" + obj.s3+obj.s4;
let mval = `${obj.s1}\r\n${obj.s2}${temp}`.replace('/','')
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="MT Number"
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={3} style={{imeMode:'disabled'}} placeholder="MT Number"/>
</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 span={6}>
<FormItem
required={value.s3 || value.s4}
label="Session Number"
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input type="text" value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={4} style={{imeMode:'disabled'}} placeholder="4位固定长度数字"/>
</FormItem>
</Col>
<Col span={9}>
<FormItem
label="ISN"
required={value.s3 || value.s4}
help={errmsg.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input type="text" value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={6} style={{imeMode:'disabled'}} placeholder="6位固定长度数字"/>
</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 T11S extends Component
{
name='11S'
desp = "MT and Date of the Original Message"
pattern = ""
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 = "";
if(obj.s3)
temp ="\r\n" + obj.s3+obj.s4;
let mval = `${obj.s1}\r\n${obj.s2}${temp}`.replace('/','')
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="MT Number"
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={3} style={{imeMode:'disabled'}} placeholder="MT Number"/>
</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 size={InputSize} defaultValue="" format="yyMMdd" value={value.s2} onChange={(date, dateString)=>this.onChange(2,dateString)} />
</FormItem>
</Col>
<Col span={6}>
<FormItem
required={value.s3 || value.s4}
label="Session Number"
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input type="text" value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={4} style={{imeMode:'disabled'}} placeholder="4位固定长度数字"/>
</FormItem>
</Col>
<Col span={9}>
<FormItem
label="ISN"
required={value.s3 || value.s4}
help={errmsg.s4}
validateStatus={errmsg.s4?'error':null}
>
<Input type="text" value={value.s4} onChange={e=>this.onChange(4,e.target.value)} maxLength={6} style={{imeMode:'disabled'}} placeholder="6位固定长度数字"/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select,TimePicker} from 'antd';
const FormItem = Form.Item;
const InputSize = 'default'
const Option = Select.Option
export default class T13C extends Component
{
name='13C'
desp = "Time Indication"
pattern = "/8c/4!n1!x4!n"
tno = -1
keys = [1,2,3,4]
constructor(props)
{
super(props)
}
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 = null
if(!obj.s1)
obj.s1 = undefined
if(!obj.s3)
obj.s3 = undefined
if(obj.s1 || obj.s2 || obj.s3 || obj.s4 )
mval = `/${obj.s1}/${obj.s2}${obj.s3}${obj.s4}`.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 span={1} style={{textAlign:'center'}}><h3 style={{display:'inline-block'}}>/</h3></Col>*/}
<Col span={6}>
<FormItem
label="Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select allowClear={true} ref="s1" value={value.s1} placeholder="Code" style={{ width: "100%" }} onChange={val=>this.onChange(1,val)}>
<Option value={'CLSTIME'}>{"CLSTIME"}</Option>
<Option value={'RNCTIME'}>{"RNCTIME"}</Option>
<Option value={'SNDTIME'}>{"SNDTIME"}</Option>
</Select>
</FormItem>
</Col>
{/*<Col span={1} style={{textAlign:'center'}}><h3 style={{display:'inline-block'}}>/</h3></Col>*/}
<Col style={{"minWidth":'100px'}} span={6}>
<FormItem
label="Time indication"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<TimePicker ref="s2" value={value.s2} placeholder="indication" format="HHmm" onChange={(time,val)=>this.onChange(2,val)} />
</FormItem>
</Col>
<Col style={{"minWidth":'80px'}} span={6}>
<FormItem
label="Sign"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select allowClear={true} ref="s3" 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={6}>
<FormItem
label="Time offset"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s4}
validateStatus={errmsg.s4?'error':null}
>
<TimePicker ref="s4" value={value.s4} placeholder="offset" format="HHmm" disabledHours={()=>[14,15,16,17,18,19,20,21,22,23,24]} onChange={(time,val)=>this.onChange(4,val)} />
</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 T20 extends Component
{
name='20'
desp = "Sender's Reference"
pattern = "16x"
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={21}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input maxLength={16} value={value.s1} placeholder={this.props.desp} style={{'imeMode':'disabled'}} onChange={e=>this.onChange(e.target.value)}/>
</FormItem>
</Col>
<Col span={1}></Col>
{/*(this.props.mty && 'mt410,mt420,mt422,mt701'.indexOf(this.props.mty) > -100)?null:
<Col span={2}><Button size="small" type="primary" shape="circle" icon="plus" title="Gener Ref."/></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 T21 extends Component
{
name='21'
desp = "Related Reference"
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={21}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input maxLength={16} value={value.s1} placeholder={this.props.desp} style={{'imeMode':'disabled'}} onChange={e=>this.onChange(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 T22A extends Component
{
name='22A'
desp = "Purpose of Message"
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={5}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder={this.props.desp}
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(val)} >
<Option value="ACNF">ACNF</Option>
<Option value="ADVI">ADVI</Option>
<Option value="ISSU">ISSU</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 T22A extends Component
{
name='22D'
desp = "Purpose of Message"
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={10}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder={this.props.desp}
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(val)} >
<Option value="DGAR">DGAR</Option>
<Option value="DOCR">DOCR</Option>
<Option value="STBY">STBY</Option>
<Option value="UNDK">UNDK</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';
const FormItem = Form.Item;
export default class T23 extends Component
{
name='23'
desp = "Further Identification"
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={21}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input value={value.s1} placeholder={this.props.desp} style={{'imeMode':'disabled'}} onChange={e=>this.onChange(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';
const FormItem = Form.Item;
const Option = Select.Option
export default class T23 extends Component
{
name='23'
desp = "Further Identification"
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={21}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select
placeholder="Further Identification"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(val)} >
{
this.props.SELCode.map(code=>{
return <Option value={code} key={code}>{code}</Option>
})
}
</Select>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
import React,{Component} from 'react'
import T23_d from './T23'
import T23_1 from './T23_1'
const mtys1 = ['mt752']
const code1 = ["ACCEPT","DEBIT","NEGOTIATE","REIMBURSE","REMITTED","SEE79Z"]
const mtys2 = ['mt760','mt767']
const code2 = ["ISSUE","REQUEST"]
export default function(props)
{
let {mty} = props
if(mtys1.findIndex(m=>m==mty)>= 0)
return <T23_1 {...props} SELCode={code1} />
if(mtys2.findIndex(m=>m==mty)>= 0)
return <T23_1 {...props} SELCode={code2} />
return <T23_d {...props} />
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import {InputSize} from "./Utils"
const FormItem = Form.Item;
export default class T23B extends Component
{
name='23B'
desp = "Bank Operation Code"
pattern = "4!c"
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={12}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select allowClear={true}
size={InputSize} placeholder="Bank Operation Code" value={value.s1} style={{ width: "100%" }} onChange={(val)=>this.onChange(val)}>
<Option value="CRED"> CRED-Normal credit transfer</Option>
<Option value="CRTS"> CRTS-Test message</Option>
<Option value="SPAY"> SPAY-SWIFTPay</Option>
<Option value="SPRI"> SPRI-Priority</Option>
<Option value="SSTD"> SSTD-Standard</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} from "./Utils"
const FormItem = Form.Item;
export default class T23E extends Component
{
name='23E'
desp = "Instruction Code"
pattern = "4!c[/30x]"
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}`
if(obj.s2)
mval =mval + '/' + 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={12}>
<FormItem
label="Instruction Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize} placeholder="Instruction Code"
showSearch
optionFilterProp="children"
notFoundContent="Wrong Code" style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)}>
<Option value="CHQB">CHQB-Cheque </Option>
<Option value="CORT">CORT-Corporate Trade </Option>
<Option value="HOLD">HOLD-Hold </Option>
<Option value="INTC">INTC-Intra-Company Payment </Option>
<Option value="PHOB">PHOB-Phone Beneficiary </Option>
<Option value="PHOI">PHOI-Phone Intermediary </Option>
<Option value="PHON">PHON-Telephone </Option>
<Option value="REPA">REPA-Related Payment </Option>
<Option value="SDVA">SDVA-Same Day Value </Option>
<Option value="TELB">TELB-Telecommunication </Option>
<Option value="TELE">TELE-Telecommunication </Option>
<Option value="TELI">TELI-Telecommunication </Option>
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Additional Information"
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input maxLength={30} style={{imeMode:'disabled'}} placeholder="Additional Information" 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 T22A extends Component
{
name='22A'
desp = "Purpose of Message"
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={10}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder={this.props.desp}
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(val)} >
<Option value="CLSVCLOS">CLSVCLOS</Option>
<Option value="CLSVOPEN">CLSVOPEN</Option>
<Option value="FRAUDMSG">FRAUDMSG</Option>
<Option value="GENINFAD">GENINFAD</Option>
<Option value="ISSAMEND">ISSAMEND</Option>
<Option value="ISSUANCE">ISSUANCE</Option>
<Option value="OTHERFNC">OTHERFNC</Option>
<Option value="REIMBURS">REIMBURS</Option>
<Option value="REQAMEND">REQAMEND</Option>
<Option value="REQFINAN">REQFINAN</Option>
<Option value="REQISSUE">REQISSUE</Option>
<Option value="TRANSFER">TRANSFER</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,Switch} from 'antd';
const FormItem = Form.Item;
export default class T23S extends Component
{
name='23S'
desp = "Cancellation Request"
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>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Switch size="default" value={value.s1=='CANCEL'?true:false} onChange={bol=>{
let val=bol?"CANCEL":"";
this.onChange(val)
}
} />
</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 T23X extends Component
{
name='23X'
desp = "Purpose of Message"
pattern = ""
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 span={8}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder="Code"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="COUR">COUR</Option>
<Option value="EMAL">EMAL</Option>
<Option value="FACT">FACT</Option>
<Option value="FAXT">FAXT</Option>
<Option value="HOST">HOST</Option>
<Option value="MAIL">MAIL</Option>
<Option value="OTHR">OTHR</Option>
</Select>
</FormItem>
</Col>
<Col span={10}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input addonBefore="/" maxLength={65} value={value.s2} placeholder="File Name or Reference" style={{'imeMode':'disabled'}} 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';
const FormItem = Form.Item;
export default class T25 extends Component
{
name='25'
desp = "Account Identification"
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}
>
<Input maxLength={35} value={value.s1} placeholder={this.props.desp} style={{'imeMode':'disabled'}} onChange={e=>this.onChange(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';
const FormItem = Form.Item;
export default class T26E extends Component
{
name='26E'
desp = "Number of Amendment"
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={5}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input maxLength={3} value={value.s1} placeholder={this.props.desp} style={{'imeMode':'disabled'}} onChange={e=>this.onChange(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';
const FormItem = Form.Item;
export default class T26T extends Component
{
name='26T'
desp = "Transaction Type Code"
pattern = "3!c"
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={8}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input type="text" maxLength={3} style={{imeMode:'disabled'}} placeholder="Transaction Type Code"
value={value.s1}
onChange={e=>this.onChange(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';
const FormItem = Form.Item;
export default class T27 extends Component
{
name='27'
desp = "Sequence of Total"
pattern = ""
tno = -1
keys=[1,2]
constructor(props)
{
super(props)
}
componentWillMount()
{
if(this.props.mty=='mt700' || this.props.mty=='mt707') //直接编辑的
{
if(this.props.action=='edit')
{
let obj = {s1:'1',s2:'1'}
this.props.onValue([obj,'1/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}/${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] : {}
if(this.props.mty=='mt700' || this.props.mty=='mt707') //直接编辑的
{
this.readonly = 'readonly'
}
return (<Row>
<Col span={6}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
label="Number"
>
<Input readOnly={this.readonly} type= "text" maxLength={1} style={{imeMode:'disabled'}} placeholder="Number" value={value.s1} onChange={(e)=>this.onChange(1,e.target.value)}/>
</FormItem>
</Col>
<Col span={6}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
label="Total"
>
<Input readOnly={this.readonly} type= "text" addonBefore="/" maxLength={1} style={{imeMode:'disabled'}} placeholder="Total" 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 T30 extends Component
{
name='30'
desp = "Date"
pattern = ""
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}`.replace('/','')
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={5}>
<FormItem
validateStatus={errmsg.s1?'error':null}
help={errmsg.s1}
>
<DatePicker size={InputSize} defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
</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 T31C extends Component
{
name='31C'
desp = "Date of Issue"
pattern = ""
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}`.replace('/','')
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
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<DatePicker size={InputSize} defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
</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 T31D extends Component
{
name='31D'
desp = "Date and Place of Expiry"
pattern = ""
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 = `${obj.s1}`
if(temp)
temp = temp.replace(/\//g,'')
let mval = `${temp}/${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={5}>
<FormItem
label="Date"
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)} />
</FormItem>
</Col>
<Col span={14}>
<FormItem
label="Place"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input type="text" value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={29} style={{imeMode:'disabled'}} placeholder="Narrative"/>
</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 T31E extends Component
{
name='31E'
desp = "New Date of Expiry"
pattern = ""
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}`.replace('/','')
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={5}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<DatePicker size={InputSize} defaultValue="" format="yyMMdd" value={value.s1} onChange={(date, dateString)=>this.onChange(1,dateString)} />
</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 T32A extends Component
{
name='32A'
desp = "Value Date/Currency/Interbank Settled 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] : {}
this.keys.forEach(i=>this['s'+i]=value['s'+i])
let readOnly = this.props.enLock && (this.props.mty=='mt103' || this.props.mty=='mt202' || this.props.mty=='mt202cov')
return (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Value Date"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<DatePicker disabled={readOnly} 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
disabled={readOnly}
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="Interbank Settled Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input readOnly={readOnly} value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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 T32B extends Component
{
name='32B'
desp = "Amount Traced"
pattern = ""
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 = `${obj.s1}${temp}`.replace('/','')
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 readOnly = this.props.enLock && (this.props.mty=='mt700' || this.props.mty=='mt701' || this.props.mty=='mt707' || this.props.mty=='mt708')
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"
disabled={readOnly} allowClear={true} size={InputSize} value={value.s1} style={{ width: "100%" }} onChange={(val)=>this.onChange(1,val)}>
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Interbank Settled Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input readOnly={readOnly} value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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;
export default class T32D extends Component
{
name='32D'
desp = "Amount of Charges"
pattern = ""
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] : {}
this.keys.forEach(i=>this['s'+i]=value['s'+i])
return (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Value 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="Interbank Settled 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={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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 T32K extends Component
{
name='32K'
desp = "Amount Traced"
pattern = ""
tno = -1
keys=[1,2,3,4,5]
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.s5);
let mval = `${obj.s1}${obj.s2}${obj.s3}${obj.s4}${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={4}>
<FormItem
label="Day/Month"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder="Day/Month"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="D">D</Option>
<Option value="M">M</Option>
</Select>
</FormItem>
</Col>
<Col span={4}>
<FormItem label="Days/Months"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input maxLength={3} value={value.s2} placeholder="Days/Months" style={{'imeMode':'disabled'}} onChange={e=>this.onChange(2,e.target.value)}/>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={4}>
<FormItem
label="Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Select size={InputSize}
placeholder="Code"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s3} onChange={val=>this.onChange(3,val)} >
<Option value="BE">BE</Option>
<Option value="CC">CC</Option>
<Option value="FD">FD</Option>
<Option value="FP">FP</Option>
<Option value="GA">GA</Option>
<Option value="ID">ID</Option>
<Option value="ST">ST</Option>
<Option value="TD">TD</Option>
<Option value="XX">XX</Option>
</Select>
</FormItem>
</Col>
<Col style={{"minWidth":'100px'}} span={4}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s4}
validateStatus={errmsg.s4?'error':null}
>
<Select size={InputSize}
placeholder="Currency"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s4} onChange={val=>this.onChange(4,val)} >
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={8}>
<FormItem
label="Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s5}
validateStatus={errmsg.s5?'error':null}
>
<Input value={value.s5} onChange={e=>this.onChange(5,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 T33A extends Component
{
name='33A'
desp = "Net Amount"
pattern = ""
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] : {}
let readOnly = this.props.enLock && (this.props.mty=='mt202')
return (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Value Date"
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)} />
</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 size={InputSize}
disabled={readOnly}
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="Interbank Settled Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input readOnly={readOnly} value={value.s3} onChange={e=>this.onChange(3,e.target.value)} maxLength={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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 T33B extends Component
{
name='33B'
desp = "Currency/Instructed 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 = `${obj.s1}${temp}`
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 readOnly = this.props.enLock && (this.props.mty=='mt707' || this.props.mty=='mt708' || this.props.mty=='mt202cov')
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 size={InputSize}
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
disabled={readOnly}
style={{ width: "100%" }} placeholder="Currency" value={value.s1} onChange={(val)=>this.onChange(1,val)}>
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Instructed Amount"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input readOnly={readOnly} value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={16} style={{imeMode:'disabled'}} placeholder="Instructed 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 T34A extends Component
{
name='34A'
desp = "Total Amount Claimed"
pattern = ""
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="Value Date"
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)} />
</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 size={InputSize}
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="Interbank Settled 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={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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 T34B extends Component
{
name='34B'
desp = "Total Amount to be Paid"
pattern = ""
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 = `${obj.s1}${temp}`.replace('/','')
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" allowClear={true} value={value.s1} style={{ width: "100%" }} onChange={(val)=>this.onChange(1,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.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={16} style={{imeMode:'disabled'}} placeholder="Interbank Settled 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 {FormatAmount} from './Utils'
const FormItem = Form.Item;
export default class T36 extends Component
{
name='36'
desp = "Currency/Instructed Amount"
pattern = "12d"
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 temp = FormatAmount(obj.s1);
let mval = `${temp}`
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={12}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input value={value.s1} onChange={e=>this.onChange(1,e.target.value)} maxLength={13} 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 T39A extends Component
{
name='39A'
desp = "Percentage Credit Amount Tolerance"
pattern = ""
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] : {}
let readOnly = this.props.enLock && (this.props.mty=='mt700' || this.props.mty=='mt701' || this.props.mty=='mt707' || this.props.mty=='mt708')
return (<Row>
<Col span={5}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
label="Tolerance 1"
>
<Input readOnly={readOnly} type= "text" maxLength={2} style={{imeMode:'disabled'}} placeholder="Tolerance 1" value={value.s1} onChange={(e)=>this.onChange(1,e.target.value)}/>
</FormItem>
</Col>
<Col span={5}>
<FormItem
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
label="Tolerance 2"
>
<Input readOnly={readOnly} type= "text" addonBefore="/" maxLength={2} style={{imeMode:'disabled'}} placeholder="Tolerance 2" 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';
const FormItem = Form.Item;
export default class T39C extends Component
{
name='39C'
desp = "Additional Amounts Covered"
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>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input type= "textarea" maxLength={140} cols={35} rows={4} style={{imeMode:'disabled'}} placeholder="Narrative" value={value.s1} onChange={(e)=>this.onChange(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';
const FormItem = Form.Item;
const Option = Select.Option
export default class T40A extends Component
{
name='40A'
desp = "Form of Documentary Credit"
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={10}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select allowClear={true} size="default" style={{ width: "100%" }} value={value.s1} onChange={val=>{
this.onChange(val)
}
} >
<Option value="IRREVOCABLE" >IRREVOCABLE</Option>
<Option value="IRREVOCABLE TRANSFERABLE" >IRREVOCABLE TRANSFERABLE</Option>
<Option value="IRREVOCABLE STANDBY" >IRREVOCABLE STANDBY</Option>
<Option value="IRREVOC TRANS STANDBY" >IRREVOC TRANS STANDBY</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 T40C extends Component
{
name='40C'
desp = "Applicable Rules"
pattern = ""
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}`
if(obj.s2)
mval = `${mval}/${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={10}>
<FormItem
label="Type"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder="Type"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="ISPR">ISPR</Option>
<Option value="NONE">NONE</Option>
<Option value="OTHR">OTHR</Option>
<Option value="URDG">URDG</Option>
</Select>
</FormItem>
</Col>
<Col span={14}>
<FormItem
label="Narrative"
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input type="text" value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={35} style={{imeMode:'disabled'}} placeholder="Narrative"/>
</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 T40E extends Component
{
name='40E'
desp = "Applicable Rules"
pattern = ""
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}`
if(obj.s2)
mval = `${mval}/${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={10}>
<FormItem
label="Applicable Rules"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select size={InputSize}
placeholder="Applicable Rules"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
<Option value="EUCP LATEST VERSION">EUCP LATEST VERSION</Option>
<Option value="EUCPURR LATEST VERSION">EUCPURR LATEST VERSION</Option>
<Option value="ISP LATEST VERSION">ISP LATEST VERSION</Option>
<Option value="OTHR">OTHR</Option>
<Option value="UCP LATEST VERSION">UCP LATEST VERSION</Option>
<Option value="UCPURR LATEST VERSION">UCPURR LATEST VERSION</Option>
</Select>
</FormItem>
</Col>
<Col span={14}>
<FormItem
label="Narrative"
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input type="text" value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={35} style={{imeMode:'disabled'}} placeholder="Narrative"/>
</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 T40F extends Component
{
name='40F'
desp = "Applicable Rules"
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={5}>
<FormItem
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select allowClear={true}
placeholder={this.props.desp}
showSearch
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(val)} >
<Option value="NOTURR">NOTURR</Option>
<Option value="URR LATEST VERSION">URR LATEST VERSION</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"
import YBIC from './YBIC'
const FormItem = Form.Item;
const Option = Select.Option
export default class T41A extends Component
{
name='41A'
desp = "Available With ... By ..."
pattern = ""
tno = -1
keys=[1,2]
onChange=(index,value)=>
{
let obj = {};
if(!value)
value = ""
let objtemp =this.props.value
objtemp = objtemp && objtemp.length? objtemp[0] : {}
objtemp["s"+index] = value;
this.keys.forEach(i=>{
obj['s'+i] = objtemp['s'+i]
});
let mval = `${obj.s1}\r\n${obj.s2}`
this.props.onValue([obj,mval])
}
render()
{
let value =this.props.value
let mval = value && value.length? value[1] : ''
let errmsg = value && value.length==3?value[2]:{}
value = value && value.length? value[0] : {}
return (
<div>
<Row>
<Col>
<FormItem
label="Identifier Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input addonAfter={ <YBIC onSelect={obj=>this.onChange(1,obj.bic)} />} maxLength={11} value={value.s1} onChange={e=>this.onChange(1,e.target.value)} style={{imeMode:'disabled'}} placeholder="Identifier Code"/>
</FormItem>
</Col>
</Row>
<Row>
<Col style={{"minWidth":'100px'}} span={10}>
<FormItem
label="Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Select size={InputSize}
placeholder="Code"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s2} onChange={val=>this.onChange(2,val)} >
<Option value="BY ACCEPTANCE">BY ACCEPTANCE</Option>
<Option value="BY DEF PAYMENT">BY DEF PAYMENT</Option>
<Option value="BY MIXED PYMT">BY MIXED PYMT</Option>
<Option value="BY NEGOTIATION">BY NEGOTIATION</Option>
<Option value="BY PAYMENT">BY PAYMENT</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 T41D extends Component
{
name='41D'
desp = "Available With ... By ..."
pattern = ""
tno = -1
keys=[1,2]
onChange=(index,value)=>
{
let obj = {};
if(!value)
value = ""
let objtemp =this.props.value
objtemp = objtemp && objtemp.length? objtemp[0] : {}
objtemp["s"+index] = value;
this.keys.forEach(i=>{
obj['s'+i] = objtemp['s'+i]
});
let mval = `${obj.s1}\r\n${obj.s2}`
this.props.onValue([obj,mval])
}
render()
{
let value =this.props.value
let mval = value && value.length? value[1] : ''
let errmsg = value && value.length==3?value[2]:{}
value = value && value.length? value[0] : {}
return (
<div>
<Row>
<Col>
<FormItem
label="Name and Address"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Input type="textarea" maxLength={140} rows={4} cols={35} value={value.s1} onChange={e=>this.onChange(1,e.target.value)} style={{imeMode:'disabled'}} placeholder="Name and Address"/>
</FormItem>
</Col>
</Row>
<Row>
<Col style={{"minWidth":'100px'}} span={10}>
<FormItem
label="Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Select size={InputSize}
placeholder="Code"
showSearch allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s2} onChange={val=>this.onChange(2,val)} >
<Option value="BY ACCEPTANCE">BY ACCEPTANCE</Option>
<Option value="BY DEF PAYMENT">BY DEF PAYMENT</Option>
<Option value="BY MIXED PYMT">BY MIXED PYMT</Option>
<Option value="BY NEGOTIATION">BY NEGOTIATION</Option>
<Option value="BY PAYMENT">BY PAYMENT</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} from "./Utils"
import YBIC from './YBIC'
const FormItem = Form.Item;
const Option = Select.Option
export default class T42A extends Component
{
name='42A'
desp = "Drawee"
pattern = ""
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 mval = ""
if(obj.s1)
mval = '/' + obj.s1
if(obj.s2)
mval = mval +'/' + obj.s2
if(obj.s3)
mval = mval?`${mval}\r\n${obj.s3}`:obj.s3
this.props.onValue([obj,mval])
}
render()
{
let value =this.props.value
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}>
<Col span={10}>
<FormItem
label="D/C"
help={errmsg.s1}
validateStatus={errmsg.s1?'error':null}
>
<Select allowClear={true} size={InputSize} value={value.s1} style={{ width: "100%" }} placeholder="D/C" onChange={(val)=>this.onChange(1,val)}>
<Option value="C">C</Option>
<Option value="D">D</Option>
</Select>
</FormItem>
</Col>
<Col span={14}>
<FormItem
label="Party Identifier"
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input addonBefore="/" maxLength={34} style={{imeMode:'disabled'}} placeholder="Account" value={value.s2} onChange={(e)=>this.onChange(2,e.target.value)}/>
</FormItem>
</Col>
</Col>
</Row>
<Row>
<Col>
<FormItem
label="Identifier Code"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s3}
validateStatus={errmsg.s3?'error':null}
>
<Input addonAfter={ <YBIC onSelect={obj=>this.onChange(3,obj.bic)} />} maxLength={11} style={{imeMode:'disabled'}} placeholder="Identifier Code" value={value.s3} onChange={(e)=>this.onChange(3,e.target.value)}/>
</FormItem>
</Col>
</Row>
</div>
)
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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