123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- {Template header}
- <body>
- <div class="warp">
- <div class="fixed">
- <ul class="search">
- <li>
- 店铺名称:<select name="shop" class="select">
- <option value="">请选择</option>
- {loop usershop() as $val}
- <option value="{$val['id']}">{$val['shopname']}</option>
- {/loop}</select>
- <li>
- <li>
- 订单类型:<select name="source" class="select" style="width:90px">
- <option value="2d">店内订单</option>
- <option value="1">线下订单</option>
- <option value="">查看全部</option>
- </select>
- </li>
- <li>
- 发送状态:<select name="dlzemail" class="select">
- <option value="">请选择</option>
- <option value="1">发送成功</option>
- <option value="2">发送失败</option>
- <option value="0">未发送</option>
- </select>
- <li>
- <li>
- 订单状态:<select name="state" class="select">
- <option value="">请选择</option>
- {loop typeclass(29) as $val}
- <option value="{$val['id']}">{$val['title']}</option>
- {/loop}</select>
- <li>
- <li>
- 快递方式:<select name="express" class="select">
- <option value="">请选择</option>
- {loop express(100) as $val}
- <option value="{$val['id']}">{$val['servicename']}</option>
- {/loop}</select>
- <li>
- <li>订单号:<input value="" name="orderinfo" type="text" ><li>
- <li>编号:<input value="" name="number" type="text" ><li>
- <li>运单号:<input value="" name="waybill" type="text" ><li>
- <li>
- 选择时间条件:<select name="xztime" class="select">
- <option value="librarytime">出库时间</option>
- <option value="dtime">订单时间</option>
- <option value="dlzemailtime">发送时间</option>
- </select>
- <li>
- <li><input id="timetk" value="{date('Y-m-d',time()-30*24*3600)} 0:00" name="timetk" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
- 至 <input id="timetj" value="{date('Y-m-d',time()+24*3600)} 0:00" name="timetj" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"><li>
- <li><span>确 定</span><li>
- </ul>
- <div class="control">
- <a href="javascript:void(0);" class="fswaybillemail">发送邮件</a>
- </div>
- <table class="datatitle data" border="0" style="border-collapse:collapse;">
- <tr>
- <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
- <td>店铺名称</td>
- <td>订单号</td>
- <td>编号</td>
- <td>收件人国家</td>
- <td>出库状态</td>
- <td>发货时间</td>
- <td>快递公司</td>
- <td>运单号</td>
- <td>发送状态</td>
- <td>发送时间</td>
- </tr>
- </table>
- </div>
- <table class="datatext data" border="0" style="border-collapse:collapse;">
- </table>
- <div class="bomf"></div>
- </div>
- <script>
- var dataurl = "/fullorder/waybillemail";var fdataurl = "/fullorder/";
- var editurl = "/fullorder/readonly/";
- var editdj = 2;
- var customon = 1;
- function custom(){
- $(".data tr").each(function() {
- $(this).find('td:eq(10)').css("width","15%");
- });}
- $(".fswaybillemail").click(function() {
- var a = "";
- $(".datatext input[name='check']:checked").each(function() {
- a = a + $(this).val()+",";
- });
- if (a) {
- var notice = $("select[name=notice]").find("option:selected").val();
- var noticeid = $("select[name=noticeid]").find("option:selected").val();
- if(notice == 2 && noticeid == '')
- {
- $(".ts p").html("请选择需要发送的模板!");
- $(".ts").show();
- setTimeout('$(".ts").fadeOut()', 1000);
- return false;
- }
- layx.confirm('提示','是否确定发送?',null,{
- buttons:[
- {
- label:'确定',
- callback:function(id, button, event){
- fswaybillemailgo();
- layx.destroy(id);
- }
- },
- {
- label:'取消',
- callback:function(id, button, event){
- layx.destroy(id);
- }
- }
- ]
- });
- }
- else
- {
- $(".ts p").html("请勾选需要发送的订单!");
- $(".ts").show();
- setTimeout('$(".ts").fadeOut()', 1000);
- }
- });
- function fswaybillemailgo() {
- $(".express").hide();
- layx.load('loadId','正在发送中,请稍后',{shadable:0.6});
- var a = "";
- $(".datatext input[name='check']:checked").each(function() {
- a = a + $(this).val()+",";
- });
- if(!a)
- {
- $(".ts p").html("请勾选需要发送的订单!");
- $(".ts").show();
- setTimeout('$(".ts").fadeOut()', 1000);
- }
- $.ajax({
- url: "/api/fswaybillemail/",
- data: "s=" + a,
- type: "POST",
- dataType: "json",
- success: function(c) {
- layx.destroy('loadId');
- if (c && c.success) {
- $(".ts p").html(c.msg+'点击关闭');
- $(".ts").fadeIn();
- setTimeout('$(".search span").click();', 900);
- return false;
- } else {
- layx.destroy('loadId');
- $(".ts p").html(c.msg);
- $(".ts").fadeIn();
- setTimeout('$(".ts").fadeOut()', 900);
- return false;
- }
- }
- });
- };
- var editt = "订单详情";
- $("select[name=notice]").change(function(){
- var noticetj = $(this).find("option:selected").val();
- if(noticetj == '2')
- {
- $("select[name=noticeid]").show();
- }
- else
- {
- $("select[name=noticeid]").hide();
- }
- });
- $(".statedc").click(function() {
- var f = "";
- $(".select").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
- });
- $("input:text").each(function() {
- var thisval = $(this).val().replace(/#/g,escape('#'));
- f = f + $(this).attr("name") + "=" + thisval + "&";
- });
- $("input:hidden").each(function() {
- f = f + $(this).attr("name") + "=" + $(this).val() + "&";
- });
- var a = "";
- $(".datatext input[name='check']:checked").each(function() {
- a = a + $(this).val()+",";
- });
- f = f + "excel=1&a="+a;
- window.location.href = fdataurl+"statedc?fexcel="+$("select[name=fexcel]").find("option:selected").val()+"&"+f;
- });
- </script>
- <script type="text/javascript" src="{$theme}js/time.js"></script>
- <script type="text/javascript" src="{$theme}js/laydate.js"></script>
- {Template footer}
|