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

📄 in_store.asp

📁 汽车4s店库存管理系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
set rs=nothing

set rs=server.createobject("adodb.recordset") 
sql="select * from storage where storage='"&request.Form("storage")&"'"
rs.open sql,conn,1,3
if not rs.eof then
Material_ids=Split(rs("Material_id"),"|")
nums=Split(rs("num"),"|")
for i=0 to UBound(Material_ids)
if Material_ids(i)<>"" then
if clng(Material_ids(i))=clng(Material_id) then
id0=id0&Material_ids(i)&"|"
n=cdbl(nums(i))-num1
num00=num00&n&"|"
else
id0=id0&Material_ids(i)&"|"
num00=num00&nums(i)&"|"
end if
end if
next
rs("Material_id") = id0
rs("num") = num0
rs.update
end if
rs.close
set rs=nothing

response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=in_store.asp"">"
response.end
end sub   
 
  sub delCate()
        conn.execute("delete from in_store where id in ("&Request.Form("selBigClass")&")")
		response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=in_store.asp"">"
response.end
  end sub
  %> <% sub myform(isEdit) %> 	  
<TABLE width=800 align=center border="1" cellspacing="0" bordercolor="#D6D3CE">
  <TBODY> 
  <TR> 
    <td align="center" valign="top"> <%if oskey="supper" or oskey="admin" then%>
	<fieldset style="width:98%"><legend>
	<%
	    
	   if isedit then
	   set rs=server.createobject("adodb.recordset")
		   rs.open "select * from in_store where id=" & request("id"),conn,1,1
	       response.write "编辑入库信息"
	   else
	       response.write "添加入库信息"
	   end if %></legend>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入库日期</td>
            <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
			<td width="5%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名称| 车 型 | 计量单位</td>
			<td width="15%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">供应商</td>
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购单价</td>
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">数量</td>
			
          </tr>
		  <form name="powersearch" method="post" action="in_store.asp" onSubmit="return Juge(this)" >
		  <tr> <input type="Hidden" name="action" value='<% If isedit then%>modify<% Else %>add<% End If %>'> 
		  <% If isedit then%><input type="Hidden" name="id" value="<%=rs("id")%>">
		  <input type="Hidden" name="storage" value="<%=rs("storage")%>">
		  <input type="Hidden" name="old_num" value="<%=rs("use_num")%>">
		  <input type="Hidden" name="Material_id" value="<%=rs("Material_id")%>">
		  <% End If %>
            <td height="18" align="center">
			<input name="uptime" onFocus="show_cele_date(uptime,'','',uptime)" type="text"  size="10"  value='<% if isedit then
		                                                         response.write rs("uptime")
																 else
																 response.write date()
																  end if %>'></td>
            <td>
			<select name='d_position1' onchange='Do_po_Change(this);' valign=top style='width:90'<% if isedit then%> disabled="disabled"<%end if%>>
			<% if isedit then%>
			<option selected="selected"><%=rs("class")%></option>
			<%else%>
			<option selected value='0000'>请选择类别</option>
			<%end if%>
			
			<%			
			set rs1=server.createobject("adodb.recordset")
		   rs1.open "select * from class",conn,1,1
		   if not rs1.eof then
		   do while not rs1.eof
			%>
			<option value="<%=rs1("classnumber")%>"><%=rs1("classnumber")%></option>
			<%
			rs1.movenext
			loop
			end if
			rs1.close
			set rs1=nothing
			%></select></td>
            <td align="center">
			<select name='Material_id' size=1 style='width:250' <% if isedit then%> disabled="disabled"<%end if%>>
			<% if isedit then%>
			<option selected="selected" value="<%=rs("Material_id")%>"><%=getMaterial(rs("Material_id"))%></option>
			<%else%>
			<option>--请选择--</option>
			<%end if%>
			</select>
			</td>
			<td><select name="Supplier"  size="1" style='width:150'>
			<% if isedit then%><option ><%=rs("Supplier")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from Supplier",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("Supplier_name"))=trim(rs("Supplier")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("Supplier_name")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			
			</td>
			<td><input name="use_price" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("use_price")
																  end if %>'></td>
			<td><input name="use_num" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("use_num")
																  end if %>'></td>
          </tr>
		  <tr class="but">
			<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">借方金额</td>
			<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">结帐日期</td>
			<td  colspan="3" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">备  注</td>
			<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入库仓库</td>		
          </tr>
		  <tr> 
            <td align="center"><input name="use_Amount" readonly type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("use_Amount")
																  end if %>'></td>
			<td align="center"><input name="end_time" onFocus="show_cele_date(end_time,'','',end_time)" type="text"  size="10"  value='<% if isedit then
		                                                         response.write rs("end_time")
																 else
																 response.write "1980-1-1"
																  end if %>'></td>
			<td colspan="3"><textarea name="content" cols="50" rows="1"><% if isedit then
		                                                         response.write rs("content")
																  end if %></textarea></td>
			<td>
			<select name='storage'  style='width:70'<% if isedit then%> disabled="disabled"<%end if%>>
			<% if isedit then%>
			<option selected="selected"><%=rs("storage")%></option>
			<%end if%>
			
			<%			
			set rs1=server.createobject("adodb.recordset")
		   rs1.open "select * from 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></td>
																  
																  
																  </tr>
			<tr>
			<td colspan="8" align="center"><input type="submit"  value="<% if isedit then
		                                                         response.write "编辑"
																 else
																 response.write "添加"
																  end if %>"> </td>
          </tr></form>
		  
           </table>
        </fieldset><%end if%>
      <TABLE cellSpacing=1 cellPadding=0 width="100%" border=0 >
        <TR>
          <TD height="25" align="center">入 库 材 料 列 表</TD>
              </TR>
            </TABLE>
			<form action="in_store.asp" method="post" name="selform" >
  <table width="100%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8" align="center">
    <tr> 
      
      <td width="100%" align="center" valign="top">
	  <fieldset style="width:95%">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
          <tr class="but"> 
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">入库日期</td>
            <td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">类 别</td>
			<td width="25%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">配件名称 / 车 型 / 单 位</td>
			<td width="15%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">供应商</td>
			<td width="6%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">采购单价</td>
			<td width="6%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">数量</td>
			<td width="8%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">总金额</td>
			<td width="10%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">结帐日期</td>
            <td width="5%" height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">仓 位</td>
          </tr>
		 <%
