【调度系统】广东民航医疗快线调度系统源代码
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
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
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
<%@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
 
MRP_OrderID=request("MRP_OrderID")
OrdType=Request("OrdType")
If MRP_OrderID<>"" Then    '单据号分析
    OrdType=Mid(MRP_OrderID,5,2)
End If
If OrdType="10" then
    OrdListName    = "采购入库单"
    OrdTypeName    = "采购入库"
    OrdTypeName1= "入库"
ElseIf OrdType="15" then
    OrdListName    = "退货出库单"
    OrdTypeName    = "退货出库"
    OrdTypeName1= "出库"
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")
If MRP_OrderID<>"" Then
    sql="select * from MRP_OrderPurchase where MRP_OrderID='"&MRP_OrderID&"'"
    rs.open sql,objConn,1,1
    if rs.eof Then Response.Redirect "/MRP_PurchaseList.gds"
    MRP_OPID        = rs("MRP_OPID")            '流水ID
    MRP_OrderID        = rs("MRP_OrderID")            '单据编号(进货=10,销售=11,供应商退货=15,销售退=16,转仓=14)
    OrderSupplierID    = rs("OrderSupplierID")        '供应商ID
    OrderWarehouseID= rs("OrderWarehouseID")    '仓库ID
    OrderState        = rs("OrderState")            '状态(0未审核,1已审核,3已入库,4取消)
    OrderTime        = rs("OrderTime")            '开单时间
    OrderTime_OAid    = rs("OrderTime_OAid")        '开单人员ID
    AuditTime        = rs("AuditTime")            '审核时间
    AuditTime_OAid    = rs("AuditTime_OAid")        '审核人员ID
    StorageTime        = rs("StorageTime")            '入库时间
    StorageTime_OAid= rs("StorageTime_OAid")    '入库人员ID
    TotalMoney        = rs("TotalMoney")            '总金额
    TotalQty        = rs("TotalQty")            '总数量
    OrderRemarks    = rs("OrderRemarks")        '备注
    rs.close()
 
    OrdClassName=OrdListName&" "&MRP_OrderID
    MRP_OrderID_TXT=MRP_OrderID
    If OrderTime<>"" Then OrderTime_TXT=OrderTime&" ("&OAUser(OrderTime_OAid,"UserName")&")"
    If AuditTime<>"" Then AuditTime_TXT=AuditTime&" ("&OAUser(AuditTime_OAid,"UserName")&")"
    If StorageTime<>"" Then StorageTime_TXT=StorageTime&" ("&OAUser(StorageTime_OAid,"UserName")&")"
    TotalMoney_TXT    = TotalMoney
    TotalQty_TXT    = TotalQty
    OrdStateTXT        = PurchaseOrderState_A(OrderState,OrdType)
    admin_save        = "73"
Else
    OrdClassName="新建"&OrdListName
    MRP_OrderID_TXT="[系统自动生成]"
    OrderTime_TXT=now()&" ("&OAUser(session("adminID"),"UserName")&")"
    TotalMoney_TXT    = "0"
    TotalQty_TXT    = "0"
    OrdStateTXT        = "新"&OrdTypeName1
    admin_save        = "72"
    OrderState        = 0
End If
 
If OrderState=4 then
    SystemMessageType=1
    SystemMessageTXT="此单据已作废!"
