【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-05-05 14553e97825d8c112ce2c40275e0c71b79fe3121
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
<?php require '/inc/odbc.php';?>
<?php require '/inc/function.php';?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php 
$searchTXT=empty($_REQUEST['searchTXT'])!=false ? "" : addslashes($_REQUEST['searchTXT']);
$orderby=empty($_REQUEST['orderby'])!=false ? "" : addslashes($_REQUEST['orderby']);
 
$OrdDateType=empty($_REQUEST['OrdDateType'])!=false ? "0" : addslashes($_REQUEST['OrdDateType']);
$OrdDateStart=empty($_REQUEST['OrdDateStart'])!=false ? "" : addslashes($_REQUEST['OrdDateStart']);
$OrdDateEnd=empty($_REQUEST['OrdDateEnd'])!=false ? "" : addslashes($_REQUEST['OrdDateEnd']);
$OAOccupation=empty($_REQUEST['OAOccupation'])!=false ? "" : addslashes($_REQUEST['OAOccupation']);
 
if(isDepartment("070113")==0){
  header("Location: /"); 
  exit;
}
 
//默认显示字段
$Report_Name    = "加班情况统计";
if ($OrdDateType=="0" and $OrdDateStart=="" and $OrdDateEnd=="") {
    $OrdDateType=4;
    $OrdDateTop=" top 20 ";
}
else {
    $OrdDateTop="";
}
$OrdDateTypeName="";
if ($OrdDateType=="0") {
    if ($OrdDateStart=="" and $OrdDateEnd=="") {
        $OrdDateStart=date("Y-m-d");
        $OrdDateEnd=date("Y-m-d");
    }
    elseif ($OrdDateStart!="" and $OrdDateEnd=="") {
        $OrdDateEnd=$OrdDateStart;
    }
    elseif ($OrdDateStart=="" and $OrdDateEnd!="") {
        $OrdDateStart=$OrdDateEnd;
    }
    If ($OrdDateStart>$OrdDateEnd) {
        $OrdDateStart1=$OrdDateStart;
        $OrdDateStart=$OrdDateEnd;
        $OrdDateEnd=$OrdDateStart1;
    }
    If ($OrdDateStart==$OrdDateEnd) {
        $OrdDateTypeName=$OrdDateStart;
        $OrdDateTypeName1=$OrdDateTypeName;
    }
    Else {
        $OrdDateTypeName=$OrdDateStart." 至 ".$OrdDateEnd;
        $OrdDateTypeName1="时间段 ".$OrdDateTypeName;
    }
    $SqlOrdDateType=" between '".$OrdDateStart."' and '".$OrdDateEnd." 23:59:59'";
}
Else {
    $sql = "select top 1 vID,vtext,vOrder2 from dictionary where vType>=1 and vtitle='OrdDateType' and vID=".$OrdDateType ;
    $data = sqlsrv_query($conn,$sql);
    if($data == true){
        if (sqlsrv_rows_affected($data)!=0) {
            while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
                $OrdDateTypeName    = $rs['vtext'];
                $OrdDateTypeName1    = $OrdDateTypeName;
                $SqlOrdDateType    = $rs['vOrder2'];
            }
        } else {
            $OrdDateType="4";
            $OrdDateTypeName="本月";
            $OrdDateTypeName1=$OrdDateTypeName;
            $SqlOrdDateType="between DATEADD(mm,DATEDIFF(mm,0,getdate()),0) and dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate())+1,0))";
 
        }
    }
    
}
 
//各种返回信息
$SystemMessageTXT="";
$SystemMessageType=empty($_REQUEST['SystemMessageType'])!=false ? "" : $_REQUEST['SystemMessageType'];
$SMT=empty($_REQUEST['SMT'])!=false ? "" : $_REQUEST['SMT'];
if ($SystemMessageType!="") {
    if ($SMT=="1") {
        $SystemMessageTXT="请选择日期";
    }
}
 
//时间段列表
$OrdDateTypes=array();
$sql = "select vID,vtext from dictionary where vType>=1 and vtitle='OrdDateType' order by vOrder" ;
$data = sqlsrv_query($conn,$sql);
if($data == true){
    $i=0;
    while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
        $OrdDateTypes[$i]=array($rs['vID'],$rs['vtext']);
        $i++;
    }
}
 
