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

📄 dx_defective_refund.asp

📁 功能介绍: 1、产品入库
💻 ASP
字号:
<!--#include file="inc/config.asp"-->
<!--#include file="inc/Dx_admin_check.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%=WebName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Css/style.css" rel="stylesheet" type="text/css">
<style>
body {
	background-color:#FFFFFF;
}
</style>
<script language="javascript">
function collapse(img, objName)
{
	var obj;
	obj = document.getElementById(objName);
	if (img.src.indexOf('open') != -1)
	{
		img.src = img.src.replace('open', 'close');
		obj.style.display = 'none';
	}
	else
	{
		img.src = img.src.replace('close', 'open');
		obj.style.display = '';
	}
}
</script>

<script language=javascript>
function preview() { 
	bdhtml=window.document.body.innerHTML; 
	sprnstr="<!--startprint-->"; 
	eprnstr="<!--endprint-->"; 
	prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); 
	prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); 
	window.document.body.innerHTML=prnhtml; 
	window.print(); 
	window.document.body.innerHTML=bdhtml; 
}
</script>
</HEAD>

<BODY>
<%
if session("Dx_Admin")="" then
%>
<br><center><img src="Images/note.gif" align="absmiddle">&nbsp;<font color="#FF0000">你不具备此权限,请与管理员联系!</font></center>
<%  
  response.end
end if
%>
<script>
function CheckAll(form)  {
  for (var i=0;i<form.elements.length;i++)    {
    var e = form.elements[i];
    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
   }
  }
</script>


<table width="100%" border="0" cellpadding="0" cellspacing="2" align="center">
<form name="form2">
  <tr> 
    <td width="5%" height="21">&nbsp;<img src="Images/print.jpg" align="absmiddle" style="cursor:hand;" onClick="preview();window.close()"></td>
	<td width="95%" align="right">
	  开始日期:
      <input name="startdate" value="<%=DateStart%>" style="width:100px">
	  <img src="Images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=startdate&oldDate='+startdate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=590');">
	  结束日期:
      <input name="enddate" value="<%=DateEnd%>" style="width:100px">
