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

📄 product_out_store.asp

📁 asp_erp 源碼 附詳盡使用說明及數據庫
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="checkuser.asp"-->
<html>
<head>
<title>∷企业生产管理信息系统∷</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/main.css" rel="stylesheet" type="text/css">

<SCRIPT language=JavaScript src="css/User_Info_Modify.js"></SCRIPT>
<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(powersearch)
{

	if (powersearch.youjipin.value == "")
	{
		alert("优级品数量不能为空!");
		powersearch.youjipin.focus();
		return (false);
	}
	if (powersearch.yijipin.value == "")
	{
		alert("一级品数量不能为空!");
		powersearch.yijipin.focus();
		return (false);
	}
	if (powersearch.hegepin.value == "")
	{
		alert("合格品数量不能为空!");
		powersearch.hegepin.focus();
		return (false);
	}
	if (powersearch.dengwaipin.value == "")
	{
		alert("等外品数量不能为空!");
		powersearch.dengwaipin.focus();
		return (false);
	}
	if (powersearch.chehao.value == "")
	{
		alert("车号不能为空!");
		powersearch.chehao.focus();
		return (false);
	}

}

//-->
</script>


<script   language="javascript">   
function SelectAll() {
	for (var i=0;i<document.selform.selBigClass.length;i++) {
		var e=document.selform.selBigClass[i];
		e.checked=!e.checked;
	}
}
  
  </script>


<script>
  var po_ca_show = new Array();
  var po_ca_value = new Array();
  var po_detail_show = new Array();
  var po_detail_value = new Array();
  var funtype1;
//Modified by Ryan Gao 2006-03-30 16:01:09

</script>
</HEAD>
<BODY topMargin=0 rightMargin=0 leftMargin=0>       
<!--#include file="top.asp"-->
<%
  select case request("action")
  case "add"
       call SaveAdd()
  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 SaveAdd
 
cangku=request.Form("d_position1")
youjipin = request.Form("youjipin")
yijipin = request.Form("yijipin")
hegepin = request.Form("hegepin")
dengwaipin = request.Form("dengwaipin")
num = CDbl(request.Form("youjipin")) + CDbl(request.Form("yijipin")) + CDbl(request.Form("hegepin")) + CDbl(request.Form("dengwaipin"))

set rs1=server.createobject("adodb.recordset") 

sql1="select * from product_store where cangku='"&cangku&"'"

rs1.open sql1,conn,1,3



if not rs1.eof then

rs1("number")=rs1("number")-num
rs1("youjipin_num")=rs1("youjipin_num")-youjipin
rs1("yijipin_num")=rs1("yijipin_num")-yijipin
rs1("hegepin_num")=rs1("hegepin_num")-hegepin
rs1("dengwaipin_num")=rs1("dengwaipin_num")-dengwaipin

rs1.update
end if



rs1.update
rs1.close
set rs1=nothing

set rs=server.createobject("adodb.recordset") 
sql="select * from product_out_store"
rs.open sql,conn,1,3
rs.addnew
rs("class") = cangku

rs("uptime") = request.Form("uptime")
rs("chehao") = trim(request.Form("chehao"))
rs("use_dep") = trim(request.Form("use_dep"))
rs("packing") = trim(request.Form("packing"))
rs("youjipin") = youjipin
rs("yijipin") = yijipin
rs("hegepin") = hegepin
rs("dengwaipin") = dengwaipin
rs("Loan_num") = num

rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('出库成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=product_out_store.asp"">"
response.end
rs.close
set rs=nothing
end sub

 
sub SaveModify  

  
set rs=server.createobject("adodb.recordset") 
sql="select * from product_out_store where id="&request.Form("id")
rs.open sql,conn,1,3
rs("class") = trim(request.Form("d_position1"))

rs("uptime") = request.Form("uptime")
rs("chehao") = trim(request.Form("chehao"))
rs("use_dep") = trim(request.Form("use_dep"))
rs("packing") = trim(request.Form("packing"))
rs("youjipin") = request.Form("youjipin")
rs("yijipin") = request.Form("yijipin")
rs("hegepin") = request.Form("hegepin")
rs("dengwaipin") = request.Form("dengwaipin")
rs("Loan_num") = rs("youjipin") + rs("yijipin") + rs("hegepin") + rs("dengwaipin")

rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=product_out_store.asp"">"
response.end
rs.close
set rs=nothing
end sub   
 
  sub delCate()
        conn.execute("delete from product_out_store where id in ("&Request.Form("selBigClass")&")")
		response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=product_out_store.asp"">"
response.end
  end sub
  %> <% sub myform(isEdit) %> 	  
<TABLE width=800 align=center border="1" cellspacing="0" cellpadding="0" bordercolor="#0055E6">
  <TBODY> 
  <TR> 
    <td align="center" valign="top"> <%if oskey="supper" or oskey="chengpin" then%>

	<%
	    
	   if isedit then
	   set rs=server.createobject("adodb.recordset")
		   rs.open "select * from product_out_store where id=" & request("id"),conn,1,1
%>

    <table width="800" border="0" cellpadding="0" cellspacing="0" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">编辑供货单位信息</font></b>

</td>
</tr>
</table>
<%
else
%>
    <table width="800" border="0" cellpadding="0" cellspacing="0" >
          <tr >  
<td height=26 background="images/background.gif">
<b><font color="#ffffff">添加供货单位信息</font></b>

</td>
</tr>
</table>
<%end if %>
        <table width="800" border="0" cellpadding="0" cellspacing="0" bordercolor="#0055E6">
          <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="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="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="10%" 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>
			
          </tr>
		  <form name="powersearch" method="post" action="product_out_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")%>"> <% End If %>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
			<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 height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><select name="d_position1"  size="1" style='width:80'>
			<% if isedit then%><option ><%=rs("class")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from chengpincangku",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("cangkuname"))=trim(rs("class")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("cangkuname")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			
			</td>

<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="youjipin" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("youjipin")

																  end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="yijipin" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("yijipin")

																  end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="hegepin" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("hegepin")


																  end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input name="dengwaipin" type="text"  size="10" value='<% if isedit then
		                                                         response.write rs("dengwaipin")

																  end if %>'></td>
<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'"><input readonly name="Loan_num" type="text"  class="textfield"  size="10" value='<% if isedit then
		                                                         response.write rs("Loan_num")
																  end if %>'></td>

<td height="18" align="center" class="but11" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but11'">
			<select name="packing" size="1">
			<%
set rs0=server.CreateObject("ADODB.RecordSet") 

⌨️ 快捷键说明

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