【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-04-22 72c0df785d4838d35dc694071c61e3f9a54e7e81
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
if isDepartment("0606")=0 then
  Response.Redirect "/"
  Response.End()
end If
 
 
'各种返回信息
SystemMessageType=trim(Request("SystemMessageType"))
SMT=trim(Request("SMT"))
if SMT="1" then
  SystemMessageTXT="数据不足!!!"
elseif SMT="2" then
  SystemMessageTXT="分公司资料修改完成"
elseif SMT="3" then
  SystemMessageTXT="新建分公司资料完成"
elseif SMT="4" then
  SystemMessageTXT="分公司资料删除完成"
elseif SMT="5" then
  SystemMessageTXT="分公司名称重复"
elseif SMT="6" then
  SystemMessageTXT="请选择需要修改的项目"
elseif SMT="7" then
  SystemMessageTXT="请先输入两位字母的机构代码"
elseif SMT="8" then
  SystemMessageTXT="服务或调度单前缀重复"
elseif SMT="9" then
  SystemMessageTXT="分公司资料不存在或已停用或重复提交"
elseif SMT="10" then
  SystemMessageTXT="资料格式不正确,请手动删除!!"
elseif SMT="11" then
  SystemMessageTXT="分公司状态正常,不可重复操作"
end if
 