PageShowSize = 10            '每页显示多少个页
MyPageSize   = 20          '每页显示多少条
If Not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Or Request("page") <=0 Then
MyPage=1
Else
MyPage=Int(Abs(Request("page")))
End if
set rs=server.CreateObject("ADODB.RecordSet") 
search=request("search")
if search<>"" then 
class1=request("class")
keyword=request("keyword")
rs.Source="select* from In_Store where class like '%"&class1&"%' order by -id"
else
rs.Source="select* from In_Store order by -id"
end if
rs.Open rs.Source,conn,1,1
if not rs.EOF then
rs.PageSize     = MyPageSize
MaxPages         = rs.PageCount
rs.absolutepage = MyPage
total            = rs.RecordCount
for i=1 to rs.PageSize
if not rs.EOF then
%>
<tr><td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><input name="selBigClass" type="checkbox" id="selBigClass" value="<%=rs("ID")%>"><a href="In_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=rs("uptime")%></a></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("class")%><%if rs("class")="" then%>&nbsp;<%end if%></td>
<td height="18" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">&nbsp;<a href="In_Store.Asp?id=<%=rs("ID")%>&action=edit"><%=getMaterial(rs("Material_id"))%></a></td>

<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("Supplier")%><%if rs("Supplier")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("use_price")%><%if rs("use_price")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("use_num")%><%if rs("use_num")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("use_Amount")%><%if rs("use_Amount")="" then%>&nbsp;<%end if%></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%if rs("end_time")="1980-1-1" then%><font color="#FF0000">未结帐</font><%else%><%=rs("end_time")%><%end if%></td>
<td height="18" align="center" class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'"><%=rs("storage")%></td>
</tr>
<%
rs.MoveNext
end if
next
end if
%>
<tr><td align="right" colspan="10" height="22">
共 <%=total%> 条,当前第 <%=Mypage%>/<%=Maxpages%> 
            页,每页 <%=MyPageSize%> 条 
            <%
			if search<>"" then
			url="In_Store.asp?class="&class1&"&keyword="&keyword&"&search=search&"
			else
            url="In_Store.asp?"
			end if				
