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)}> {
<Form.Item label="产品" {...smallFormItemLayout}> item &&
<p>{item && item.title}</p> <Form className="main-form" horizontal onSubmit={this.handleSubmit.bind(this)}>
</Form.Item> <Form.Item label="产品" {...smallFormItemLayout}>
<p>{item.title || NULL}</p>
<Form.Item label="确认打款金额" {...smallFormItemLayout}> </Form.Item>
<Input placeholder="确认打款金额" <Form.Item label="理财师" {...smallFormItemLayout}>
readOnly {
{...getFieldProps('remittanceAmount', { item.user ?
initialValue: item && item.remittanceAmount ((item.user.username || NULL) + ' - ' +
})} /> (mobileSecrecy(item.user.mobile) || NULL))
</Form.Item> :
<Form.Item label="实际佣金" {...smallFormItemLayout}> NULL
<Input placeholder="实际佣金" }
readOnly </Form.Item>
{...getFieldProps('realReturn', { <Form.Item label="确认打款金额" {...smallFormItemLayout}>
initialValue: item && item.commission {
})} /> item.remittanceAmount || NULL
</Form.Item> }
<Form.Item {...footerFormSubmitLayout} style={{marginTop:30}}> </Form.Item>
<Button type="primary" htmlType="submit" loading={loading}><Icon type="save"/>发放</Button> <Form.Item label="实际佣金" {...smallFormItemLayout}>
<Button onClick={e=>{e.preventDefault(); this.props.history.goBack();}} {
style={{marginLeft:'1em'}}> item.commission || NULL
<Icon type="rollback"/>返回 }
</Button> </Form.Item>
</Form.Item> <Form.Item {...footerFormSubmitLayout} style={{marginTop:30}}>
</Form> <Button type="primary" htmlType="submit" loading={loading}><Icon
type="save"/>发放</Button>
<Button onClick={e=>{e.preventDefault(); this.props.history.goBack();}}
style={{marginLeft:'1em'}}>
<Icon type="rollback"/>返回
</Button>
</Form.Item>
</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