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

📄 productsalerecordcreate.asp

📁 精美OA网络办公系统,带PSD文件.可任意修改.
💻 ASP
字号:
<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<!--#INCLUDE FILE="../HXINCLUDE/SelectDate.ASP"-->
<%
ColumnName="":Tablename="HX_ProductSaleRecord":Tablename1="HX_Product":Orderby=""
action=request("action")
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
 PTID=WS_s.HX_Replace(request("PTID"))
 SaleMan=WS_s.HX_Replace(request("SaleMan"))
 SaleDate=WS_s.HX_Replace(request("SaleDate"))
 SaleDescribe=WS_s.HX_Replace(request("SaleDescribe"))
 DetailDate=WS_s.HX_Replace(request("DetailDate"))
 DetailContent =WS_s.HX_Replace(request("DetailContent"))
 SaleCnt=WS_s.HX_Replace(request("SaleCnt"))
 rs.addnew  
   rs("WS_PTID")=PTID
   rs("WS_ProductSaleMan")=SaleMan
   if isdate(SaleDate) then   rs("WS_ProductSaleDate")=SaleDate
   rs("WS_ProductSaleDescribe")=SaleDescribe
   rs("WS_ProductSaleCreateMan")=loginuid
   rs("WS_ProductSaleDetailDate")=DetailDate
   rs("WS_ProductSaleDetailContent")=DetailContent
   if WS_s.HX_ISnum(SaleCnt) then rs("WS_ProductSaleCnt")=SaleCnt
 rs.update
  if WS_s.HX_ISnum(SaleDetailFlag) and SaleDetailFlag=1 then 
   set prs=WS_S.HX_SetRSD("","HX_Product"," where WS_PTID="&PTID)
   if prs.recordcount>0 then
     if prs("WS_ProductStocks")>=cint(SaleCnt) then
	   prs("WS_ProductStocks")=prs("WS_ProductStocks")-SaleCnt
	   prs.update
	 else
	   HX_GoBack "库存量不足!",""
	 end if  
   end if
 end if

 response.write "<script>if(confirm('添加成功!是否继续添加?')) {location.href='ProductSaleRecordCreate.asp';}else {location.href='ProductSaleRecord.asp';}</script>"
 response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>销售记录管理</title>
<link rel=stylesheet type=text/css href="../HXinclude/HX_Style.css">
<script src="../HXinclude/HX_Function.js"></script>
</head>
<body topmargin="50" leftmargin="0" bottommargin="0">
<table width="596"  border="0" cellspacing="1" cellpadding="0" align=center bgcolor="#613c25">
  <tr>
    <td colspan="2" bgcolor=FFFBE8><table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" background="../hximages/titleline.gif"><font class="fontmenu">添加销售记录</font>      <a href="ProductSaleRecord.asp" class="menu">销售记录管理(销售记录总数 <%=rs.recordcount%> )</a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="1" cellpadding="3" bgcolor=FFFBE8>
  <form name="form1" method="post" action="?action=saveinfo"><tr bgcolor="#FFFBE8">
    <td width="23%" align="right">产品名称:</td>
    <td width="77%"><select name="PTID" id="PTID">
	<%
     Orderby=" where WS_ProductCreateMan="&loginuid&" order by WS_PTID desc"
	set urs=WS_S.HX_SetRSD(ColumnName,Tablename1,Orderby)
	if urs.recordcount>0 then
	  do until urs.eof
	%>
      <option value="<%=urs("WS_PTID")%>"><%=urs("WS_ProductName")%></option><%
	   urs.movenext
	   loop
	  end if
	WS_S.HX_RSClose urs  
	  %>
    </select>      </td>
  </tr>
  <tr bgcolor="#FFFBE8">
    <td align="right">出售日期:</td>
    <td>      <input name="SaleDate" type="text" value="<%=date%>" size="28" readonly>
      <input name="button" type="button" title="选择开始时间" onClick="popUpcalendar(this, form1.SaleDate, 'yyyy-mm-dd')" value="选择"></td>
  </tr>
    <tr bgcolor="#FFFBE8">
    <td align="right">是否清单:</td>
      <td><input type="radio" name="SaleDetailFlag" value="1" "DetailFlag" style="border:0 "><label for="DetailFlag" style="cursor:hand; ">是</label>
	  <input type="radio" name="SaleDetailFlag" value="0" <%response.Write "checked"%> id="DetailFlag1" style="border:0 "><label for="DetailFlag1" style="cursor:hand; ">否</label></td>
    </tr>
    <tr bgcolor="#FFFBE8">
      <td align="right">清单意见:</td>
      <td><input type="text" size="36" name="DetailContent"></td>
    </tr>
    <tr bgcolor="#FFFBE8">
    <td align="right">购 买 人:</td>
    <td><select name="SaleMan"><%
	ColumnName="":Tablename="HX_CustomInfo":Tablename1="HX_CustomContact":Orderby=""
    set crs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
	if crs.recordcount>0 then
	  do until crs.eof
	   if crs("WS_CIID")=0 then
	     sql=" where WS_CIID=0"
	   else
	     sql=" where WS_CIID="&crs("WS_CIID")
	   end if
	     set cors=WS_S.HX_SetRSD(ColumnName,Tablename1,sql)
		  if cors.recordcount>0 then
		    do until cors.eof
             response.Write "<option value="&cors("WS_CCID")&">["&crs("WS_CustomInfoName")&"]"&cors("WS_CustomContactName")&"</option>"
		    cors.movenext
			loop
		end if
	  crs.movenext
	  loop
	end if	
		%>
      </select></td>
  </tr>
  <tr bgcolor="#FFFBE8">
    <td align="right">购买数量:</td>
    <td><input type="text" size="36" name="SaleCnt"></td>
  </tr>
  <tr bgcolor="#FFFBE8">
    <td align="right">备  注:</td>
    <td><input type="text" size="36" name="SaleDescribe"></td>
  </tr>
  <tr bgcolor="#FFFBE8">
    <td align="right" valign=top>&nbsp;</td>
    <td><input type="submit" name="Submit" value=" 创 建 ">
      <input type="reset" name="Submit2" value=" 重 置 "></td>
  </tr></form>
</table></td>
  </tr>
</table>
<%WS_S.HX_RSClose rs%>

⌨️ 快捷键说明

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