test.js
2.9 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
import * as types from '../constants/ActionTypes';
const initialState = {
tmpList: [],
tmpListCount: 0,
legalEntityList: [],
legalEntityListCount: 0,
waitForSignList: [],
waitForSignListCount: 0,
signList: [],
signListCount: 0,
backToFisrtPage: false,
tmpDetail: {},
contractDetail: {},
lglEntSeals: [],
lglEntSealsCount: 0,
laborContractNum: {},
reload: false,
laborContractRemind: {},
waitForTerminateList: [],
waitForTerminateListCount: 0,
QRCodeURL:''
}
export default function environment(state = initialState, action) {
switch (action.type) {
case types.LABOR_CONTRACT_TMP_LIST:
return Object.assign({}, state, {
tmpList: action.tmpList,
tmpListCount: action.tmpListCount
});
break;
case types.LABOR_CONTRACT_LEGAL_ENTITY_LIST_TEST:
return Object.assign({}, state, {
legalEntityList: action.legalEntityList,
legalEntityListCount: action.legalEntityListCount
});
break;
case types.WAIT_FOR_SIGN_LIST:
return Object.assign({}, state, {
waitForSignList: action.waitForSignList,
waitForSignListCount: action.waitForSignListCount
});
break;
case types.LABOR_CONTRACT_LIST:
return Object.assign({}, state, {
contractList: action.contractList,
contractListCount: action.contractListCount
});
break;
case types.ENT_SIGN_LIST:
return Object.assign({}, state, {
signList: action.signList,
signListCount: action.signListCount
});
break;
case types.LABOR_CONTRACT_TMP_DETAIL:
return Object.assign({}, state, {
tmpDetail: action.tmpDetail,
tmpDetailFields: action.tmpDetailFields
});
break;
case types.LABOR_CONTRACT_DETAIL:
return Object.assign({}, state, {contractDetail: action.contractDetail});
break;
case types.LEGAL_ENTITY_SEALS:
return Object.assign({}, state, {
lglEntSeals: action.lglEntSeals,
lglEntSealsCount: action.lglEntSealsCount
});
break;
case types.LABOR_CONTRACT_NUM:
return Object.assign({}, state, {laborContractNum: action.laborContractNum});
break;
case types.LABOR_CONTRACT_REMIND:
return Object.assign({}, state, {laborContractRemind: action.laborContractRemind});
break;
case types.WAIT_FOR_TERMINATE_LIST:
return Object.assign({}, state, {waitForTerminateList: action.waitForTerminateList,waitForTerminateListCount:action.waitForTerminateListCount});
break;
case types.LABOR_CONTRACT_QRCODE:
return Object.assign({}, state, {QRCodeURL: action.QRCodeURL});
break;
case types.LABOR_CONTRACT_NEED_RELOAD:
return Object.assign({}, state, {reload: action.reload});
break;
case types.BACK_TO_FIRST_PAGE:
return Object.assign({}, state, {backToFisrtPage: action.backToFisrtPage});
break;
default:
return state;
}
};