Commit 0d6ca9ac by fukai

Merge branch 'master' of http://172.17.2.110:11080/fukai/dzt-mobx

parents d749edc2 35a41d3c
import React, {Component, Fragment} from 'react'
import {Form, Input, Select, Checkbox, Button, notification, DatePicker,Row,Col} from 'antd'
import {formItemLayout, formSubBtnLayout} from '../../../config'
import fieldSet from './descriptor/cptopn'
import Api from '../../../service/api'
import './index.less'
const FormItem = Form.Item
const FromCreate = Form.create;
const {Option} = Select;
const {Search,TextArea} = Input;
@FromCreate()
export default class Cptopn extends Component {
constructor(props) {
super(props)
this.state = {loading: false}
}
handleSubmit = (e) => {
e.preventDefault();
this.props.form.validateFieldsAndScroll(async (err, values) => {
console.log(err)
if (!err) {
console.log('Received values of form: ', values);
this.setState({loading: true})
}
});
}
async componentWillMount() {
// //发起交易切换
// const data = await Api.post('pxiadd/init',{data:{}})
// console.log(data)
}
render() {
const {getFieldDecorator} = this.props.form;
const amtCURSelector = getFieldDecorator('cur', {
initialValue: '',
})(
<Select placeholder="请选择币种" style={{ width: 70 }}>
<Option value="156">CNY</Option>
<Option value="840">USD</Option>
</Select>
);
const amtf33bCURSelector = getFieldDecorator('curf3', {
initialValue: '',
})(
<Select placeholder="请选择币种" style={{ width: 70 }}>
<Option value="156">CNY</Option>
<Option value="840">USD</Option>
</Select>
);
return (
<Fragment>
<Form onSubmit={this.handleSubmit}>
<FormItem
{...formItemLayout}
label="业务机构"
>
{getFieldDecorator('branch', {rules: fieldSet.branch})(
<Input maxLength={20} placeholder="请填写业务机构"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="业务日期"
>
{getFieldDecorator('credat', {rules: fieldSet.credat})(
<DatePicker format="YYYY-MM-DD"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="业务编号"
>
{getFieldDecorator('ownref', {rules: fieldSet.ownref})(
<Input maxLength={32} placeholder="请填写业务机构"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="客户编号"
>
{getFieldDecorator('extkey', {rules: fieldSet.extkey})(
<Search
placeholder="请选择客户编号"
onSearch={value => console.log(value)}
enterButton
/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="客户经理"
>
{getFieldDecorator('cusman', fieldSet.cusman)(
<Select placeholder="请选择客户经理">
<Option value="001">刘经理</Option>
<Option value="002">王经理</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="产品经理"
>
{getFieldDecorator('cpman', fieldSet.cpman)(
<Select placeholder="请选择产品经理">
<Option value="001">刘经理</Option>
<Option value="002">王经理</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="客户性质"
>
{getFieldDecorator('custyp', {rules: fieldSet.custyp})(
<Input maxLength={20} placeholder="请填写客户性质"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="对公/对私"
>
{getFieldDecorator('cuspr', {rules: fieldSet.cuspr})(
<Input maxLength={20} placeholder="请填写对公/对私"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="核心编号"
>
{getFieldDecorator('corref', {rules: fieldSet.corref})(
<Search
placeholder="请选择核心编号"
onSearch={value => console.log(value)}
enterButton
/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="客户分类"
>
{getFieldDecorator('cusseg', {rules: fieldSet.cusseg})(
<Input maxLength={20} placeholder="请填写客户分类"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="客户名称"
>
{getFieldDecorator('ptynam', {rules: fieldSet.ptynam})(
<Input maxLength={20} placeholder="请填写客户名称"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="关注日期"
>
{getFieldDecorator('attdat', {rules: fieldSet.attdat})(
<Input maxLength={20} placeholder="请填写关注日期"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="关注原因"
>
{getFieldDecorator('attrsn', {rules: fieldSet.attrsn})(
<Input maxLength={20} placeholder="请填写关注原因"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇款方式"
>
{getFieldDecorator('paytyp', {rules: fieldSet.paytyp})(
<Select placeholder="请选择汇款方式">
<Option value="001">汇款方式001</Option>
<Option value="002">汇款方式002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇款性质"
>
{getFieldDecorator('trntyp', {rules: fieldSet.trntyp})(
<Select placeholder="请选择汇款性质">
<Option value="001">汇款方式001</Option>
<Option value="002">汇款方式002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="付款类型"
>
{getFieldDecorator('fktyp', {rules: fieldSet.fktyp})(
<Select placeholder="请选择付款类型">
<Option value="001">付款类型001</Option>
<Option value="002">付款类型002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="是否离岸转手"
>
{getFieldDecorator('isoffh', {rules: fieldSet.isoffh})(
<Select placeholder="请选择是否离岸转手">
<Option value="Y"></Option>
<Option value="N"></Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="离岸转手收汇时间"
>
{getFieldDecorator('offdat', {rules: fieldSet.offdat})(
<DatePicker format="YYYY-MM-DD HH:mm:ss"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="相关离岸业务编号"
>
{getFieldDecorator('offref', {rules: fieldSet.offref})(
<Input maxLength={20} placeholder="请填写相关离岸业务编号"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易对手性质"
>
{getFieldDecorator('oppcuspro', {rules: fieldSet.oppcuspro})(
<Select placeholder="请选择交易对手性质">
<Option value="001">交易类型001</Option>
<Option value="002">交易类型002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇款币种金额"
>
{getFieldDecorator('amt', {rules: fieldSet.amt})(
<Input addonBefore={amtCURSelector} placeholder="请填写汇款币种金额"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="起息日"
>
{getFieldDecorator('valdat', {rules: fieldSet.valdat})(
<DatePicker format="YYMMDD"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="头寸编号"
>
{getFieldDecorator('cashref', {rules: fieldSet.cashref})(
<Search
placeholder="请选择头寸编号"
onSearch={value => console.log(value)}
enterButton
/>
)}
</FormItem>
<FormItem {...formItemLayout}>
{getFieldDecorator('isqnam', {
valuePropName: 'checked',
initialValue: false,
})(
<Checkbox className="check_layout">同名划转</Checkbox>
)}
</FormItem>
<FormItem {...formItemLayout}>
{getFieldDecorator('othcurflg', {
valuePropName: 'checked',
initialValue: false,
})(
<Checkbox className="check_layout">小币种汇款</Checkbox>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="清算路径"
>
{getFieldDecorator('liqtyp', {rules: fieldSet.liqtyp})(
<Select placeholder="请选择清算路径">
<Option value="001">清算路径001</Option>
<Option value="002">清算路径002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="报文类型"
>
{getFieldDecorator('swftyp', {rules: fieldSet.swftyp})(
<Select placeholder="请选择报文类型">
<Option value="001">103</Option>
<Option value="002">202</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="扣款币种金额"
>
{getFieldDecorator('amtf33b', {rules: fieldSet.amtf33b})(
<Input addonBefore={amtf33bCURSelector} placeholder="请填写扣款币种金额"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇率 (36)"
>
{getFieldDecorator('f36', {rules: fieldSet.f36})(
<Input maxLength={20} placeholder="请填写汇率"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇率计算方式"
>
{getFieldDecorator('ratcat', {rules: fieldSet.ratcat})(
<Select placeholder="请选择汇率计算方式">
<Option value="001">1</Option>
<Option value="002">2</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇款人名称及地址 (50)"
>
{getFieldDecorator('dbfadrblkcn', {rules: fieldSet.dbfadrblkcn})(
<TextArea placeholder="" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="收款人编号"
>
<Row gutter={0}>
<Col span={10}>
{getFieldDecorator('extkey', {rules: fieldSet.extkey})(
<Input maxLength={20} placeholder="请填写收款人编号"/>
)}
</Col>
<Col span={2}>
<Button icon="search"/>
</Col>
<Col span={4}>
<Button onClick={()=>{
}}>Details</Button>
</Col>
<Col span={2}>
<Button icon="question"/>
</Col>
</Row>
</FormItem>
<FormItem
{...formItemLayout}
label="收款人名称及地址 (59)"
>
{getFieldDecorator('dbfadrblkcn', {rules: fieldSet.dbfadrblkcn})(
<TextArea placeholder="" autosize/>
)}
</FormItem>
<FormItem {...formItemLayout}>
{getFieldDecorator('is59f', {
valuePropName: 'checked',
initialValue: false,
})(
<Checkbox className="check_layout">是否使用59F</Checkbox>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="我行账户行"
>
<Row>
<Col span={10}>
{getFieldDecorator('extkey', {rules: fieldSet.extkey})(
<Input maxLength={20} placeholder="请填写我行账户行"/>
)}
</Col>
<Col span={2}>
<Button icon="search"/>
</Col>
<Col span={4}>
<Button onClick={()=>{
}}>Details</Button>
</Col>
<Col span={2}>
<Button icon="question"/>
</Col>
</Row>
</FormItem>
<FormItem
{...formItemLayout}
label="名称及地址"
>
{getFieldDecorator('dbfadrblkcn', {rules: fieldSet.dbfadrblkcn})(
<TextArea placeholder="" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="收款人账号"
>
{getFieldDecorator('pyeact', {rules: fieldSet.pyeact})(
<Input maxLength={20} placeholder="请填写收款人账号"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="收款人国别"
>
<Row>
<Col span={10}>
{getFieldDecorator('stac', {rules: fieldSet.stac})(
<Input maxLength={20} placeholder="请填写收款人国别"/>
)}
</Col>
<Col span={8}>
<Button>调用历史数据</Button>
</Col>
</Row>
</FormItem>
<FormItem {...formItemLayout} label="对私客户交易查询">
<Button icon="search"/>
</FormItem>
<FormItem {...formItemLayout}>
{getFieldDecorator('islink', {
valuePropName: 'checked',
initialValue: false,
})(
<Checkbox className="check_layout">关联前序融资业务</Checkbox>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="前序融资编号"
>
{getFieldDecorator('finref', {rules: fieldSet.finref})(
<Search
placeholder="请选择前序融资编号"
onSearch={value => console.log(value)}
enterButton
/>
)}
</FormItem>
<FormItem {...formSubBtnLayout}>
<Button type="primary" htmlType="submit" loading={this.state.loading}>提交</Button>
</FormItem>
</Form>
</Fragment>
)
}
}
\ No newline at end of file
export default fieldSet = {
branch: [{type: 'string', required: true, max: 20, message: '长度不能超过20个字符'}],
credat: [{type: 'object', required: true, message: '请选择业务日期'}],
ownref: [{type: 'string', required: true, max: 32, message: '长度不能超过32个字符'}],
extkey: [{type: 'string', max: 20}],
cusman: [{type: 'string', max: 20}],
cpman: [{type: 'string', max: 20}],
custyp: [{type: 'string', max: 20}],
cuspr: [{type: 'string', max: 20}],
corref: [{type: 'string', max: 20}],
cusseg: [{type: 'string', max: 20}],
ptynam: [{type: 'string', max: 20}],
attdat: [{type: 'string', max: 20}],
attrsn: [{type: 'string', max: 20}],
paytyp: [{type: 'string', max: 20}],
trntyp: [{type: 'string', max: 20}],
fktyp: [{type: 'string', max: 20}],
isoffh: [{type: 'string', max: 20}],
offdat: [{type: 'object'}],
offref: [{type: 'string', max: 20}],
oppcuspro: [{type: 'string', max: 20}],
amt: [{type: 'string', max: 20}],
valdat: [{type: 'object'}],
cashref: [{type: 'string', max: 20}],
liqtyp: [{type: 'string', max: 20}],
swftyp: [{type: 'string', max: 20}],
amtf33b: [{type: 'string', max: 20}],
f36: [{type: 'string', max: 20}],
ratcat: [{type: 'string', max: 20}],
dbfadrblkcn: [{type: 'string', max: 20}],
pyeact: [{type: 'string', max: 20}],
stac: [{type: 'string', max: 20}],
finref: [{type: 'string', max: 20}],
}
\ No newline at end of file
import React,{Component} from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';
import Cptopn from './Cptopn'
import "./index.less"
const moduleBasePath = "/business/cpt/"
export default function moduleRouter(props){
return <React.Fragment>
<Switch>
<Route exact path={`${moduleBasePath}opn`} component={Cptopn} />
</Switch>
</React.Fragment>
}
\ No newline at end of file
.check_layout{
margin-left: 33%;
}
\ No newline at end of file
import React, {Component, Fragment} from 'react'
import {Form, Input, Select, Button, notification} from 'antd'
import {formItemLayout, formSubBtnLayout} from '../../../config'
import fieldSet from './descriptor/fetfxq'
import Api from '../../../service/api'
const FormItem = Form.Item
const FromCreate = Form.create;
const {Option} = Select;
const { TextArea } = Input;
@FromCreate()
export default class Fetfxq extends Component {
constructor(props) {
super(props)
this.state = {loading: false}
}
handleSubmit = (e) => {
e.preventDefault();
this.props.form.validateFieldsAndScroll(async (err, values) => {
console.log(err)
if (!err) {
console.log('Received values of form: ', values);
this.setState({loading: true})
}
});
}
async componentWillMount() {
// //发起交易切换
// const data = await Api.post('pxiadd/init',{data:{}})
// console.log(data)
}
render() {
const {getFieldDecorator} = this.props.form;
return (
<Fragment>
<Form onSubmit={this.handleSubmit}>
<FormItem
{...formItemLayout}
label="我行客户名称"
>
{getFieldDecorator('orcnam', {rules: fieldSet.orcnam})(
<TextArea placeholder="请填写我行客户名称" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易对手名称"
>
{getFieldDecorator('oppnam', {rules: fieldSet.oppnam})(
<TextArea placeholder="请填写交易对手名称" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="我行客户地址"
>
{getFieldDecorator('orcadr', {rules: fieldSet.orcadr})(
<TextArea placeholder="请填写我行客户地址" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易对手地址"
>
{getFieldDecorator('oppadr', {rules: fieldSet.oppadr})(
<TextArea placeholder="请填写交易对手地址" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行1"
>
{getFieldDecorator('trnbnk1', fieldSet.trnbnk1)(
<TextArea placeholder="请填写交易涉及银行1" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行2"
>
{getFieldDecorator('trnbnk2', fieldSet.trnbnk2)(
<TextArea placeholder="请填写交易涉及银行2" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行3"
>
{getFieldDecorator('trnbnk3', fieldSet.trnbnk3)(
<TextArea placeholder="请填写交易涉及银行3" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行4"
>
{getFieldDecorator('trnbnk4', fieldSet.trnbnk4)(
<TextArea placeholder="请填写交易涉及银行4" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行5"
>
{getFieldDecorator('trnbnk5', fieldSet.trnbnk5)(
<TextArea placeholder="请填写交易涉及银行5" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易涉及银行6"
>
{getFieldDecorator('trnbnk6', fieldSet.trnbnk6)(
<TextArea placeholder="请填写交易涉及银行6" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="产地"
>
{getFieldDecorator('gooddis', {rules: fieldSet.gooddis})(
<TextArea placeholder="请填写产地" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="货物类型"
>
{getFieldDecorator('goodtyp', {rules: fieldSet.goodtyp})(
<Select placeholder="请选择货物类型">
<Option value="001">货物类型001</Option>
<Option value="002">货物类型002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="货物名称"
>
{getFieldDecorator('goodnam', {rules: fieldSet.goodnam})(
<TextArea placeholder="请填写货物名称" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="notify"
>
{getFieldDecorator('notify', {rules: fieldSet.notify})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="交易对手国别"
>
{getFieldDecorator('oppnat', {rules: fieldSet.oppnat})(
<TextArea placeholder="请填写交易对手国别" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="carrier"
>
{getFieldDecorator('carrier', {rules: fieldSet.carrier})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="船名"
>
{getFieldDecorator('shipnam', {rules: fieldSet.shipnam})(
<TextArea placeholder="请填写船名" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="consignee"
>
{getFieldDecorator('consignee', {rules: fieldSet.consignee})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="发货地"
>
{getFieldDecorator('fhdis', {rules: fieldSet.fhdis})(
<TextArea placeholder="请填写发货地" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="shipper"
>
{getFieldDecorator('shipper', {rules: fieldSet.shipper})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="目的地"
>
{getFieldDecorator('tagdis', {rules: fieldSet.tagdis})(
<TextArea placeholder="请填写目的地" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="agent"
>
{getFieldDecorator('agent', {rules: fieldSet.agent})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="起运港"
>
{getFieldDecorator('shport', {rules: fieldSet.shport})(
<TextArea placeholder="请填写起运港" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="drawee"
>
{getFieldDecorator('drawee', {rules: fieldSet.drawee})(
<TextArea autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="目的港"
>
{getFieldDecorator('taport', {rules: fieldSet.taport})(
<TextArea placeholder="请填写目的港" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="备注"
>
{getFieldDecorator('remark', {rules: fieldSet.remark})(
<TextArea placeholder="请填写备注" autosize/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="有效地"
>
{getFieldDecorator('valdis', {rules: fieldSet.valdis})(
<TextArea placeholder="请填写有效地" autosize/>
)}
</FormItem>
<FormItem {...formSubBtnLayout}>
<Button type="primary" htmlType="submit" loading={this.state.loading}>提交</Button>
</FormItem>
</Form>
</Fragment>
)
}
}
\ No newline at end of file
export default fieldSet = {
orcnam: [{type: 'string'}],
oppnam: [{type: 'string'}],
orcadr: [{type: 'string'}],
oppadr: [{type: 'string'}],
trnbnk1: [{type: 'string'}],
trnbnk2: [{type: 'string'}],
trnbnk3: [{type: 'string'}],
trnbnk4: [{type: 'string'}],
trnbnk5: [{type: 'string'}],
trnbnk6: [{type: 'string'}],
gooddis: [{type: 'string'}],
goodtyp: [{type: 'string'}],
goodnam: [{type: 'string'}],
notify: [{type: 'string'}],
oppnat: [{type: 'string'}],
carrier: [{type: 'string'}],
shipnam: [{type: 'string'}],
consignee: [{type: 'string'}],
fhdis: [{type: 'string'}],
shipper: [{type: 'string'}],
tagdis: [{type: 'string'}],
agent: [{type: 'string'}],
shport: [{type: 'string'}],
drawee: [{type: 'string'}],
taport: [{type: 'string'}],
remark: [{type: 'string'}],
valdis: [{type: 'string'}],
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ import React,{Component} from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';
import Fetopn from './Fetopn'
import Fetfxq from './Fetfxq'
import "./index.less"
......@@ -11,6 +12,7 @@ export default function moduleRouter(props){
return <React.Fragment>
<Switch>
<Route exact path={`${moduleBasePath}opn`} component={Fetopn} />
<Route exact path={`${moduleBasePath}fxq`} component={Fetfxq} />
</Switch>
</React.Fragment>
}
\ No newline at end of file
......@@ -13,6 +13,7 @@ import Home from '../Home'
import PXIRouter from '../Business/PXI'
import FETRouter from '../Business/FET'
import CPTRouter from '../Business/CPT'
const {
Header, Footer, Sider, Content,
......@@ -44,6 +45,7 @@ export default class LayoutCom extends Component {
{/*模块路由插入开始*/}
<Route path="/business/pxi" component={PXIRouter} />
<Route path="/business/fet" component={FETRouter} />
<Route path="/business/cpt" component={CPTRouter} />
{/*模块路由插入结束*/}
<Redirect path="/" to="/home" />
</Switch>
......
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