chosenproduct.asp

来自「功能介绍: 1、产品入库」· ASP 代码 · 共 106 行

ASP
106
字号
<!--#include file="Inc/Config.asp"-->
<!--#include file="inc/Dx_admin_check.asp"-->
<%
getType=request.QueryString("type")
select case getType
   case "1"
     depot=request.QueryString("depot")
	 if depot=0 then
     sql="select distinct dx_class_name,dx_class_id from [ProductList]"
	 else 
     sql="select distinct dx_class_name,dx_class_id from [ProductList] where dx_depot_id="&depot
	 end if
	 rs.open sql,conn,1,1
	 if rs.eof then
	 response.Write("无内容$-1")
	 else
	 response.Write("请选择$-1")
	 while not rs.eof
	 response.Write("&"&rs(0)&"$"&rs(1))
	 rs.movenext
	 wend
	 end if
	 rs.close
   case "2"
     depot=request.QueryString("depot")
     clas=request.QueryString("class")
	 if depot=0 then
       sql="select distinct dx_brand_name,dx_brand_id from [ProductList] where dx_class_id="&clas
	 else
       sql="select distinct dx_brand_name,dx_brand_id from [ProductList] where dx_depot_id="&depot&" and dx_class_id="&clas
	 end if
	 rs.open sql,conn,1,1
	 if rs.eof then
	 response.Write("无内容$-1")
	 else
	 response.Write("请选择$-1")
	 while not rs.eof
	 response.Write("&"&rs(0)&"$"&rs(1))
	 rs.movenext
	 wend
	 end if
	 rs.close
   case "3"
     depot=request.QueryString("depot")
     clas=request.QueryString("class")
     brand=request.QueryString("brand")
	 if depot=0 then
	   if clas=0 then
       sql="select distinct dx_product_parameter,dx_product_id from [ProductList] where dx_brand_id="&brand
	   else
       sql="select distinct dx_product_parameter,dx_product_id from [ProductList] where dx_brand_id="&brand&" and dx_class_id="&clas
	   end if
	 else
	   if clas=0 then
       sql="select distinct dx_product_parameter,dx_product_id from [ProductList] where dx_brand_id="&brand&" and dx_depot_id="&depot
	   else
       sql="select distinct dx_product_parameter,dx_product_id from [ProductList] where dx_brand_id="&brand&" and dx_depot_id="&depot&" and dx_class_id="&clas
	   end if
	 end if
	 rs.open sql,conn,1,1
	 if rs.eof then
	 response.Write("无内容$-1")
	 else
	 response.Write("请选择$-1")
	 while not rs.eof
	 response.Write("&"&rs(0)&"$"&rs(1))
	 rs.movenext
	 wend
	 end if
	 rs.close
   case "4"
     product=request.QueryString("product")
	 if cint(product)=-1 then
	 response.Write("无商品$-1")
	 else
	 sql="select * from [dx_ToDepot] where dx_ToDepot_product="&product
	 rs.open sql,conn,1,1
	 if rs.eof then
	 response.Write("无商品$-1")
	 else
	     sqlt="select sum(dx_ToDepot_now_count) as productCount from [dx_ToDepot] where dx_ToDepot_product="&product
	     rst.open sqlt,conn,1,1
	     if rst("productCount")=0 then
	     response.Write("无商品$-1")
	     else
	     response.Write("请选择$-1")
	     for i=1 to rst("productCount")
	     response.Write("&"&i&"$"&i)
	     next
	     end if
	     rst.close
	 end if
	 rs.close
	 end if
   case "price"
     product=request.QueryString("product")
	 sqlt="select dx_ToDepot_sell_price from [dx_ToDepot] where dx_ToDepot_product="&product&" and dx_ToDepot_now_count>0"
	 rst.open sqlt,conn,1,1
	 if not rst.eof then
	 response.Write(rst("dx_ToDepot_sell_price"))
	 else
	 response.Write(0)
	 end if
	 rst.close
end select
%>

⌨️ 快捷键说明

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