⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 store_reorganization.asp

📁 汽车4s店库存管理系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷汽车4S店配件仓储管理系统:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">


<style type="text/css">
<!--
td {  font-family: "宋体"; font-size: 9pt}
body {  font-family: "宋体"; font-size: 9pt}
select {  font-family: "宋体"; font-size: 9pt}
A {text-decoration: none; color: #336699; font-family: "宋体"; font-size: 9pt}
A:hover {text-decoration: underline; color: #FF0000; font-family: "宋体"; font-size: 9pt} 
-->
</style>
<SCRIPT LANGUAGE=javascript>
<!--
function Juge(add1)
{

	if (add1.storage.value == "")
	{
		alert("名称不能为空!");
		add1.storage.focus();
		return (false);
	}

}


function SelectAll() {
	for (var i=0;i<document.selform.selBigClass.length;i++) {
		var e=document.selform.selBigClass[i];
		e.checked=!e.checked;
	}
}
//-->
</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>       
<!--#include file="top.asp"--><% dim sql,rs

  select case request("action")
  case "Reorganization"
       call Reorganization()
  case "modify"
       call SaveModify()
  case "del"
       call delCate()
  case "edit"
       isEdit=True
       call myform(isEdit)
  case else
       isEdit=False
       call myform(isEdit) 
  end select

  
sub Reorganization 

set rs=server.createobject("adodb.recordset") 
sql="select * from storage where storage='"&request.Form("from_storage")&"'"
rs.open sql,conn,1,3
if not rs.eof then
Material_id=Split(rs("Material_id"),"|")
num=Split(rs("num"),"|")
for i=0 to UBound(Material_id)
if Material_id(i)<>"" then

if clng(Material_id(i))<>clng(request.Form("Material_id"))  then
id=id&Material_id(i)&"|"
nums=nums&num(i)&"|"
else
    if num(i)-cdbl(request.Form("num"))>0 then
       id=id&Material_id(i)&"|"
       nums=nums&(num(i)-cdbl(request.Form("num")))&"|"
    end if
end if
end if
next
rs("Material_id") = id
rs("num") = nums
rs.update
end if
rs.close
set rs=nothing


n=0
set rs=server.createobject("adodb.recordset") 
sql="select * from storage where storage='"&request.Form("to_storage")&"'"
rs.open sql,conn,1,3
if not rs.eof then
Material_id0=Split(rs("Material_id"),"|")
num0=Split(rs("num"),"|")
for i=0 to UBound(Material_id0)

if Material_id0(i)<>"" then

if clng(Material_id0(i))<>clng(request.Form("Material_id"))  then
id0=id0&Material_id0(i)&"|"
nums0=nums0&num0(i)&"|"
else
id0=id0&Material_id0(i)&"|"
nums0=nums0&(num0(i)+cdbl(request.Form("num")))&"|"
n=1
end if

end if
next

if n=1 then
rs("Material_id") = id0
rs("num") = nums0

else

rs("Material_id") = rs("Material_id")&"|"&request.Form("Material_id")
rs("num") = rs("num")&"|"&cdbl(request.Form("num"))

end if
rs.update
end if
rs.close
set rs=nothing



set rs=server.createobject("adodb.recordset") 
sql="select * from Reorganization"
rs.open sql,conn,1,3
rs.addnew
rs("Material_id")=request.Form("Material_id")
rs("num")=request.Form("num")
rs("from_storage")=request.Form("from_storage")
rs("to_storage")=request.Form("to_storage")
rs("uptime")=now()
rs.update
rs.close
set rs=nothing

response.Write "<script language=javascript>alert('调拨成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=store_Reorganization.asp"">"
response.end

end sub
  %> <% sub myform(isEdit) %> 	  

	  <fieldset style="width:800">
	  <TABLE width=98% align=center border="1" cellspacing="0" bordercolor="#D6D3CE">
  <TBODY> 
  <TR> 
    <td align="center" valign="top">
	
      <TABLE cellSpacing=1 cellPadding=0 width="100%" border=0 >
        <TR>
          <TD height="35" align="center">当前仓库存货信息</TD>
              </TR>
            </TABLE>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 
			<td width="10%" height="25" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">仓库</td>
           <td width="90%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">存货信息</td>
          </tr>
		 <%
set rs=server.CreateObject("ADODB.RecordSet") 
rs.Source="select* from storage"
rs.Open rs.Source,conn,1,1
if not rs.EOF then
do while not rs.eof
if rs("Material_id")<>"" then
Material_id=Split(rs("Material_id"),"|")
num=Split(rs("num"),"|")
%>
<tr><td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;<%=rs("storage")%></td>
<td height="18" align="center" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
<tr> <td class="window-0" width="30%" align="center">配件名称</td>
<td class="window-0" width="30%" align="center">车 型</td>
<td class="window-0" width="10%">数 量</td><td class="window-0" width="30%" align="center">操 作</td></tr>
<%
for i=0 to UBound(Material_id)
if Material_id(i)<>"" then

set rs0=server.createobject("adodb.recordset") 
sql0="select * from Material where id="&Material_id(i)&""
rs0.open sql0,conn,1,1
if not rs0.eof then
%><form action="store_Reorganization.asp?action=Reorganization" method="post" name="selform" >
<input name="from_storage" type="hidden" value="<%=rs("storage")%>">
<input name="Material_id" type="hidden" value="<%=Material_id(i)%>">
<tr> <td class="window-0" width="30%">&nbsp;<%=rs0("pinming")%></td><td class="window-0" width="30%">&nbsp;<%=rs0("guige")%></td><td class="window-0" width="10%">&nbsp;<%=num(i)%></td><td class="window-0" width="30%">&nbsp;<select name='to_storage'  style='width:70'>
		
			<%			
			set rs1=server.createobject("adodb.recordset")
		   rs1.open "select * from storage where storage<>'"&rs("storage")&"' order by storage",conn,1,1
		   if not rs1.eof then
		   do while not rs1.eof
			%>
			<option value="<%=rs1("storage")%>"><%=rs1("storage")%></option>
			<%
			rs1.movenext
			loop
			end if
			rs1.close
			set rs1=nothing
			%></select>&nbsp;<input name="num" value="<%=num(i)%>" size="6">&nbsp;<input type="submit" name="ss" value="调拨"></td></tr></form>
<%
end if
rs0.close
set rs0=nothing
end if
next
%>
</table>
</td>
</tr>
<%
end if
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
   </table>
</fieldset>
<%end sub%>
<P>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TBODY>
  <TR vAlign=center>
    <TD align=middle width="100%"><!--#include file="footer.htm"--></TD>
  </TR></TBODY></TABLE></P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -