Commit aa7cc8cb authored by superman's avatar superman

update

parent 2da6334e
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -29,7 +29,8 @@ import {
smallFormItemLayout,
footerFormSubmitLayout,
remittanceAuditStatusToString,
leftRightFormItemLayout
leftRightFormItemLayout,
NULL
} from '../../utils';
@connect(state=>({
......@@ -121,7 +122,6 @@ export default class PassItem extends Component {
const header = (<MainHeader breadcrumb={['审核管理', '报单审核','审核详情']} title={title} operation={operation}/>);
const imgProps = (src)=>({
src: src + '!t',
style: {maxWidth: 200, maxHeight: 160},
......@@ -147,17 +147,18 @@ export default class PassItem extends Component {
{audit.dateCreated && formatDateTime(audit.dateCreated) || '错误的时间'}
</Form.Item>
<Form.Item label="产品募集情况" {...leftRightFormItemLayout}>
{'已募集:' + audit.fundRaisedOver + '、募集目标:' + audit.fundRaisedTarget}
{'已募集:' + (audit.fundRaisedOver || NULL) + '、募集目标:' + (audit.fundRaisedTarget || NULL)}
</Form.Item>
<Form.Item label="预约姓名" {...leftRightFormItemLayout}>
{audit.buyerName}
{audit.buyerName || NULL}
</Form.Item>
<Form.Item label="预约金额" {...leftRightFormItemLayout}>
{audit.reservationAmount}
{audit.reservationAmount || NULL}
</Form.Item>
{
isEdit ?
<Form.Item label="实际入账金额" help="实际入账金额,请核对打款凭条" {...leftRightFormItemLayout}>
<Form.Item label="实际入账金额"
help="实际入账金额,请核对打款凭条" {...leftRightFormItemLayout}>
<Input placeholder="实际入账金额"
{...getFieldProps('remittanceAmount', {
initialValue: audit.remittanceAmount
......@@ -165,12 +166,13 @@ export default class PassItem extends Component {
</Form.Item>
:
<Form.Item label="实际入账金额" {...leftRightFormItemLayout}>
{audit.remittanceAmount}
{audit.remittanceAmount || NULL}
</Form.Item>
}
{
isEdit ?
<Form.Item label="投资人姓名" help="真实的投资人姓名,请核对身份证照片上的姓名" {...leftRightFormItemLayout}>
<Form.Item label="投资人姓名"
help="真实的投资人姓名,请核对身份证照片上的姓名" {...leftRightFormItemLayout}>
<Input placeholder="投资人姓名"
{...getFieldProps('realName', {
initialValue: audit.realName
......@@ -178,12 +180,13 @@ export default class PassItem extends Component {
</Form.Item>
:
<Form.Item label="投资人姓名" {...leftRightFormItemLayout}>
{audit.realName}
{audit.realName || NULL}
</Form.Item>
}
{
isEdit ?
<Form.Item label="投资人身份证号码" help="真实的投资人身份证号码,请核对身份证照片上的号码" {...leftRightFormItemLayout}>
<Form.Item label="投资人身份证号码"
help="真实的投资人身份证号码,请核对身份证照片上的号码" {...leftRightFormItemLayout}>
<Input placeholder="投资人身份证号码"
{...getFieldProps('identityCardNumber', {
initialValue: audit.identityCardNumber
......@@ -191,7 +194,7 @@ export default class PassItem extends Component {
</Form.Item>
:
<Form.Item label="投资人身份证号码" {...leftRightFormItemLayout}>
{audit.identityCardNumber}
{audit.identityCardNumber || NULL}
</Form.Item>
}
{
......
......@@ -51,7 +51,6 @@ export default class Commission extends Component {
handleSubmit(e) {
e.preventDefault();
alert('ok');
this.props.dispatch({
type: 'SETTLEMENT_TRADE_ITEM',
id: this.props.item.id
......@@ -94,8 +93,12 @@ export default class Commission extends Component {
}
</Form.Item>
<Form.Item {...footerFormSubmitLayout} style={{marginTop:30}}>
<Button type="primary" htmlType="submit" loading={loading}><Icon
type="save"/>发放</Button>
{
(item.status == 11 || item.status == 21) && (! item.commissionId) &&
<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"/>返回
......
......@@ -28,7 +28,8 @@ import {
smallFormItemLayout,
footerFormSubmitLayout,
userStatusToString,
formatDateTime
formatDateTime,
NULL
} from '../../utils';
@connect(state=>({
......@@ -80,9 +81,7 @@ export default class EditItem extends Component {
const operation = (
<div style={{textAlign:'right'}}>
<Button.Group>
<Button type="ghost" onClick={e=>{e.preventDefault(); this.setState({isEdit: !this.state.isEdit})}}>
<Icon type="edit"/>
</Button>
<Button type="ghost" onClick={e=>{e.preventDefault(); this.props.history.goBack();}}>
<Icon type="rollback"/>
</Button>
......@@ -114,7 +113,7 @@ export default class EditItem extends Component {
isEdit ?
<Input {...getFieldProps('nick', {initialValue: item.nick})} />
:
item.nick
item.nick || NULL
}
</Form.Item>
<Form.Item label="E-mail" {...smallFormItemLayout}>
......@@ -122,7 +121,7 @@ export default class EditItem extends Component {
isEdit ?
<Input {...getFieldProps('email', {initialValue: item.email})} />
:
item.email
item.email || NULL
}
</Form.Item>
<Form.Item label="手机号" {...smallFormItemLayout}>
......@@ -130,7 +129,7 @@ export default class EditItem extends Component {
isEdit ?
<Input {...getFieldProps('mobile', {initialValue: item.mobile})} />
:
item.mobile
item.mobile || NULL
}
</Form.Item>
<Form.Item label="注册时间" {...smallFormItemLayout}>
......@@ -167,3 +166,7 @@ export default class EditItem extends Component {
);
}
}
// <Button type="ghost" onClick={e=>{e.preventDefault(); this.setState({isEdit: !this.state.isEdit})}}>
// <Icon type="edit"/>
// </Button>
......@@ -24,8 +24,7 @@ const remittance = handleActions({
return {...state, loading: true};
},
['PASS_REMITTANCE_ITEM_SUCCESS'](state, action){
const audit = {...state.audit, status: action.status};
return {...state, loading: false, audit};
return {...state, loading: false, audit: {...state.audit, ...action.item}};
},
['PASS_REMITTANCE_ITEM_FAILED'](state, action){
return {...state, loading: false, err: action.err};
......
......@@ -41,7 +41,7 @@ const trade = handleActions({
return {...state, loading: true};
},
['SETTLEMENT_TRADE_ITEM_SUCCESS'](state, action){
return {...state, loading: false,};
return {...state, loading: false, item:{...state.item, ...action.item}};
},
['SETTLEMENT_TRADE_ITEM_FAILED'](state, action){
return {...state, err: action.err, loading: false};
......
......@@ -54,13 +54,13 @@ function* watchItem() {
}
}
function* passItem(data){
function* passItem(item){
try {
yield call(pass, data);
yield call(pass, item);
yield put({
type: 'PASS_REMITTANCE_ITEM_SUCCESS',
status: data.status
item
});
} catch (err) {
console.log(err);
......
......@@ -79,10 +79,11 @@ function* watchAdd() {
function* settlement(id) {
try {
yield call(settlementItem, id);
yield item = call(settlementItem, id);
message.success('发放成功!');
yield put({
type: 'SETTLEMENT_TRADE_ITEM_SUCCESS'
type: 'SETTLEMENT_TRADE_ITEM_SUCCESS',
item
});
} catch (err) {
console.log(err);
......
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