【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-05 9dc0d99742f5526321e1b5fdb0dec10e6725415e
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
<%
If DispatchOrdClass<>"" Then
    DefaultAddress=OrderClassB(DispatchOrdClass,"vMono")
ElseIf ServiceOrdClass<>"" Then
    DefaultAddress=OrderClassB(ServiceOrdClass,"vMono")
Else
    DefaultAddress="民航广州医院"
End If
%>
 
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=TE9OTtYm29ALeP84zCsaGNCFxsBoCaj2"></script>
 
 
  <div id="r-result" style=" width:400px; float:left;line-height: 30px;margin-top: 20px;">
    <input name="frm_Distance" id="frm_Distance" type="hidden" value="">
    <input name="frm_Duration" id="frm_Duration" type="hidden" value="">
    <input name="frm_OfferPrice" id="frm_OfferPrice" type="hidden" value="">
    <div style="margin: 5px;font-size: 15px;">默认地址:<span id="frm_streetHTML"><a onclick="frm_street_JS('<%=DefaultAddress%>')"><%=DefaultAddress%></a></span></div>
    <div id="MapInput0">出发地:<input type="text" id="search0" size="40" value="" style="width:250px;" /><input type="button" value="+" id="submit" style="width:30px;"  onClick="MapInput_JS(0)"/></div>
    <div id="MapInput2" style="display:none;">途 经1:<input type="text" id="search2" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(2)"/></div>
    <div id="MapInput3" style="display:none;">途 经2:<input type="text" id="search3" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(3)"/></div>
    <div id="MapInput4" style="display:none;">途 经3:<input type="text" id="search4" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(4)"/></div>
    <div id="MapInput5" style="display:none;">途 经4:<input type="text" id="search5" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(5)"/></div>
    <div id="MapInput6" style="display:none;">途 经5:<input type="text" id="search6" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(6)"/></div>
    <div id="MapInput7" style="display:none;">途 经6:<input type="text" id="search7" size="40" value="" style="width:250px;" /><input type="button" value="-" id="submit" style="width:30px;"  onClick="MapInput_JS(7)"/></div>
    <div id="MapInput1">目的地:<input type="text" id="search1" size="40" value="" style="width:250px;" /></div>
    &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="查找" id="submit"  onClick="BMap_JS()"/>&nbsp;&nbsp;<input type="button" value="确定" id="MapSubmit"  onClick="JS_BaiduCalCreateSave()"/>
    <div id="MapOutput" style="font-size: 15px;"></div>
    </div>
    <div id="l-map" style="width:800px;height:600px;border:1px solid gray; float:right"></div>
 
<script type="text/javascript">
    var search0="search0";  //定义查询框ID;
    var search1="search1";  //定义查询框ID;
    var search2="search2";  //定义查询框ID;
    var search3="search3";  //定义查询框ID;
    var search4="search4";  //定义查询框ID;
    var search5="search5";  //定义查询框ID;
    var search6="search6";  //定义查询框ID;
    var search7="search7";  //定义查询框ID;
//=================默认出发地==========================\\
function frm_street_JS(ServiceOrdTraStreet){
     document.getElementById('search0').value=ServiceOrdTraStreet;
}
 
//清空所有元素
function MapDel_JS(){
    for(var i=0;i<=7;i++){
        document.getElementById("search"+i).value="";
        if (i>=2){document.getElementById("MapInput"+i).style.display = "none"}
    }
    document.getElementById("MapSubmit").disabled=true;
}
 
function MapInput_JS(id){
    if (id==0)
    {
        if (document.getElementById("MapInput2").style.display == "none")
        {document.getElementById("MapInput2").style.display = "";}
        else if (document.getElementById("MapInput3").style.display == "none")
        {document.getElementById("MapInput3").style.display = "";}
        else if (document.getElementById("MapInput4").style.display == "none")
        {document.getElementById("MapInput4").style.display = "";}
        else if (document.getElementById("MapInput5").style.display == "none")
        {document.getElementById("MapInput5").style.display = "";}
        else if (document.getElementById("MapInput6").style.display == "none")
        {document.getElementById("MapInput6").style.display = "";}
        else if (document.getElementById("MapInput7").style.display == "none")
        {document.getElementById("MapInput7").style.display = "";} 
    }
    else
    {
        document.getElementById("search"+id).value = ""
        document.getElementById("MapInput"+id).style.display = "none"
    }
}
//BaiduCalCreate.style.display='block';
 
