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

📄 bangdan_store.asp

📁 非常实用的生产管理系统
💻 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.pinming.value == "")
	{
		alert("货名不能为空!");
		powersearch.pinming.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>


<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
<%
i=0
		
set rs1=server.createobject("adodb.recordset")
rs1.open "select * from class",conn,1,1
if not rs1.eof then   
do while not rs1.eof
j=0	
%>
po_ca_show[<%=i%>] = '<%=rs1("classname")%>';
po_ca_value[<%=i%>] = '<%=rs1("classname")%>';
po_detail_show[<%=i%>] = new Array();
po_detail_value[<%=i%>] = new Array();

<%
classname=rs1("classname")
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from Material where class='"&classname&"' order by pinming",conn,1,1
if not rs2.eof then   
do while not rs2.eof
%>
po_detail_show[<%=i%>][<%=j%>] = '<%=rs2("pinming")%>-<%=rs2("guige")%>';
po_detail_value[<%=i%>][<%=j%>] = '<%=rs2("pinming")%>';
<%
rs2.movenext
j=j+1
loop
else
%>
po_detail_show[<%=i%>][<%=j%>] = '此类暂无材料';
po_detail_value[<%=i%>][<%=j%>] = '';
<%
end if
rs2.close
set rs2=nothing
%>

<%
rs1.movenext
i=i+1
loop
end if
rs1.close
set rs1=nothing
%>

</script>
<script Language="JavaScript">



var psid="";

function DoLoad(form,funtypev){
        var n;
        var i,j,k;
        var num;
        num= GetObjID('funtype[]');
        num1= GetObjID('pinming');

        if (!funtypev)
           return;
        k=0;
        for (i=0;i<po_ca_show.length;i++) {
         for(j = 0; j < po_detail_value[i].length; j++){
                if(funtypev.indexOf(po_detail_value[i][j])!=-1) {
                    NewOptionName = new Option(po_detail_show[i][j], po_detail_value[i][j]);
                    form.elements[num].options[k] = NewOptionName;
                    k++;
                    }
         }
        }
}

function Do_po_Change(form){
        var num,n, i, m;
        num= GetObjID('d_position1');
        m = document.powersearch.elements[num].selectedIndex-1;
        n = document.powersearch.elements[num + 1].length;
        for(i = n - 1; i >= 0; i--)
                document.powersearch.elements[num + 1].options[i] = null;

        if (m>=0) {
        for(i = 0; i < po_detail_show[m].length; i++){
                NewOptionName = new Option(po_detail_show[m][i], po_detail_value[m][i]);
                document.powersearch.elements[num + 1].options[i] = NewOptionName;
        }
        document.powersearch.elements[num + 1].options[0].selected = true;
        }
}

function InsertItem(ObjID, Location)
{
	len=document.powersearch.elements[ObjID].length;
	for (counter=len; counter>Location; counter--)
	{
		Value = document.powersearch.elements[ObjID].options[counter-1].value;
		Text2Insert  = document.powersearch.elements[ObjID].options[counter-1].text;
		document.powersearch.elements[ObjID].options[counter] = new Option(trimPrefixIndent(Text2Insert), Value);
	}
}
function GetLocation(ObjID, Value)
{
  total=document.powersearch.elements[ObjID].length;
  for (pp=0; pp<total; pp++)
     if (document.powersearch.elements[ObjID].options[pp].text == "---"+Value+"---")
     { return (pp);
       break;
     }
  return (-1);
}

function GetObjID(ObjName)
{
  for (var ObjID=0; ObjID < window.powersearch.elements.length; ObjID++)
    if ( window.powersearch.elements[ObjID].name == ObjName )
    {  return(ObjID);
       break;
    }
  return(-1);
}




</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   
set rs=server.createobject("adodb.recordset") 
sql="select * from bangdan_store"
rs.open sql,conn,1,3
rs.addnew

rs("uptime") = request.Form("uptime")
rs("user") = trim(request.Form("user"))
rs("class") = trim(request.Form("d_position1"))
rs("pinming") = trim(request.Form("pinming"))
rs("Unit") = trim(request.Form("Unit"))
rs("fahuo") = trim(request.Form("fahuo"))
rs("shouhuo") = trim(request.Form("shouhuo"))
rs("chehao") = trim(request.Form("chehao"))+trim(request.Form("zimu"))+trim(request.Form("hao"))
rs("kouzhong") = trim(request.Form("kouzhong"))
rs("maozhong") = trim(request.Form("maozhong"))
rs("pizhong") = request.Form("pizhong")
rs("jingzhong") = CDbl(request.Form("maozhong")) - CDbl(request.Form("pizhong")) - CDbl(request.Form("kouzhong"))
rs("content") = trim(request.Form("content"))

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

 
sub SaveModify   
set rs=server.createobject("adodb.recordset") 
sql="select * from bangdan_store where id="&request.Form("id")
rs.open sql,conn,1,3
rs("uptime") = request.Form("uptime")
rs("user") = trim(request.Form("user"))
rs("class") = trim(request.Form("d_position1"))
rs("pinming") = trim(request.Form("pinming"))
rs("Unit") = trim(request.Form("Unit"))
rs("fahuo") = trim(request.Form("fahuo"))
rs("shouhuo") = trim(request.Form("shouhuo"))
rs("chehao") = trim(request.Form("chehao"))+trim(request.Form("hao"))
rs("kouzhong") = trim(request.Form("kouzhong"))
rs("maozhong") = trim(request.Form("maozhong"))
rs("pizhong") = request.Form("pizhong")
rs("jingzhong") = CDbl(request.Form("maozhong")) - CDbl(request.Form("pizhong")) - CDbl(request.Form("kouzhong"))
rs("content") = trim(request.Form("content"))
rs.update
response.Write "<script language=javascript>alert('修改成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=bangdan_store.asp"">"
response.end
rs.close
set rs=nothing
end sub   
 
  sub delCate()
        conn.execute("delete from bangdan_store where id in ("&Request.Form("selBigClass")&")")
		response.Write "<script language=javascript>alert('删除成功!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=bangdan_store.asp"">"
response.end
  end sub
  %> <% sub myform(isEdit) %> 	  
<TABLE width=98% align=center border="0" cellspacing="0" bordercolor="#D6D3CE">
  <TBODY> 
  <TR> 
    <td align="center" valign="top"> <%if oskey="supper" or oskey="caiwu" then%>
	<fieldset style="width:98%"><legend>
	<%
	    
	   if isedit then
	   set rs=server.createobject("adodb.recordset")
		   rs.open "select * from bangdan_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="20%" 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="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="20%" 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="bangdan_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">
			<select name='d_position1' onchange='Do_po_Change(this);' valign=top style='width:120'>
			<% 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("classname")%>"><%=rs1("classname")%></option>
			<%
			rs1.movenext
			loop
			end if
			rs1.close
			set rs1=nothing
			%></select></td>
            <td align="center">
			<select name='pinming' size=1 style='width:170'>
			<% if isedit then%>
			<option selected="selected" value="<%=rs("pinming")%>"><%=rs("pinming")%></option>
			<%else%>
			<option>--请选择--</option>
			<%end if%>
			</select></td>
            <td align="center">
			<select name="unit"  size="1" style='width:50'>
			<% if isedit then%><option ><%=rs("unit")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from unit",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("unit"))=trim(rs("unit")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("unit")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			</td>
			

			<td><select name="fahuo"  size="1" style='width:150'>
			<% if isedit then%><option ><%=rs("fahuo")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from owner",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("owner_name"))=trim(rs("fahuo")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("owner_name")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			
			</td>



			<td><select name="shouhuo"  size="1" style='width:200'>
			<% if isedit then%><option ><%=rs("shouhuo")%></option><%end if%>
			<%
			
			set rs3=server.createobject("adodb.recordset")
		   rs3.open "select * from danwei",conn,1,1
		   if not rs3.eof then
		   do while not rs3.eof
			%>
			<option <% if isedit then
			if trim(rs3("danweiname"))=trim(rs("shouhuo")) then
			%> selected="selected"<%end if%><%end if%>><%=rs3("danweiname")%></option>
			<%
			rs3.movenext
			loop
			end if
			rs3.close
			set rs3=nothing
			%>
			</select>
			
			</td>




          </tr>

          <tr class="but">

			<td width="20%" 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="20%" height="18" align="center"  class="but" onMouseDown="this.className='tddown'" onMouseUp="this.className='but'" onMouseOut="this.className='but'">净 重</td>

⌨️ 快捷键说明

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