Commit 7f0913d4 authored by superman's avatar superman

update

parent 12f10146
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -25,7 +25,9 @@ import { ...@@ -25,7 +25,9 @@ import {
formItemLayout, formItemLayout,
smallFormItemLayout, smallFormItemLayout,
footerFormSubmitLayout, footerFormSubmitLayout,
handleUpload handleUpload,
NULL,
mobileSecrecy
} from '../../utils'; } from '../../utils';
import Layout from '../../components/Layout/Layout'; import Layout from '../../components/Layout/Layout';
...@@ -66,33 +68,41 @@ export default class Commission extends Component { ...@@ -66,33 +68,41 @@ export default class Commission extends Component {
return ( return (
<Layout header={header}> <Layout header={header}>
<Spin spinning={loading}> <Spin spinning={loading}>
<Form horizontal onSubmit={this.handleSubmit.bind(this)}> {
item &&
<Form className="main-form" horizontal onSubmit={this.handleSubmit.bind(this)}>
<Form.Item label="产品" {...smallFormItemLayout}> <Form.Item label="产品" {...smallFormItemLayout}>
<p>{item && item.title}</p> <p>{item.title || NULL}</p>
</Form.Item>
<Form.Item label="理财师" {...smallFormItemLayout}>
{
item.user ?
((item.user.username || NULL) + ' - ' +
(mobileSecrecy(item.user.mobile) || NULL))
:
NULL
}
</Form.Item> </Form.Item>
<Form.Item label="确认打款金额" {...smallFormItemLayout}> <Form.Item label="确认打款金额" {...smallFormItemLayout}>
<Input placeholder="确认打款金额" {
readOnly item.remittanceAmount || NULL
{...getFieldProps('remittanceAmount', { }
initialValue: item && item.remittanceAmount
})} />
</Form.Item> </Form.Item>
<Form.Item label="实际佣金" {...smallFormItemLayout}> <Form.Item label="实际佣金" {...smallFormItemLayout}>
<Input placeholder="实际佣金" {
readOnly item.commission || NULL
{...getFieldProps('realReturn', { }
initialValue: item && item.commission
})} />
</Form.Item> </Form.Item>
<Form.Item {...footerFormSubmitLayout} style={{marginTop:30}}> <Form.Item {...footerFormSubmitLayout} style={{marginTop:30}}>
<Button type="primary" htmlType="submit" loading={loading}><Icon type="save"/>发放</Button> <Button type="primary" htmlType="submit" loading={loading}><Icon
type="save"/>发放</Button>
<Button onClick={e=>{e.preventDefault(); this.props.history.goBack();}} <Button onClick={e=>{e.preventDefault(); this.props.history.goBack();}}
style={{marginLeft:'1em'}}> style={{marginLeft:'1em'}}>
<Icon type="rollback"/>返回 <Icon type="rollback"/>返回
</Button> </Button>
</Form.Item> </Form.Item>
</Form> </Form>
}
</Spin> </Spin>
</Layout> </Layout>
); );
......
...@@ -221,3 +221,7 @@ export function remittanceAuditStatusToString(status) { ...@@ -221,3 +221,7 @@ export function remittanceAuditStatusToString(status) {
return '未定义'; return '未定义';
} }
} }
export function mobileSecrecy(mobile){
return (mobile+'').replace(/^(\d{3})(\d{4})(\d{4})$/g, (b,c,d,e)=>(c+'****'+e));
}
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