provider.js
5.5 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
import * as types from '../constants/ActionTypes';
const initialState = {
formDefind: [],
providerList: {},
recruitProviderList: {},
providerDel: {},
is_import: 'init',
errorMeg: '',
provider_is_ok: 'init',
providerAccount: {},
agentList: [],
agentListDetail: [],
billingdetails_list: [],
lookover_list: [],
getLookOverbroker_list: [],
getPosttion_list: [],
agentIndexCollectAchieveSettle: [],
manageIndexCollectAchieveSettle: [],
providerAreaList: {},
import_broker: '',
messageAll: '',
auditingList: [],
rebateAddSubtractList: [],
};
export default function environment(state = initialState, action) {
switch (action.type) {
case types.PROVIDER_AREA_LIST:
return Object.assign({}, state, {
providerAreaList: action.providerAreaList
});
case types.PROVIDER_LOAD_FORM:
return Object.assign({}, state, {
formDefind: action.formDefind
});
case types.PROVIDER_LIST:
return Object.assign({}, state, {
providerList: action.providerList
});
case types.RECRUIT_PROVIDER_LIST:
return Object.assign({}, state, {
recruitProviderList: action.recruitProviderList
});
case types.PROVIDER_DEL:
return Object.assign({}, state, {
providerDel: action.providerDel
});
case types.IMPORT_PROVIDER:
return Object.assign({}, state, {
is_import: action.is_import,
errorMeg: action.errorMeg
});
case types.PROVIDER_IS_OK:
return Object.assign({}, state, {
provider_is_ok: action.provider_is_ok
});
case types.PROVIDER_ACCOUNT:
return Object.assign({}, state, {
providerAccount: action.providerAccount
});
case types.LIST_AGENTS:
return Object.assign({}, state, {
agentList: action.agentList
});
case types.LIST_AGENTS_DETAIL:
return Object.assign({}, state, {
agentListDetail: action.agentListDetail
});
case types.DETAIL_AGENTS:
return Object.assign({}, state, {
agentDetail: action.agentDetail
});
case types.DETAIL_RANGE_AGENTS:
return Object.assign({}, state, {
agentDetailList: action.agentDetailList,
total_direct: action.total_direct,
total_bylower: action.total_bylower,
total_count: action.total_count,
});
case types.LIST_AGENTS_SETTING_DAYS:
return Object.assign({}, state, {
agentSettings: action.agentSettings,
});
case types.AGENT_INDEX_COLLECT_TODAY:
return Object.assign({}, state, {
agentIndexCollectToday: action.agentIndexCollectToday,
});
///供应商管理首页
case types.MANAGE_INDEX_COLLECT_TODAY:
return Object.assign({}, state, {
manageIndexCollectToday: action.manageIndexCollectToday,
});
case types.AGENT_INDEX_COLLECT_DETAIL:
return Object.assign({}, state, {
agentIndexCollectDetail: action.agentIndexCollectDetail,
});
//供应商管理首页供应商汇总
case types.MANAGE_INDEX_COLLECT_DETAIL:
return Object.assign({}, state, {
manageIndexCollectDetail: action.manageIndexCollectDetail,
});
case types.AGENT_INDEX_COLLECT_ACHIEVE_SETTLE:
return Object.assign({}, state, {
agentIndexCollectAchieveSettle: action.agentIndexCollectAchieveSettle,
});
//供应商管理首页业绩及汇总结算
case types.MANAGE_INDEX_COLLECT_ACHIEVE_SETTLE:
return Object.assign({}, state, {
manageIndexCollectAchieveSettle: action.manageIndexCollectAchieveSettle,
});
//英格玛---供应商管理---待审核供应列表
case types.PROVIDER_AUDITING_LIST:
return Object.assign({}, state, {
auditingList: action.auditing_list
});
break;
//英格玛---供应商管理---结算明细--导入返利加减项--选中数据
case types.IMPORT_REBATE_ADD_SUBTRACT:
return Object.assign({}, state, {
rebateAddSubtractList: action.rebateAddSubtractList
});
break;
case types.BILLINGDETAILS_LIST:
return Object.assign({}, state, {
billingdetails_list: action.billingdetails_list
});
break;
case types.LOOKOVER_LIST:
return Object.assign({}, state, {
lookover_list: action.lookover_list
});
break;
case types.GETLOOKOVERBROKER_LIST:
return Object.assign({}, state, {
getLookOverbroker_list: action.getLookOverbroker_list
});
break;
case types.GETPOSTTION:
return Object.assign({}, state, {
getPosttion_list: action.getPosttion_list
});
break;
case types.IMPORT_BROKER:
return Object.assign({}, state, {
import_broker: action.import_broker,
messageAll: action.messageAll,
});
break;
default:
return state;
}
}