<img src="Images/date.gif" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:window.open('day.asp?form=form2&field=enddate&oldDate='+enddate.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=170,top=150,left=740');">
	  <select name="refun">
	
        <option value="">所有记录</option>

	    <option value="0">次品退换</option>	
		
		<option value="0">退款处理</option>


      </select>	  
	  <input type="text" name="keyword" size="20" value="">
	
	  <input type="submit" value=" 查询 " class="button">&nbsp;
	</td>
  </tr>
</form>  
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED">
	<tr>
		<td><img src="Images/r_1.gif" alt="" /></td>
		<td width="100%" background="Images/r_0.gif">
 			<table cellpadding="0" cellspacing="0" width="100%">
    			<tr>
      				<td>&nbsp;次品处理查询</td>
	  				<td align="right">&nbsp;</td>
    			</tr>
  			</table>
		</td>
		<td><img src="Images/r_2.gif" alt="" /></td>
	</tr>
	<tr>
		<td></td>
		<td>
<!--startprint-->
			<table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1">
			<form name="form1" action=""> 
			<tr align="center">
				<td class="category" width="10">&nbsp;</td>
				<td class="category" height="30"><a href="#" class="title">次品编号<img src="Images/up2.gif" border="0" hspace="2" align="absmiddle"><img src="Images/down2.gif" border="0" hspace="2" align="absmiddle"></a></td>
				<td class="category">次品名称</td>
				<td class="category">处理方式</td>
				<td class="category">处理人</td>
				<td class="category">处理时间</td>
			</tr>
<%
  sql="select*from dx_defective order by dx_defective_id desc"
  rs.open sql,conn,1,1
   if err.number<>0 then 
response.write "数据库中无数据" 
end if 
'------------------------------------------分页开始 
if rs.recordcount=0 then    
%>
			<tr align="center" onMouseOver="this.className='highlight'" onMouseOut="this.className=''">
    			<td colspan="12" height="25" align="center" style="color:red"><b>没有找到记录</b></td>
  			</tr>
<%
else 
rs.PageSize =10 '每页记录条数 
iCount=rs.RecordCount '记录总数 
iPageSize=rs.PageSize 
maxpage=rs.PageCount  
page=request("page") 
    if Not IsNumeric(page) or page="" then 
        page=1 
    else 
        page=cint(page) 
    end if 
    if page<1 then 
        page=1 
    elseif  page>maxpage then 
        page=maxpage 
    end if 
    rs.AbsolutePage=Page 
 if page=maxpage then 
  x=iCount-(maxpage-1)*iPageSize 
 else 
  x=iPageSize 
 end if 
For i=1 To x
%>
  			<tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''" >
    			<td align="center"><img src="Images/folder_close.gif" style="cursor:hand" onClick="collapse(this, 'buy<%=rs("dx_defective_id")%>')" /></td>
				<td align="center" height="25"><%=rs("dx_defective_product")%></td>
	<% 
	  set rs1=server.CreateObject("adodb.recordset")
	    sqlstr="select*from dx_product where  dx_product_id="&rs("dx_defective_product")&""
		rs1.open sqlstr,conn,1,1
	%>
				<td align="center"><%=rs1("dx_product_model")%></td>
	<%=rs1.close%>
				<td align="center"><%if rs("dx_defective_type")=1 then%>次品换新<%else%>退款<%end if%></td>
				<td align="center"><%=rs("dx_defective_user")%></td>	
				<td align="center"><%=rs("dx_defective_time")%></td>
			</tr>
<%if rs("dx_defective_type")=1 then%>
  			<tr id="buy<%=rs("dx_defective_id")%>" style="display:none;">
    			<td colspan="12" class="category">
	<table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
		<tr align="center">
		  <td >换货商品1名称</td>
		  <td >换货商品1数量</td>		  
		  <td>换货商品2名称</td>
		  <td>换货商品2数量</td>
		  <td>处理时间</td>
		</tr>
		<tr>
		<% 
	  set rs2=server.CreateObject("adodb.recordset")
	    sqlstr="select*from dx_product where  dx_product_id="&rs("dx_defective_toproduce1")&""
		rs2.open sqlstr,conn,1,1
	%>
		  <td align="center"><%=rs2("dx_product_model")%></td>
		 <%rs2.close%>
		  <td align="center"><%=rs("dx_defective_tocount1")%></td>
		  <% 
		  if rs("dx_defective_toproduce2")<>0 then
	  set rs3=server.CreateObject("adodb.recordset")
	    sqlstr1="select*from dx_product where  dx_product_id="&rs("dx_defective_toproduce2")&""
		rs3.open sqlstr1,conn,1,1
	%>
		  <td align="center"><%=rs3("dx_product_model")%></td>	
		  <td align="center"><%=rs("dx_defective_tocount2")%></td>
		  <td align="center"><%=rs("dx_defective_time")%></td>		  
		  <%rs3.close 
		  else
		  %>
		   <td align="center"><%=rs("dx_defective_toproduce2")%></td>		  
		  <td align="center"><%=rs("dx_defective_tocount2")%></td>
		  <td align="center"><%=rs("dx_defective_time")%></td>	
		  <%end if%>  
		</tr>
	</table>
		<% else %>
 <tr id="buy<%=rs("dx_defective_id")%>" style="display:none;">
    <td colspan="12" class="category">
	  <table align="center" cellpadding="4" cellspacing="1" class="grid" border="1" width="100%">
		<tr align="center">
		  <td width="70">退货数量</td>
		  <td height="30">退款金额</td>
		  <td>退款时间</td>
		  <td>处理人</td>
		  <td>&nbsp;</td>
		  </tr>		  
	    <tr>
		  <td align="center"><%=rs("dx_defective_count")%></td>
		  <td align="center">¥:<%=rs("dx_defective_out")%></td>
		  <td align="center"><%=rs("dx_defective_time")%></td>
		  <td align="center"><%=rs("dx_defective_user")%></td>
		  <td align="center">&nbsp;</td>
		  </tr>
	  </table>

  <%end if%>
 	</td>
  </tr>	
<%rs.movenext 
  next 
  end if 
  rs.close 
  set rs=nothing 
Sub PageControl(iCount,pagecount,page,table_style,font_style) 
    '生成上一页下一页链接 
    Dim query, a, x, temp 
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME") 
    query = Split(Request.ServerVariables("QUERY_STRING"), "&") 
    For Each x In query 
        a = Split(x, "=") 
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then 
            temp = temp & a(0) & "=" & a(1) & "&" 
        End If 
    Next 
    Response.Write("<table  border=0 cellpadding=0 cellspacing=0 align=right>" & vbCrLf )         
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf ) 
    Response.Write("<TD align=center height=35>" & vbCrLf ) 
    Response.Write(font_style & vbCrLf )     
    if page<=1 then 
        Response.Write ("首 页 " & vbCrLf)         
        Response.Write ("上一页 " & vbCrLf) 
    else         
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1><SPAN CLASS=STYLE3 >首 页</SPAN></A> " & vbCrLf) 
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一页</A> " & vbCrLf) 
    end if 
    if page>=pagecount then 
        Response.Write ("下一页 " & vbCrLf) 
        Response.Write ("尾 页 " & vbCrLf)             
    else 
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一页</A> " & vbCrLf) 
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 页</A> " & vbCrLf)             
    end if 
    Response.Write(" 页次:" & page & "/" & pageCount & "页" &  vbCrLf) 
    Response.Write(" 共有" & iCount & "个记录" &  vbCrLf) 
    Response.Write(" 转到" & "<INPUT  TYEP=TEXT NAME=page SIZE=2 Maxlength=5 CLASS=tx VALUE=" & page & ">" & "页"  & vbCrLf & "<INPUT type=submit value=GO CLASS=tx>") 
    Response.Write("</TD>" & vbCrLf )                 
    Response.Write("</TR></form>" & vbCrLf )         
    Response.Write("</table>" & vbCrLf )         
End Sub 
%>
  <tr>
    <td colspan="12" height="30" class="category">
	<table cellpadding=0 cellspacing=0 width="100%">
		<tr>
			<td width="20%" align="left" style="color:#FF0000;">&nbsp;双击查看打印单</td>  
			<td width="80%" align="right"><%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=left>") 
%></td>
  		</tr>
	</table>
	</td>
  </tr>
</form>   
</table>
<!--endprint-->
		</td>
		<td></td>
	</tr>
	<tr>
		<td><img src="Images/r_4.gif" alt="" /></td>
    	<td></td>
    	<td><img src="Images/r_3.gif" alt="" /></td>
	</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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