📄 in_yarn.asp
字号:
<!--#include file=../myPrg.asp-->
<!--#include file=../opendb.inc-->
<% response.buffer=true %>
<%const title="入库操作"%>
<%
if session("admin")="" then
response.redirect "admin.asp"
else
make=session("admin")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<title><%=title%></title>
<link rel=stylesheet type=text/css href=../css/css.css>
</head>
<%
sql = "select * from yarn_type order by yarn_type_id asc"
rs.open sql,conn,1,1
%><SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("yarn_type_name"))%>","<%= trim(rs("yarn_sort_id"))%>","<%= trim(rs("yarn_type_id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
</SCRIPT>
<body ALIGN=CENTER leftmargin="0" topmargin="0" bgcolor="#468ea3">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber" height="100%">
<TR width="609" ght="100%" align="center" valign="top">
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="609" id="AutoNumber1" height="100%"> <tr>
<td width="609" height="100%" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="101%" id="AutoNumber2" align=center>
<tr>
<td width="100%" colspan="9">
<p align="center"><br>
<b><font size="7">海盐威康纺织工业有限公司<br></font></b>
<font size="3">| 纱料入库单 |</font>
<p align="center">|
<a href="in_fabric.asp">胚布入库单</a> |
<a href="in_cloth.asp">成品布入库单</a> |
<a href="in_other.asp"> 其它入库单</a> |</p>
</td>
</tr>
<form method="POST" name="myform" action="rs_in_yarn.asp?action=add" >
<tr>
<td width="100%" colspan="12">
<p align="center"> <select size="1" name="yarn_year">
<%
y=2002
do while y<=2010
%>
<option <%if y=year(now()) then %>selected<%end if%> value="<%=y%>"><%=y%></option>
<%
y=y+1
loop
%>
</select>
年
<select size="1" name="yarn_month">
<%
mon=1
do while mon<=12
%>
<option <%if mon=month(now()) then %>selected<%end if%> value="<%=mon%>"><%=mon%></option>
<%
mon=mon+1
loop
%>
</select>
月
<select size="1" name="yarn_day">
<%
da_y=1
do while da_y<=31
%><option <%if da_y=day(now()) then %>selected<%end if%> value="<%=da_y%>"><%=da_y%></option>
<%
da_y=da_y+1
loop
%></select>日</td>
</tr>
<tr>
<td width="12%"> 编 号:</td>
<td width="15%"><input type="text" name="yarn_no" size="10"></td>
<td width="12%"> 制令号:</td>
<td width="7%"><input type="text" name="yarn_makeno" size="10"></td>
<td width="5%"> </td>
<td width="10%">订单号:</td>
<td width="6%"><input type="text" name="yarn_orderno" size="10"></td>
<td width="15%"> 事件类型:</td>
<td width="19%"><select name="select_happen">
<%
sql = "select * from happen "
rs.open sql,conn
%>
<%
While (NOT rs.EOF)
%>
<option value="<%=(rs("happen_id"))%>" ><%=(rs.Fields.Item("happen_name"))%></option>
<%
rs.MoveNext()
Wend
If (rs.CursorType > 0) Then
rs.MoveFirst
Else
rs.Requery
End If
rs.close
%>
</select></td>
</tr>
<tr>
<td width="12%"> 供应商:</td>
<td width="49%" colspan="5">
<select name="select_provider">
<%
sql = "select * from provider "
rs.open sql,conn
%>
<%
While (NOT rs.EOF)
%>
<option value="<%=(rs("provider_id"))%>" ><%=(rs.Fields.Item("provider_name"))%></option>
<%
rs.MoveNext()
Wend
If (rs.CursorType > 0) Then
rs.MoveFirst
Else
rs.Requery
End If
rs.close
%>
</select> </td>
<td width="6%">
</td>
<td width="15%"> 收货仓库:
</td>
<td width="17%"><select name="select_storage">
<%
sql = "select * from storage "
rs.open sql,conn
%>
<%
While (NOT rs.EOF)
%>
<option value="<%=(rs("storage_id"))%>" ><%=(rs.Fields.Item("storage_name"))%></option>
<%
rs.MoveNext()
Wend
If (rs.CursorType > 0) Then
rs.MoveFirst
Else
rs.Requery
End If
rs.close
%>
</select></td>
</tr>
</table><BR>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="600" id="AutoNumber2" height="40">
<tr align="center">
<td height="12" width="32">
行号
</td>
<td height="12" width="92">
纱支种类</td>
<td height="12" width="121">
纱支型号</td>
<td height="12" width="73">
纱支颜色</td>
<td height="12" width="38">
单位</td>
<td height="12" width="68">
实收数量</td>
<td height="12" width="69">
备注</td>
</tr>
<%
i=1
do while i<=5
%>
<SCRIPT language="javascript">
function changelocation_<%=i%>(locationid)
{
document.myform.yarn_type_id_<%=i%>.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.yarn_type_id_<%=i%>.options[document.myform.yarn_type_id_<%=i%>.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT>
<tr align="center">
<td height="19" width="32">
<input type="text" name="line_<%=i%>" size="5" value="<%=I%>" ></td>
<td height="19" width="92">
<%
sql = "select * from yarn_sort"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<SELECT name="yarn_sort_id_<%=i%>" onChange="changelocation_<%=i%>(document.myform.yarn_sort_id_<%=i%>.options[document.myform.yarn_sort_id_<%=i%>.selectedIndex].value)" size="1">
<OPTION selected value=""> </OPTION><%
do while not rs.eof
%><OPTION value="<%=trim(rs("yarn_sort_id"))%>"><%=trim(rs("yarn_sort_name"))%></OPTION>
<%
rs.movenext
loop
end if
rs.close
%></SELECT>
</TD>
<TD height="19" width="92">
<SELECT name="yarn_type_id_<%=i%>">
<OPTION selected value=""> </OPTION>
</SELECT>
</td>
<td height="19" width="73">
<select size="1" name="color_<%=I%>">
<OPTION selected value=""></OPTION>
<%
sql = "select * from color "
rs.open sql,conn
%>
<%
While (NOT rs.EOF)
%>
<option value="<%=(rs("color_id").Value)%>" ><%=(rs.Fields.Item("color_name"))%></option>
<%
rs.MoveNext()
Wend
If (rs.CursorType > 0) Then
rs.MoveFirst
Else
rs.Requery
End If
rs.close
%>
</select>
</td>
<td height="19" width="38">公斤
</td>
<td height="19" width="60">
<input type="text" name="yarn_amount_<%=I%>" size="5"></td>
<td height="19" width="68">
<input type="text" name="yarn_meno_<%=I%>" size="5"></td>
</tr>
<%
i=i+1
loop
%>
<tr>
<td height="7" width="32">总计
</td>
<td colspan="5" width="388"></td>
<td width="68"></td>
</tr>
</table>
<p align="right">制单:
<label name="make"><%=make%></label>
</td>
</tr>
<tr>
<TD width="609">
<p align="center">
<input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</td>
</tr>
</table>
</TD>
</TR>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -