|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+using RMYY_CallCenter_Api.Models.Enum;
|
|
|
2
|
+using System;
|
|
|
3
|
+using System.Collections.Generic;
|
|
|
4
|
+using System.Linq;
|
|
|
5
|
+using System.Web;
|
|
|
6
|
+
|
|
|
7
|
+namespace RMYY_CallCenter_Api.Models
|
|
|
8
|
+{
|
|
|
9
|
+ public class ButtonGroup
|
|
|
10
|
+ {
|
|
|
11
|
+ public static button query()
|
|
|
12
|
+ {
|
|
|
13
|
+ return new button(1, "查询");
|
|
|
14
|
+ }
|
|
|
15
|
+ public static button edit()
|
|
|
16
|
+ {
|
|
|
17
|
+ return new button(2, "编辑");
|
|
|
18
|
+ }
|
|
|
19
|
+ public static button delete()
|
|
|
20
|
+ {
|
|
|
21
|
+ return new button(3, "删除");
|
|
|
22
|
+ }
|
|
|
23
|
+ public static button submit()
|
|
|
24
|
+ {
|
|
|
25
|
+ return new button(4, "提交");
|
|
|
26
|
+ }
|
|
|
27
|
+ public static button assign()
|
|
|
28
|
+ {
|
|
|
29
|
+ return new button(5, "派单");
|
|
|
30
|
+ }
|
|
|
31
|
+ public static button receive()
|
|
|
32
|
+ {
|
|
|
33
|
+ return new button(6, "查收");
|
|
|
34
|
+ }
|
|
|
35
|
+ public static button deal()
|
|
|
36
|
+ {
|
|
|
37
|
+ return new button(7, "处理");
|
|
|
38
|
+ }
|
|
|
39
|
+ public static button takered()
|
|
|
40
|
+ {
|
|
|
41
|
+ return new button(8, "取红处方");
|
|
|
42
|
+ }
|
|
|
43
|
+ public static button takepill()
|
|
|
44
|
+ {
|
|
|
45
|
+ return new button(9, "取药");
|
|
|
46
|
+ }
|
|
|
47
|
+ public static button takeblood()
|
|
|
48
|
+ {
|
|
|
49
|
+ return new button(10, "取血");
|
|
|
50
|
+ }
|
|
|
51
|
+ public static button send()
|
|
|
52
|
+ {
|
|
|
53
|
+ return new button(11, "送达");
|
|
|
54
|
+ }
|
|
|
55
|
+ public static button end()
|
|
|
56
|
+ {
|
|
|
57
|
+ return new button(12, "完成");
|
|
|
58
|
+ }
|
|
|
59
|
+ public static button over()
|
|
|
60
|
+ {
|
|
|
61
|
+ return new button(13, "处理完结");
|
|
|
62
|
+ }
|
|
|
63
|
+ public static button export()
|
|
|
64
|
+ {
|
|
|
65
|
+ return new button(14, "导出");
|
|
|
66
|
+ }
|
|
|
67
|
+
|
|
|
68
|
+
|
|
|
69
|
+ /// <summary>
|
|
|
70
|
+ /// 按钮类
|
|
|
71
|
+ /// </summary>
|
|
|
72
|
+ public class button
|
|
|
73
|
+ {
|
|
|
74
|
+ public int key { get; set; }
|
|
|
75
|
+ public string value { get; set; }
|
|
|
76
|
+ public button(int _key, string _value) {
|
|
|
77
|
+ key = _key;
|
|
|
78
|
+ value = _value;
|
|
|
79
|
+ }
|
|
|
80
|
+ }
|
|
|
81
|
+
|
|
|
82
|
+ /// <summary>
|
|
|
83
|
+ /// 根据状态和角色代码获取操作按钮
|
|
|
84
|
+ /// </summary>
|
|
|
85
|
+ /// <param name="state"></param>
|
|
|
86
|
+ /// <param name="code"></param>
|
|
|
87
|
+ /// <param name="iszb"></param>
|
|
|
88
|
+ /// <returns></returns>
|
|
|
89
|
+ public static List<button> GetButtons(int? state, string code, int? type)
|
|
|
90
|
+ {
|
|
|
91
|
+ List<button> buttons = new List<button>();
|
|
|
92
|
+ buttons.Add(query());
|
|
|
93
|
+ //中心话务员 坐席班长 管理员
|
|
|
94
|
+ if (code == "ZXHWY" || code == "ZXBZ" || code == "GLY")
|
|
|
95
|
+ {
|
|
|
96
|
+ buttons.Add(submit());
|
|
|
97
|
+ buttons.Add(edit()); buttons.Add(delete());
|
|
|
98
|
+ }
|
|
|
99
|
+ switch (type)
|
|
|
100
|
+ {
|
|
|
101
|
+
|
|
|
102
|
+ case (int)EnumWorkOrder.RedDis:
|
|
|
103
|
+ //红处方配送
|
|
|
104
|
+ if (state==(int)EnumDisWorkOrderState.neworder)
|
|
|
105
|
+ {
|
|
|
106
|
+ if (code == "GLY")
|
|
|
107
|
+ {
|
|
|
108
|
+ buttons.Add(assign());
|
|
|
109
|
+ }
|
|
|
110
|
+ }
|
|
|
111
|
+ if (state == (int)EnumDisWorkOrderState.assign)
|
|
|
112
|
+ {
|
|
|
113
|
+ if (code == "ZYY")
|
|
|
114
|
+ {
|
|
|
115
|
+ buttons.Add(receive());
|
|
|
116
|
+ }
|
|
|
117
|
+ }
|
|
|
118
|
+ if (state == (int)EnumDisWorkOrderState.receive)
|
|
|
119
|
+ {
|
|
|
120
|
+ if (code == "ZYY")
|
|
|
121
|
+ {
|
|
|
122
|
+ buttons.Add(takered());
|
|
|
123
|
+ }
|
|
|
124
|
+ }
|
|
|
125
|
+ if (state == (int)EnumDisWorkOrderState.stayred)
|
|
|
126
|
+ {
|
|
|
127
|
+ if (code == "ZYY")
|
|
|
128
|
+ {
|
|
|
129
|
+ buttons.Add(takepill());
|
|
|
130
|
+ }
|
|
|
131
|
+ }
|
|
|
132
|
+ if (state == (int)EnumDisWorkOrderState.staydrug)
|
|
|
133
|
+ {
|
|
|
134
|
+ if (code == "ZYY")
|
|
|
135
|
+ {
|
|
|
136
|
+ buttons.Add(send());
|
|
|
137
|
+ }
|
|
|
138
|
+ }
|
|
|
139
|
+ if (state == (int)EnumDisWorkOrderState.send)
|
|
|
140
|
+ {
|
|
|
141
|
+ if (code == "ZYY")
|
|
|
142
|
+ {
|
|
|
143
|
+ buttons.Add(end());
|
|
|
144
|
+ }
|
|
|
145
|
+ }
|
|
|
146
|
+ if (state == (int)EnumDisWorkOrderState.end)
|
|
|
147
|
+ {
|
|
|
148
|
+ if (code == "GLY")
|
|
|
149
|
+ {
|
|
|
150
|
+ buttons.Add(over());
|
|
|
151
|
+ }
|
|
|
152
|
+ }
|
|
|
153
|
+ break;
|
|
|
154
|
+ case (int)EnumWorkOrder.OrtherDis:
|
|
|
155
|
+ case (int)EnumWorkOrder.UrgDis:
|
|
|
156
|
+ //急标本配送
|
|
|
157
|
+ if (state == (int)EnumDisWorkOrderState.neworder)
|
|
|
158
|
+ {
|
|
|
159
|
+ if (code == "GLY")
|
|
|
160
|
+ {
|
|
|
161
|
+ buttons.Add(assign());
|
|
|
162
|
+ }
|
|
|
163
|
+ }
|
|
|
164
|
+ if (state == (int)EnumDisWorkOrderState.assign)
|
|
|
165
|
+ {
|
|
|
166
|
+ if (code == "ZYY")
|
|
|
167
|
+ {
|
|
|
168
|
+ buttons.Add(receive());
|
|
|
169
|
+ }
|
|
|
170
|
+ }
|
|
|
171
|
+ if (state == (int)EnumDisWorkOrderState.receive)
|
|
|
172
|
+ {
|
|
|
173
|
+ if (code == "ZYY")
|
|
|
174
|
+ {
|
|
|
175
|
+ buttons.Add(deal());
|
|
|
176
|
+ }
|
|
|
177
|
+ }
|
|
|
178
|
+ if (state == (int)EnumDisWorkOrderState.dealing)
|
|
|
179
|
+ {
|
|
|
180
|
+ if (code == "ZYY")
|
|
|
181
|
+ {
|
|
|
182
|
+ buttons.Add(end());
|
|
|
183
|
+ }
|
|
|
184
|
+ }
|
|
|
185
|
+
|
|
|
186
|
+ break;
|
|
|
187
|
+ case (int)EnumWorkOrder.BloodDis:
|
|
|
188
|
+ //血制品配送
|
|
|
189
|
+ if (state == (int)EnumDisWorkOrderState.neworder)
|
|
|
190
|
+ {
|
|
|
191
|
+ if (code == "GLY")
|
|
|
192
|
+ {
|
|
|
193
|
+ buttons.Add(assign());
|
|
|
194
|
+ }
|
|
|
195
|
+ }
|
|
|
196
|
+ if (state == (int)EnumDisWorkOrderState.assign)
|
|
|
197
|
+ {
|
|
|
198
|
+ if (code == "ZYY")
|
|
|
199
|
+ {
|
|
|
200
|
+ buttons.Add(receive());
|
|
|
201
|
+ }
|
|
|
202
|
+ }
|
|
|
203
|
+ if (state == (int)EnumDisWorkOrderState.receive)
|
|
|
204
|
+ {
|
|
|
205
|
+ if (code == "ZYY")
|
|
|
206
|
+ {
|
|
|
207
|
+ buttons.Add(takeblood());
|
|
|
208
|
+ }
|
|
|
209
|
+ }
|
|
|
210
|
+ if (state == (int)EnumDisWorkOrderState.takeblood)
|
|
|
211
|
+ {
|
|
|
212
|
+ if (code == "ZYY")
|
|
|
213
|
+ {
|
|
|
214
|
+ buttons.Add(send());
|
|
|
215
|
+ }
|
|
|
216
|
+ }
|
|
|
217
|
+ if (state == (int)EnumDisWorkOrderState.send)
|
|
|
218
|
+ {
|
|
|
219
|
+ if (code == "ZYY")
|
|
|
220
|
+ {
|
|
|
221
|
+ buttons.Add(end());
|
|
|
222
|
+ }
|
|
|
223
|
+ }
|
|
|
224
|
+ if (state == (int)EnumDisWorkOrderState.end)
|
|
|
225
|
+ {
|
|
|
226
|
+ if (code == "GLY")
|
|
|
227
|
+ {
|
|
|
228
|
+ buttons.Add(over());
|
|
|
229
|
+ }
|
|
|
230
|
+ }
|
|
|
231
|
+ break;
|
|
|
232
|
+
|
|
|
233
|
+ }
|
|
|
234
|
+ return buttons;
|
|
|
235
|
+ }
|
|
|
236
|
+ }
|
|
|
237
|
+}
|