Commit 636e111f by fukai

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

parents 71d1e83b 2923c3d3
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions" suppressed-tasks="Less" />
</project>
\ No newline at end of file
import React, {Component, Fragment} from 'react'
import {Form, Input, Select, Row, Col, Button, notification, DatePicker} from 'antd'
import {formItemLayout, formSubBtnLayout} from '../../../config'
import fieldSet from './descriptor/fetopn'
import Api from '../../../service/api'
const FormItem = Form.Item
const FromCreate = Form.create;
const {Option} = Select;
const Search = Input.Search;
@FromCreate()
export default class Fetopn 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 maxCURSelector = getFieldDecorator('maxcur', {
initialValue: '',
})(
<Select placeholder="请选择币种" style={{ width: 70 }}>
<Option value="156">CNY</Option>
<Option value="840">USD</Option>
</Select>
);
const amtCURSelector = getFieldDecorator('amtcur', {
initialValue: '',
})(
<Select placeholder="请选择币种" style={{ width: 70 }}>
<Option value="156">CNY</Option>
<Option value="840">USD</Option>
</Select>
);
const accCURSelector = getFieldDecorator('acccur', {
initialValue: '',
})(
<Select placeholder="请选择币种" style={{ width: 70 }}>
<Option value="156">CNY</Option>
<Option value="840">USD</Option>
</Select>
);
const acc2CURSelector = getFieldDecorator('acc2cur', {
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('opndat', {rules: fieldSet.opndat})(
<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('fudref', {rules: fieldSet.fudref})(
<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('fxtyp', {rules: fieldSet.fxtyp})(
<Select placeholder="请选择交易类型">
<Option value="001">交易类型001</Option>
<Option value="002">交易类型002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="出账账户钞汇标志"
>
{getFieldDecorator('actcs', {rules: fieldSet.actcs})(
<Select placeholder="请选择出账账户钞汇标志">
<Option value="001">标志001</Option>
<Option value="002">标志002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="汇率类型"
>
{getFieldDecorator('rattyp', {rules: fieldSet.rattyp})(
<Select placeholder="请选择汇率类型">
<Option value="001">汇率类型001</Option>
<Option value="002">汇率类型002</Option>
</Select>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="锁定汇率编号"
>
{getFieldDecorator('ratref', {rules: fieldSet.ratref})(
<Search
placeholder="请选择锁定汇率编号"
onSearch={value => console.log(value)}
enterButton
/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="本次使用价格"
>
{getFieldDecorator('rat', {rules: fieldSet.rat})(
<Input maxLength={20} placeholder="请填写本次使用价格"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="实时汇率"
>
{getFieldDecorator('livrat', {rules: fieldSet.livrat})(
<Input maxLength={20} placeholder="请填写实时汇率"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="优惠点数"
>
{getFieldDecorator('pripon', {rules: fieldSet.pripon})(
<Input maxLength={32} placeholder="请填写优惠点数"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="外币金额"
>
{getFieldDecorator('max', {rules: fieldSet.max})(
<Input addonBefore={maxCURSelector} placeholder="请填写外币金额"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="本币金额"
>
{getFieldDecorator('amt', {rules: fieldSet.amt})(
<Input addonBefore={amtCURSelector} placeholder="请填写本币金额"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="外币账号"
>
{getFieldDecorator('acc', {rules: fieldSet.acc})(
<Input addonBefore={accCURSelector} placeholder="请填写外币账号"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="外币账户性质"
>
{getFieldDecorator('cortyp', {rules: fieldSet.cortyp})(
<Input maxLength={20} placeholder="请填写外币账户性质"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="本币账号"
>
{getFieldDecorator('acc2', {rules: fieldSet.acc2})(
<Input addonBefore={acc2CURSelector} placeholder="请填写本币账号"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="本币账户性质"
>
{getFieldDecorator('cortyp2', {rules: fieldSet.cortyp2})(
<Input maxLength={20} placeholder="请填写本币账户性质"/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label="结售汇统计代码"
>
{getFieldDecorator('sumcod', {rules: fieldSet.sumcod})(
<Input maxLength={20} placeholder="请填写结售汇统计代码"/>
)}
</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个字符'}],
opndat: [{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}],
fudref: [{type: 'string', max: 20}],
cusseg: [{type: 'string', max: 20}],
ptynam: [{type: 'string', max: 20}],
attdat: [{type: 'string', max: 20}],
attrsn: [{type: 'string', max: 20}],
fxtyp: [{type: 'string', max: 20}],
actcs: [{type: 'string', max: 20}],
rattyp: [{type: 'string', max: 20}],
ratref: [{type: 'string', max: 20}],
rat: [{type: 'string', max: 20}],
livrat: [{type: 'string', max: 20}],
pripon: [{type: 'string', max: 20}],
max: [{type: 'string', max: 20}],
amt: [{type: 'string', max: 20}],
acc: [{type: 'string', max: 20}],
cortyp: [{type: 'string', max: 20}],
acc2: [{type: 'string', max: 20}],
cortyp2: [{type: 'string', max: 20}],
sumcod: [{type: 'string', max: 20}],
}
\ No newline at end of file
import React,{Component} from 'react'
import { Switch, Route, Redirect } from 'react-router-dom';
import Fetopn from './Fetopn'
import "./index.less"
const moduleBasePath = "/business/fet/"
export default function moduleRouter(props){
return <React.Fragment>
<Switch>
<Route exact path={`${moduleBasePath}opn`} component={Fetopn} />
</Switch>
</React.Fragment>
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ import './index.less'
import Home from '../Home'
import PXIRouter from '../Business/PXI'
import FETRouter from '../Business/FET'
const {
Header, Footer, Sider, Content,
......@@ -41,6 +42,7 @@ export default class LayoutCom extends Component {
<Route path="/home" component={Home} />
{/*模块路由插入开始*/}
<Route path="/business/pxi" component={PXIRouter} />
<Route path="/business/fet" component={FETRouter} />
{/*模块路由插入结束*/}
<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