<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
|
<%Session.CodePage=65001%>
|
<!--#include virtual="/inc/chkadmin.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
<%
|
if isDepartment("040401")=0 then
|
Response.Redirect "/"
|
Response.End()
|
end If
|
|
searchTXT=SafeRequest(Request("searchTXT"))
|
WarehouseID=SafeRequest(Request("WarehouseID"))
|
strItmClassID=SafeRequest(Request("strItmClassID"))
|
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
Set rsDt = Server.CreateObject("ADODB.Recordset")
|
|
'各种返回信息
|
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="7" then
|
SystemMessageTXT="启用物料完成!!"
|
end if
|
end if
|
|
'仓库列表
|
If WarehouseID="" Or WarehouseID="0" Then
|
StockWarehouseName="集盛总部正常仓一"
|
WarehouseID=2
|
End If
|
StockWarehouseTypes = ""
|
sql="select WarehouseID,WarehouseName from MRP_Warehouse where WarehouseID<>5 order by WarehouseID desc"
|
rs.open Sql,objConn,1,1
|
do while not rs.Eof
|
If CInt(WarehouseID)=rs("WarehouseID") Then StockWarehouseName = rs("WarehouseName")
|
StockWarehouseTypes = StockWarehouseTypes & rs("WarehouseID") &","& rs("WarehouseName") & "|"
|
rs.movenext
|
Loop
|
rs.close()
|
StockWarehouseTypes = left(StockWarehouseTypes,len(StockWarehouseTypes)-1)
|
StockWarehouseTypesPS = SPLIT(StockWarehouseTypes,"|")
|
|
|
page_URL="&searchTXT="&searchTXT&"&WarehouseID="&WarehouseID
|
%>
|
<!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">
|
<!-- table -->
|
<div class="box">
|
<!-- box / title -->
|
<div class="title">
|
<h5><%If searchTXT<>"" then%>重点议器管理 <%=searchTXT%><%else%>重点议器管理<%End if%></h5>
|
<ul class="links">
|
<li>
|
<%
|
'下拉菜单设定
|
DownMenuName="仓库" '菜单名称
|
DownMenuNameID="WarehouseID" '菜单ID
|
DownMenuOldName=StockWarehouseName '默认值名称
|
DownMenuOldID=WarehouseID '默认值ID
|
%>
|
<div class="search">
|
<div name="DownMenu_container" id="<%=DownMenuNameID%>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<%=DownMenuNameID%>')">
|
<span class="select-content" style="width: 46px;"><%=DownMenuName%>:<%=DownMenuOldName%></span><span class="arrow" id="<%=DownMenuNameID%>_arrow" name="DownMenu_arrow"></span>
|
</div>
|
<div name="DownMenu_list" id="<%=DownMenuNameID%>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
|
<div class="jspContainer" style="width: 90px;">
|
<div style="padding: 0px; top: 0px; width: 90px;">
|
<%for z = 0 to UBOUND(StockWarehouseTypesPS)
|
StockWarehouseTypesPS1=SPLIT(StockWarehouseTypesPS(z),",")
|
vID=StockWarehouseTypesPS1(0)
|
vtext=StockWarehouseTypesPS1(1)
|
%>
|
<span title="<%=vtext%>" name="DownMenu_<%=DownMenuNameID%>" onmouseover="JS_DownMenuMouseover('<%=DownMenuNameID%>',<%=z%>)" onclick="JS_DownMenuJump('<%="?"&mid(page_URL,2)%>','<%=DownMenuOldID%>','<%=DownMenuNameID%>','<%=vID%>')" class="list-option<%if vID=DownMenuOldID then Response.Write " option"%>"><%=vtext%></span>
|
<%next%>
|
</div>
|
</div>
|
</div>
|
</div>
|
<input id="DownMenuTime" type="hidden" value="">
|
</li>
|
<div class="search">
|
<form action="?" method="post">
|
<div class="input">
|
<input type="text" id="searchTXT" name="searchTXT" value="<%=searchTXT%>" />
|
</div>
|
<div class="button">
|
<input type="submit" name="submit" value="搜索" />
|
</div>
|
</form>
|
</div>
|
</ul>
|
</div>
|
<!-- end box / title -->
|
<%
|
acc1=request("page")
|
if acc1=empty then acc1=clng(1)
|
QuantityInt = 40
|
acc2=0
|
acc3=0
|
|
if searchTXT<>"" Then
|
searchSql=" and (strItmName like '%"&searchTXT&"%' or strItmNo='"&searchTXT&"' or strItmBarcode='"&searchTXT&"' or strItmPinyin like '"&searchTXT&"%') "
|
end If
|
|
'测试
|
'sql="select strItmID,strItmName,UseState=SUM(isnull(b.StockQty,0)) from tblStItm LEFT JOIN MRP_Stock as b on b.StItmIDPK=strItmID and b.StockWarehouseID=5,MRP_Stock as a where a.StItmIDPK=strItmID and a.StockWarehouseID="&WarehouseID&" and strItmClassID=8 and strItmState=1"&searchSql&" GROUP BY strItmID,strItmName order by SUM(isnull(b.StockQty,0)) desc,strItmName"
|
'sql="select strItmID,strItmName,UseState=SUM(isnull(b.StockQty,0)) from tblStItm LEFT JOIN MRP_Stock as b on b.StItmIDPK=strItmID and b.StockWarehouseID=5,MRP_Stock as a where a.StItmIDPK=strItmID and a.StockWarehouseID="&WarehouseID&" and strItmClassID=8 and strItmState=1"&searchSql&" GROUP BY strItmID,strItmName order by strItmName"
|
|
sql="select strItmID,strItmName,UseState=(select SUM(isnull(StockQty,0)) from MRP_Stock where StockWarehouseID in (2) and StItmIDPK=strItmID) from tblStItm where strItmClassID=8 and strItmState=1 order by strItmName"
|
|
'正式
|
'sql="select strItmID,strItmName,UseState=SUM(isnull(StockQty,0)) from tblStItm LEFT JOIN MRP_Stock on StItmIDPK=strItmID and StockWarehouseID=5 where strItmClassID=8 and strItmState=1"&searchSql&" GROUP BY strItmID,strItmName order by SUM(isnull(StockQty,0)) desc,strItmName"
|
'Response.Write sql
|
rs.open sql,objConn,1,1
|
if not rs.eof then
|
rs.pagesize=QuantityInt
|
rs.absolutepage=acc1
|
acc2=rs.pagecount
|
acc3=rs.recordcount
|
else
|
SystemMessageType=2
|
SystemMessageTXT="数据库中相关无数据!"
|
end if
|
%>
|
<!--#include virtual="/inc/SystemMessages.gds" -->
|
<div class="table" style="overflow:auto">
|
<form id="form1" name="form1" action="" method="post">
|
<input name="admin_save" type="hidden" value="52">
|
<input name="Car_Check" type="hidden" value="">
|
<input name="searchTXT" type="hidden" value="<%=searchTXT%>">
|
<input name="page" type="hidden" value="<%=acc1%>">
|
<table>
|
<thead>
|
<tr style="white-space: nowrap;">
|
<th>设备</th>
|
<th>状态</th>
|
<th>最后领用人</th>
|
<th>最后领用时间</th>
|
<th>最后归还时间</th>
|
<th>最后领用调度单</th>
|
<th class="last">查看领用记录流水</th>
|
</tr>
|
</thead>
|
<tbody>
|
|
<%i=1
|
do while not rs.Eof and i<=QuantityInt
|
strItmID = rs("strItmID") '商品ID
|
strItmName = rs("strItmName") '物品名称
|
UseState = rs("UseState") '领用状态(0在库未领用,>=1使用中)
|
LastUseOAName = "--"
|
LastUseTime = "--"
|
LastReturnTime= "--"
|
LastUseRemarks= "--"
|
|
If UseState>0 Then
|
UseState="在库"
|
Else
|
UseState="使用中"
|
End If
|
sql="select top 1 OrderTime_OAid,OrderTime,OrderRemarks from MRP_OrderManoeuvre,MRP_OrderDetail where MRP_OrderID=MRP_OrderIDPK and OrderState=3 and OutWarehouseID="&WarehouseID&" and StItmIDPK="&strItmID&" order by OrderTime desc"
|
rsDt.open sql,objConn,1,1
|
If not rsDt.Eof then
|
LastUseOAName = OAUser(rsDt("OrderTime_OAid"),"UserName") '最后领用人ID
|
LastUseTime = rsDt("OrderTime") '最后领用时间
|
LastUseRemarks = rsDt("OrderRemarks") '最后领用调度单(备注)
|
End If
|
rsDt.close()
|
|
If UseState="在库" Then
|
sql="select top 1 OrderTime_OAid,OrderTime,OrderRemarks from MRP_OrderManoeuvre,MRP_OrderDetail where MRP_OrderID=MRP_OrderIDPK and OrderState=3 and InWarehouseID="&WarehouseID&" and StItmIDPK="&strItmID&" order by OrderTime desc"
|
rsDt.open sql,objConn,1,1
|
If not rsDt.Eof then
|
LastReturnTime = rsDt("OrderTime") '最后领用时间
|
End If
|
rsDt.close()
|
End If
|
i=i+1
|
|
%>
|
|
<tr style="white-space: nowrap;">
|
<td class="category"><%=strItmName%></td>
|
<td class="category"><%=UseState%></td>
|
<td class="category"><%=LastUseOAName%></td>
|
<td class="category"><%=LastUseTime%></td>
|
<td class="category"><%=LastReturnTime%></td>
|
<td class="category"><%=LastUseRemarks%></td>
|
<td class="category last"><a href="MRP_VE_Log.gds?strItmID=<%=strItmID%>&StockWarehouseID=<%=WarehouseID%>">查看记录</a></td>
|
</tr>
|
<%rs.movenext
|
loop
|
rs.close()
|
%>
|
<%for j=i to 20%>
|
<tr>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td> </td>
|
<td class="last"> </td>
|
</tr>
|
<%next%>
|
</tbody>
|
</table>
|
<!-- pagination -->
|
<div class="pagination pagination-left">
|
<div class="results">
|
<%
|
ShowingLeast = (acc1-1)*QuantityInt+1
|
ShowingMax = QuantityInt*acc1
|
if ShowingMax>acc3 then ShowingMax=acc3
|
%>
|
<span><%="显示 "& ShowingLeast &"-"& ShowingMax &" of "&acc3%></span>
|
</div>
|
<%if acc2>1 then%>
|
<ul class="pager">
|
<%if acc1=1 then%>
|
<li class="disabled">« 上页</li>
|
<%else%>
|
<li><a href="?page=<%=acc1-1%><%=page_URL%>">« 上页</a></li>
|
<%end if%>
|
<%
|
acc4=""
|
for i=1 to acc2
|
if acc2<=9 then
|
acc4=acc4&","&i
|
else
|
if i=1 then
|
acc4=acc4&","&i
|
elseif acc1<=5 and i<=7 then
|
acc4=acc4&","&i
|
elseif acc1>=acc2-4 and i>=acc2-6 then
|
acc4=acc4&","&i
|
elseif i>=acc1-2 and i<=acc1+2 then
|
acc4=acc4&","&i
|
elseif i=acc2 then
|
acc4=acc4&","&i
|
elseif i=2 or i=acc2-1 then
|
acc4=acc4&",0"
|
end if
|
end if
|
next
|
acc4SP=SPLIT(acc4,",")
|
for i = 1 to UBOUND(acc4SP)%>
|
<%if acc4SP(i)="0" then%>
|
<li class="separator">...</li>
|
<%elseif acc1=cint(acc4SP(i)) then%>
|
<li class="current"><%=acc4SP(i)%></li>
|
<%else%>
|
<li><a href="?page=<%=acc4SP(i)%><%=page_URL%>"><%=acc4SP(i)%></a></li>
|
<%end if%>
|
<%next%>
|
<%if acc1>=acc2 then%>
|
<li class="disabled">下页 »</li>
|
<%else%>
|
<li><a href="?page=<%=acc1+1%><%=page_URL%>">下页 »</a></li>
|
<%end if%>
|
</ul>
|
<%end if%>
|
</div>
|
<!-- end pagination -->
|
</form>
|
</div>
|
</div>
|
<!-- end table -->
|
|
|
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
<!--#include FILE="vicgame.asp"-->
|
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
|
</body>
|
</html>
|