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

📄 editstoragecheck.asp

📁 客户管理crm xitong ,希望能给你带来帮助
💻 ASP
字号:
<!--#include file="../function/connect.asp"-->
<!--#include file="../function/function.asp"-->
<%
	IID=request("IID")
	if request("submit")<>"" then
		Product_Category_ID=request("Product_Category_ID")
		Product_CategoryII_ID=request("Product_CategoryII_ID")
		product_cost=request("product_cost")
		product_num=request("product_num")
		product_num1=request("product_num1")
		product_desc=getString(request("product_desc"))
		Check_Flag=request("Check_Flag")
		if Check_Flag=0 then
			strproduct_num="-" & (cint(product_num1)-cint(product_num))
		else
			strproduct_num="+" & (cint(product_num1)-cint(product_num))
		end if
		strsql="update products set "
		strsql= strsql & "product_cost='" & product_cost & "',"
		strsql= strsql & "product_num=product_num" & strproduct_num & ","
		strsql= strsql & "product_desc=product_desc + ' " & product_desc & "' "
		strsql= strsql & " where product_id=" & IID
		'response.write strsql
		'response.end
		objConn.execute strsql
		strsql="update Storages_Check set "
		strsql=strsql & " Check_Flag='" & Check_Flag & "',"
		strsql=strsql & " Quantity='" & product_num & "',"
		strsql=strsql & " Cost_Price='" & product_cost & "',"
		strsql=strsql & " Amount='" & product_cost*product_num & "',"
		strsql=strsql & " [note]='" & product_desc & "' "
		strsql=strsql & " where Storage_Check_ID=" & IID
		'response.write strsql
		'response.end
		objConn.execute strsql
		response.redirect "StorageChecklist.asp"
	end if
	
	strsql="select p.*,s.*,c1.cat1_name,c2.cat2_name from products p,cat1 c1,cat2 c2,Storages_Check s where Product_Category_ID=cat1_id and Product_CategoryII_ID=cat2_id and p.Product_ID=s.Product_ID and Storage_Check_ID=" & IID
	Set objRs = Server.CreateObject("adodb.recordset")
	    objRs.Open strsql,objConn,1,1
	'response.write strsql
	if not objrs.eof then
		cat1_id=objrs.fields("product_cat1_id")
		cat2_id=objrs.fields("product_cat2_id")
		cat1_name=objrs.fields("cat1_name")
		cat2_name=objrs.fields("cat2_name")
		product_name=objrs.fields("product_name")
		product_code=objrs.fields("product_code")
		product_standard=objrs.fields("product_standard")
		product_unit=objrs.fields("product_unit")
		product_num=objrs.fields("product_num")
		Quantity=objrs.fields("Quantity")
		Check_Flag=objrs.fields("Check_Flag")
		Cost_Price=objrs.fields("Cost_Price")
		note=objrs.fields("note")
	end if
%>
<html>
<head>
<title>修改库存</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../cssD.css" rel=stylesheet>
<script>
	function check()
	{
		if(document.form1.product_num.value==""){
			alert("产品数量为空");
			document.form1.product_num.focus();
			return false;
		}
	}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="1" cellspacing="0" cellpadding="2"  bordercolorlight='#000000' bordercolordark='#FFFFFF'>
  <form name="form1" method="post" action="editStorageCheck.asp" onsubmit="return check();">
    <tr> 
      <td colspan="4" height="25" class="tablehead"> <div align="center">修改库存</div></td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">产品大类:</div></td>
      <td width="35%" height="22">
      <%=cat1_name%><input type="hidden" name="Product_Category_ID" value="<%=cat1_id%>"><input type="hidden" name="IID" value="<%=IID%>">
      </td>
      <td width="18%" height="22" nowrap><div align="right">产品小类:</div></td>
      <td width="30%" height="22">
      <%=cat2_name%><input type="hidden" name="Product_CategoryII_ID" value="<%=cat2_id%>">
	</td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">产品名:</div></td>
      <td height="22"> <div align="left">
         <%=product_name%>
	</div></td>
      <td width="18%" height="22" nowrap><div align="right">产品编码:</div></td>
      <td width="30%" height="22"><%=product_code%></td>
    </tr>
    <tr> 
      <td width="17%" height="22" nowrap><div align="right">盈亏标志:</div></td>
      <td height="22"> <div align="left">
         <select name="Check_Flag">
         	<%if Check_Flag=0 then%>
         	<option value="0" selected>盈余</option>
         	<option value="1">散失</option>
         	<%else%>
         	<option value="0">盈余</option>
         	<option value="1" selected>散失</option>
         	<%end if%>
         </select>
	</div></td>
      <td width="18%" height="22" nowrap><div align="right">成本价:</div></td>
      <td width="30%" height="22"><input name="product_cost" type="text" class="input" id="product_cost" size="20" maxlength="20" value="<%=Cost_Price%>"></td>
    </tr>
    <tr> 
      <td width="17%" height="22" align="right" nowrap> 数量:</td>
      <td height="22"><input name="product_num" type="text" class="input" id="product_num" size="10" maxlength="20" value="<%=Quantity%>">&nbsp;<%=product_unit%><input name="product_num1" type="hidden" class="input" id="product_num1" size="10" maxlength="20" value="<%=Quantity%>"></td>
      <td width="18%" height="22" nowrap><div align="right">库存:</div></td>
      <td width="30%" height="22"><%=product_num%>&nbsp;<%=product_unit%></td>
    </tr>
    <tr> 
      <td height="22" nowrap><div align="right">备注信息:</div></td>
      <td height="22" colspan="3"><textarea name="product_desc" cols="50" rows="5" class="input" id="product_desc"><%=note%></textarea></td>
    </tr>
    <tr> 
      <td colspan="4" height="22"> <div align="center"> 
          <input type="submit" name="submit" value="  提 交  " class="button">
          <input type="reset" value="  重 设  " class="button">
        </div></td>
    </tr>
  </form>
</table>
</body>
</html>
<script>
	function Openwin(str)
	{
		window.open(str,"","left=100,top=100,Width=500,Height=400,scrolling=yes");
	}
</script>

⌨️ 快捷键说明

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