PageNextSize=int((MyPage-1)/PageShowSize)+1
Pagetpage=int((total-1)/rs.PageSize)+1

if PageNextSize >1 then
PagePrev=PageShowSize*(PageNextSize-1)
Response.write "<a class=black href='" & Url & "page=" & PagePrev & "' title='上" & PageShowSize & "页'>上一翻页</a> "
Response.write "<a class=black href='" & Url & "page=1' title='第1页'>页首</a> "
end if
if MyPage-1 > 0 then
Prev_Page = MyPage - 1
Response.write "<a class=black href='" & Url & "page=" & Prev_Page & "' title='第" & Prev_Page & "页'>上一页</a> "
end if

if Maxpages>=PageNextSize*PageShowSize then
PageSizeShow = PageShowSize
Else
PageSizeShow = Maxpages-PageShowSize*(PageNextSize-1)
End if
If PageSizeShow < 1 Then PageSizeShow = 1
for PageCounterSize=1 to PageSizeShow
PageLink = (PageCounterSize+PageNextSize*PageShowSize)-PageShowSize
if PageLink <> MyPage Then
Response.write "<a class=black href='" & Url & "page=" & PageLink & "'>[" & PageLink & "]</a> "
else
Response.Write "<B>["& PageLink &"]</B> "
end if
If PageLink = MaxPages Then Exit for
Next

if Mypage+1 <=Pagetpage  then
Next_Page = MyPage + 1
Response.write "<a class=black href='" & Url & "page=" & Next_Page & "' title='第" & Next_Page & "页'>下一页</A>"
end if

if MaxPages > PageShowSize*PageNextSize then
PageNext = PageShowSize * PageNextSize + 1
Response.write " <A class=black href='" & Url & "page=" & Pagetpage & "' title='第"& Pagetpage &"页'>页尾</A>"
Response.write " <a class=black href='" & Url & "page=" & PageNext & "' title='下" & PageShowSize & "页'>下一翻页</a>"
End if
rs.Close
set rs=nothing
%>&nbsp;&nbsp;&nbsp;&nbsp;<%if oskey="supper" or oskey="admin" then%>
        <input type="checkbox" name="checkbox" value="checkbox" onClick="javascript:SelectAll()"> 选择/反选
              <input onClick="{if(confirm('此操作将删除该信息!\n\n确定要执行此项操作吗?')){this.document.selform.submit();return true;}return false;}" type=submit value=删除 name=action2> 
              <input type="Hidden" name="action" value='del'><%end if%></td></tr>
        </table>
</fieldset>
	  
</td>
    </tr>
    <tr> 
      <td height="50" colspan="3" align="center">
        

        </td>
    </tr>
  </table>
</form><br>
<fieldset style="width:80%"><legend>入库搜索</legend>
        <table width="90%" border="0" cellpadding="0" cellspacing="0" bordercolor="#D4D0C8">
         
		  <form name="search" method="post" action="in_store.asp">
		  <tr><input name="search" type="hidden" value="search">
            <td height="18" align="center" width="20%">
			<select name="class" size="1">
			<option value="">所有分类</option>
			<%
	       set rs2=server.createobject("adodb.recordset")
		   rs2.open "select * from class",conn,1,1
		   if not rs2.eof then
		   do while not rs2.eof
		   classnumber=rs2("classnumber")
		   %>
		   <option value="<%=rs2("classnumber")%>"><%=rs2("classnumber")%></option>
			<%
			rs2.movenext
			loop
			end if
			rs2.close
			set rs2=nothing
			%></select></td>
                     
			<td align="center" width="15%" ><input type="submit"  value="查 找"> </td>
          </tr></form>
			</TD>
              </TR>
          </table>
		    </fieldset> 
			</TD>
              </TR>
          </table>
		          
      <table width="100%" border="0" cellspacing="0" cellpadding="4">
      
      </table>
  </TBODY>
</TABLE>
<%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 + -