settlement.js
2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import * as types from '../constants/ActionTypes';
const initialState = {
generateList: [],
generateListCount: 0,
confirmingList: [],
confirmingListCount: 0,
payingList: [],
payingListCount: 0,
completedList: [],
completedListCount: 0,
verifyingList: [],
verifyingListCount: 0,
detailList: [],
detailListCount: 0,
backToFirstPage:false,
settleRecordsDetail:{},
positionSettlementDetail:{
price_proto:'',
price_policy:''
},
needLoad:false
};
export default function environment(state = initialState, action) {
switch (action.type) {
case types.GET_GENERATE_LIST:
return Object.assign({}, state, {
generateList: action.generateList,
generateListCount: action.generateListCount
});
break;
case types.GET_CONFIRMING_LIST:
return Object.assign({}, state, {
confirmingList: action.confirmingList,
confirmingListCount: action.confirmingListCount
});
break;
case types.GET_SUPPLEMENT_PAYING_LIST:
return Object.assign({}, state, {
payingList: action.payingList,
payingListCount: action.payingListCount
});
break;
case types.GET_SUPPLEMENT_COMPLETED_LIST:
return Object.assign({}, state, {
completedList: action.completedList,
completedListCount: action.completedListCount
});
break;
case types.GET_VERIFYING_LIST:
return Object.assign({}, state, {
verifyingList: action.verifyingList,
verifyingListCount: action.verifyingListCount
});
break;
case types.SETTLEMENT_DETAIL_LIST:
return Object.assign({}, state, {
detailList: action.detailList,
detailListCount: action.detailListCount
});
break;
case types.CHANGE_PAGE_NUM:
return Object.assign({}, state, {
backToFirstPage: action.backToFirstPage,
});
break;
case types.SETTLE_RECORD_DETAIL:
return Object.assign({}, state, {
settleRecordsDetail: action.settleRecordsDetail,
});
break;
case types.POSITION_SETTLEMENT_DETAIL:
return Object.assign({}, state, {
positionSettlementDetail: action.positionSettlementDetail,
});
break;
case types.CHANGE_SETTLEMENT_NEED_LOAD:
return Object.assign({}, state, {
needLoad: action.needLoad,
});
break;
default:
return state;
}
}