whlabeltransport.html 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. {Template header}
  2. <body>
  3. <div class="warp">
  4. <div class="fixed">
  5. <ul class="search">
  6. <li>SKU:<input value="" name="sku" type="text" style="width:250px;"></li>
  7. <li>备注:<input value="" name="text" type="text" ></li>
  8. <li>状态:<select name="cz" class="select">
  9. <option value="">请选择</option>
  10. <option value="0">未到达</option>
  11. <option value="1">已到达</option>
  12. </select></li>
  13. <li>仓库:<select name="warehouse" class="select">
  14. <option value="">请选择</option>{loop warehouse(10) as $val}
  15. <option value="{$val['id']}">{$val['title']}</option>{/loop}</select></li>
  16. <li><select name="xztime" class="select">
  17. <option value="enter">添加时间</option>
  18. <option value="stime">预达时间</option>
  19. <option value="time">完成时间</option>
  20. </select> :<input id="timetk" value="{date('Y-m-d',time()-29*24*3600)} 0:00" name="timetk" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
  21. 至&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>
  22. <li><span>确 定</span></li>
  23. </ul>
  24. <div class="control">
  25. <a href="javascript:void(0);" class="datalistwc">批量完成</a>
  26. <a href="javascript:void(0);" class="whlabeltransportmb">导出模板</a>
  27. <a href="javascript:void(0);" class="whlabeldr">导入在途数据</a>
  28. <a href="javascript:void(0);" class="whlabeltransportexcel">导出在途数据</a>
  29. <a href="javascript:void(0);" class="whlabeltransportexcelzh">导出在途中及库存数据</a>
  30. <a href="javascript:void(0);" class="check">删 除</a>
  31. </div>
  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>SKU</td>
  37. <td>产品名称</td>
  38. <td>数量</td>
  39. <td>添加时间</td>
  40. <td>预达时间</td>
  41. <td>完成时间</td>
  42. <td>备注</td>
  43. <td>操作</td>
  44. </tr>
  45. </table>
  46. </div>
  47. <table class="datatext data" border="0" style="border-collapse:collapse;">
  48. </table>
  49. <div class="bomf"></div>
  50. </div>
  51. <script>
  52. var dataurl = "/whlabeltransport/";var fdataurl = "/whlabeltransport/";var excel = "/whlabeltransport/add/";
  53. $(function () { $("#ktime").calendar();$("#jtime").calendar();});
  54. var customon = 1;
  55. var editurl = "/whlabeltransport/edit/";
  56. var editdj = 2;
  57. var editt = "编辑数量 - 操作";
  58. let ppkc = false;
  59. let kcpd = false;
  60. let customs = false;
  61. function custom(){
  62. $(".data tr").each(function() {
  63. $(this).find('td:eq(1)').css("width","6%");
  64. $(this).find('td:eq(3)').css("width","25%");
  65. $(this).find('td:eq(4)').css("width","4%");
  66. });}
  67. $(".whlabeltransportmb").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. window.location.href = "http://1.wepolicy.cn/whlabeltransport/presetou?excel=1&"+f;
  76. });
  77. $(".whlabeltransportexcel").click(function() {
  78. var f = "";
  79. $(".select").each(function() {
  80. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  81. });
  82. $("input:text").each(function() {
  83. str2 = $(this).val().replace(/\</g,"&lt;");
  84. str2 = str2.replace(/\>/g,"&gt;");
  85. str2 = str2.replace(/\+/g,"%2B");
  86. str2 = str2.replace(/&/g,"%26");
  87. str2 = str2.replace(/#/g,escape('#'));
  88. f = f + $(this).attr("name") + "=" + str2 + "&";
  89. });
  90. window.location.href = "http://1.wepolicy.cn/whlabeltransport/excel?excel=1&"+f;
  91. });
  92. $(".whlabeltransportexcelzh").click(function() {
  93. var f = "";
  94. $(".select").each(function() {
  95. f = f + $(this).attr("name") + "=" + $(this).children("option:selected").val() + "&";
  96. });
  97. $("input:text").each(function() {
  98. str2 = $(this).val().replace(/\</g,"&lt;");
  99. str2 = str2.replace(/\>/g,"&gt;");
  100. str2 = str2.replace(/\+/g,"%2B");
  101. str2 = str2.replace(/&/g,"%26");
  102. str2 = str2.replace(/#/g,escape('#'));
  103. f = f + $(this).attr("name") + "=" + str2 + "&";
  104. });
  105. window.location.href = "http://1.wepolicy.cn/whlabeltransport/excelzh?excel=1&"+f;
  106. });
  107. $(".datatext").on('click',"td .ztwc",function() {
  108. var id = $(this).data("id");
  109. layx.load('loadId','操作中,请稍后',{shadable:0.6});
  110. $.ajax({
  111. url: fdataurl+"/zj/",
  112. data: "id="+id,
  113. type: "POST",
  114. dataType: "json",
  115. success: function(a) {
  116. layx.destroy('loadId');
  117. if (a && a.success) {
  118. $(".datatext #"+a.id).find("td .ztwc").hide();
  119. $(".datatext #"+a.id).find("td .cz").html("已完成");
  120. $(".datatext #"+a.id).find("td .wc").html(a.time);
  121. $(".ts p").html(a.msg);
  122. $(".ts").fadeIn();
  123. setTimeout('$(".ts").fadeOut()', 800);
  124. }
  125. else {
  126. $(".ts p").html(a.msg);
  127. $(".ts").fadeIn();
  128. setTimeout('$(".ts").fadeOut()', 800);
  129. }
  130. }
  131. });
  132. });
  133. </script>
  134. <script type="text/javascript" src="{$theme}js/laydate.js"></script>
  135. <div style="display:none;">
  136. <input id="upload-file" name="files" accept="image/xls,image/xlsx" type="file">
  137. </div>
  138. {Template footer}