//计划路线
function BMap_JS(){
    var frm0=document.getElementById("search0").value
    var frm1=document.getElementById("search1").value
    var frm2=document.getElementById("search2").value
    var frm3=document.getElementById("search3").value
    var frm4=document.getElementById("search4").value
    var frm5=document.getElementById("search5").value
    var frm6=document.getElementById("search6").value
    var frm7=document.getElementById("search7").value
    
    document.getElementById("MapOutput").innerHTML="";
    if (frm0!='' && frm1!='')
    {
    
        // 计划路线
        var map = new BMap.Map("l-map");
        map.centerAndZoom(new BMap.Point(113.2398,23.09104), 11);
        var output = "";
        var searchComplete = function (results){
            if (transit.getStatus() != BMAP_STATUS_SUCCESS){
                return ;
            }
            var plan = results.getPlan(0);
            var frm_Distance = plan.getDistance(true);
            var frm_Duration = plan.getDuration(true);
            //获取距离
            output += "总路程为:" ;
            output += frm_Distance + "&nbsp;&nbsp;&nbsp;&nbsp;" ; 
            document.getElementById("frm_Distance").value=frm_Distance
            
            //计算标准报价
            var TraUnitPrice=document.getElementById('ServiceOrdTraUnitPrice').value;
            var km="";
            if (frm_Distance.indexOf("公里")>=1) {km=frm_Distance.replace(/公里/, "");}
            else {km=frm_Distance.replace(/米/, "");km=parseFloat(km)/1000;}
            km=parseFloat(km);
            var OfferPrice=TraUnitPrice*km
            output += "标准报价:" ;
            output += OfferPrice +"元" ;
            document.getElementById("frm_OfferPrice").value=OfferPrice;
 
            //获取时间
            output += "<br>预计行程时间为:" ;
            output += frm_Duration + "&nbsp;&nbsp;&nbsp;&nbsp;<br><br>" ;
            document.getElementById("frm_Duration").value=frm_Duration;
        }
        var transit = new BMap.DrivingRoute(map, {renderOptions: {map: map},
            onSearchComplete: searchComplete,
            onPolylinesSet: function(){        
            //alert(output);
            document.getElementById("MapOutput").innerHTML=output;
            document.getElementById("MapSubmit").disabled=false;
        }});
 
        var waypoints=""
        if (frm2!=''){waypoints=waypoints+",\""+frm2+"\""}
        if (frm3!=''){waypoints=waypoints+",\""+frm3+"\""}
        if (frm4!=''){waypoints=waypoints+",\""+frm4+"\""}
        if (frm5!=''){waypoints=waypoints+",\""+frm5+"\""}
        if (frm6!=''){waypoints=waypoints+",\""+frm6+"\""}
        if (frm7!=''){waypoints=waypoints+",\""+frm7+"\""}
        if (waypoints!=''){waypoints=",{waypoints:["+waypoints.substring(1)+"]}"}
        eval("transit.search(frm0,frm1"+waypoints+");");
        //alert(transit.search(frm0,frm1));
        //transit.search(frm0,frm1);
        //transit.search(frm0,frm2);
    
    }
    else
    {alert("请输入出发地和目的地")}
    
}
 
 
    var map = new BMap.Map("l-map");
    map.centerAndZoom("广州",12);                   // 初始化地图,设置城市和地图级别。
 
    
    //下拉选单0
    var ac = new BMap.Autocomplete( {"input" : search0,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单1
    var ac = new BMap.Autocomplete( {"input" : search1,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单2
    var ac = new BMap.Autocomplete( {"input" : search2,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单3
    var ac = new BMap.Autocomplete( {"input" : search3,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单4
    var ac = new BMap.Autocomplete( {"input" : search4,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单5
    var ac = new BMap.Autocomplete( {"input" : search5,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单6
    var ac = new BMap.Autocomplete( {"input" : search6,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
    //下拉选单7
    var ac = new BMap.Autocomplete( {"input" : search7,"location" : map} );    //建立一个自动完成的对象
    ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件  
    var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    //setPlace();
    });
 
 
</script>