taskReducer.js
3.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
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
// import * as types from '../constants/ActionTypes';
// 默认数据
const initialState = {
visible:false,
listdata:[],
dolistdata:[],
cashmanagementwaitlistdata:[],
tasksetdata:[],
cashmanagementstayoutlistdata:[],
cashmanagementissuedlistdata:[],
legalentityinit:[],
addmanagementdata:[]
};
export default (state = initialState, action)=>{
if (action.tyoe == "MODALLOCK"){
return {
...state,
visible: action.data
}
}
if(action.type == "INIT"){ //获取未发放列表
return {
...state,
listdata:action.data
}
}
if (action.type == "SEARCHINIT") { //搜索 未发放 列表
return {
...state,
listdata: action.data
}
}
if (action.type == "SEARCHDOINIT") { //搜索 已发放 列表
return {
...state,
dolistdata: action.data
}
}
if (action.type == "DOINIT") {
return {
...state,
dolistdata: action.data // 获取已发放列表
}
}
if (action.type == "CASHMANAGEMENTWAITLISTINIT") {
return {
...state,
cashmanagementwaitlistdata: action.data // 获取待处理列表
}
}
if (action.type == "CASHMANAGEMENTSTAYOUTINIT") {
return {
...state,
cashmanagementstayoutlistdata: action.data // 获取未发放列表
}
}
if (action.type == "GET_TASKSET_TYPE") {
return {
...state,
legalentityinit: state.legalentityinit.concat(action.data) // 获取 添加法务实体(回写)
}
}
if (action.type == "CASHMANAGEMENTISSUEDINIT") {
return {
...state,
cashmanagementissuedlistdata: action.data // 获取已发放列表
}
}
if (action.type == "SEARCHCASHMANAGEMENTWAITLLIST") {
return {
...state,
cashmanagementwaitlistdata: action.data // 搜索 ——待做
}
}
if (action.type == "SEARCHCASHMANAGEMENTSTAYOUTLLIST") {
return {
...state,
cashmanagementstayoutlistdata: action.data // 搜索 ———— 未发放
}
}
if (action.type == "SEARCHCASHMANAGEMENTISSUEDLLIST") {
return {
...state,
cashmanagementissuedlistdata: action.data // 搜索 ————已发放
}
}
if (action.type == "GETTASKSETTYPEPATHINIT") {
return {
...state,
tasksetdata: action.data // 搜索 ————已发放
}
}
if (action.type == "GETLEGALENTITYINIT") {
return {
...state,
legalentityinit: state.legalentityinit.concat(action.data)// taskset 添加法务实体
}
}
if (action.type == "DEl_TASKSET_TYPE") {
return {
...state,
legalentityinit: action.data// 财务管理 设置 删除法务实体
}
}
if (action.type == "GETMANAGEMENTLIST") {
return {
...state,
addmanagementdata: action.data// 小程序管理 ———————— 获取小程序管理列表(初始化小程序列表)
}
}
if (action.type == "ADDMANAGEMENT") {
return {
...state,
addmanagementdata: state.addmanagementdata.concat(action.data)// 小程序管理 ———————— 添加小程序管理
}
}
if (action.type == "MODIFICATIONMANAGEMENT") {
return {
...state,
addmanagementdata: action.data// 小程序管理 ———————— 修改小程序管理
}
}
return state;
}