歡迎來(lái)到安信科技官方網(wǎng)站!【m.boomerlogic.com】
      18112005550
      工作時(shí)間: 8:30-21:30
      新聞中心
      News Center

      【解決方案】安信多用戶商城按日期導(dǎo)出訂單的實(shí)現(xiàn)代碼

      資訊分類(lèi): 二次開(kāi)發(fā)  瀏覽: 2015年11月26日

      1.表單提交文件的寫(xiě)法:anxinMall.ordertoExcel.asp

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

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      <title>訂單導(dǎo)入報(bào)表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>訂單導(dǎo)入報(bào)表Excel</legend>
      <br><br><br>
              <table width="400" border="0" align="center">
       <tr>
                  <td width="158" height="13" align="right">選擇導(dǎo)出日期:</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">請(qǐng)選擇日期</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="導(dǎo)出Excel">
                               </td>
                </tr>
              </table>
      <br><br><br>
            </fieldset></td>
          </tr>
        </table>
      </form>
      </body>
      </html>
       
      2.訂單下載頁(yè)的寫(xiě)法:訂單.asp
       
      <%
       
      function getDingdanZongerByid(dingdanhao)'根據(jù)訂單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>無(wú)標(biāo)題文檔</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">訂單號(hào)</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">訂單狀態(tài)</span></td><!-- zhuangtai -->
      </tr>
      <%
      dim riqi : riqi =request("riqi")
      if request("riqi")=0 then
      call anxinMall.alert("請(qǐng)選擇導(dǎo)出日期","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><!-- 訂單號(hào) -->
      <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"買(mǎi)家已經(jīng)付款"
      case 3:response.write"商家已確認(rèn)收款"
      case 4:response.write"商家已經(jīng)發(fā)貨"
      case 5:response.write"<font color=#008750>買(mǎi)家已收到貨</font>"
      end select%></span></td><!-- zhuangtai -->
      </tr>
      <%
      rs.movenext
      loop
      rs.close
      set rs=nothing
      conn.close
      set conn=nothing
      %>
      </table>
      </body>
      </html>
       

       

      Copyright © 2007-2022 安信科技(十五周年紀(jì)念版) All Rights Reserved  備案號(hào):蘇ICP備15047094號(hào)-3 
      網(wǎng)站首頁(yè) |  新聞資訊 |  服務(wù)項(xiàng)目 |  軟件產(chǎn)品 |  試用下載 |  需求提交 |  模版建站 |  關(guān)于安信 |  產(chǎn)品授權(quán) |  聯(lián)系我們 |  定制開(kāi)發(fā) | 
      服務(wù)熱線:181-1200-5550  客服QQ: 120094883  | 郵箱:120094883#qq.com(#改@)