【调度系统】广东民航医疗快线调度系统源代码
wlzboy
2025-09-06 2decf5219e3476e30095fd9dbf6e49c55e105563
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
617
618
619
620
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
if isDepartment("0402")=0 then
  Response.Redirect "/"
  Response.End()
end If
 
'各种返回信息
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="单据已审核或已完结,不可修改!!"
  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="单据部分"&OrdTypeName1&"完成!!"
  elseif SMT="9" then
    SystemMessageTXT="单据审核"&OrdTypeName1&"完成!!"
  end if
end if
 
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="MRP_menu_left.gds" -->
            <!-- content / right -->
            <div id="right">
                <!-- messages -->
                <!-- forms -->
                <div class="box">
                    <!-- box / title -->
                    <div class="title">
                        <h5>新增物品货架对照</h5>
                        <ul class="links">
                            <li><a href="javascript:JS_Form1SaveSubmit(0);">提交新增</a></li>
                            <%
                            if PositionURLID="1" then PositionURLID=11
                            ReturnURL=session("PositionURL"&PositionURLID)
                            if InStr(ReturnURL,"?")<1 then
                              ReturnURL=ReturnURL&"?ReturnURLID="&(PositionURLID)
                            else
                              ReturnURL=ReturnURL&"&ReturnURLID="&(PositionURLID)
                            end if
                            %>
                            <li><a href="<%=ReturnURL%>">返回</a></li>
                        </ul>
                    </div>
                    <script LANGUAGE="javascript">
                    //表单提交-保存
                    function JS_Form1SaveSubmit(State)
                    {
                        JS_SystemMessageClose();
                        if (State==0)    //新建/修改单据
                        {
                            if (document.getElementById("OrderWarehouseID").value=='')
                            {
                                JS_SystemMessage(1,"仓库不可为空");
                                return false;
                            }
                            if (document.getElementById("ShelvesListY").value<=0)
                            {
                                JS_SystemMessage(1,"请选择关连的货架");
                                return false;
                            }
                            if (document.getElementById("StItmListY").value<=0)
                            {
                                JS_SystemMessage(1,"请选择关连的物品");
                                return false;
                            }
                            form1.submit();
                        }
                    }
                    </script>
                    <!-- end box / title -->
                    <!--#include virtual="/inc/SystemMessages.gds" -->
                    <form id="form1" name="form1" action="admin_save.gds" method="post">
                    <input name="admin_save" id="admin_save" type="hidden" value="97">
                    <div class="form">
                        <div class="fields">
                            <div class="field  field-first">
                                <div class="label" style="float: left;margin-left: 0px;">
                                    <label for="input-small"><%=OrdTypeName1%>仓库:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 70px;">
                                    <select name="OrderWarehouseID" id="OrderWarehouseID" style="width:150px;padding: 5px 0 5px 1px;" class="select">
                                        <%If MRP_OrderID="" then%><option value="">请选择</option><%End If%>
                                        <%sql="select WarehouseID,WarehouseName from MRP_Warehouse"
                                        rs.open Sql,objConn,1,1
                                        do while not rs.Eof
                                            WarehouseID        = rs("WarehouseID")
                                            WarehouseName    = rs("WarehouseName")
                                            %>
                                            <option value="<%=WarehouseID%>"<%if WarehouseID=OrderWarehouseID then Response.Write " selected"%>><%=WarehouseName%></option>
                                            <%
                                        rs.movenext
                                        Loop
                                        rs.close()
                                        %>
                                    </select>
                                </div>
                            </div>
                        
                    </div>
                    </div>
                    <!-- box / title -->
                    <div class="title">
                        <h5>货架</h5>
                        <ul class="links">
                            <li><a onclick="javascript:JS_ShelvesOpen('OrderWarehouseID');">添加</a></li>
                            <li><a onclick="javascript:JS_ShelvesDel();">删除</a></li>
                        </ul>
                    </div>
                    <div class="table">
                        <table>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <th class="left" style="width: 20px;">序号</th>
                                    <th>货架</th>
                                    <th>备注</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <input name="ShelvesListY" id="ShelvesListY" type="hidden" value="0">
                            <tbody id="ShelvesList">
 
                            </tbody>
                            <%if Y<=4 then%>
                            <tbody id="ShelvesList1">
                            <%for j=Y to 4%>
                            <tr id="Shelves1_<%=j%>">
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td class="selected last">&nbsp;</td>
                            </tr>
                            <%next%>
                            </tbody>
                            <%end if%>
                            
                        </table>
                    </div>
                    <!-- end box / title -->
<!-- 弹窗A -->
        <div class="dialogJ  dialogJfix dialogJshadow" id="window_Shelves" style="z-index: 50007; width:900px; left: 0px; top: 0px;display:none;">
            <div class="dialogJtitle">
                <a href="javascript:JS_ShelvesClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                <input id="ShelvesJSID" type="hidden" value="">
                <span class="dialogJtxt">选择货架</span>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="ShelvesSearchTXT" name="ShelvesSearchTXT" value="<%=ShelvesSearchTXT%>" style="width: 200px;" onkeypress="EnterPress_Shelves(event)" onkeydown="EnterPress_Shelves()"/>&nbsp;<input type="button" name="button3" value="查询" onclick="JS_ShelvesSearch();">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="button3" value="添加" onclick="JS_ShelvesSave(0);");">&nbsp;<input type="button" name="button3" value="继续添加" onclick="JS_ShelvesSave(1);">
            </div>
            <div class="dialogJcontent">
                <div class="box">
                        <div class="table" style="padding: 0px;">
                            <input name="window_ShelvesID" type="hidden" value="">
                            <table>
                                <thead>
                                    <tr>
                                        <th class="selected left" style="text-align: center;">选择</th>
                                        <th class="selected left" style="text-align: center;">仓库</th>
                                        <th class="selected left" style="text-align: center;">货架</th>
                                        <th class="selected left" style="text-align: center;">备注</th>
                                    </tr>
                                </thead>
                                <tbody id="NewShelvesList">
                                    <%for j=0 to 10%>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                        </tr>
                                    <%next%>
                                </tbody>
                            </table>
                        </div>
                </div>
            </div>
        </div>
        <script LANGUAGE="javascript">
        //打开选择货架窗口
        function JS_ShelvesOpen(id)
        {
        JS_SystemMessageClose();
        WarehouseID=document.getElementById("OrderWarehouseID").value;
        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(id).getBoundingClientRect().top;
        if (dTop<200) {dTop=110;}
        var dLeft = document.getElementById(id).getBoundingClientRect().left;
        if (dLeft<200) {dLeft=200;}
        window_Shelves.style.display="block";
        window_Shelves.style.left=(dLeft)+"px";
        window_Shelves.style.top=(sTop+dTop+30)+"px";
        window.HiddenFrame.location.replace("ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID);
        }
        //关闭选择货架窗口
        function JS_ShelvesClose()
        {
        document.all.ShelvesSearchTXT.value='';
        window_Shelves.style.display="none";
        }
        //选择货架查询
        function JS_ShelvesSearch()
        {
        ShelvesSearchTXT=document.all.ShelvesSearchTXT.value;
        WarehouseID=document.getElementById("OrderWarehouseID").value;
        window.HiddenFrame.location.replace('ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID='+WarehouseID+'&ShelvesSearchTXT='+ShelvesSearchTXT);
        }
        function EnterPress_Shelves(e){ //传入 event 
        var e = e || window.event; 
        if(e.keyCode == 13){JS_ShelvesSearch();} 
        }
        //选择货架
        function JS_ShelvesSave(is)
        {
            var NewShelvesIDs=document.getElementsByName("NewShelvesID");
            var Y=parseInt(document.getElementById("ShelvesListY").value);
            var ShelvesListArray=new Array()
            for(var i=1;i<=Y;i++)
            {
                var OD_ShelvesDle=document.getElementById("ShelvesDle_"+i).checked;
                ShelvesListArray[i]=new Array(OD_ShelvesDle)    
            }
            var ShelvesList=document.getElementById("ShelvesList");
            var ShelvesListHTML=ShelvesList.innerHTML;
            for(var i=0;i<NewShelvesIDs.length;i++)
            {
                if (NewShelvesIDs[i].checked==true)
                {
                    Y=Y+1;
                    ShelvesName=document.getElementById("NewShelvesName_"+NewShelvesIDs[i].value).innerHTML;
                    ShelvesOrder2=document.getElementById("NewvOrder2_"+NewShelvesIDs[i].value).innerHTML;
 
                    ShelvesListHTML=ShelvesListHTML+"<tr style='white-space: nowrap;' id='Shelves_"+Y+"'>"
                    ShelvesListHTML=ShelvesListHTML+"<input name='ShelvesID_"+Y+"' type='hidden' value='"+NewShelvesIDs[i].value+"'>"
                    ShelvesListHTML=ShelvesListHTML+"<td class='selected'>"+Y+"</td>"
                    ShelvesListHTML=ShelvesListHTML+"<td class='category left'>"+ShelvesName+"</td>"
                    ShelvesListHTML=ShelvesListHTML+"<td class='category left'>"+ShelvesOrder2+"</td>"
                    ShelvesListHTML=ShelvesListHTML+"<td class='selected last'><input id='ShelvesDle_"+Y+"' name='ShelvesDle' value='"+Y+"' type='checkbox'/></td>"
                    ShelvesListHTML=ShelvesListHTML+"</tr>"
                    ShelvesList.innerHTML=ShelvesListHTML;
                    if (Y-1<4) {document.getElementById("ShelvesList1").deleteRow(0);}
                    document.getElementById("ShelvesListY").value=Y;
                    JS_NewShelves(NewShelvesIDs[i].value,0);
                };
            }
            if (ShelvesListArray.length>1)
            {
                for (var i=1;i<ShelvesListArray.length;i++)
                {
                    document.getElementById("ShelvesDle_"+i).checked=ShelvesListArray[i][3];
                }
            }
            if (is==0){JS_ShelvesClose();}
            //JS_ShelvesListSum();
        }
        //删除选择货架
        function JS_ShelvesDel()
        {
            var ShelvesDle=document.getElementsByName("ShelvesDle");
            for(var i=0;i<ShelvesDle.length;i++)
            {
                if (ShelvesDle[i].checked==true)
                {
                    document.getElementById('Shelves_'+ShelvesDle[i].value).style.display='none';
                };
            }
            //JS_ShelvesListSum();
        }
        //显示货架列表窗口
        function JS_ShelvesList(ShelvesListArray,acc1,acc2,ShelvesSearchTXT,acc3)
        {
            var WarehouseID=document.getElementById("OrderWarehouseID").value;
            var ShelvesListHTML = "";
            var i = 0;
            if (ShelvesListArray.length>0)
            {
                for (var i=0;i<ShelvesListArray.length;i++)
                {
                    ShelvesListHTML = ShelvesListHTML+"<tr style='cursor:pointer' id='NewShelvesTR_"+ShelvesListArray[i][0]+"'>"
                    ShelvesListHTML = ShelvesListHTML+"<td class='selected last'><input id='NewShelves_"+ShelvesListArray[i][0]+"' name='NewShelvesID' value='"+ShelvesListArray[i][0]+"' type='checkbox'/></td>"
                    ShelvesListHTML = ShelvesListHTML+"<td class='selected' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewWarehouseName_"+ShelvesListArray[i][0]+"'  style='white-space: nowrap;'>"+ShelvesListArray[i][4]+"</td>"
                    ShelvesListHTML = ShelvesListHTML+"<td class='selected' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewShelvesName_"+ShelvesListArray[i][0]+"'  style='white-space: nowrap;'>"+ShelvesListArray[i][1]+"</td>"
                    ShelvesListHTML = ShelvesListHTML+"<td class='category' onclick='JS_NewShelves("+ShelvesListArray[i][0]+",1)' id='NewvOrder2_"+ShelvesListArray[i][0]+"' style='white-space: nowrap;'>"+ShelvesListArray[i][3]+"</td>"
                    ShelvesListHTML = ShelvesListHTML+"</tr>";
                }
            }
            if (acc2>1)
            {
                i=i+1;
                ShelvesListHTML = ShelvesListHTML+"<tr><td colspan='9' style='text-align:center;'>";
                if (acc1>1){ShelvesListHTML = ShelvesListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&ShelvesSearchTXT="+ShelvesSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{ShelvesListHTML = ShelvesListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";}
                if (acc1<acc2){ShelvesListHTML = ShelvesListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:window.HiddenFrame.location.replace(\"ShelvesSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&ShelvesSearchTXT="+ShelvesSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a>";}
                ShelvesListHTML = ShelvesListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;共&nbsp;"+acc3+"&nbsp;条记录</td></tr>";
            }
            
            for (var j=i;j<=10;j++)
            {
                ShelvesListHTML = ShelvesListHTML+"<tr><td class='category'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td></tr>";
            }
            document.getElementById("NewShelvesList").innerHTML=ShelvesListHTML;
            
        }
        //选择项目
        function JS_NewShelves(id,is)
        {
            var NewShelvesCheckbox=document.getElementById('NewShelves_'+id).checked;
            if (is==1 && NewShelvesCheckbox==false)
            {
                document.getElementById('NewShelves_'+id).checked=true;
                document.getElementById("NewShelvesTR_"+id).className='selected ';
            }
            else if (is==0 && NewShelvesCheckbox==true)
            {
                document.getElementById('NewShelves_'+id).checked=false;
                document.getElementById("NewShelvesTR_"+id).className='';
            }
        }
        </script>
        <!-- end 弹窗A -->
 
 
                    <!-- box / title -->
                    <div class="title">
                        <h5>物品列表</h5>
                        <ul class="links">
                            <li><a onclick="javascript:JS_StItmOpen('OrderWarehouseID');">添加</a></li>
                            <li><a onclick="javascript:JS_StItmDel();">删除</a></li>
                        </ul>
                    </div>
                    <!-- end box / title -->
            <%
            StItmListY=0
            %>
                    <div class="table">
                        <table>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <th class="left" style="width: 20px;">序号</th>
                                    <th>物品名称</th>
                                    <th>单位</th>
                                    <th>现库存</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <input name="StItmListY" id="StItmListY" type="hidden" value="<%=StItmListY%>">
                            <tbody id="StItmList">
 
                            </tbody>
                            <%if Y<=11 then%>
                            <tbody id="StItmList1">
                            <%for j=Y to 11%>
                            <tr id="StItm1_<%=j%>">
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td class="selected last">&nbsp;</td>
                            </tr>
                            <%next%>
                            </tbody>
                            <%end if%>
                            
                        </table>
                    </div>
                </div>
                </div>
                </form>
                <!-- end forms -->    
 
        <!-- 弹窗 -->
        <div class="dialogJ  dialogJfix dialogJshadow" id="window_StItm" style="z-index: 50007; width:900px; left: 0px; top: 0px;display:none;">
            <div class="dialogJtitle">
                <a href="javascript:JS_StItmClose();" class="dialogJclose" title="关闭本窗口">&nbsp;</a>
                <input id="StItmJSID" type="hidden" value="">
                <span class="dialogJtxt">选择物品</span>&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" id="StItmSearchTXT" name="StItmSearchTXT" value="<%=StItmSearchTXT%>" style="width: 200px;" onkeypress="EnterPress_StItm(event)" onkeydown="EnterPress_StItm()"/>&nbsp;<input type="button" name="button3" value="查询" onclick="JS_StItmSearch();">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="button3" value="添加" onclick="JS_StItmSave(0);");">&nbsp;<input type="button" name="button3" value="继续添加" onclick="JS_StItmSave(1);">
            </div>
            <div class="dialogJcontent">
                <div class="box">
                        <div class="table" style="padding: 0px;">
                            <input name="window_StItmID" type="hidden" value="">
                            <table>
                                <thead>
                                    <tr>
                                        <th class="selected left" style="text-align: center;">选择</th>
                                        <th class="selected left" style="text-align: center;">物料号</th>
                                        <th class="selected left" style="text-align: center;">条形码</th>
                                        <th class="category left" style="text-align: center;">物品名称</th>
                                        <th class="selected left" style="text-align: center;">单位</th>
                                        <th>库存</th>
                                    </tr>
                                </thead>
                                <tbody id="NewStItmList">
                                    <%for j=0 to 10%>
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                        </tr>
                                    <%next%>
                                </tbody>
                            </table>
                        </div>
                </div>
            </div>
        </div>
        <script LANGUAGE="javascript">
        //打开选择物品窗口
        function JS_StItmOpen(id)
        {
        JS_SystemMessageClose();
        WarehouseID=document.getElementById("OrderWarehouseID").value;
        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(id).getBoundingClientRect().top;
        if (dTop<200) {dTop=110;}
        var dLeft = document.getElementById(id).getBoundingClientRect().left;
        if (dLeft<200) {dLeft=200;}
        window_StItm.style.display="block";
        window_StItm.style.left=(dLeft)+"px";
        window_StItm.style.top=(sTop+dTop+30)+"px";
        window.HiddenFrame.location.replace("MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID);
        }
        //关闭选择物品窗口
        function JS_StItmClose()
        {
        document.all.StItmSearchTXT.value='';
        window_StItm.style.display="none";
        }
        //选择物品查询
        function JS_StItmSearch()
        {
        StItmSearchTXT=document.all.StItmSearchTXT.value;
        WarehouseID=document.getElementById("OrderWarehouseID").value;
        window.HiddenFrame.location.replace('StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID='+WarehouseID+'&StItmSearchTXT='+StItmSearchTXT);
        }
        function EnterPress_StItm(e){ //传入 event 
        var e = e || window.event; 
        if(e.keyCode == 13){JS_StItmSearch();} 
        } 
        //物品列表总金额/总数量
        function JS_StItmListSum()
        {
            JS_SystemMessageClose();
            var Y=parseInt(document.getElementById("StItmListY").value);
            var TotalMoney=0;
            var TotalQty=0;
            for(var i=1;i<=Y;i++)
            {
                var Stock=document.getElementById("Stock_"+i).innerHTML;
                var OD_Price=document.getElementById("OD_Price_"+i).value;
                var OD_Qty=document.getElementById("OD_Qty_"+i).value;
                var OD_Remarks=document.getElementById("OD_Remarks_"+i).value;
                var OD_ItmDle=document.getElementById("ItmDle_"+i).checked;
                if (OD_ItmDle!=true)
                {
                    <%if OrdType="15" then Response.Write "if (parseFloat(OD_Qty)>parseFloat(Stock)){JS_SystemMessage(4,'"&OrdTypeName1&"数量不可以大于现有库存');document.getElementById('TotalQty_TXT').value=0;return false;}"%>
                    SumMoney=parseFloat(OD_Price)*parseFloat(OD_Qty)
                    TotalMoney=(TotalMoney+SumMoney);
                    TotalQty=TotalQty+parseFloat(OD_Qty);
                }
                document.getElementById("OD_PriceSum_"+i).innerHTML=SumMoney.toFixed(2);
            }
            document.getElementById("TotalMoney_TXT").value=TotalMoney.toFixed(2);
            document.getElementById("TotalQty_TXT").value=TotalQty;
 
        }
        //选择物品
        function JS_StItmSave(is)
        {
            var NewItmIDs=document.getElementsByName("NewItmID");
            var Y=parseInt(document.getElementById("StItmListY").value);
            var StItmListArray=new Array()
            for(var i=1;i<=Y;i++)
            {
                var OD_ItmDle=document.getElementById("ItmDle_"+i).checked;
                StItmListArray[i]=new Array(OD_ItmDle)    
            }
            var StItmList=document.getElementById("StItmList");
            var StItmListHTML=StItmList.innerHTML;
            for(var i=0;i<NewItmIDs.length;i++)
            {
                if (NewItmIDs[i].checked==true)
                {
                    Y=Y+1;
                    strItmName=document.getElementById("NewItmName_"+NewItmIDs[i].value).innerHTML;
                    ItmUnit=document.getElementById("NewItmUnit_"+NewItmIDs[i].value).innerHTML;
                    Stock=document.getElementById("NewItmStock_"+NewItmIDs[i].value).innerHTML;
 
                    StItmListHTML=StItmListHTML+"<tr style='white-space: nowrap;' id='StItm_"+Y+"'>"
                    StItmListHTML=StItmListHTML+"<input name='StItmID_"+Y+"' type='hidden' value='"+NewItmIDs[i].value+"'>"
                    StItmListHTML=StItmListHTML+"<td class='selected'>"+Y+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='category left'>"+strItmName+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='selected'>"+ItmUnit+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='selected' id='Stock_"+Y+"'>"+Stock+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='selected last'><input id='ItmDle_"+Y+"' name='ItmDle' value='"+Y+"' type='checkbox'/></td>"
                    StItmListHTML=StItmListHTML+"</tr>"
                    StItmList.innerHTML=StItmListHTML;
                    if (Y-1<11) {document.getElementById("StItmList1").deleteRow(0);}
                    document.getElementById("StItmListY").value=Y;
                    JS_NewItm(NewItmIDs[i].value,0);
                };
            }
            if (StItmListArray.length>1)
            {
                for (var i=1;i<StItmListArray.length;i++)
                {
                    document.getElementById("ItmDle_"+i).checked=StItmListArray[i][3];
                }
            }
            if (is==0){JS_StItmClose();}
            //JS_StItmListSum();
        }
        //删除选择物品
        function JS_StItmDel()
        {
            var ItmDle=document.getElementsByName("ItmDle");
            for(var i=0;i<ItmDle.length;i++)
            {
                if (ItmDle[i].checked==true)
                {
                    document.getElementById('StItm_'+ItmDle[i].value).style.display='none';
                };
            }
            //JS_StItmListSum();
        }
        //显示物品列表窗口
        function JS_StItmList(StItmListArray,acc1,acc2,StItmSearchTXT,acc3)
        {
            var WarehouseID=document.getElementById("OrderWarehouseID").value;
            var StItmListHTML = "";
            var i = 0;
            if (StItmListArray.length>0)
            {
                for (var i=0;i<StItmListArray.length;i++)
                {
                    StItmListHTML = StItmListHTML+"<tr style='cursor:pointer' id='NewItmTR_"+StItmListArray[i][0]+"'>"
                    StItmListHTML = StItmListHTML+"<td class='selected last'><input id='NewItm_"+StItmListArray[i][0]+"' name='NewItmID' value='"+StItmListArray[i][0]+"' type='checkbox'/></td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmNo_"+StItmListArray[i][0]+"'  style='white-space: nowrap;'>"+StItmListArray[i][1]+"</td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmBarcode_"+StItmListArray[i][0]+"'  style='white-space: nowrap;'>"+StItmListArray[i][5]+"</td>"
                    StItmListHTML = StItmListHTML+"<td class='category' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmName_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][2]+"</td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmUnit_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][3]+"</td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmStock_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][6]+"</td>"
                    StItmListHTML = StItmListHTML+"</tr>";
                }
            }
            if (acc2>1)
            {
                i=i+1;
                StItmListHTML = StItmListHTML+"<tr><td colspan='9' style='text-align:center;'>";
                if (acc1>1){StItmListHTML = StItmListHTML+"<a href='javascript:window.HiddenFrame.location.replace(\"MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&StItmSearchTXT="+StItmSearchTXT+"&page="+(acc1-1)+"\");'>上一页</a>";}else{StItmListHTML = StItmListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";}
                if (acc1<acc2){StItmListHTML = StItmListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:window.HiddenFrame.location.replace(\"MRP_StItmSearch.gds?OrdType=<%=OrdType%>&WarehouseID="+WarehouseID+"&StItmSearchTXT="+StItmSearchTXT+"&page="+(acc1+1)+"\");'>下一页</a>";}
                StItmListHTML = StItmListHTML+"&nbsp;&nbsp;&nbsp;&nbsp;共&nbsp;"+acc3+"&nbsp;条记录</td></tr>";
            }
            
            for (var j=i;j<=10;j++)
            {
                StItmListHTML = StItmListHTML+"<tr><td class='category'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td><td class='category last1'>&nbsp;</td></tr>";
            }
            document.getElementById("NewStItmList").innerHTML=StItmListHTML;
            
        }
        //选择项目
        function JS_NewItm(id,is)
        {
            var NewItmCheckbox=document.getElementById('NewItm_'+id).checked;
            if (is==1 && NewItmCheckbox==false)
            {
                document.getElementById('NewItm_'+id).checked=true;
                document.getElementById("NewItmTR_"+id).className='selected ';
            }
            else if (is==0 && NewItmCheckbox==true)
            {
                document.getElementById('NewItm_'+id).checked=false;
                document.getElementById("NewItmTR_"+id).className='';
            }
        }
        </script>
        <!-- end 弹窗 -->
            </div>
            <!-- end content / right -->
        </div>
        <!-- end content -->
 
        
        <IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
        <!--#include FILE="vicgame.asp"-->
    </body>
</html>