serviceInOut.js
3.8 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
import * as types from '../constants/ActionTypes';
const initialState = {
backProcessStatisticsList : [],//后道
backProcessStatisticsListCount: 0,
backProcessList : [],
backProcessListCount : 0,
backProcessAll : {},
backProcessStatistics : {
increase: 0,
decrease: 0,
payback : 0
},
backProcessCheckList : [],
backProcessCheckListCount: 0,
outCheckStatistics : 0,
backProcessDetail : {},
backImportError : '',
frontList : {},
frontDetail : {},
frontStatistics : {},
serviceData : {},
orderData : {},
processData : {},
datumData : {},
datumCheck : {}
};
export default function environment(state = initialState, action) {
switch (action.type) {
case types.BACK_PROCESS_STATISTICS_LIST://后道首页列表
return Object.assign({}, state, {
backProcessStatisticsList: action.backProcessStatisticsList,
backProcessStatisticsListCount: action.backProcessStatisticsListCount
});
break;
case types.BACK_PROCESS_STATISTICS://后道首页统计数字
return Object.assign({}, state, {
backProcessStatistics: action.backProcessStatistics
});
break;
case types.BACK_PROCESS_LIST://后道
return Object.assign({}, state, {
backProcessList : action.backProcessList,
backProcessListCount: action.backProcessListCount,
backProcessAll : action.backProcessAll
});
break;
case types.BACK_PROCESS_CHECK_LIST://后道
return Object.assign({}, state, {
backProcessCheckList: action.backProcessCheckList,
backProcessCheckListCount: action.backProcessCheckListCount
});
break;
case types.OUT_CHECK_STATISTICS://后道
return Object.assign({}, state, {
outCheckStatistics: action.outCheckStatistics
});
break;
case types.BACK_PROCESS_DETAIL://后道
return Object.assign({}, state, {
backProcessDetail : action.backProcessDetail,
});
break;
case types.BACK_PROCESS_IMPORT_ERROR://后道
return Object.assign({}, state, {
backImportError: action.backImportError
});
break;
case types.FRONT_LIST:
return Object.assign({}, state, {
frontList: action.frontList
});
break;
case types.FRONT_DETAIL:
return Object.assign({}, state, {
frontDetail: action.frontDetail
});
break;
case types.FRONT_STATISTICS:
return Object.assign({}, state, {
frontStatistics: action.frontStatistics
});
break;
case types.SERVICE_STATISTICS:
return Object.assign({}, state, {
serviceData: action.serviceData
});
break;
case types.ORDER_STATISTICS:
return Object.assign({}, state, {
orderData: action.orderData
});
break;
case types.PROCESS_STATISTICS:
return Object.assign({}, state, {
processData: action.processData
});
break;
case types.DATUMDATA_STATISTICS:
return Object.assign({}, state, {
datumData: action.datumData
});
break;
case types.DATUMDATA_CHECK:
return Object.assign({}, state, {
datumCheck: action.datumCheck
});
break;
default:
return state;
}
}