天天酷跑黄金奖池更新第四期:新聞資訊

點擊排行

您現在的位置:首頁 > 新聞資訊 > 二次開發

【解決方案】安信多用戶商城按日期導出訂單的實現代碼

來源:安信科技    瀏覽: 次    日期:2015年11月26日

天天酷跑刷英雄传 www.gclqm.icu 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"未作任何處理"
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>
 

 

親,試試微信掃碼分享本頁! *^_^*

精彩推薦