End If
%>
<!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><%=OrdClassName%></h5>
                        <ul class="links">
                            <%If MRP_OPID="" And isDepartment("040202")=1 then%><li><a href="javascript:JS_Form1SaveSubmit(0);">提交新建</a></li><%End if%>
                            <%If MRP_OPID<>"" And OrderState="0" And isDepartment("040202")=1 then%><li><a href="javascript:JS_Form1SaveSubmit(0);">修改</a></li><%End if%>
                            <%If MRP_OPID<>"" And OrderState="0" And isDepartment("040203")=1 then%><li><a href="javascript:JS_Form1AuditSubmit(1);">审核</a></li><%End if%>
                            <%If MRP_OPID<>"" And OrderState="0" And (isDepartment("040202")=1 Or isDepartment("040203")=1) then%><li><a href="javascript:JS_Form1AuditSubmit(4);">作废</a></li><%End if%>
                            <%If MRP_OPID<>"" And (OrderState="1" Or OrderState="2") And isDepartment("040204")=1 then%><li><a href="javascript:JS_Form1SaveSubmit(3);">审核<%=OrdTypeName1%></a></li><%End if%>
                            <%If MRP_OPID<>"" And (OrderState="1" Or OrderState="2") And isDepartment("040204")=1 then%><li><a href="javascript:JS_Form1SaveSubmit(2);">部分<%=OrdTypeName1%></a></li><%End if%>
                            <%If MRP_OPID<>"" And OrderState="1" And isDepartment("040203")=1 then%><li><a href="javascript:JS_Form1AuditSubmit(0);">反审核</a></li><%End if%>
                            <%
                            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,"<%=OrdTypeName1%>仓库不可为空");
                                return false;
                            }
                            if (document.getElementById("OrderSupplierID").value=='')
                            {
                                JS_SystemMessage(1,"采购供应商不可为空");
                                return false;
                            }
                            JS_StItmListSum();
                            if (document.getElementById("StItmListY").value<=0 || document.getElementById("TotalQty_TXT").value<=0 || document.getElementById("TotalQty_TXT").value=='NaN')
                            {
                                JS_SystemMessage(1,"请选择<%=OrdTypeName1%>物品");
                                return false;
                            }
                            document.getElementById("OrderState").value='0';
                            form1.submit();
                        }
                        else if (State==2)    //部分入库
                        {
                            JS_StItmListSum();
                            if (document.getElementById("QtyA_Sum").innerHTML=='0' || document.getElementById("QtyA_Sum").innerHTML=='' || document.getElementById("QtyA_Sum").innerHTML=='NaN')
                            {
                                JS_SystemMessage(1,"请填写需要<%=OrdTypeName1%>物品的实际数量");
                                return false;
                            }
                            if (confirm('确定部分<%=OrdTypeName1%>?'))
                            {
                                if (parseFloat(document.getElementById("QtyA_Sum").innerHTML)>=parseFloat(document.getElementById("TotalQty_TXT").value))
                                {
                                    if (confirm('你填写的实际数量已大于或等于预定的数量,请问是否确定继续部分<%=OrdTypeName1%>操作?')){}else{return false;}
                                }
                                document.getElementById("OrderState").value='2';
                                document.getElementById("admin_save").value="75";
                                form1.submit();
                            }
                        }
                        else if (State==3)    //审核入库
                        {
                            JS_StItmListSum();
                            if (document.getElementById("QtyA_Sum").innerHTML=='0' || document.getElementById("QtyA_Sum").innerHTML=='' || document.getElementById("QtyA_Sum").innerHTML=='NaN')
                            {
                                JS_SystemMessage(1,"请填写需要<%=OrdTypeName1%>物品的实际数量");
                                return false;
                            }
                            if (confirm('确定审核<%=OrdTypeName1%>?'))
                            {
                                document.getElementById("OrderState").value='3';
                                document.getElementById("admin_save").value="75";
                                form1.submit();
                            }
                        }
                    }
                    //表单提交-审核/反审核/作废
                    function JS_Form1AuditSubmit(Audit)
                    {
                        JS_SystemMessageClose();
                        if (Audit==1)
                        {
                            if (document.getElementById("OrderWarehouseID").value=='')
                            {
                                JS_SystemMessage(1,"<%=OrdTypeName1%>仓库不可为空");
                                return false;
                            }
                            if (document.getElementById("OrderSupplierID").value=='')
                            {
                                JS_SystemMessage(1,"采购供应商不可为空");
                                return false;
                            }
                            if (confirm('确定审核单据?'))
                            {
                                document.getElementById("OrderState").value=Audit;
                                form1.submit();
                            }
                        }
                        else if (Audit==0)
                        {
                            if (confirm('确定反审核单据?'))
                            {
                                document.getElementById("admin_save").value="74";
                                document.getElementById("OrderState").value=Audit;
                                form1.submit();
                            }
                        }
                        else if (Audit==4)
                        {
                            if (confirm('确定作废单据?'))
                            {
                                document.getElementById("admin_save").value="74";
                                document.getElementById("OrderState").value=Audit;
                                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="<%=admin_save%>">
                    <input name="MRP_OPID" type="hidden" value="<%=MRP_OPID%>">
                    <input name="MRP_OrderID" type="hidden" value="<%=MRP_OrderID%>">
                    <input name="OrderState" id="OrderState" type="hidden" value="<%=OrderState%>">
                    <input name="OrdType" type="hidden" value="<%=OrdType%>">
                    <div class="form">
                        <div class="fields">
                            <div class="field  field-first">
                                <div class="label" style="float: left;margin-left: 0px;">
                                    <label for="input-small">单据编号:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 70px;">
                                    <input type="text" id="MRP_OrderID_TXT" name="MRP_OrderID_TXT" class="small" style="width:146px;" value="<%=MRP_OrderID_TXT%>" readonly="true">
                                </div>
                                <div class="label" style="float: left;margin-left: 244px;">
                                    <label for="input-small"><%=OrdTypeName1%>仓库:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 74px;">
                                    <%If OrderState>0 then%>
                                    <input name="OrderWarehouseID" id="OrderWarehouseID" type="hidden" value="<%=OrderWarehouseID%>">
                                    <input type="text" id="WarehouseName" name="WarehouseName" class="small" style="width:138px;" value="<%=Warehouse_A(OrderWarehouseID,"Name")%>" readonly="true">
                                    <%else%>
                                    <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>
                                    <%End If%>
                                </div>
                                <div class="label" style="float: left;margin-left:460px;">
                                    <label for="input-small">采购供应商:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 76px;">
                                    <%If OrderState>0 then%>
                                    <input name="OrderSupplierID" id="OrderSupplierID" type="hidden" value="<%=OrderSupplierID%>">
                                    <input type="text" id="SupplierName" name="SupplierName" class="small" style="width:138px;" value="<%=Supplier_A(OrderSupplierID,"Name")%>" readonly="true">
                                    <%else%>
                                    <select name="OrderSupplierID" id="OrderSupplierID" style="width:150px;padding: 5px 0 5px 1px;" class="select">
                                        <%If MRP_OrderID="" then%><option value="">请选择</option><%End If%>
                                        <%sql="select SupplierID,SupplierName from MRP_Supplier where SupplierState=1"
                                        rs.open Sql,objConn,1,1
                                        do while not rs.Eof
                                            SupplierID    = rs("SupplierID")
                                            SupplierName    = rs("SupplierName")
                                            %>
                                            <option value="<%=SupplierID%>"<%if SupplierID=OrderSupplierID then Response.Write " selected"%>><%=SupplierName%></option>
                                            <%
                                        rs.movenext
                                        Loop
                                        rs.close()
                                        %>
                                    </select>
                                    <%End If%>
                                </div>
                                <div class="label" style="float: left;margin-left: 692px;">
                                    <label for="input-small">单据状态:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 74px;">
                                    <input type="text" id="OrdStateTXT" name="OrdStateTXT" class="small <%If OrdState=4 then%>error<%else%>valid<%End if%>" style="width:88px;" value="<%=OrdStateTXT%>" readonly="true">
                                </div>
                            </div>
                            <div class="field">
                                <div class="label" style="float: left;margin-left: 0px;">
                                    <label for="input-small">开单时间:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 70px;">
                                    <input type="text" id="OrderTime_TXT" name="OrderTime_TXT" class="small valid" style="width:200px;" value="<%=OrderTime_TXT%>" readonly="true">
                                </div>
                                <div class="label" style="float: left;margin-left: 294px;">
                                    <label for="input-small">审核时间:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 71px;">
                                    <input type="text" id="AuditTime_TXT" name="AuditTime_TXT" class="small valid" style="width:200px;" value="<%=AuditTime_TXT%>" readonly="true">
                                </div>
                                <div class="label" style="float: left;margin-left: 582px;">
                                    <label for="input-small"><%=OrdTypeName1%>时间:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 71px;">
                                    <input type="text" id="StorageTime_TXT" name="StorageTime_TXT" class="small valid" style="width:200px;" value="<%=StorageTime_TXT%>" readonly="true">
                                </div>
                            </div>
                            <div class="field">
                                <div class="label" style="float: left;margin-left: 0px;">
                                    <label for="input-small">总金额:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 70px;">
                                    <input type="text" id="TotalMoney_TXT" name="TotalMoney_TXT" class="small valid" style="width:80px;" value="<%=TotalMoney_TXT%>" readonly="true">
                                </div>
                                <div class="label" style="float: left;margin-left: 175px;">
                                    <label for="input-small">总数量:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 60px;">
                                    <input type="text" id="TotalQty_TXT" name="TotalQty_TXT" class="small valid" style="width:80px;" value="<%=TotalQty_TXT%>" readonly="true">
                                </div>
                                <div class="label" style="float: left;margin-left: 328px;">
                                    <label for="input-small">备注:</label>
                                </div>
                                <div class="input" style="float:left;margin-left: 46px;">
                                    <input type="text" id="OrderRemarks" name="OrderRemarks" class="small" style="width:476px;" value="<%=OrderRemarks%>">
                                </div>
                            </div>
                        
                    </div>
                    </div>
                    <!-- box / title -->
                    <div class="title">
                        <h5><%=OrdTypeName1%>物品列表</h5>
                        <ul class="links">
                            <%If OrderState=0 And (isDepartment("040202")=1 Or isDepartment("040203")=1) then    '未审核%>
                            <li><a onclick="javascript:JS_StItmOpen('TotalMoney_TXT');document.all.StItmSearchTXT.focus();">添加</a></li>
                            <li><a onclick="javascript:JS_StItmDel();">删除</a></li>
                            <%ElseIf OrderState=1 And isDepartment("040204")=1 then    '未入库%>
                            <li><a onclick="javascript:JS_StItmAuto();">自动填充</a></li>
                            <%End If%>
                        </ul>
                    </div>
                    <!-- end box / title -->
            <%
            If MRP_OrderID<>"" Then
                Y=1
                sql="select *,Stock=(select isnull(sum(StockQty),0) from MRP_Stock where StItmIDPK=strItmID and StockWarehouseID="&OrderWarehouseID&") from tblStItm,MRP_OrderDetail where StItmIDPK=strItmID and MRP_OrderIDPK='"&MRP_OrderID&"' order by MRP_ODID"
                'sql="select top 1 * from tblStItm"
                rs.open sql,objConn,1,1
                Dim FormArray()
                ArrayX=20
                if not rs.eof then
                    acc3=rs.recordcount
                end If
                ArrayY=acc3
                REDIM FormArray(ArrayX,ArrayY)
                do while not rs.Eof
                    '读取数据
                    strItmID    = rs("strItmID")        '物品ID
                    strItmNo    = rs("strItmNo")        '物料号
                    strItmName    = rs("strItmName")        '商品名称
                    strItmUnit    = rs("strItmUnit")        '单位
                    PurchasePrice=FN(rs("PurchasePrice"))    '标准进价
                    SellingPrice= FN(rs("SellingPrice"))    '标准销售价
                    MRP_ODID    = rs("MRP_ODID")        '流水ID
                    OD_Qty        = rs("OD_Qty")            '数量
                    OD_QtyA        = rs("OD_QtyA")            '实际入库数量
                    OD_Price    = FN(rs("OD_Price"))        '实际进价
                    OD_Remarks    = rs("OD_Remarks")        '备注
                    Stock        = rs("Stock")            '现库存
 
                    '写入数组
                    FormArray(1,Y)=Y
                    FormArray(2,Y)=strItmID
                    FormArray(3,Y)=strItmNo
                    FormArray(4,Y)=strItmName
                    FormArray(5,Y)=PurchasePrice
                    FormArray(6,Y)=SellingPrice
                    FormArray(7,Y)=MRP_ODID
                    FormArray(8,Y)=OD_Qty
                    FormArray(9,Y)=OD_Price
                    FormArray(10,Y)=OD_Remarks
                    FormArray(11,Y)=strItmUnit
                    FormArray(12,Y)=OD_QtyA
                    FormArray(13,Y)=Stock
                    Y=Y+1
                rs.movenext
                loop
                
                If Y=1 then
                    SystemMessageType=2
                    SystemMessageTXT="数据库中相关无数据!"
                end If
                StItmListY=Y-1
            Else
                StItmListY=0
            End If
            %>
                    <div class="table">
                        <table>
                            <thead>
                                <tr style="white-space: nowrap;">
                                    <th class="left">序号</th>
                                    <th>物品名称</th>
                                    <th>单位</th>
                                    <%If OrderState=0 then    '未审核%>
                                        <th>现库存</th>
                                        <th>标准进价</th>
                                        <th>实际进价</th>
                                        <th>数量</th>
                                        <th>金额</th>
                                        <th>备注</th>
                                        <th class="selected last">删除</th>
                                    <%ElseIf OrderState=1 Or OrderState=2 then    '未入库/部分入库%>
                                        <th>现库存</th>
                                        <th>实际进价</th>
                                        <th>计划数量</th>
                                        <%If OrderState=2 then%><th>已<%=OrdTypeName1%></td><%End If%>
                                        <th>实际数量</th>
                                        <th>实际金额</th>
                                        <th class="last"<%If OrderState=1 Then Response.Write " colspan='2'"%>>备注</th>
                                    <%ElseIf OrderState=3 then    '已审核入库%>
                                        <th>实际进价</th>
                                        <th>计划数量</th>
                                        <th>实际数量</th>
                                        <th>实际金额</th>
                                        <th class="last" colspan='3'>备注</th>
                                    <%ElseIf OrderState=4 then    '作废取消%>
                                        <th>标准进价</th>
                                        <th>实际进价</th>
                                        <th>数量</th>
                                        <th>金额</th>
                                        <th class="last" colspan='3'>备注</th>
                                    <%End If%>
                                </tr>
                            </thead>
                            <input name="StItmListY" id="StItmListY" type="hidden" value="<%=StItmListY%>">
                            <tbody id="StItmList">
 
                            <%
                            If MRP_OrderID<>"" Then
                            Qty_Sum=0
                            QtyA_Sum=0
                            PriceA_Sum=0
                            For Y=Lbound(FormArray,2)+1 to Ubound(FormArray,2)
                                strItmID=FormArray(2,Y)
                                strItmNo=FormArray(3,Y)
                                strItmName=FormArray(4,Y)
                                PurchasePrice=FormArray(5,Y)
                                SellingPrice=FormArray(6,Y)
                                MRP_ODID=FormArray(7,Y)
                                OD_Qty=FormArray(8,Y)
                                OD_Price=FormArray(9,Y)
                                OD_Remarks=FormArray(10,Y)
                                strItmUnit=FormArray(11,Y)
                                OD_QtyA=FormArray(12,Y)
                                Stock=FormArray(13,Y)
 
                                Qty_Sum=Qty_Sum+OD_Qty
                                QtyA_Sum=QtyA_Sum+OD_QtyA
                                PriceA_Sum=PriceA_Sum+OD_Price*OD_QtyA
                            %>
                              <tr style="white-space: nowrap;" id="StItm_<%=Y%>">
                                <input name="StItmID_<%=Y%>" type="hidden" value="<%=strItmID%>">
                                <td class="selected"><%=Y%></td>
                                <td class="category left"><%=strItmName%></td>
                                <td class="selected"><%=strItmUnit%></td>
                                <%If OrderState=0 then    '未审核%>
                                    <td class="selected" id='Stock_<%=Y%>'><%=Stock%></td>
                                    <td class="selected"><%=PurchasePrice%></td>
                                    <td class="selected"><input type='number' id='OD_Price_<%=Y%>' name='OD_Price_<%=Y%>' onKeyUp='JS_StItmListSum()' style='width:56px;' value='<%=OD_Price%>'></td>
                                    <td class="selected"><input type='number' id='OD_Qty_<%=Y%>' name='OD_Qty_<%=Y%>' onKeyUp='JS_StItmListSum()' style='width:56px;' value='<%=OD_Qty%>'></td>
                                    <td class="selected" id="OD_PriceSum_<%=Y%>"><%=OD_Price*OD_Qty%></td>
                                    <td class="category"><input type="text" id="OD_Remarks_<%=Y%>" name="OD_Remarks_<%=Y%>" size="20" value="<%=OD_Remarks%>"></td>
                                    <td class="selected last"><input id='ItmDle_<%=Y%>' name="ItmDle" value='<%=Y%>' type="checkbox" onclick='JS_StItmListSum()' /></td>
                                <%ElseIf OrderState=1 Or OrderState=2 then    '未入库/部分入库%>
                                    <td class="selected" id='Stock_<%=Y%>'><%=Stock%></td>
                                    <input id='OD_Price_<%=Y%>' name='OD_Price_<%=Y%>' type="hidden" value="<%=OD_Price%>">
                                    <input id='OD_Qty_<%=Y%>' name='OD_Qty_<%=Y%>' type="hidden" value="<%=OD_Qty%>">
                                    <td class="selected"><%=OD_Price%></td>
                                    <td class="selected"><%=OD_Qty%></td>
                                    <%If OrderState=2 then%><td class="selected"><%=OD_QtyA%></td><%End If%>
                                    <td class="selected"><input type='number' id='OD_QtyA_<%=Y%>' name='OD_QtyA_<%=Y%>' style='width:56px;' onKeyUp='JS_StItmListSum()' value='0'></td>
                                    <td class="selected" id="OD_PriceSum_<%=Y%>">0</td>
                                    <td class="category last"<%If OrderState=1 Then Response.Write " colspan='2'"%>><input type="text" id="OD_Remarks_<%=Y%>" name="OD_Remarks_<%=Y%>" size="20" value="<%=OD_Remarks%>"></td>
                                <%ElseIf OrderState=3 then    '已审核入库%>
                                    <td class="selected"><%=OD_Price%></td>
                                    <td class="selected"><%=OD_Qty%></td>
                                    <td class="selected"><%=OD_QtyA%></td>
                                    <td class="selected"><%=OD_QtyA*OD_Price%></td>
                                    <td class="category last" colspan='3'><%=OD_Remarks%></td>
                                <%ElseIf OrderState=4 then    '作废取消%>
                                    <td class="selected"><%=PurchasePrice%></td>
                                    <td class="selected"><%=OD_Price%></td>
                                    <td class="selected"><%=OD_Qty%></td>
                                    <td class="selected" id="OD_PriceSum_<%=Y%>"><%=OD_Price*OD_Qty%></td>
                                    <td class="category last" colspan='3'><%=OD_Remarks%></td>
                                <%End If%>
                              </tr>
                            <%Next
                            End If%>
                            <%If OrderState<>0 And OrderState<>4 then    '入库合计
                                If OrderState=2 Then
                                    PriceA_Sum=0
                                    QtyAold_Sum=QtyA_Sum
                                    QtyA_Sum=0
                                End If%>
                            <tr id="StItm_Sum>">
                                <td class="category right" colspan='3'><%=OrdTypeName1%>合计:</td>
                                <td>&nbsp;</td>
                                <td>&nbsp;</td>
                                <td class="selected"><%=Qty_Sum%></td>
                                <%If OrderState=2 then%><td class="selected"><%=QtyAold_Sum%></td><%End If%>
                                <td class="selected" id="QtyA_Sum"><%=QtyA_Sum%></td>
                                <td class="selected" id="PriceA_Sum"><%=PriceA_Sum%></td>
                                <td class="selected last"<%If OrderState<>2 Then Response.Write " colspan='2'"%>>&nbsp;</td>
                            </tr>
                            <%End If%>
                            </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>&nbsp;</td>
                                <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 -->    
    <%If OrderState=1 Or OrderState=2 then%>
        <script LANGUAGE="javascript">
        //物品列表总金额/总数量
        function JS_StItmAuto()
        {
            var Y=parseInt(document.getElementById("StItmListY").value);
            var TotalMoney=0;
            var TotalQty=0;
            for(var i=1;i<=Y;i++)
            {
                var OD_Price=document.getElementById("OD_Price_"+i).value;
                var OD_Qty=document.getElementById("OD_Qty_"+i).value;
                var OD_QtyA=OD_Qty;
                document.getElementById("OD_QtyA_"+i).value=OD_QtyA;
            }
            JS_StItmListSum();
        }
        //物品列表总金额/总数量
        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 OD_Price=document.getElementById("OD_Price_"+i).value;
                var OD_QtyA=document.getElementById("OD_QtyA_"+i).value;
                var Stock=document.getElementById("Stock_"+i).innerHTML;
                <%if OrdType="15" then Response.Write "if (parseFloat(OD_QtyA)>parseFloat(Stock)){JS_SystemMessage(4,'"&OrdTypeName1&"数量不可以大于现有库存');document.getElementById('QtyA_Sum').innerHTML=0;return false;}"%>
                SumMoney=parseFloat(OD_Price)*parseFloat(OD_QtyA);
                TotalMoney=(TotalMoney+SumMoney);
                TotalQty=TotalQty+parseFloat(OD_QtyA);
                document.getElementById("OD_PriceSum_"+i).innerHTML=SumMoney.toFixed(2);
            }
            document.getElementById("PriceA_Sum").innerHTML=TotalMoney.toFixed(2);
            document.getElementById("QtyA_Sum").innerHTML=TotalQty;
 
        }
        </script>
    <%ElseIf OrderState=0 then%>
        <!-- 弹窗 -->
        <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 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 last" style="text-align: center;">数量</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>
                                            <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;
        <%if OrdType="15" then Response.Write "if (WarehouseID==''){JS_SystemMessage(1,'请先选择"&OrdTypeName1&"仓库');return false;}"%>
        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('MRP_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_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;
                StItmListArray[i]=new Array(OD_Price,OD_Qty,OD_Remarks,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;
                    ItmPrice=document.getElementById("NewItmPrice_"+NewItmIDs[i].value).innerHTML;
                    Price=document.getElementById("NewPrice_"+NewItmIDs[i].value).value;
                    Qty=document.getElementById("NewQty_"+NewItmIDs[i].value).value;
 
                    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'>"+ItmPrice+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='selected'><input type='number' id='OD_Price_"+Y+"' name='OD_Price_"+Y+"' onKeyUp='JS_StItmListSum()' style='width:56px;' value='"+Price+"'></td>"
                    StItmListHTML=StItmListHTML+"<td class='selected'><input type='number' id='OD_Qty_"+Y+"' name='OD_Qty_"+Y+"' onKeyUp='JS_StItmListSum()' style='width:56px;' value='"+Qty+"'></td>"
                    StItmListHTML=StItmListHTML+"<td class='selected' id='OD_PriceSum_"+Y+"'>"+(Price*Qty)+"</td>"
                    StItmListHTML=StItmListHTML+"<td class='category'><input type='text' id='OD_Remarks_"+Y+"' name='OD_Remarks_"+Y+"'  size='20' value=''></td>"
                    StItmListHTML=StItmListHTML+"<td class='selected last'><input id='ItmDle_"+Y+"' name='ItmDle' value='"+Y+"' type='checkbox' onclick='JS_StItmListSum()' /></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("OD_Price_"+i).value=StItmListArray[i][0];
                    document.getElementById("OD_Qty_"+i).value=StItmListArray[i][1];
                    document.getElementById("OD_Remarks_"+i).value=StItmListArray[i][2];
                    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+"<td class='selected' onclick='JS_NewItm("+StItmListArray[i][0]+",1)' id='NewItmPrice_"+StItmListArray[i][0]+"' style='white-space: nowrap;'>"+StItmListArray[i][4]+"</td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' style='white-space: nowrap;'><input type='number' id='NewPrice_"+StItmListArray[i][0]+"' name='NewPrice_"+StItmListArray[i][0]+"' style='width:56px;' value='"+StItmListArray[i][4]+"'></td>"
                    StItmListHTML = StItmListHTML+"<td class='selected' style='white-space: nowrap;'><input type='number' id='NewQty_"+StItmListArray[i][0]+"' name='NewQty_"+StItmListArray[i][0]+"' style='width:56px;' value='0' onKeyUp='JS_Qty_Len("+StItmListArray[i][0]+")'></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><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_Qty_Len(id)
        {
            var NewQty=document.getElementById('NewQty_'+id).value;
            var NewItmCheckbox=document.getElementById('NewItm_'+id).checked;
            if (NewQty!='0' && NewQty!='' && NewItmCheckbox==false)
            {
                JS_NewItm(id,1)
            }
            else if ((NewQty=='0' || NewQty=='') && NewItmCheckbox==true)
            {
                JS_NewItm(id,0)
            }
            //alert(NewItmCheckbox);
        }
        //选择项目
        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 弹窗 -->
        <%End If%>
            </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>