whlabel_bh_operate.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <div class="numberprint">
  6. <ul class="searchtop" style="text-align: center;padding: 10px 0;">
  7. <li><select name="cz" class="select" style="font-size: 18px;">
  8. <option value="1">入库</option>
  9. <!--<option value="2">出库</option> -->
  10. </select></li>
  11. <li><input value="" name="transferout" id="transferout" placeholder="点此处扫码" type="text"></li>
  12. </ul>
  13. </div>
  14. <ul class="search">
  15. <li>
  16. 操作部门:<select name="transfer" class="select">
  17. {if $vip == 1}
  18. <option value="">查看所有</option>
  19. {/if}
  20. {loop $transfer as $val}
  21. <option value="{$val['id']}">{$val['title']}</option>
  22. {/loop}
  23. </select>
  24. </li>
  25. <li>颜色:<select name="color" class="select">
  26. <option value="">请选择</option>{loop typeclassyc(8) as $val}
  27. <option value="{$val['id']}">{$val['title']}</option>{/loop}</select>
  28. </li>
  29. <li>编号:<input value="" name="number" type="text"></li>
  30. <li>品名:<input value="" name="pm" type="text" style="width:200px"></li>
  31. <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'})">
  32. 至&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>
  33. <li><span>确 定</span></li>
  34. <li class="none">
  35. {if $vip == 1}
  36. <font class="cona obdel">删除</font>
  37. {/if}
  38. </li>
  39. <!--<li>
  40. <font class="cona dowot">下载Excel</font>
  41. </li>
  42. -->
  43. <li>
  44. <font class="cona xz">下载Excel</font>
  45. </li>
  46. <li style="padding-left:25px">
  47. <select name="printer" class="select">
  48. <option value="">选择打印机</option>
  49. </select>
  50. </li>
  51. <li><font class="bdbbprint" style="height: 30px;line-height: 30px;padding: 0 16px;color: #fff;background-color: #2084db;margin-left: 20px;border-radius: 5px;display: block;cursor: pointer;">补打布标</font></li>
  52. </ul>
  53. <table class="datatitle data" border="0" style="border-collapse:collapse;">
  54. <tr>
  55. <td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
  56. <td>编号</td>
  57. <td>品名</td>
  58. <td>备注</td>
  59. <td>数量</td>
  60. <td>打印时间</td>
  61. <td>操作时间</td>
  62. </tr>
  63. </table>
  64. </div>
  65. <table class="datatext data" border="0" style="border-collapse:collapse;">
  66. </table>
  67. <div class="bomf"></div>
  68. </div>
  69. <div class="print none"></div>
  70. <div class="ts"><p class="tsn"></p></div>
  71. <div class="systemwindow">
  72. <div>
  73. <p></p>
  74. <p><font class="button">确 定</font><font class="esc">取 消</font></p>
  75. </div>
  76. </div>
  77. <div class="boundtj">
  78. <div>
  79. <p></p>
  80. <p><font class="button">确 定</font><font class="esc">取 消</font></p>
  81. </div>
  82. </div>
  83. <div class="tyrows"><div><p></p><p></p></div></div>
  84. <audio id="music_d">
  85. <source src="{$theme}music/d.mp3" type="audio/mpeg">
  86. </audio>
  87. <audio id="music_c">
  88. <source src="{$theme}music/c.mp3" type="audio/mpeg">
  89. </audio>
  90. <audio id="music_print">
  91. <source src="{$theme}music/print.mp3" type="audio/mpeg">
  92. </audio>
  93. <audio id="music_print_error">
  94. <source src="{$theme}music/print_error.mp3" type="audio/mpeg">
  95. </audio>
  96. <audio id="music_print_ok">
  97. <source src="{$theme}music/print_ok.mp3" type="audio/mpeg">
  98. </audio>
  99. <script>
  100. var sysprint = 1;var transfer = 1;
  101. var dataurl = "/whlabel_bh/operate/";var fdataurl = "/whlabel_bh/operate/";
  102. var customon = 1;
  103. function custom(){
  104. $(".data tr").each(function() {
  105. $(this).find('td:eq(0)').css("width","1%");
  106. $(this).find('td:eq(1)').css("width","18%");
  107. $(this).find('td:eq(2)').css("width","25%");
  108. $(this).find('td:eq(3)').css("width","15%");
  109. $(this).find('td:eq(4)').css("width","8%");
  110. $(this).find('td:eq(5)').css("width","13%");
  111. $(this).find('td:eq(6)').css("width","19%");
  112. });}
  113. window.onload = function() {
  114. if(typeof $("select[name='printer']").length < 1) return;
  115. setTimeout(function(){ wprinter.printer()},1000);};
  116. $(document).ready(function() {
  117. $("#transferout").focus();
  118. });
  119. $(".xz").click(function() {
  120. var f = "";
  121. $(".select").each(function() {
  122. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  123. });
  124. $("input:text").each(function() {
  125. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  126. });
  127. $("input:hidden").each(function() {
  128. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  129. });
  130. window.location.href = "/whlabel_bh/excel/?fexcel=1&"+f;
  131. });
  132. $(document).keyup(function(event) {
  133. if (event.keyCode == 13) {
  134. if (typeof transfer != "undefined") {
  135. var f = "";
  136. $(".select").each(function() {
  137. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  138. });
  139. $("input:text").each(function() {
  140. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  141. });
  142. $("input:hidden").each(function() {
  143. f = f + $(this).attr("name") + "=" + $(this).val() + "&";
  144. });
  145. $(".search .number").val("");
  146. $(".search .waybill").val("");
  147. $.ajax({
  148. url: "/whlabel_bh/out",
  149. data: "label=" + $("input[name='transferout']").val() + "&"+f,
  150. type: "POST",
  151. dataType: "json",
  152. success: function(b) {
  153. searchspan(1);
  154. $(".systemwindow").hide();
  155. if (b && b.success) {
  156. $("#music_d")[0].play();
  157. $("#transferout").val("");
  158. $("#transferout").focus();
  159. } else {
  160. $("#wigsout").blur();
  161. $("#music_c")[0].play();
  162. $(".express div p:eq(0)").html(b.msg);
  163. $(".express div p:eq(1)").html("<font class='esc'>确 定</font>");
  164. $(".express").show();
  165. $("#transferout").val("");
  166. $("#transferout").focus();
  167. }
  168. }
  169. });
  170. }
  171. }
  172. })
  173. $(".obdel").click(function() {
  174. var a = "";
  175. $(".datatext input[name='check']:checked").each(function() {
  176. a = a + $(this).val()+",";
  177. });
  178. if (a) {
  179. $(".systemwindow p:eq(0)").html("确定删除已勾选的信息?");
  180. $(".systemwindow").show();
  181. }
  182. else
  183. {
  184. $(".ts p").html("请勾选需要删除的内容");
  185. $(".ts").show();
  186. setTimeout('$(".ts").fadeOut()', 1000);
  187. }
  188. });
  189. $(".systemwindow .button").click(function() {
  190. $(".systemwindow").hide();
  191. var a = "";
  192. $(".datatext input[name='check']:checked").each(function() {
  193. a = a + $(this).val()+",";
  194. });
  195. $.ajax({
  196. url: "/whlabel_bh/deltransfer",
  197. data: "s=" + a,
  198. type: "POST",
  199. dataType: "json",
  200. success: function(c) {
  201. if (c && c.success) {
  202. $(".ts p").html(c.msg);
  203. $(".ts").fadeIn();
  204. setTimeout('$(".ts").fadeOut()', 900);
  205. $.each(c.del,function(f,b){ $("#"+b).hide()});
  206. return false;
  207. } else {
  208. $(".ts p").html(c.msg);
  209. $(".ts").fadeIn();
  210. setTimeout(' $(".ts").fadeOut()', 900);
  211. return false;
  212. }
  213. }
  214. });
  215. });
  216. $(".bdbbprint").click(function() {
  217. if ($("select[name='printer']").children("option:selected").val() == "") {
  218. $(".ts p").html("请选择打印机!");
  219. $(".ts").show();
  220. setTimeout('$(".ts").fadeOut()', 1000);
  221. } else {
  222. var a = "";
  223. $(".datatext input[name='check']:checked").each(function() {
  224. a = a + $(this).val()+",";
  225. });
  226. if (!a)
  227. {
  228. $(".ts p").html("请勾选需要补打的内容!");
  229. $(".ts").show();
  230. setTimeout('$(".ts").fadeOut()', 1000);
  231. return;
  232. }
  233. $(".systemwindow div p:eq(0)").text("是否确定打印布标?");
  234. $(".systemwindow div p:eq(1)").html("<p><font id='bdbbprintks'>确 定</font><font class='esc'>取 消</font></p>");
  235. $(".systemwindow").show();
  236. }
  237. });
  238. $(".systemwindow").on('click', ".esc", function() {
  239. $(".systemwindow").hide();
  240. });
  241. $(".systemwindow").on('click', "#bdbbprintks", function() {
  242. $(".systemwindow").hide();
  243. layx.load('loadId','正在处理打印信息,请稍后');
  244. var a = "";
  245. $(".datatext input[name='check']:checked").each(function() {
  246. a = a + $(this).val()+",";
  247. });
  248. $.ajax({
  249. url: "/whlabel_bh/bdbb/",
  250. data: "s=" + a,
  251. type: "POST",
  252. dataType: "json",
  253. success: function(a) {
  254. layx.destroy('loadId');
  255. if (a && a.success) {
  256. wprinter.bhbubiao(a['rows']);
  257. $(".systemwindow div p:eq(0)").html("打印完成!");
  258. $(".systemwindow div p:eq(1)").html("<font class='printok'>确 定</font>");
  259. return;
  260. } else {
  261. $(".ts").hide();
  262. $(".systemwindow div p:eq(0)").text(a.msg);
  263. $(".systemwindow div p:eq(1)").html("<p><font class='esc'>确 定</font></p>");
  264. $(".systemwindow").show();
  265. }
  266. }
  267. });
  268. });
  269. </script>
  270. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  271. {Template footer}