陕西快乐十分前三直选最大遗漏数据|陕西快乐十分近期开奖|

新闻资讯

点击排行

您现在的位置:首页 > 新闻资讯 > 二次开发

【解决方案】安信多用户商城按日期导出订单的实现代码

来源:安信科技    浏览: 次    日期:2015年11月26日

1.表单提交文件的写法:anxinMall.ordertoExcel.asp

 <!--#include file="common.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>订单导入报表Excel</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
 
<body>
<form action="dingdanExcel.asp" method="get" name="form1" target="_blank">
<br>
  <table width="680" height="360" border="0" align="center">
    <tr>
      <td>
        <fieldset style="border : 1px solid #217fbb;">
        <legend>订单导入报表Excel</legend>
<br><br><br>
        <table width="400" border="0" align="center">
 <tr>
            <td width="158" height="13" align="right">选择导出日期:</td>
            <td width="232">
<select name="riqi" style="position:relative;left:0px;top:0px;font-size:14px;width:120px;line-height:14px;border:#ccc solid 1px;">
<base target=Right>
<option value="0">请选择日期</option>
<%
set rs=anxinMall.db("select distinct(format(addtime,'yyyy-mm-dd')) as temp from [anxinMall_dingdan] order by format(addtime,'yyyy-mm-dd') desc",3)
do while not rs.eof
response.write"<option value='"&rs("temp")&"'>"&rs("temp")&"</option>"
rs.movenext
loop
rs.close
set rs=nothing
%>
</select>
</td>
 </tr>
 
          <tr align="center">
            <td height="54" colspan="2"><input type="submit" name="Submit" value="导出Excel">
                         </td>
          </tr>
        </table>
<br><br><br>
      </fieldset></td>
    </tr>
  </table>
</form>
</body>
</html>
 
2.订单下载页的写法:订单.asp
 
<%
 
function getDingdanZongerByid(dingdanhao)'根据订单dingdanhao获得订单总额
getDingdanZongerByid = anxinMall.db("select sum(zonger) from [anxinMall_dingdan_prodlist] where dingdanhao='"&dingdanhao&"'",2)(0)
end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style></head>
 
<body>
<%response.ContentType="application/vnd.ms-excel"%>
<table width="" height="41" border="1" align="center">
<tr>
<td width="60" height="28" align="center"><span class="style4">日期</span></td><!-- addtime -->
<td width="150" height="28" align="center"><span class="style4">订单号</span></td><!-- dingdanhao -->
<td width="140" height="28" align="center"><span class="style4">订单金额</span></td><!-- getDingdanZongerByid(dingdanhao) -->
<td width="100" height="28" align="center"><span class="style4">订单状态</span></td><!-- zhuangtai -->
</tr>
<%
dim riqi : riqi =request("riqi")
if request("riqi")=0 then
call anxinMall.alert("请选择导出日期","back")
end if
set rs=anxinMall.db("select * from [anxinMall_dingdan] where addtime=#"&riqi&"#",3)
do while not rs.eof
%>
<tr>
<td height="28" align="center"><span class="style4"><%=rs("addtime")%></span></td><!-- userid -->
<td height="28" align="center"><span class="style4">'<%=rs("dingdanhao")%></span></td><!-- 订单号 -->
<td height="28" align="center"><span class="style4"><%=getDingdanZongerByid(rs("dingdanhao"))%></span></td><!-- 订单总额 -->
<td height="28" align="center"><span class="style4"><%select case rs("zhuangtai")
case 1:response.write"未作任?#26410;?#29702;"
case 2:response.write"买家已经付款"
case 3:response.write"商家已确认收款"
case 4:response.write"商家已经发货"
case 5:response.write"<font color=#008750>买家已收到货</font>"
end select%></span></td><!-- zhuangtai -->
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
</body>
</html>
 

 

亲,试试微信扫码分享本页! *^_^*

精彩推荐

陕西快乐十分前三直选最大遗漏数据
北京11选5今天开奖结果 江苏快三开奖结果 陕西十一选五软件 江苏十一选五时间 北京快中彩中奖规则 体彩快中彩 888棋牌下载地址 澳洲幸运10开奖软件app 分分彩坑人规律 3d杀组选复式投注技巧