【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-06-16 ae5b0a8c63979351028215b8fe8cdf4b0766c272
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
<?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("070115")==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';?>
        <!-- DataTables -->
        <link rel="stylesheet" type="text/css" href="/js/media/css/jquery.dataTables.css">
        <script type="text/javascript" charset="utf8" src="/js/media/js/jquery.js"></script>
        <script type="text/javascript" charset="utf8" src="/js/media/js/jquery.dataTables.js"></script>
        <style type="text/css">
        #content div.box table td {
            border-right: 1px solid #cdcdcd;
            text-align: center;
        }
        </style>
    </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_OrdReport_Excel.php?<?php echo $page_URL?>">导出Excel</a></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;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;">
                                        <?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;z-index: 100;">
                        <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/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_OrdReport.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_OrdReport.php?<?php echo $page_URL_noDate?>&OrdDateType='+id;
                        }
 
                        //时间表列转跳
                        function JS_OrdClassTypeJump(id){
                            //var searchTXT=document.getElementById("searchTXT").value;
                            window.location.href='Report_OrdReport.php?<?php echo $page_URL_noDate?>&OrdClassList='+id;
                        }
                        
                    </script>
                    <!-- end box / title -->
            <?php //数据读取
            $is_CSV=0;
            ?>
            <?php require 'Report_OrdReport_Data.php';?>
            
                    <?php require '/inc/SystemMessages.php';?>
                    <div class="table" style="overflow:auto">
                    <!--第二步:添加如下 HTML 代码-->
                        <table id="example" class="display">
                            <thead>
                                <tr>
                                    <?php
                                    for($x=0;$x<$FormArrayX;$x++) {
                                      echo "<th>".$FormArray[0][$x]."</th>";
                                    }
                                    ?>
                                </tr>
                            </thead>
                        </table>
 
                        <!--第三步:初始化Datatables-->
                        <script>
                        //$(document).ready( function () {
                        //    $('#table_id_example').DataTable();
                        //} );
 
                            var data = [
                                <?php
                                for($y=1;$y<count($FormArray);$y++) {
                                    if ($y==count($FormArray)-1){
                                      $FormArrayHtml="";
                                    }else{
                                      $FormArrayHtml=",";
                                    }
                                    echo "[";
                                    for($x=0;$x<count($FormArray[$y]);$x++) {
                                        if ($x==count($FormArray[$y])-1){
                                          $classHtml="";
                                        }else{
                                          $classHtml=",";
                                        }
                                        echo "\"".$FormArray[$y][$x]."\"".$classHtml;
                                    }
                                    echo "]".$FormArrayHtml;
                                }
                                ?>
                            ];
                         
                            //然后 DataTables 这样初始化:
                            $('#example').DataTable( {
                                data: data,            //原数据
                                //"ordering": false,    //排序显示开关
                                //"info":     false,    //数量显示开关
                                //"paging":   false,    //分页显示开关
                                //"searching": false,        //查找功能开关
                                //"search": {"search": "Fred"},    //默认查找内容
                                "lengthMenu": [[50,100], [50, 100,]],    //分页显示数量
                                "language": {
                                    "lengthMenu": "每页_MENU_ 条记录",
                                    "zeroRecords": "没有找到记录",
                                    "info": "显示 _START_ - _END_ , 共 _TOTAL_ 条",
                                    "infoEmpty": "无记录",
                                    "search": "搜索:",
                                    "infoFiltered": "(从 _MAX_ 条记录过滤)",
                                    "paginate": {
                                        "previous": "上一页",
                                        "next": "下一页"
                                    }
                                }
                            } );
                        </script>
                    </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>