//单据类型表列
$OAOccupationName="全部";
$OAOccupations    = array(
                      array("","全部"),
                      array("3,5","医生"),
                      array("4,6","护士"),
                      array("1,2","司机")
                  );
for($i=0;$i<count($OAOccupations);$i++) {
  if ($OAOccupations[$i][0]==$OAOccupation){$OAOccupationName = $OAOccupations[$i][1];}
}
 
$page_URL_noDate="searchTXT=".$searchTXT."&orderby=".$orderby."&OAOccupation=".$OAOccupation;
$page_URL="OrdDateType=".$OrdDateType."&OrdDateStart=".$OrdDateStart."&OrdDateEnd=".$OrdDateEnd."&".$page_URL_noDate;
?>
 
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><?php echo $LindemanAdmin?></title>
        <?php require '/inc/ccs.php';?>
    </head>
    <body onkeydown="xKeyEvent(event)">
        <?php require 'menu_header.php';?>
        <!-- content -->
        <div id="content">
            <?php require 'Report_menu_left.php';?>
            <!-- content / right -->
            <div id="right">
                <!-- table -->
                <div class="box">
                    <!-- box / title -->
                    <?php if (empty($OrdDateType)!=false) {$OrdDateType="0";}?>
                    <div class="title">
                        <h5><span id="right_Menu" style="display: none;">[<a onclick="JavaScript:JS_left_Menu2('1');" style="color: #ffffff;">显示菜单</a>]&nbsp;</span><?php if($searchTXT!=""){echo $Report_Name." ".$searchTXT;} else {echo $OrdDateTypeName1." ".$Report_Name;} ?></h5>
                        <ul class="links">
                            <li><a href="Report_OT_Excel.php?<?php echo $page_URL?>">导出Excel</a></li>
                            <li>
                                <?php
                                //下拉菜单设定
                                $DownMenuName="岗位";        //菜单名称
                                $DownMenuNameID="OAOccupation";    //菜单ID
                                $DownMenuArray=$OAOccupations;    //菜单数组
                                $DownMenuOldName=$OAOccupationName;    //默认值名称
                                $DownMenuOldID=$OAOccupation    //默认值ID
                                ?>
                                <div class="search">
                                <div name="DownMenu_container" id="<?php echo $DownMenuNameID?>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<?php echo $DownMenuNameID?>')">
                                    <span class="select-content" style="width: 46px;"><?php echo $DownMenuName.":".$DownMenuOldName?></span><span class="arrow" id="<?php echo $DownMenuNameID?>_arrow" name="DownMenu_arrow"></span>
                                </div>
                                <div name="DownMenu_list" id="<?php echo $DownMenuNameID?>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; height:250px; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
                                    <div class="jspContainer" style="width: 90px; height:250px;">
                                        <div class="jspPane" style="padding: 0px; top: 0px; width: 90px;">
                                        <?php for($i=0;$i<count($DownMenuArray);$i++) {?>
                                          <span title="<?php echo $DownMenuArray[$i][1]?>" name="DownMenu_<?php echo $DownMenuNameID?>" onmouseover="JS_DownMenuMouseover('<?php echo $DownMenuNameID?>',<?php echo $i?>)" onclick="JS_DownMenuJump('<?php echo "?".$page_URL?>','<?php echo $DownMenuOldID?>','<?php echo $DownMenuNameID?>','<?php echo $DownMenuArray[$i][0]?>')" class="list-option<?php if ($DownMenuArray[$i][0]==$DownMenuOldID){echo " option";}?>"><?php echo $DownMenuArray[$i][1]?></span>
                                        <?php }?>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                            <li>
                                <div class="search">
                                <div id="Date_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_OrdDateType()">
                                    <span class="select-content" style="width: 46px;">期间:<?php echo $OrdDateTypeName?></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; height: 350px; width: 65px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 35px;">
                                    <div class="jspContainer" style="width: 63px; height: 350px;">
                                        <div class="jspPane" style="padding: 0px; top: 0px; width: 63px;">
                                        <?php for($i=0;$i<count($OrdDateTypes);$i++) {?>
                                          <span title="<?php echo $OrdDateTypes[$i][1]?>" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_<?php echo $OrdDateTypes[$i][0]?>')" onclick="JS_OrdDateTypeJump('<?php echo $OrdDateTypes[$i][0]?>')" id="OrdDateType_<?php echo $OrdDateTypes[$i][0]?>" class="list-option<?php if ($OrdDateTypes[$i][0]==$OrdDateType){echo " option";}?>"><?php echo $OrdDateTypes[$i][1]?></span>
                                        <?php }?>
                                        <span title="自定义" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_0')" onclick="JS_OrdDateTypeCreateOpen()" id="OrdDateType_0" name="OrdDateType" class="list-option">自定义</span>
                                        </div>
                                    </div>
                                </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="dialogJ  dialogJfix dialogJshadow" id="OrdDateTypeCreate" style="width: 440px;right: 80px; top: 150px;height:80px ;display:none;">
                        <div class="dialogJtitle">
                            <a href="javascript:JS_OrdDateTypeCreateClose();" 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;" id="two-inputs">
                                期间:
                                <input type="text" id="OrdDateStart" name="OrdDateStart" class="date" style="width:138px;" value="<?php echo $OrdDateStart?>">
                                至
                                <input type="text" id="OrdDateEnd" name="OrdDateEnd" class="date" style="width:138px;" value="<?php echo $OrdDateEnd?>">
                                <input type="button" class="dialogJbtn first-child" onclick="JS_OrdDateJump()" value="查询">
                            </div>
                        </div>
                    </div>
                    <!--时间选择js  liang------------->
                    <link rel="stylesheet" href="css/daterangepicker.css">
                    <script src="js/jquery-1.12.3.min.js"></script>
                    <script src="js/moment.min.js"></script>
                    <script src="js/jquery.daterangepicker.js"></script>
                    <script>
                            $(function()
                        {
                            $('#two-inputs').dateRangePicker(
                            {
                                separator : ' to ',
                                getValue: function()
                                {
                                    if ($('#OrdDateStart').val() && $('#OrdDateEnd').val() )
                                        return $('#OrdDateStart').val() + ' to ' + $('#OrdDateEnd').val();
                                    else
                                        return '';
                                },
                                setValue: function(s,s1,s2)
                                {
                                    $('#OrdDateStart').val(s1);
                                    $('#OrdDateEnd').val(s2);
                                }
 
                            });
                        });
                    </script>
                <!--时间选择js  liang------------->
                    <script type="text/javascript">
                        //时间表列显示下拉菜单
                        function JS_OrdDateType(){
                          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";
                            OrdDateTypeCreate.style.display="none";
                          }
                          else {
                            Date_container.className="select-container";
                            Date_arrow.className="arrow";
                            Date_list.style.display="none";
                          }
                        }
                        //时间表列指针移动到下拉菜单
                        function JS_OrdDateTypeMouseover(id){
                          var d=document.getElementById(id);
                          <?php for($i=0;$i<count($OrdDateTypes);$i++) {?>
                          document.getElementById("OrdDateType_<?php echo $OrdDateTypes[$i][0]?>").className="list-option";
                          <?php }?>
                          document.getElementById("OrdDateType_0").className="list-option";
                          d.className="list-option option";
                        }
                        //自定义时间-打开窗口
                        function JS_OrdDateTypeCreateOpen()
                        {
                            JS_OrdDateType();
                            OrdDateTypeCreate.style.display="block";
                        }
                        //自定义时间-关闭窗口
                        function JS_OrdDateTypeCreateClose()
                        {
                            JS_OrdDateType();
                            OrdDateTypeCreate.style.display="none";
                        }
                        //自定义时间-确定时间
                        function JS_OrdDateTypeCreateSave()
                        {
                        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;
                            //var searchTXT=document.getElementById("searchTXT").value;
                            window.location.href='Report_OT.php?<?php echo $page_URL_noDate?>&OrdDateType=0&OrdDateStart='+OrdDateStart+'&OrdDateEnd='+OrdDateEnd;
                        }
                        //自定义时间转跳
                        function JS_OrdDateTypeJump(id){
                            //var searchTXT=document.getElementById("searchTXT").value;
                            window.location.href='Report_OT.php?<?php echo $page_URL_noDate?>&OrdDateType='+id;
                        }
 
                        //时间表列转跳
                        function JS_OrdClassTypeJump(id){
                            //var searchTXT=document.getElementById("searchTXT").value;
                            window.location.href='Report_OT.php?<?php echo $page_URL_noDate?>&OrdClassList='+id;
                        }
                        
                    </script>
                    <!-- end box / title -->
            <?php //数据读取
            $is_CSV=0;
            ?>
            <?php require 'Report_OT_Data.php';?>
            
                    <?php require '/inc/SystemMessages.php';?>
                    <div class="table" style="overflow:auto">
                        <table>
                            <?php if ($SystemMessageType!="2"){ ?>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <?php
                                    for($x=0;$x<$FormArrayX;$x++) {
                                      if ($x==$FormArrayX-1){
                                          //$classHtml=" class=\"last\"";
                                      }
                                      elseif ($x==0){
                                          $classHtml=" class=\"selected\"";
                                      }else{
                                          $classHtml="";
                                      }
                                      echo "<th$classHtml>".$FormArray[0][$x]."</th>";
                                    }
                                    ?>
                                    <th class="last">&nbsp;</td>
                                </tr>
                            </thead>
                            <tbody>
                            <?php
                            for($y=1;$y<count($FormArray);$y++) {
                                echo "<tr style=\"white-space: nowrap;\">";
                                for($x=0;$x<count($FormArray[$y]);$x++) {
                                    if ($x==count($FormArray[$y])-1){
                                      $classHtml=" class=\"category category2 last\"";
                                    }
                                    elseif ($x==0){
                                      $classHtml=" class=\"selected\"";
                                    }else{
                                      $classHtml=" class=\"category category2\"";
                                    }
                                    echo "<td$classHtml>".$FormArray[$y][$x]."</td>";
                                }
                                echo "<td class=\"last\">&nbsp;</td>";
                            }
                            ?>
                            <?php }?>
                            <?php
                            $classHtml="";
                            for($j=$y;$j<=20;$j++) {
                                echo "<tr>";
                                for($x=0;$x<$FormArrayX;$x++) {
                                    if ($x==$FormArrayX-1){
                                      //$classHtml=" class=\"last\"";
                                    }else{
                                      $classHtml="";
                                    }
                                    echo "<td$classHtml>&nbsp;</td>";
                                }
                                echo "<td class=\"last\">&nbsp;</td>";
                                echo "</tr>";
                            }
                            ?>
                            </tbody>
                        </table>
                        <!-- pagination -->
                        <?php if ($acc3>=1) {?>
                        <div class="pagination pagination-left">
                            <div class="results">
                                <?php
                                $ShowingLeast = ($acc1-1)*$QuantityInt+1;
                                $ShowingMax = $QuantityInt*$acc1;
                                if ($ShowingMax>$acc3) {$ShowingMax=$acc3;}
                                ?>
                                <span><?php echo "显示&nbsp;$ShowingLeast-$ShowingMax&nbsp;of&nbsp;$acc3";?></span>
                            </div>
                            <?php if ($acc2>1) {?>
                            <ul class="pager">
                                <?php
                                if ($acc1==1) {
                                    echo "<li class=\"disabled\">&laquo; 上页</li>";
                                }else{
                                    echo "<li><a href=\"?page=".($acc1-1)."&".$page_URL."\">&laquo; 上页</a></li>";
                                }
                                
                                $acc4=0;
                                for($i=1;$i<=$acc2;$i++) {
                                    if ($i==$acc1) {echo "<li class=\"current\">$i</li>";}
                                    elseif ($i<=3 or $i>($acc2-3)) {echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
                                    elseif ($acc4==0){echo "<li class=\"separator\">...</li>";$acc4=$i<$acc1 ? 1 : 2;}
                                    elseif ($acc4==1 and $i>$acc1+3){echo "<li class=\"separator\">...</li>";$acc4=2;}
                                    elseif ($acc4==1 and $i>=$acc1-3){echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
                                }
 
                                if ($acc1>=$acc2) {
                                    echo "<li class=\"disabled\">下页 &raquo;</li>";
                                }else{
                                    echo "<li><a href=\"?page=".($acc1+1)."&".$page_URL."\">下页 &raquo;</a></li>";
                                }
                                ?>
                            </ul>
                            <?php }?>
                        </div>
                        <?php }?>
                        <!-- end pagination -->
                    </div>
                </div>
                <!-- end table -->
 
 
                
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
        <?php require 'vicgame.php';?>
        <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>