📄 setpoapply.asp
字号:
<SCRIPT language='javascript'>window.resizeTo(350,250);window.focus()</SCRIPT>
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "po","add"
set objcheck=nothing
set conn=server.CreateObject("adodb.connection")
conn.open connstring
if Request("Mod2") = "save" then
sql="update poapply set poqty='"&request("poqty")&"',poprice='"&request("poprice")&"',poaccountid='"&request("Manufacturer")&"',descriptions='"&request("descriptions")&"' where poapplyid="&request("poapplyid")
conn.execute(sql)
%>
<script language=javascript>
window.opener.location.reload();
window.close();
</script>
<%
else
sql="select * from v_poapply where poapplyid="&request("poapplyid")
set rs=conn.execute(sql)
strmodel=rs("model")
strproductid=rs("productid")
strproductcode=rs("productcode")
strpoprice=rs("poprice")
strpoaccountid=rs("poaccountid")
strpoaccount=rs("poaccount")
strpoapplyqty=rs("poapplyqty")
strpoqty=rs("poapplyqty")
strdescriptions=rs("descriptions")
if rs.eof then
response.write "记录没有找到"
response.end
end if
end if
%>
<title>设定订货</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link href="../global.css" rel=stylesheet type=text/css>
<Script Language="javascript" >
function dosub()
{
if (isNaN(form1.poqty.value)||form1.poqty.value <= 0 || form1.poqty.value==''){
alert('输入的订货数量不正确!');
form1.poqty.focus();
return;
}
if (parseInt(form1.poqty.value) > parseInt(form1.poapplyqty.value)){
alert('订货数量不能超过预定数量!');
form1.poqty.focus();
return;
}
if (isNaN(form1.poprice.value)||form1.poprice.value <= 0 || form1.poprice.value==''){
alert('输入的订货价格不正确!');
form1.poprice.focus();
return;
}
if (form1.Manufacturer.value==''){
alert('请选择供应商!');
form1.Manufacturer.focus();
return;
}
form1.Mod2.value = "save";
form1.submit();
}
</Script>
<script language="JavaScript" type="text/JavaScript">
function pohistoryprice(theProductid,themodel)
{
var theWindow;
var theAccount;
theWindow = window.open("pohistoryprice.asp?theProductid="+theProductid+"&themodel="+themodel,"查看历史采购价格","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,width=350,height=300,top=280,left=400");
theWindow.opener = this;
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" >
<form method="post" id=form1 name=form1 action="">
<input type=hidden name="Mod2" >
<font class=title>型号:<%=strmodel%></font>
<table width="100%"><tr>
<td><font size=2 color="330000"><b>产品货号:<%=strproductcode%></b></font></td>
<td align="right"><a onclick="return dosub()"><img src="../images/button_confirm.gif" style="cursor:hand"></a>
<img src="../images/button_close.gif" style="cursor:hand" border=0 language=javascript onclick="window.close();"></td>
</tr></table>
<table align="center" border='2' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#C0C0C0' width='100%' bordercolorlight='#CCCCCC' bordercolordark='#808080'>
<tr><td width="100%"align="left">
<table border=1 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%">
<tr height=30 bgcolor='#DDFFD7'>
<td width="22%" align="right">预定数量:</td>
<td colspan="3"> <input type=hidden name="poapplyqty" value="<%=strpoapplyqty%>">
<%=strpoapplyqty%></td>
</tr>
<tr height=30 bgcolor='#FDFFD7'>
<td width="22%" align="right">订货数量:</td>
<td width="20%" align="left"><input type=text name="poqty" value="<%=strpoqty%>" size=6 <%'if request.querystring("mod")="detail" then response.write "readonly"%>></td>
<td width="22%" align="right">订货价格:</td>
<td width="36%" align="left"> <input type=text name="poprice" size=8 value="<%=strpoprice%>">
<input type=button onClick="JavaScript:pohistoryprice('<%=strproductid%>','<%=strmodel%>')" value="价格" class=black></td>
</tr>
<tr height=16 bgcolor='#EFEFEF'>
<td width="22%" align="right">供应商:</td>
<td align="left" colspan="3">
<input name="Manufacturer" type="hidden" size="8" value="<%=strpoaccountid%>">
<input name="Manufacturername" type="text" size="20" value="<%=strpoaccount%>" readonly>
<input type="button" name="bnSupplier" onClick="JavaScript:opensubwin2('form1','Manufacturer')" value=... class=black>
</td>
</tr>
<tr bgcolor='#FFE6FF'>
<td width="22%" align="right">备注:</td>
<td height=70 align="left" colspan="3"><textarea name=descriptions cols="30" rows="3"><%=strdescriptions%></textarea></td>
</tr>
</table></td></tr></table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -