【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-05-05 2a11acffdd3df927be6abace9e8155e370b49681
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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
If isDepartment("0603")=0 Then Response.Redirect "/"
searchTXT=trim(Request("searchTXT"))
CompetencyID=trim(Request("CompetencyID"))
SchedulesDate=trim(Request("SchedulesDate"))
SchedulesShiftID=trim(Request("SchedulesShiftID"))
SchedulesDate_old=trim(Request("SchedulesDate_old"))
If CompetencyID="" Then CompetencyID=1
If SchedulesDate="" Then SchedulesDate=Date()
If SchedulesShiftID="" Then SchedulesShiftID=1
If SchedulesDate_old="" Then SchedulesDate_old=FormatDateTime(SchedulesDate,2)
 
'各种返回信息
SystemMessageType=trim(Request("SystemMessageType"))
SMT=trim(Request("SMT"))
if SystemMessageType<>"" then
  if SMT="1" then
    SystemMessageTXT="班表保存完成"
  elseif SMT="2" then
    SystemMessageTXT="请填写必要数据"
  elseif SMT="3" then
    SystemMessageTXT="微信OA同步失败,请联系IT部!!"
  elseif SMT="4" then
    SystemMessageTXT="发出关注邀请完成,新员工默认密码:000000.请首次登陆后尽快修改"
  elseif SMT="5" then
    SystemMessageTXT="发出关注邀请失败,请点击[<a href=""/weixin/user_list.gds?departmentID="&departmentID&""">刷新数据</a>]并修改微信相关联系方式后再次发送"
  end if
end if
 
Set rs = Server.CreateObject("ADODB.Recordset")
If SchedulesDateType<>"" then
    sql="select vID,vtext,vOrder2 from dictionary where vType>=1 and vtitle='SchedulesDateType' and vID="&SchedulesDateType&" order by vOrder"
    rs.open sql,objConn,1,1
    If rs.Eof then Response.Redirect "/"
    SchedulesDateType    = rs("vID")
    SchedulesDateName    = rs("vtext")
    SchedulesDateSql    = rs("vOrder2")
    rs.close()
    sql=""
Else
    departmentName    = "系统角色"
End If
 
'时间段列表
sql="select vID,vtext from dictionary where vType>=1 and vtitle='SchedulesDateType' order by vOrder"
rs.open Sql,objConn,1,1
do while not rs.Eof
    SchedulesDateTypes = SchedulesDateTypes & rs("vID") &","& rs("vtext") & "|"
rs.movenext
Loop
rs.close()
SchedulesDateTypes = left(SchedulesDateTypes,len(SchedulesDateTypes)-1)
SchedulesDateTypesPS = SPLIT(SchedulesDateTypes,"|")
 
page_URL="&departmentID="&departmentID&"&searchTXT="&searchTXT&"&h_menu1_1=1"
%>
<!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 box1">
                    <!-- box / title -->
                    <div class="title" style="margin: 0 0 1px 0;">
                        <h5><%If searchTXT<>"" then%>服务单查询 <%=searchTXT%><%else%><%=SchedulesDateTypeName1&" "&OrdListName%><%End if%></h5>
                        <ul class="links">
                            <li>
                                <div class="search">
                                <div id="Date_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_SchedulesDateType()">
                                    <span class="select-content" style="width: 46px;">期间:<%=SchedulesDateTypeName%></span><span class="arrow" id="Date_arrow"></span>
                                </div>
                                <div id="Date_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 65px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 35px;">
                                    <div class="jspContainer" style="width: 63px;">
                                        <div style="padding: 0px; top: 0px; width: 63px;">
                                        <%for z = 0 to UBOUND(SchedulesDateTypesPS)
                                          SchedulesDateTypesPS1=SPLIT(SchedulesDateTypesPS(z),",")
                                          vID=SchedulesDateTypesPS1(0)
                                          vtext=SchedulesDateTypesPS1(1)
                                          %>
                                          <span title="<%=vtext%>" onmouseover="JS_SchedulesDateTypeMouseover('SchedulesDateType_<%=vID%>')" onclick="JS_SchedulesDateTypeJump('<%=vID%>')" id="SchedulesDateType_<%=vID%>" class="list-option<%if vID=SchedulesDateType then Response.Write "  option"%>"><%=vtext%></span>
                                        <%next%>
                                        <span title="自定义" onmouseover="JS_SchedulesDateTypeMouseover('SchedulesDateType_0')" onclick="JS_SchedulesDateTypeCreateOpen()" id="SchedulesDateType_0" name="SchedulesDateType" class="list-option">自定义</span>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <div class="search">
                            <form action="AdminUser_Schedules.gds?h_menu1_1=<%=session("h_menu1_1")%>" method="post">
                                <div class="input">
                                    <input type="text" id="search" name="searchTXT" value="<%=searchTXT%>" />
                                </div>
                                <div class="button">
                                    <input type="submit" name="submit" value="搜索" />
                                </div>
                            </form>
                            </div>
                        </ul>
                    </div>
                    <div class="dialogJ  dialogJfix dialogJshadow" id="SchedulesDateTypeCreate" style="width: 440px;right: 80px; top: 150px;height:80px ;display:none;">
                        <div class="dialogJtitle">
                            <a href="javascript:JS_SchedulesDateTypeCreateClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                            <span class="dialogJtxt" id="EditPhotoTXT">请选择时间段</span>
                        </div>
                        <div class="dialogJcontent" style="margin-left: 5px;margin-right:5px;">
                            <div class="input" style="float:left;margin-top: 10px;margin-left: 5px;">
                                期间:
                                <input type="text" id="OrdDateStart" name="OrdDateStart" class="date" style="width:138px;" value="<%=OrdDateStart%>">
                                至
                                <input type="text" id="OrdDateEnd" name="OrdDateEnd" class="date" style="width:138px;" value="<%=OrdDateEnd%>">
                                <input type="button" class="dialogJbtn first-child" onclick="JS_OrdDateJump()" value="查询">
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        //时间表列显示下拉菜单
                        function JS_SchedulesDateType(){
                          if (Date_container.className!="select-container select-container-show-list"){
                            Date_container.className="select-container select-container-show-list";
                            Date_arrow.className="arrow arrow-up";
                            Date_list.style.display="block";
                            OrdClass_container.className="select-container";
                            OrdClass_arrow.className="arrow";
                            OrdClass_list.style.display="none";
                            SchedulesDateTypeCreate.style.display="none";
                          }
                          else {
                            Date_container.className="select-container";
                            Date_arrow.className="arrow";
                            Date_list.style.display="none";
                          }
                        }
                        //时间表列指针移动到下拉菜单
                        function JS_SchedulesDateTypeMouseover(id){
                          var d=document.getElementById(id);
                          <%for z = 0 to UBOUND(SchedulesDateTypesPS)
                          SchedulesDateTypesPS1=SPLIT(SchedulesDateTypesPS(z),",")
                          vID=SchedulesDateTypesPS1(0)
                          vtext=SchedulesDateTypesPS1(1)
                          %>
                          document.getElementById("SchedulesDateType_<%=vID%>").className="list-option";
                          <%next%>
                          document.getElementById("SchedulesDateType_0").className="list-option";
                          d.className="list-option option";
                        }
                        //自定义时间-打开窗口
                        function JS_SchedulesDateTypeCreateOpen()
                        {
                            JS_SchedulesDateType();
                            SchedulesDateTypeCreate.style.display="block";
                        }
                        //自定义时间-关闭窗口
                        function JS_SchedulesDateTypeCreateClose()
                        {
                            JS_SchedulesDateType();
                            SchedulesDateTypeCreate.style.display="none";
                        }
                        //自定义时间-确定时间
                        function JS_SchedulesDateTypeCreateSave()
                        {
                        document.getElementById('ServiceOrdTraStreet').value=document.getElementById('Duration').value;
                        document.getElementById('ServiceOrdTraEnd').value=document.getElementById('ServiceOrdTraEnd').value;
                        document.getElementById('ServiceOrdTraStreetCoo').value=results.sw.point.lng + ','+ results.sw.point.lat; //起点坐标
                        document.getElementById('ServiceOrdTraEndCoo').value=results.Lu.point.lng + ','+ results.Lu.point.lat; //起点坐标
                        }
                        //时间类表列转跳
                        function JS_OrdDateJump(id){
                            var OrdDateStart=document.getElementById("OrdDateStart").value;
                            var OrdDateEnd=document.getElementById("OrdDateEnd").value;
                            window.location.href='AdminUser_Schedules.gds?h_menu1_1=1&OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&SchedulesDateType=0&OrdDateStart='+OrdDateStart+'&OrdDateEnd='+OrdDateEnd;
                        }
                        //自定义时间转跳
                        function JS_SchedulesDateTypeJump(id){
                            window.location.href='AdminUser_Schedules.gds?h_menu1_1=1&OrdState=<%=OrdState%>&OrdClassList=<%=OrdClassList%>&SchedulesDateType='+id;
                        }
 
                        //时间表列转跳
                        function JS_OrdClassTypeJump(id){
                            window.location.href='AdminUser_Schedules.gds?h_menu1_1=1&OrdState=<%=OrdState%>&SchedulesDateType=<%=SchedulesDateType%>&OrdClassList='+id;
                        }
                        
                    </script>
                    <!-- end box / title -->
            <%
            acc1=clng(request("page"))
            if acc1=empty then acc1=clng(1)
            QuantityInt = 20
            acc2=0
            acc3=0
 
            if searchTXT<>"" then
              searchSql=" (OA_User like '%"&searchTXT&"%' or OA_weixinUserID like '%"&searchTXT&"%' or OA_Name like '%"&searchTXT&"%' or OA_mobile='"&searchTXT&"' or OA_email='"&searchTXT&"' or OA_email='"&searchTXT&"') "
            else
              'searchSql=" OA_execLevel in (0,1) and (OA_B2bID=0 or OA_B2bID in (select SupplierID from B2B_Supplier where Supplier_is=0) or OA_B2bID in (select DealerID from B2B_Dealer where Dealer_is=0))"
              searchSql=" OA_DepartmentID="&departmentID&" "
            end if
 
            sql="select * from OA_User where "&searchSql&B2bIDSql&" order by OA_execLevel desc,OA_User_ID"
            'rs.open sql,objConn,1,1
            'if not rs.eof then
            'rs.pagesize=QuantityInt
            'rs.absolutepage=acc1
            'acc2=rs.pagecount
            'acc3=rs.recordcount
            'else
            'SystemMessageType=2
            'SystemMessageTXT="数据库中相关无数据!"
            'end if
            %>
                    <!--#include virtual="/inc/SystemMessages.gds" -->
                    <div class="table">
                        <div class="MAIN_PANE" style="width: 800px;">
<form id="post_form" method="post" action="admin_save.gds">
<input name="admin_save" type="hidden" value="41">
<table width="100%">
<tbody><tr>
<td class="SBLANK"></td>
<td>
<table class="FRAMEWORK">
<tbody>                              
<%
OS_CompetencyID=""
OS_CompetencyName=""
sql="select vID,vtext from dictionary where vtitle='OA_Competency' "
rs.open sql,objConn,1,1
do while not rs.Eof
    OS_CompetencyID=OS_CompetencyID&","&rs(0)
    OS_CompetencyName=OS_CompetencyName&","&rs(1)
rs.movenext
loop
rs.close()
OS_CompetencyIDSP    = SPLIT(OS_CompetencyID,",")
OS_CompetencyNameSP    = SPLIT(OS_CompetencyName,",")
 
'班组
OS_SchedulesShiftID=""
OS_SchedulesShiftName=""
sql="select vID,vtext,vOrder2 from dictionary where vtitle='SchedulesShift' order by vOrder"
rs.open sql,objConn,1,1
do while not rs.Eof
    OS_SchedulesShiftID=OS_SchedulesShiftID&","&rs(0)
    OS_SchedulesShiftName=OS_SchedulesShiftName&","&rs(1)
rs.movenext
loop
rs.close()
OS_SchedulesShiftIDSP    = SPLIT(OS_SchedulesShiftID,",")
OS_SchedulesShiftNameSP    = SPLIT(OS_SchedulesShiftName,",")
 
'只显示广州公司员工
OA_ClassSql=" and (OA_OrderClass like ('%BF%') or OA_OrderClass like ('%AB%') or OA_OrderClass like ('%SA%')) "
 
%>
<tr id="groupview_groupName" classname="TABLE_ENTRY_DESELECT" class="TABLE_ENTRY_NORMAL">  
<td class="FRAMEWORK_LEFT">日期:<input type="text" id="SchedulesDate" name="SchedulesDate" class="date" style="width:66px;" value="<%=SchedulesDate%>"><input type="button" name="btn_view" id="btn_view" tabindex="4" value="转跳" onclick="groupview_chooseGroup();" class="BTN_NORMAL_L" width="100px;"></td>
<td class="FRAMEWORK_LEFT">班组:
<select id="SchedulesShiftID" name="SchedulesShiftID" onchange="groupview_chooseGroup();" class="SLT_NORMAL" style="width:120px;display:inline;" tabindex="4">
<%for i = 1 to UBOUND(OS_SchedulesShiftIDSP)%>
    <option value="<%=OS_SchedulesShiftIDSP(i)%>"<%If OS_SchedulesShiftIDSP(i)=SchedulesShiftID Then%> selected = "selected"<%End If%>><%=OS_SchedulesShiftNameSP(i)%></option>
<%next%>
</select>
</td>
<td class="FRAMEWORK_MIDDLE" align="middle">组名:
<select id="CompetencyID" name="CompetencyID" class="SLT_NORMAL" onchange="groupview_chooseGroup();" style="width:120px;display:inline;" tabindex="4">
<%for i = 1 to UBOUND(OS_CompetencyIDSP)%>
    <option value="<%=OS_CompetencyIDSP(i)%>"<%If OS_CompetencyIDSP(i)=CompetencyID Then%> selected = "selected"<%End If%>><%=OS_CompetencyNameSP(i)%></option>
<%next%>
</select></td>
 
<td width="265px">        <span id="st_view" class="BTN">
<input type="button" name="btn_view" id="btn_view" tabindex="4" value="复制昨天排班" onclick="showMyOwnDiv();" class="BTN_NORMAL_L" width="100px;">
</span> 
</td>
</tr>
<tr id="groupview_userBind" classname="TABLE_ENTRY_DESELECT" class="TABLE_ENTRY_NORMAL">   
<td colspan="3">
<table class="FRAMEWORK" cellspacing="0" cellpadding="0">
<tbody><tr>
<td style="width:220px;">
<table class="FRAMEWORK" cellspacing="0" cellpadding="0">
<tbody><tr>
<td align="center"><span id="t_unbinduser_tip" class="CFG_DATA">可选用户</span></td>
</tr>                   
<tr colspan="4">
<td>
<%
'sql="select OA_User_ID,OA_Name from OA_User,OA_Competency where OA_CompetencyUserID=OA_User_ID and OA_execLevel in (1,2) and OA_Name not like '%外援%' and OA_CompetencyID="&CompetencyID&" and OA_User_ID not in (select OAid from OA_Schedules where SchedulesDate='"&SchedulesDate_old&"' and CompetencyID="&CompetencyID&" and SchedulesShiftID="&SchedulesShiftID&") order by OA_Name"
'Response.Write sql
%>
<select name="groupview_unbind" size="10" id="groupview_unbind" multiple="" style="width:204px;height:300px;"  ondblclick="groupview_moveSelected(document.all.groupview_unbind,document.all.groupview_binded);">   
<%sql="select OA_User_ID,OA_Name from OA_User,OA_Competency where OA_CompetencyUserID=OA_User_ID and OA_execLevel in (1,2) and OA_Name not like '%外援%' and OA_CompetencyID="&CompetencyID&" and OA_User_ID not in (select OAid from OA_Schedules where SchedulesDate='"&SchedulesDate_old&"' and CompetencyID="&CompetencyID&" and SchedulesShiftID="&SchedulesShiftID&")"&OA_ClassSql&" order by OA_Name"
'Response.Write sql
rs.open sql,objConn,1,1
do while not rs.Eof
    OA_User_ID=rs("OA_User_ID")
    OA_Name=rs("OA_Name")
%>
<option value="<%=OA_User_ID%>"><%=OA_Name%></option>
<%
rs.movenext
loop
rs.close()%>
</select>
</td>
</tr>
</tbody></table>
</td>
<td class="FRAMEWORK" width="80px">
<table>
<tbody><tr height="24px">
<td align="center"><span id="s_button_tip2" class="NORMAL"></span></td>
</tr>   
<tr>
<td><span class="BTN">
<input class="BTN_NORMAL" type="button" value=">>" width="55px" onclick="groupview_moveSelected(document.all.groupview_unbind,document.all.groupview_binded)">
</span>
</td>
</tr>   
<tr>
<td><span class="BTN">
<input class="BTN_NORMAL" type="button" value="<<" width="55px" onclick="groupview_moveSelected(document.all.groupview_binded,document.all.groupview_unbind)">
</span>
</td>
</tr>
</tbody></table>
</td>
<td style="width:220px;">
<table class="FRAMEWORK" cellspacing="0" cellpadding="0">
<tbody><tr>
<td align="center"><span id="t_binduser" class="CFG_DATA">包含用户</span></td>
</tr>
<tr>
<td>
<select name="groupview_binded" size="10" id="groupview_binded" multiple="" style="width:204px;;height:300px;" ondblclick="groupview_moveSelected(document.all.groupview_binded,document.all.groupview_unbind);">
<%sql="select OA_User_ID,OA_Name from OA_User,OA_Schedules where OAid=OA_User_ID and SchedulesDate='"&SchedulesDate_old&"' and CompetencyID="&CompetencyID&" and SchedulesShiftID="&SchedulesShiftID&" order by SchedulesShiftTOP"
rs.open sql,objConn,1,1
do while not rs.Eof
    OA_User_ID=rs("OA_User_ID")
    OA_Name=rs("OA_Name")
%>
<option value="<%=OA_User_ID%>"><%=OA_Name%></option>
<%
rs.movenext
loop
rs.close()%>
</select>   
<input type="hidden" name="Schedules" id="Schedules" value="">
 
 
<script type="text/javascript">
function selectAll(){
    document.getElementById('Schedules').value="";
    var sltSrc=document.getElementById('groupview_binded');
    for (var i=0;i<sltSrc.options.length;i++){
        var temOption=sltSrc.options[i];
        document.getElementById('Schedules').value=document.getElementById('Schedules').value+','+temOption.value
    }   
}
</script>
<script type="text/javascript">
function UpOrDown(direct, selectId) {//direct : 1:Up, -1:Down
 var obj = document.getElementById(selectId);
 var len = obj.length;
 var index = obj.selectedIndex;
 //如果:1.没有选中的项; 2.向上,但已是最上; 3.向下,但是最下,不作处理
 if ( (index == -1) || (direct == -1 && index == 0) || (direct == 1 && index >= len - 1) )
  return;
 var swapIndex = index + direct;
 var tempOptions = new Array();
 for (var i = 0; i < len; i++){
  tempOptions[tempOptions.length] = obj.options[i == index?swapIndex:(i == swapIndex?index:i)];
 }
 obj.options.length = 0;
 for (var i = 0; i < len; i++)
  obj.options.add(tempOptions[i]);
}
 
</script>
</td>
<td style="vertical-align: top;">
    <input class="BTN_NORMAL" type="button" value="↑" width="55px" onclick="UpOrDown(-1,'groupview_binded')" style="margin-left: -15px;margin-bottom: 10px;">
    <input class="BTN_NORMAL" type="button" value="↓" width="55px" onclick="UpOrDown(1,'groupview_binded')" style="margin-left: -15px;margin-bottom: 10px;">
</td>
</tr>
</tbody></table>
</td>
 
</tr>
</tbody></table>
</td>
<td class="RIGHT"><table>
<tbody><tr>
<td> </td>
</tr>
<tr>
<td class="BTN_WRAPPER"><span id="s_save" class="BTN">
<input type="button" value="保存" id="btn_save" name="set" onclick="doSet();" class="BTN_NORMAL" tabindex="5">
</span> </td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
<td class="SBLANK"></td>
 
</tr>
</tbody></table>
<input type="hidden" name="selectgroup2" id="selectgroup2" value="">
<input type="hidden" name="selectuser2" id="selectuser2" value="">
<input type="hidden" name="slt_user2" id="slt_user2" value="">
<input type="hidden" name="slt_group2" id="slt_group2" value="">
</form>
<div class="BOTTOMLINE"></div> 
<script language="javascript">
 
/* 公共参数 */
var pageName = "/AdminUser_Schedules.gds";
function groupview_chooseGroup()
{
var CompetencyID = document.getElementById('CompetencyID').value;
var SchedulesShiftID = document.getElementById('SchedulesShiftID').value;
var SchedulesDate = document.getElementById('SchedulesDate').value;
var str = pageName + "?CompetencyID=" + CompetencyID+"&SchedulesShiftID="+SchedulesShiftID+"&SchedulesDate="+SchedulesDate;
location.href = str;
}
function doSet()
{   
selectAll();
post_form.submit();
}
 
/* 移动select的部分内容,必须存在value,此函数以value为标准进行移动
*
* oSourceSel: 源列表框对象 
* oTargetSel: 目的列表框对象
*/
function groupview_moveSelected(oSourceSel,oTargetSel)
{
/*存储目前的binded和unbind*/
/*修改binded和unbind*/
/*重新渲染binded和unbind*/
//建立存储value和text的缓存数组
var arrSelValue = new Array();
var arrSelText = new Array();
//此数组存贮选中的options,以value来对应
var arrValueTextRelation = new Array();
var index = 0;//用来辅助建立缓存数组
//存储源列表框中所有的数据到缓存中,并建立value和选中option的对应关系
for(var i=0; i<oSourceSel.options.length; i++)
{
if(oSourceSel.options[i].selected)
{
//存储
arrSelValue[index] = oSourceSel.options[i].value;
arrSelText[index] = oSourceSel.options[i].text;
//建立value和选中option的对应关系
arrValueTextRelation[arrSelValue[index]] = oSourceSel.options[i];
index ++;
}
}
//增加缓存的数据到目的列表框中,并删除源列表框中的对应项
for(var i=0; i<arrSelText.length; i++) 
{
//增加
var oOption = document.createElement("option");
oOption.text = arrSelText[i];
oOption.value = arrSelValue[i];
/*忽略division*/
if(-514 == arrSelValue[i])
{
continue;
}
try
{
oTargetSel.add(oOption,null); // standards compliant
}
catch(ex)
{
oTargetSel.add(oOption); // IE only
}
/* oTargetSel.add(oOption);*/
//删除源列表框中的对应项
oSourceSel.removeChild(arrValueTextRelation[arrSelValue[i]]);
}
}
function printStr(str)
{
if(str)
return str;
else
return spanNull;
}
 
function showMyOwnDiv()
{
var CompetencyID = document.getElementById('CompetencyID').value;
var SchedulesShiftID = document.getElementById('SchedulesShiftID').value;
var SchedulesDate = document.getElementById('SchedulesDate').value;
var str = pageName + "?CompetencyID=" + CompetencyID+"&SchedulesShiftID="+SchedulesShiftID+"&SchedulesDate="+SchedulesDate+"&SchedulesDate_old="+GetDateStr(-1,SchedulesDate);
location.href = str;
}
function SchedulesDate_js()
{
var CompetencyID = document.getElementById('CompetencyID').value;
var SchedulesShiftID = document.getElementById('SchedulesShiftID').value;
var SchedulesDate = document.getElementById('SchedulesDate').value;
var str = pageName + "?CompetencyID=" + CompetencyID+"&SchedulesShiftID="+SchedulesShiftID+"&SchedulesDate="+SchedulesDate;
location.href = str;
}
 
function GetDateStr(AddDayCount,SchedulesDate) { 
var dd = new Date(SchedulesDate); 
dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期 
var y = dd.getFullYear(); 
var m = dd.getMonth()+1;//获取当前月份的日期 
var d = dd.getDate(); 
return y+"-"+m+"-"+d; 
 
</script>
</div>
                    </div>
        
                </div>
                <!-- end table -->
    
    <div class="box" style="width: 600px;">
    <form id="form1" name="form1" action="admin_save.gds" method="post">
    <input name="admin_save" type="hidden" value="46">
    <input name="CompetencyID" type="hidden" value="<%=CompetencyID%>">
    <input name="SchedulesDate" type="hidden" value="<%=SchedulesDate%>">
    <input name="SchedulesShiftID" type="hidden" value="<%=SchedulesShiftID%>">
    
        <table>
                <thead>
                    <tr style="white-space: nowrap;">
                        <th>序号</th>
                        <th>员工姓名</th>
                        <%If CompetencyID="2" then%>
                        <th>加班</th>
                        <th>不加班</th>
                        <%else%>
                        <th>机动</th>
                        <%End If%>
                        <th>休上午</th>
                        <th class="last">休下午</th>
                        
                    </tr>
                </thead>
                <tbody>
                
                <%sql="select OA_User_ID,OA_Name,id,SchedulesTypeManeuver,SchedulesTypeAM,SchedulesTypePM from OA_User,OA_Schedules where OAid=OA_User_ID and SchedulesDate='"&SchedulesDate_old&"' and CompetencyID="&CompetencyID&" and SchedulesShiftID="&SchedulesShiftID&" order by SchedulesShiftTOP"
                rs.open sql,objConn,1,1
                i=0
                do while not rs.Eof
                    OA_User_ID=rs("OA_User_ID")
                    OA_Name=rs("OA_Name")
                    Sid=rs("id")
                    SchedulesTypeManeuver=rs("SchedulesTypeManeuver")
                    SchedulesTypeAM=rs("SchedulesTypeAM")
                    SchedulesTypePM=rs("SchedulesTypePM")
                    i=i+1
                %>
                <tr>
                    <td class="category"><input name="Sid" type="hidden" value="<%=Sid%>"><%=i%></td>
                    <td class="category"><%=OA_Name%></td>
                    <td class="category"><input type="checkbox" id="SchedulesTypeManeuver_<%=Sid%>" name="SchedulesTypeManeuver_<%=Sid%>" value="1"<%If SchedulesTypeManeuver="1" Then Response.Write " checked=""checked"""%>></td>
                    <%If CompetencyID="2" then%><td class="category"><input type="checkbox" id="SchedulesTypeManeuver1_<%=Sid%>" name="SchedulesTypeManeuver1_<%=Sid%>" value="-1"<%If SchedulesTypeManeuver="-1" Then Response.Write " checked=""checked"""%>></td><%End If%>
                    
                    <td class="category"><input type="checkbox" id="SchedulesTypeAM_<%=Sid%>" name="SchedulesTypeAM_<%=Sid%>" value="1"<%If SchedulesTypeAM="1" Then Response.Write " checked=""checked"""%>></td>
                    <td class="last category"><input type="checkbox" id="SchedulesTypePM_<%=Sid%>" name="SchedulesTypePM_<%=Sid%>" value="1"<%If SchedulesTypePM="1" Then Response.Write " checked=""checked"""%>></td>
                </tr>
                <%
                rs.movenext
                loop
                rs.close()%>
                </tbody>
            </tr>
        </table>
        <%If i>0 then%>
        <div class="form">
        <div class="fields">
        <div class="field" style="height: 45px;border-bottom: initial;">
            <div class="buttons">
            <div class="highlight" id="addSave">
              <input type="submit" name="submit" value="保存" class="ui-state-default">
            </div>
            </div>
        </div>
        </div>
        </div>
        <%End If %>
    </form>
    </div>
    
                
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        <!--#include FILE="vicgame.asp"-->
    </body>
</html>