searchTXT=trim(Request("searchTXT"))
Set rs = Server.CreateObject("ADODB.Recordset")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><%=LindemanAdmin%></title>
        <!--#include virtual="/inc/ccs.gds"-->
    </head>
    <body onkeydown="xKeyEvent(event)">
        <!--#INCLUDE FILE="menu_header.gds" -->
        <!-- content -->
        <div id="content">
            <!--#INCLUDE FILE="AdminUser_menu_left.gds" -->
            <!-- content / right -->
            <div id="right">
                <!-- table -->
                <div class="box">
                    <!-- box / title -->
                    <div class="title">
                        <h5>分公司名录</h5>
                        <ul class="links">
                            <%if isDepartment("060602")=1 then%>
                            <li><a onclick="javascript:UnitCreate.style.display='block';">新建</a></li>
                            <li><a onClick="form1_Unit_update()">修改</a></li>
                            <li><a onClick="form1_Unit_delete()">停用</a></li>
                            <li><a onClick="form1_Unit_app()">启用</a></li>
                            <%End If%>
                        </ul>
                        <script LANGUAGE="javascript">
                        //修改分公司
                        function form1_Unit_update(){
                        document.form1.action = "admin_save.gds";
                        document.form1.admin_save.value = "80";
                        form1.submit();
                        }
                        //删除分公司
                        function form1_Unit_delete(){
                            document.form1.action = "admin_save.gds";
                            
                            var checkArry = document.getElementsByName("UnitID");
                            var checkArryInt=0;
                            for(var i=0;i<checkArry.length;i++){
                                if(checkArry[i].checked == true){checkArryInt=checkArryInt+1;}
                            }
                            if(checkArryInt>1){alert("一次只可以删除一个项目!!");}
                            else if(checkArryInt==1){
                                if(confirm('如该分公司没对应订单将删除所关资料,否则禁用该分公司权限.\n确实要删除吗?')){document.form1.admin_save.value = "116";form1.submit();}
                            }
                            else{alert("未有项目被选中!!");}
                            
                        }
                        //启用分公司
                        function form1_Unit_app(){
                            document.form1.action = "admin_save.gds";
                            
                            var checkArry = document.getElementsByName("UnitID");
                            var checkArryInt=0;
                            for(var i=0;i<checkArry.length;i++){
                                if(checkArry[i].checked == true){checkArryInt=checkArryInt+1;}
                            }
                            if(checkArryInt>1){alert("一次只可以操作一个项目!!");}
                            else if(checkArryInt==1){
                                if(confirm('确定要重新启用吗?')){document.form1.admin_save.value = "123";form1.submit();}
                            }
                            else{alert("未有项目被选中!!");}
                            
                        }
                        //选择修改分公司
                        function form1_Unit_Edit(id){
                            if (document.getElementById('Show_UnitShort_'+id).style.display=="none")
                            {
                                document.getElementById('Show_UnitName_'+id).style.display='';
                                document.getElementById('Edit_UnitName_'+id).style.display='none';
                                document.getElementById('UnitName_'+id).disabled=true;
                                document.getElementById('Show_UnitShort_'+id).style.display='';
                                document.getElementById('Edit_UnitShort_'+id).style.display='none';
                                document.getElementById('UnitShort_'+id).disabled=true;
                                document.getElementById('Show_UnitAddress_'+id).style.display='';
                                document.getElementById('Edit_UnitAddress_'+id).style.display='none';
                                document.getElementById('UnitAddress_'+id).disabled=true;
                                document.getElementById('Show_UnitTEL_'+id).style.display='';
                                document.getElementById('Edit_UnitTEL_'+id).style.display='none';
                                document.getElementById('UnitTEL_'+id).disabled=true;
                                document.getElementById('Show_APPID_'+id).style.display='';
                                document.getElementById('Edit_APPID_'+id).style.display='none';
                                document.getElementById('APPID_'+id).disabled=true;
                                document.getElementById('Show_APPSECRET_'+id).style.display='';
                                document.getElementById('Edit_APPSECRET_'+id).style.display='none';
                                document.getElementById('APPSECRET_'+id).disabled=true;
                                document.getElementById('Show_ServiceBranch_'+id).style.display='';
                                document.getElementById('Edit_ServiceBranch_'+id).style.display='none';
                                document.getElementById('ServiceBranch_'+id).disabled=true;
                                document.getElementById('Edit_NC_OAIDs_'+id).style.display='none';
                                document.getElementById('NC_OAIDs_'+id).disabled=true;
                            }
                            else
                            {
                                document.getElementById('Show_UnitName_'+id).style.display='none';
                                document.getElementById('Edit_UnitName_'+id).style.display='';
                                document.getElementById('UnitName_'+id).disabled=false;
                                document.getElementById('Show_UnitShort_'+id).style.display='none';
                                document.getElementById('Edit_UnitShort_'+id).style.display='';
                                document.getElementById('UnitShort_'+id).disabled=false;
                                document.getElementById('Show_UnitAddress_'+id).style.display='none';
                                document.getElementById('Edit_UnitAddress_'+id).style.display='';
                                document.getElementById('UnitAddress_'+id).disabled=false;
                                document.getElementById('Show_UnitTEL_'+id).style.display='none';
                                document.getElementById('Edit_UnitTEL_'+id).style.display='';
                                document.getElementById('UnitTEL_'+id).disabled=false;
                                document.getElementById('Show_APPID_'+id).style.display='none';
                                document.getElementById('Edit_APPID_'+id).style.display='';
                                document.getElementById('APPID_'+id).disabled=false;
                                document.getElementById('Show_APPSECRET_'+id).style.display='none';
                                document.getElementById('Edit_APPSECRET_'+id).style.display='';
                                document.getElementById('APPSECRET_'+id).disabled=false;
                                document.getElementById('Show_ServiceBranch_'+id).style.display='none';
                                document.getElementById('Edit_ServiceBranch_'+id).style.display='';
                                document.getElementById('ServiceBranch_'+id).disabled=false;
                                document.getElementById('Edit_NC_OAIDs_'+id).style.display='';
                                document.getElementById('NC_OAIDs_'+id).disabled=false;
 
                            }
 
                            
                        }
                        //新建分公司-关闭窗口
                        function JS_UnitCreateClose()
                        {
                        UnitCreate.style.display="none";
                        }
                        //新建分公司-保存
                        function JS_UnitCreateSave()
                        {
                        form2.submit();
                        }
                    </script>
                    </div>
                    <div class="dialogJ  dialogJfix dialogJshadow" id="UnitCreate" style="width: 370px; right: 400px; top: 150px;display:none;">
                        <div class="dialogJtitle">
                            <a href="javascript:JS_UnitCreateClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                            <span class="dialogJtxt" id="EditPhotoTXT">新建分公司资料</span>
                        </div>
                        <form id="form2" name="form2" action="admin_save.gds" method="post">
                        <input name="admin_save" type="hidden" value="115">
                        <div class="dialogJcontent">
                            <div class="dialogJbody" id="dialogJbody" style="height: 314px;">
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>名称:</span>
                                    <input id="UnitName" name="UnitName" type="text" value="" placeholder="XX分公司" maxlength="99/">
                                </div>
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>简称:</span>
                                    <input id="UnitShort" name="UnitShort" type="text" value="" placeholder="XX" maxlength="99/">
                                </div>
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <%'生成前缀
                                    OrderClass1=""
                                    i=0
                                    do while OrderClass1="" And i<100
                                        Randomize
                                        OrderClass1=UCase(chr(int(26*rnd)+97) & chr(int(26*rnd)+97))
                                        sql="select id from dictionary where vtitle='OrderClass' and (vOrder2='"&OrderClass1&"')"
                                        rs.open sql,objConn,1,1
                                        if not rs.eof then
                                            OrderClass1=""
                                        end If
                                        rs.close()
                                        i=i+1
                                    Loop
                                    
                                    OrderClass2=""
                                    i=0
                                    do while OrderClass2="" And i<100
                                        Randomize
                                        OrderClass2=UCase(chr(int(26*rnd)+97) & chr(int(26*rnd)+97))
                                        sql="select id from dictionary where vtitle='OrderClass' and (vOrder2='"&OrderClass2&"')"
                                        rs.open sql,objConn,1,1
                                        if not rs.eof then
                                            OrderClass2=""
                                        end If
                                        rs.close()
                                        i=i+1
                                    Loop
                                    %>
                                    <span>服务单前缀:</span><input id="OrderClass1" name="OrderClass1" type="text" value="" maxlength="99/" placeholder="<%=OrderClass1%>" style="width: 34px;">&nbsp;
                                    <span>调度单前缀:</span><input id="OrderClass2" name="OrderClass2" type="text" value="" maxlength="99/" placeholder="<%=OrderClass2%>" style="width: 34px;">
                                    (两位大写字母)
                                </div>
                                
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>出车地址:</span>
                                    <input id="UnitAddress" name="UnitAddress" type="text" value="" maxlength="99/" placeholder="XX市XX区XX路X号" style="width: 236px;">
                                </div>
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>电话:</span>
                                    <input id="UnitTEL" name="UnitTEL" type="text" value="" maxlength="99/" placeholder="(选填)" style="width: 260px;">
                                </div>
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>新建企微相关部门:</span>
                                    <select name="department_create_Unit" id="department_create_Unit" style="padding: 5px 0 5px 8px;">
                                        <option value="0">新建</option>
                                        <option value="1">暂不新建</option>
                                    </select>
                                </div>
                                <!--
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>企微相关部门ID:</span>
                                    <input id="DepartmentID" name="DepartmentID" type="text" value="" maxlength="99/" placeholder="多个以","分割 (选填)" style="width: 200px;">
                                </div>
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>gpsoo信息:</span>
                                    <input id="gpsooName" name="gpsooName" type="text" value="" maxlength="99/" placeholder="XX车队 (选填)" style="width: 94px;">
                                    <span>登录名:</span>
                                    <input id="gpsooNameID" name="gpsooNameID" type="text" value="" maxlength="99/" placeholder="(选填)" style="width: 72px;">
                                </div>
                                -->
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span>车辆信息:</span>
                                    <select name="is_CarData" id="is_CarData" style="padding: 5px 0 5px 8px;">
                                        <option value="0">未录入</option>
                                        <option value="1">已录入</option>
                                    </select>
                                </div>
                                
                                <div class="modify-album-name">
                                    <p class="album-tips"></p>
                                    <span style="color: #FF0000;">先填写分公司资料,再去企微新建部门"简称--分公司部门"</span>
                                </div>
                                
                            </div>
                        </div>
                        </form>
                        <div class="dialogJanswers">
                            <input type="button" class="dialogJbtn first-child" onclick="JS_UnitCreateSave()" value="确定"> 
                            <input type="button" class="dialogJbtn" onclick="JS_UnitCreateClose()" value="取消">
                        </div>
                    </div>
                    <!-- end box / title -->
            <%
            UnitSearchID=trim(Request("UnitSearchID"))
            If UnitSearchID<>"" Then
            sql="select * from IntroducerUnitData where UnitID="&UnitSearchID&" and (ServiceBranch<>'') order by UnitID desc"
            else
            sql="select * from IntroducerUnitData where ServiceBranch<>'' and UnitState<>3 order by UnitState desc,UnitID desc"
            End If
            rs.open sql,objConn,1,1
            if rs.eof then
            SystemMessageType=2
            SystemMessageTXT="数据库中相关无数据!"
            end if
            %>
                    <!--#include virtual="/inc/SystemMessages.gds" -->
                    <div class="table">
                        <form id="form1" name="form1" action="" method="post">
                        <input name="admin_save" type="hidden" value="117">
                        <input name="BranchUnitData" type="hidden" value="1">
                        <input name="UnitSearchID" type="hidden" value="<%=UnitSearchID%>">
                        <table>
                            <thead>
                                <tr>
                                    <th class="selected"><input type="checkbox" class="checkall" /></th>
                                    <th>ID</th>
                                    <th>名称</th>
                                    <th>简称</th>
                                    <th>地址</th>
                                    <th>电话</th>
                                    <th>APPID</th>
                                    <th>APPSECRET</th>
                                    <th>状态</th>
                                    <th>机构代码</th>
                                    <th class="last">新单通知</th>
                                </tr>
                            </thead>
                            <tbody>
            
            <%i=1
            do while not rs.Eof
              UnitID        = rs("UnitID")
              UnitName        = rs("UnitName")    '名称
              UnitShort        = rs("UnitShort")    '简称
              UnitAddress    = rs("UnitAddress")    '地址
              UnitTEL        = rs("UnitTEL")        '电话
              UnitState        = rs("UnitState")    '状态(0禁用,1正常,2管理员)
              APPID            = rs("APPID")
              APPSECRET        = rs("APPSECRET")
              ServiceBranch    = rs("ServiceBranch")
              NC_OAIDs        = rs("NC_OAIDs")    '新单通知人员ID
              If UnitState="0" Then
                UnitState="停用"
              ElseIf UnitState="1" Then
                UnitState="正常"
              ElseIf UnitState="2" Then
                UnitState="管理员"
              End If
              i=i+1
              %>
              <tr>
                <td class="selected"  style='white-space: nowrap;'><input type="checkbox" id="UnitID_<%=UnitID%>" name="UnitID" value="<%=UnitID%>" onclick="javascript:form1_Unit_Edit('<%=UnitID%>')"/></td>
                <td class="selected"><%=UnitID%></td>
                <td class="category" id="Show_UnitName_<%=UnitID%>"  style='white-space: nowrap;'><A HREF="#"><%=UnitName%></A></td>
                <td class="category" id="Edit_UnitName_<%=UnitID%>" style="display:none;"><input id="UnitName_<%=UnitID%>" name="UnitName_<%=UnitID%>" class="small" style="width:150px;text-align: center;" value="<%=UnitName%>" type="text" disabled="true"></td>
                <td class="category" id="Show_UnitShort_<%=UnitID%>"  style='white-space: nowrap;'><A HREF="#"><%=UnitShort%></A></td>
                <td class="category" id="Edit_UnitShort_<%=UnitID%>" style="display:none;"><input id="UnitShort_<%=UnitID%>" name="UnitShort_<%=UnitID%>" class="small" style="width:120px;text-align: center;" value="<%=UnitShort%>" type="text" disabled="true"></td>
                <td class="category" id="Show_UnitAddress_<%=UnitID%>"  style='white-space: nowrap;'><%=UnitAddress%></td>
                <td class="category" id="Edit_UnitAddress_<%=UnitID%>" style="display:none;"><input id="UnitAddress_<%=UnitID%>" name="UnitAddress_<%=UnitID%>" class="small" style="width:200px;text-align: center;" value="<%=UnitAddress%>" type="text" disabled="true"></td>
                <td class="category" id="Show_UnitTEL_<%=UnitID%>"  style='white-space: nowrap;'><%=UnitTEL%></td>
                <td class="category" id="Edit_UnitTEL_<%=UnitID%>" style="display:none;"><input id="UnitTEL_<%=UnitID%>" name="UnitTEL_<%=UnitID%>" class="small" style="width:100px;text-align: center;" value="<%=UnitTEL%>" type="text" disabled="true"></td>
                <td class="category" id="Show_APPID_<%=UnitID%>"  style='white-space: nowrap;'><%=APPID%></td>
                <td class="category" id="Edit_APPID_<%=UnitID%>" style="display:none;"><input id="APPID_<%=UnitID%>" name="APPID_<%=UnitID%>" class="small" style="width:150px;text-align: center;" value="<%=APPID%>" type="text" disabled="true"></td>
                <td class="category" id="Show_APPSECRET_<%=UnitID%>"  style='white-space: nowrap;'><%=APPSECRET%></td>
                <td class="category" id="Edit_APPSECRET_<%=UnitID%>" style="display:none;"><input id="APPSECRET_<%=UnitID%>" name="APPSECRET_<%=UnitID%>" class="small" style="width:150px;text-align: center;" value="<%=APPSECRET%>" type="text" disabled="true"></td>
                <td class="category"><%=UnitState%></td>
                <td class="category" id="Show_ServiceBranch_<%=UnitID%>"  style='white-space: nowrap;'><A HREF="IntroducerUnitBranch.gds?UnitID=<%=UnitID%>"><%=ServiceBranch%></A></td>
                <td class="category" id="Edit_ServiceBranch_<%=UnitID%>" style="display:none;"><input id="ServiceBranch_<%=UnitID%>" name="ServiceBranch_<%=UnitID%>" class="small" style="width:30px;text-align: center;" value="<%=ServiceBranch%>" type="text" disabled="true"></td>
                <td class="category last"><input name="NC_OAIDs_<%=UnitID%>" id="NC_OAIDs_<%=UnitID%>" type="hidden" value="<%=NC_OAIDs%>" disabled="true"><label id="NC_OAIDs_Name_<%=UnitID%>"><%=OAUser(NC_OAIDs,"UserName")%></label><label id="Edit_NC_OAIDs_<%=UnitID%>" style="display:none;">&nbsp;<a onclick="javascript:JS_EntourageOpen('<%=UnitID%>',1);">[管理]</a></label></td>
              </tr>
            <%rs.movenext
            loop
            rs.close()
            %>
            <%for j=i to 21%>
            <tr>
                <td class="selected">&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="last">&nbsp;</td>
                
            </tr>
            <%next%>
            <%If UnitSearchID<>"" Then%>
            <script>
            document.getElementById("UnitID_<%=UnitSearchID%>").checked=true;
            form1_Unit_Edit('<%=UnitSearchID%>');
            
            </script>
            <%End If%>
                            </tbody>
                        </table>
                        
                        </form>
                    </div>
                </div>
                <!-- end table -->
                <!--选择人员窗口-->
                <div class="dialogJ  dialogJfix dialogJshadow" id="window_Entourage" style="z-index: 50007; width: 350px; left: 0px; top: 0px;display:none;">
                    <div class="dialogJtitle">
                        <a href="javascript:JS_EntourageClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                        <span class="dialogJtxt">选择人员</span>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="EntourageSearchTXT" name="EntourageSearchTXT" value="<%=EntourageSearchTXT%>" style="width: 100px;" onkeyup="JS_EntourageSearch();"/>&nbsp;<input type="button" name="button3" value="查询" onclick="JS_EntourageSearch();">&nbsp;<input type="button" name="button3" value="清空" onclick="JS_EntourageDel();">
                    </div>
                    <div class="dialogJcontent">
                        <div class="box">
                                <div class="table" style="padding: 0px;">
                                    <input name="window_EntourageID" type="hidden" value="">
                                    <input name="window_OA_CompetencyID" type="hidden" value="">
                                    <table>
                                        <thead>
                                            <tr>
                                                <th class="selected left">&nbsp;</th>
                                                <th class="category" style="text-align: center;">姓名</th>
                                                <th class="category last" style="text-align: center;">手机</th>
                                            </tr>
                                        </thead>
                                        <tbody id="EntourageList">
                                            <%for j=0 to 6%>
                                                <tr>
                                                    <td class="selected">&nbsp;</td>
                                                    <td class="category">&nbsp;</td>
                                                    <td class="category last">&nbsp;</td>
                                                </tr>
                                            <%next%>
                                        </tbody>
                                    </table>
                            </div>
                    </div>
                </div>
                <script LANGUAGE="javascript">
                //打开选择人员窗口
                function JS_EntourageOpen(id,OA_CompetencyID)
                {
                var sTop=document.documentElement.scrollTop;
                    if (sTop==0) {sTop=document.body.scrollTop;}
                var sLeft= document.documentElement.scrollLeft;
                    if (sLeft==0) {sLeft=document.body.scrollLeft;}
 
                var dTop = document.getElementById("ServiceBranch_"+id).getBoundingClientRect().top;
                if (dTop<200) {dTop=110;}
                var dLeft = document.getElementById("ServiceBranch_"+id).getBoundingClientRect().left;
                if (dLeft<200) {dLeft=200;}
                window_Entourage.style.display="block";
                window_Entourage.style.left=(dLeft-100)+"px";
                window_Entourage.style.top=(sTop+dTop+30)+"px";
                document.all.window_EntourageID.value=id;
                document.all.window_OA_CompetencyID.value=OA_CompetencyID;
                if (OA_CompetencyID!=0){window.HiddenFrame.location.replace('AdminUserSearch.gds?OrdClass=<%=ServiceOrdClass%>&OA_CompetencyID='+OA_CompetencyID);}
                document.getElementById('EntourageSearchTXT').focus();
                }
                //关闭选择人员窗口
                function JS_EntourageClose()
                {
                document.all.EntourageSearchTXT.value='';
                window_Entourage.style.display="none";
                }
                //选择人员查询
                function JS_EntourageSearch()
                {
                EntourageSearchTXT=document.all.EntourageSearchTXT.value;
                OA_CompetencyID=document.all.window_OA_CompetencyID.value;
                window.HiddenFrame.location.replace('AdminUserSearch.gds?OrdClass=<%=ServiceOrdClass%>&OA_CompetencyID='+OA_CompetencyID+'&EntourageSearchTXT='+EntourageSearchTXT);
                }
                function EnterPress(e){ //传入 event 
                var e = e || window.event; 
                if(e.keyCode == 13){JS_EntourageSearch();} 
                } 
                //选择人员
                function JS_EntourageSave(OA_UserID,OA_UserName)
                {
                    id=document.all.window_EntourageID.value;
                    var old_OA_UserID=document.getElementById("NC_OAIDs_"+id).value;
                    var old_OA_UserName=document.getElementById("NC_OAIDs_Name_"+id).innerHTML;
                    if (old_OA_UserID!="")
                    {
                        OA_UserID=old_OA_UserID+","+OA_UserID;
                        OA_UserName=old_OA_UserName+","+OA_UserName;
                    }
                    document.getElementById("NC_OAIDs_"+id).value=OA_UserID;
                    document.getElementById("NC_OAIDs_Name_"+id).innerHTML=OA_UserName;
                }
                //选择人员清空
                function JS_EntourageDel()
                {
                    id=document.all.window_EntourageID.value;
                    document.getElementById("NC_OAIDs_"+id).value='';
                    document.getElementById("NC_OAIDs_Name_"+id).innerHTML='';
                }
                //显示人员列表窗口
                function JS_EntourageList(EntourageListArray,acc1,acc2,EntourageSearchTXT,OA_CompetencyID,OA_CompetencyName)
                {
                    var EntourageListHTML = "";
                    var i = 0;
                    if (EntourageListArray.length>0)
                    {
                        for (var i=0;i<EntourageListArray.length;i++)
                        {
                            EntourageListHTML = EntourageListHTML+"<tr onclick='JS_EntourageSave("+EntourageListArray[i][0]+",\""+EntourageListArray[i][1]+"\")' style='cursor:pointer'><td class='selected'><img src='"+EntourageListArray[i][3]+"' style='max-width:29px;max-height: 29px;'></td><td class='category'>"+EntourageListArray[i][1]+"</td><td class='price last1'>"+EntourageListArray[i][2]+"</td></tr>";
                        }
                    }
                    if (acc2>1)
                    {
                        i=i+1;
                        EntourageListHTML = EntourageListHTML+"<tr><td class='selected'>&nbsp;</td><td colspan='2' style='text-align:center;'>";
                        if (acc1>1){EntourageListHTML = EntourageListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"AdminUserSearch.gds?OrdClass=<%=ServiceOrdClass%>&OA_CompetencyID="+OA_CompetencyID+"&EntourageSearchTXT="+EntourageSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{EntourageListHTML = EntourageListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";}
                        if (acc1<acc2){EntourageListHTML = EntourageListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:window.HiddenFrame.location.replace(\"AdminUserSearch.gds?OrdClass=<%=ServiceOrdClass%>&OA_CompetencyID="+OA_CompetencyID+"&EntourageSearchTXT="+EntourageSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a></td></tr>";}
                    }
                    
                    for (var j=i;j<=6;j++)
                    {
                        EntourageListHTML = EntourageListHTML+"<tr><td class='selected'>&nbsp;</td><td class='price'>&nbsp;</td><td class='price last1'>&nbsp;</td></tr>";
                    }
                    document.getElementById("EntourageList").innerHTML=EntourageListHTML;
                    
                }
                </script>
                <!--选择人员 end-->
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        
        <!--#include FILE="vicgame.asp"-->
        <IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
    </body>
</html>