【调度系统】广东民航医疗快线调度系统源代码
wanglizhong
2025-05-05 8a7dab004bc3eca7808d0cc196a329464402bbc9
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
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<!--#include virtual="/inc/chkadmin.gds"-->
<!--#include virtual="/inc/function.gds"-->
<%
StItmSearchTXT=trim(Request("StItmSearchTXT"))
WarehouseID=trim(Request("WarehouseID"))
InWarehouseID=trim(Request("InWarehouseID"))
classId=trim(Request("classId"))
OrdType=trim(Request("OrdType"))
acc1=trim(Request("page"))
if acc1="" then acc1=1
acc2=1
i=0
acc3=0
Set rs = Server.CreateObject("ADODB.Recordset")
if WarehouseID<>"" then
  SqlStock="(select isnull(sum(StockQty),0) from MRP_Stock where StItmIDPK=strItmID and StockWarehouseID="&WarehouseID&")"
else
  SqlStock="'--'"
end if
if InWarehouseID<>"" then
  SqlInStock="(select isnull(sum(StockQty),0) from MRP_Stock where StItmIDPK=strItmID and StockWarehouseID="&InWarehouseID&")"
else
  SqlInStock="'--'"
end If
If classId<>"" And classId<>"0" Then 
    SqlClass=" and strItmClassID in ("&classId&") "
ElseIf len(StItmSearchTXT)=0 Then
    SqlClass=" and isCarStItm=1 "
End If
if len(StItmSearchTXT)>0 then
    sql="select strItmID,strItmNo,strItmName,strItmUnit,PurchasePrice,SellingPrice,strItmBarcode,Stock="&SqlStock&",InStock="&SqlInStock&" from tblStItm where strItmState>0"&SqlClass&" and (strItmNo='"&StItmSearchTXT&"' or strItmBarcode='"&StItmSearchTXT&"' or strItmName like '%"&StItmSearchTXT&"%' or strItmPinyin like '"&StItmSearchTXT&"%') order by strItmID"
else
    sql="select strItmID,strItmNo,strItmName,strItmUnit,PurchasePrice,SellingPrice,strItmBarcode,Stock="&SqlStock&",InStock="&SqlInStock&" from tblStItm where strItmState>0"&SqlClass&" order by strItmID"
end If
'Response.Write sql
    rs.open Sql,objConn,1,1
    if not rs.eof then
        rs.pagesize=10
        rs.absolutepage=acc1
        acc2=rs.pagecount
        acc3=rs.recordcount
    Else
    %>
        <div style="font-size: 30px;">
            <p>没有找到对应物品!</p>
            <div class="clear"></div>
        </div>
    <%
    end if
    do while not rs.Eof and i<10
        strItmID    = rs("strItmID")
        strItmNo    = rs("strItmNo")
        strItmName    = rs("strItmName")
        strItmUnit    = rs("strItmUnit")
        PurchasePrice=FN(rs("PurchasePrice"))
        SellingPrice=FN(rs("SellingPrice"))
        strItmBarcode=rs("strItmBarcode")
        Stock        = rs("Stock")
        InStock    = rs("InStock")
 
        if OrdType="11" or OrdType="16" then
            Price=SellingPrice    '标准售价
        elseif OrdType="14" then
            Price=InStock        '转入仓库存
        else
            Price=PurchasePrice    '标准进价
        end if
        %>
        <li>
            <input type="hidden" class="strItmIDBySearch"  value="<%=strItmID%>" />
            <input type="hidden" class="strBarcode" value="<%=strItmBarcode%>" />
            <div class="fl ListDivLeft">
                <img src="http://images.v.com.cn/TVupfile/NewItm_60x60.png" alt="">
            </div>
            <div class="fr ListDivRight">
                <p class="mc"><%=strItmName%><%If strItmUnit<>"" Then Response.Write "&nbsp;&nbsp;("&strItmUnit&")"%></p>
                <p class="dm"><%=strItmNo%></p>
                <p class="sl">
                    <span>数量:<input type="number" name="searchqty" value="0" /></span>
                    <span>原有:<label name="searchStock"><%=Stock%></label></span>
                    <span>仓库:<label name="searchInStock"><%=InStock%></label></span>
                </p>
            </div>
            <div class="clear"></div>
        </li>
        <%i=i+1
        rs.movenext
    loop
    rs.close()
%>
<script>
//当输入框获得焦点时
    $(document).ready(function(){
        $("input").focus(function(){
          if ($(this).val()=='0' && $(this).attr("type")=="number")
          {
             $(this).val('');
          }
        });
        $("input").blur(function(){
          if ($(this).val()=='' && $(this).attr("type")=="number")
          {
             $(this).val('0');
          }
        });
    });
 
 
</script>