list.html 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <extend name="$_admin_public_layout"/>
  2. <block name="style">
  3. <link rel="stylesheet" href="__PUBLIC__/libs/layui/css/layui.css" media="all">
  4. <link rel="stylesheet" href="__PUBLIC__/libs/css/page.css" media="all">
  5. </block>
  6. <block name="script">
  7. <script src="__PUBLIC__/libs/guide/bootstrap-tour.js"></script>
  8. <script src="__PUBLIC__/libs/guide/guide.js?_t=2016121401"></script>
  9. </block>
  10. <block name="main">
  11. <fieldset name="meta_title" class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  12. <legend>{$meta_title}</legend>
  13. </fieldset>
  14. <div style="margin-left: 30px;">
  15. <button class="layui-btn layui-btn-fluid layui-btn-radius large-add">新增</button>
  16. <button class="layui-btn layui-btn-radius layui-btn-warm large-edit">修改</button>
  17. <button class="layui-btn layui-btn-radius layui-btn-danger large-del">删除</button>
  18. <button class="layui-btn layui-btn-fluid layui-btn-radius large-print">打印</button>
  19. <button class="layui-btn layui-btn-fluid layui-btn-radius large-export">导出</button>
  20. <div class="bg">
  21. <form action="/index.php?s=/Admin/Bar/large.html" autocomplete="off" method="POST" >
  22. <input type="text" name="search" value="<?php echo isset($search)?$search:'';?>" placeholder="请输入搜素关键词" class="serchInput">
  23. <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal">立即搜索</button>
  24. </form>
  25. </div>
  26. </div>
  27. <div class="builder-table">
  28. <!-- 列表 -->
  29. <table class="layui-table">
  30. <colgroup>
  31. <col width="150">
  32. <col width="200">
  33. <col>
  34. </colgroup>
  35. <thead>
  36. <tr>
  37. <th ></th>
  38. <th>条码</th>
  39. <th>工单编号</th>
  40. <th>标准名称</th>
  41. <th>客户产品编码</th>
  42. <th>自定义名称</th>
  43. <th>日期</th>
  44. <th>件内数量</th>
  45. <th>流转板号</th>
  46. <th>是否混板</th>
  47. <th>质量批识别号</th>
  48. <th>生产批号</th>
  49. <th>托盘号</th>
  50. <th>检验工号</th>
  51. </tr>
  52. </thead>
  53. <notempty name="page">
  54. <tfoot>
  55. <tr><td colspan="14"><div class="pages">{$page}</div></td></tr>
  56. </tfoot>
  57. </notempty>
  58. <tbody>
  59. <empty name="list">
  60. <tr><td colspan="14">亲,暂时还没数据</td></tr>
  61. <else/>
  62. <volist name="list" id="v">
  63. <tr>
  64. <td ><input type="checkbox" name="id[]" value="{$v.id}"></td>
  65. <td class="update" data-id = {$v.id}>{$v.sn}</td>
  66. <td>{$v.no}</td>
  67. <td >{$v.name}</td>
  68. <td >{$v.custome_sn}</td>
  69. <td >{$v.title}</td>
  70. <td>{$v.time|date="Y-m-d",###}</td>
  71. <td>{$v.num}</td>
  72. <td>{$v.board_no}</td>
  73. <td>
  74. <if condition="$v.mix_board eq 'Y' ">
  75. <else />
  76. </if>
  77. </td>
  78. <td>{$v.quality_no}</td>
  79. <td>{$v.batch_number}</td>
  80. <td>{$v.tray_no}</td>
  81. <td>{$v.inspector}</td>
  82. </tr>
  83. </volist>
  84. </empty>
  85. </tbody>
  86. </table>
  87. <notempty name="bach_page">
  88. <ul class="pagination">{$task_page}</ul>
  89. </notempty>
  90. </div>
  91. <script src="__PUBLIC__/libs/layui/layui.js"></script>
  92. <script src="__PUBLIC__/libs/jquery/2.x/jquery.js"></script>
  93. <script>
  94. <if condition="C('ismobile') eq 1">width=$('.container').width() * 0.9;<else/>width=800;</if>
  95. layui.use('form', function(){
  96. var form = layui.form;
  97. });
  98. $('.update').click(function(){
  99. var id = $(this).attr('data-id');
  100. layer.open({
  101. type: 2,
  102. title: '大件编辑',
  103. skin: 'layui-layer-rim', //加上边框
  104. area: ['1000px', '700px'], //宽高
  105. content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/largeEdit/id/'+id+'.html',
  106. end: function () {
  107. location.reload();
  108. }
  109. });
  110. });
  111. $('.large-add').click(function(){
  112. layer.open({
  113. type: 2,
  114. title: '大件新增',
  115. skin: 'layui-layer-rim', //加上边框
  116. area: ['1000px', '700px'], //宽高
  117. content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/largeAdd.html'
  118. });
  119. });
  120. $('.large-edit').click(function(){
  121. $this = $('input[type=checkbox]:checked');
  122. $len = $this .length;
  123. if($len==0 || $len>1){
  124. layer.msg('请选择一个选项');
  125. return false;
  126. }else{
  127. $.each($('input:checkbox:checked'),function(){
  128. var id = $(this).val();
  129. layer.open({
  130. type: 2,
  131. title: '大件编辑',
  132. skin: 'layui-layer-rim', //加上边框
  133. area: ['1000px', '700px'], //宽高
  134. content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/largeEdit/id/'+id+'.html',
  135. end: function () {
  136. location.reload();
  137. }
  138. });
  139. });
  140. }
  141. });
  142. $('.large-del').click(function(){
  143. $this = $('input[type=checkbox]:checked');
  144. $len = $this .length;
  145. if($len==0){
  146. layer.msg('请选择一个选项');
  147. return false;
  148. }else{
  149. var Id = '';
  150. $.each($('input:checkbox:checked'),function(){
  151. Id = Id+','+$(this).val();
  152. });
  153. Id = Id.slice(1);
  154. $.ajax({
  155. async: true,//同步
  156. url: "{:U('Bar/largeDel')}",
  157. type: 'POST',
  158. data: {
  159. id:Id
  160. },
  161. timeout: 5000,//1秒
  162. dataType: 'json',
  163. success: function (data) {
  164. layer.msg(data.msg);
  165. location.reload();
  166. },
  167. error:function(data){
  168. layer.msg(data.msg);
  169. location.reload();
  170. }
  171. });
  172. }
  173. })
  174. $('.large-print').click(function(){
  175. $this = $('input[type=checkbox]:checked');
  176. $len = $this .length;
  177. if($len==0){
  178. layer.msg('请选择一个选项');
  179. return false;
  180. }else{
  181. var Id = '';
  182. $.each($('input:checkbox:checked'),function(){
  183. Id = Id+','+$(this).val();
  184. });
  185. Id = Id.slice(1);
  186. $.ajax({
  187. async: true,//同步
  188. url: "{:U('Bar/getLargeDate')}",
  189. type: 'POST',
  190. data: {
  191. id:Id
  192. },
  193. timeout: 5000,//1秒
  194. //dataType: 'json',
  195. success: function (data) {
  196. data.forEach(function(item,index){
  197. pre(item.name,item.custome_name,item.date,item.num,item.standard,item.inspector,item.batch_number,item.board_no,item.tray_no,item.quality_no,item.sn,0);
  198. });
  199. /*layer.msg(data.msg);
  200. location.reload();*/
  201. },
  202. error:function(data){
  203. /*layer.msg(data.msg);
  204. location.reload();*/
  205. }
  206. });
  207. }
  208. })
  209. </script>
  210. </block>