fullorderout.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <ul class="searchtop" style="text-align: center;padding: 10px 0 20px 0;border-bottom: 1px solid #ccc;">
  6. <li><input value="" name="hq" id="outsku" placeholder="点此处输入或扫码" type="text" style="width: 500px;text-align: center;"></li></ul>
  7. <ul class="search">
  8. <li>
  9. 店铺:<select name="shop" class="select">
  10. <option value="">请选择</option>
  11. {loop usershop() as $val}
  12. <option value="{$val['id']}">{$val['shopname']}</option>
  13. {/loop}</select>
  14. </li>
  15. <li>
  16. 快递:<select name="express" class="select">
  17. <option value="">请选择</option>
  18. {loop express(100) as $val}
  19. <option value="{$val['id']}">{$val['servicename']}</option>
  20. {/loop}</select>
  21. </li>
  22. <li>订单号:<input value="" name="orderinfo" type="text" ></li>
  23. <li>编号:<input value="" name="number" type="text" ></li>
  24. <li>运单号:<input value="" name="waybill" type="text" ></li>
  25. <li>客户名:<input value="" name="name" type="text" ></li>
  26. <li><input id="timetk" value="{date('Y-m-d',time()-30*24*3600)} 0:00" name="timetkk" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
  27. 至&nbsp;&nbsp;&nbsp;&nbsp; <input id="timetj" value="{date('Y-m-d',time()+24*3600)} 0:00" name="timetjj" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"></li>
  28. <input value="{$url}" name="cz" type="hidden">
  29. <li><span>确 定</span></li>
  30. <!-- <li><a href="javascript:void(0);" class="whlabelczdc">导出统计</a></li> -->
  31. </ul>
  32. <table class="datatitle data" border="0" style="border-collapse:collapse;">
  33. <tr>
  34. <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
  35. <td>店铺</td>
  36. <td>名称</td>
  37. <td>编号</td>
  38. <td>订单号</td>
  39. <td>快递</td>
  40. <td>运单号</td>
  41. <td>扫描时间</td>
  42. </tr>
  43. </table>
  44. </div>
  45. <table class="datatext data" border="0" style="border-collapse:collapse;">
  46. </table>
  47. <div class="bomf"></div>
  48. </div>
  49. <audio id="music_d">
  50. <source src="/data/print/d.mp3" type="audio/mpeg">
  51. </audio>
  52. <audio id="music_c">
  53. <source src="/data/print/c.mp3" type="audio/mpeg">
  54. </audio>
  55. <script>
  56. $(document).ready(function() {
  57. $("#outsku").focus();
  58. });
  59. var dataurl = "/fullorderout";
  60. var editurl = "/fullorderout/edit/";
  61. var editdj = 3;
  62. var editt = "退单管理 - 修改";
  63. var customon = 1;
  64. function custom(){
  65. $(".data tr").each(function() {
  66. });}
  67. $(".whlabelczdc").click(function() {
  68. var f = "";
  69. $(".select").each(function() {
  70. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  71. });
  72. $("input:text").each(function() {
  73. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  74. });
  75. $("input:hidden").each(function() {
  76. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  77. });
  78. layx.load('loadId','数据准备中,请稍后',{shadable:0.6});
  79. $.ajax({
  80. url: "/whlabel/whlabelczdc",
  81. data: "excel="+$(this).data("id")+"&"+f,
  82. type: "get",
  83. success: function(exl) {
  84. layx.destroy('loadId');
  85. if(exl)
  86. {
  87. var ff = new Blob([data], {type: 'application/octet-stream'});
  88. console.log(ff);
  89.   var data = exl;
  90. var blob = new Blob([data], {type: 'application/octet-stream'});
  91. var url = URL.createObjectURL(blob);
  92. var exportLink = document.createElement('a');
  93. exportLink.setAttribute("download",fileName);
  94. exportLink.href = url;
  95. document.body.appendChild(exportLink);
  96. exportLink.click();
  97. }
  98. else
  99. {
  100. $(".ts p").html("下载失败,请稍后再试");
  101. $(".ts").fadeIn();
  102. setTimeout('$(".ts").fadeOut()', 1100);
  103. }
  104. }
  105. });
  106. /**
  107. window.location.href = "/whlabel/whlabelczdc?excel="+$(this).data("id")+"&"+f;
  108. **/
  109. })
  110. $(document).keyup(function(event){
  111. if(event.keyCode ==13 && $("input[name=hq]").val()!=""){
  112. $("#orderinfo").blur();
  113. $(".express p:eq(0)").html("<i class='fa fa-2x fa-cog fa-spin'></i> &nbsp; 处理中,请稍后...");
  114. $(".express p:eq(1)").html("");
  115. $(".express").show();
  116. $.ajax({
  117. url: dataurl,
  118. data: "hq="+$("input[name=hq]").val(),
  119. type: "POST",
  120. dataType: "json",
  121. success: function(a) {
  122. $(".express").hide();
  123. if (a && a.success) {
  124. $("#music_d")[0].play();
  125. $("#outsku").val("");
  126. $("#orderinfo").val("");
  127. //$(".search span").click();
  128. //$("#orderinfo").focus();
  129. window.location.reload()
  130. } else {
  131. $("#music_c")[0].play();
  132. $(".express p:eq(0)").html(a.msg);
  133. $(".express p:eq(1)").html("<font class='wcsj'>确 定</font>");
  134. $(".express").show();
  135. $("#orderinfo").focus();
  136. }
  137. }
  138. });
  139. }
  140. });
  141. /* 清空并聚焦出库input */
  142. $(".express").on('click',".wcsj",function() {
  143. $("#outsku").val("");
  144. $("#outsku").focus();
  145. $(".express").hide();
  146. });
  147. $(".crk font").click(function() {
  148. window.location.href = $(this).data("cz");
  149. });
  150. ;</script>
  151. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  152. {Template footer}