fullorder_waybillemail.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <ul class="search">
  6. <li>
  7. 店铺名称:<select name="shop" class="select">
  8. <option value="">请选择</option>
  9. {loop usershop() as $val}
  10. <option value="{$val['id']}">{$val['shopname']}</option>
  11. {/loop}</select>
  12. <li>
  13. <li>
  14. 订单类型:<select name="source" class="select" style="width:90px">
  15. <option value="2d">店内订单</option>
  16. <option value="1">线下订单</option>
  17. <option value="">查看全部</option>
  18. </select>
  19. </li>
  20. <li>
  21. 发送状态:<select name="dlzemail" class="select">
  22. <option value="">请选择</option>
  23. <option value="1">发送成功</option>
  24. <option value="2">发送失败</option>
  25. <option value="0">未发送</option>
  26. </select>
  27. <li>
  28. <li>
  29. 订单状态:<select name="state" class="select">
  30. <option value="">请选择</option>
  31. {loop typeclass(29) as $val}
  32. <option value="{$val['id']}">{$val['title']}</option>
  33. {/loop}</select>
  34. <li>
  35. <li>
  36. 快递方式:<select name="express" class="select">
  37. <option value="">请选择</option>
  38. {loop express(100) as $val}
  39. <option value="{$val['id']}">{$val['servicename']}</option>
  40. {/loop}</select>
  41. <li>
  42. <li>订单号:<input value="" name="orderinfo" type="text" ><li>
  43. <li>编号:<input value="" name="number" type="text" ><li>
  44. <li>运单号:<input value="" name="waybill" type="text" ><li>
  45. <li>
  46. 选择时间条件:<select name="xztime" class="select">
  47. <option value="librarytime">出库时间</option>
  48. <option value="dtime">订单时间</option>
  49. <option value="dlzemailtime">发送时间</option>
  50. </select>
  51. <li>
  52. <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'})">
  53. 至&nbsp;&nbsp;&nbsp;&nbsp; <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>
  54. <li><span>确 定</span><li>
  55. </ul>
  56. <div class="control">
  57. <a href="javascript:void(0);" class="fswaybillemail">发送邮件</a>
  58. </div>
  59. <table class="datatitle data" border="0" style="border-collapse:collapse;">
  60. <tr>
  61. <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
  62. <td>店铺名称</td>
  63. <td>订单号</td>
  64. <td>编号</td>
  65. <td>收件人国家</td>
  66. <td>出库状态</td>
  67. <td>发货时间</td>
  68. <td>快递公司</td>
  69. <td>运单号</td>
  70. <td>发送状态</td>
  71. <td>发送时间</td>
  72. </tr>
  73. </table>
  74. </div>
  75. <table class="datatext data" border="0" style="border-collapse:collapse;">
  76. </table>
  77. <div class="bomf"></div>
  78. </div>
  79. <script>
  80. var dataurl = "/fullorder/waybillemail";var fdataurl = "/fullorder/";
  81. var editurl = "/fullorder/readonly/";
  82. var editdj = 2;
  83. var customon = 1;
  84. function custom(){
  85. $(".data tr").each(function() {
  86. $(this).find('td:eq(10)').css("width","15%");
  87. });}
  88. $(".fswaybillemail").click(function() {
  89. var a = "";
  90. $(".datatext input[name='check']:checked").each(function() {
  91. a = a + $(this).val()+",";
  92. });
  93. if (a) {
  94. var notice = $("select[name=notice]").find("option:selected").val();
  95. var noticeid = $("select[name=noticeid]").find("option:selected").val();
  96. if(notice == 2 && noticeid == '')
  97. {
  98. $(".ts p").html("请选择需要发送的模板!");
  99. $(".ts").show();
  100. setTimeout('$(".ts").fadeOut()', 1000);
  101. return false;
  102. }
  103. layx.confirm('提示','是否确定发送?',null,{
  104. buttons:[
  105. {
  106. label:'确定',
  107. callback:function(id, button, event){
  108. fswaybillemailgo();
  109. layx.destroy(id);
  110. }
  111. },
  112. {
  113. label:'取消',
  114. callback:function(id, button, event){
  115. layx.destroy(id);
  116. }
  117. }
  118. ]
  119. });
  120. }
  121. else
  122. {
  123. $(".ts p").html("请勾选需要发送的订单!");
  124. $(".ts").show();
  125. setTimeout('$(".ts").fadeOut()', 1000);
  126. }
  127. });
  128. function fswaybillemailgo() {
  129. $(".express").hide();
  130. layx.load('loadId','正在发送中,请稍后',{shadable:0.6});
  131. var a = "";
  132. $(".datatext input[name='check']:checked").each(function() {
  133. a = a + $(this).val()+",";
  134. });
  135. if(!a)
  136. {
  137. $(".ts p").html("请勾选需要发送的订单!");
  138. $(".ts").show();
  139. setTimeout('$(".ts").fadeOut()', 1000);
  140. }
  141. $.ajax({
  142. url: "/api/fswaybillemail/",
  143. data: "s=" + a,
  144. type: "POST",
  145. dataType: "json",
  146. success: function(c) {
  147. layx.destroy('loadId');
  148. if (c && c.success) {
  149. $(".ts p").html(c.msg+'点击关闭');
  150. $(".ts").fadeIn();
  151. setTimeout('$(".search span").click();', 900);
  152. return false;
  153. } else {
  154. layx.destroy('loadId');
  155. $(".ts p").html(c.msg);
  156. $(".ts").fadeIn();
  157. setTimeout('$(".ts").fadeOut()', 900);
  158. return false;
  159. }
  160. }
  161. });
  162. };
  163. var editt = "订单详情";
  164. $("select[name=notice]").change(function(){
  165. var noticetj = $(this).find("option:selected").val();
  166. if(noticetj == '2')
  167. {
  168. $("select[name=noticeid]").show();
  169. }
  170. else
  171. {
  172. $("select[name=noticeid]").hide();
  173. }
  174. });
  175. $(".statedc").click(function() {
  176. var f = "";
  177. $(".select").each(function() {
  178. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  179. });
  180. $("input:text").each(function() {
  181. var thisval = $(this).val().replace(/#/g,escape('#'));
  182. f = f + $(this).attr("name") + "=" + thisval + "&";
  183. });
  184. $("input:hidden").each(function() {
  185. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  186. });
  187. var a = "";
  188. $(".datatext input[name='check']:checked").each(function() {
  189. a = a + $(this).val()+",";
  190. });
  191. f = f + "excel=1&a="+a;
  192. window.location.href = fdataurl+"statedc?fexcel="+$("select[name=fexcel]").find("option:selected").val()+"&"+f;
  193. });
  194. </script>
  195. <script type="text/javascript" src="{$theme}js/time.js"></script>
  196. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  197. {Template footer}