| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <extend name="$_admin_public_layout"/>
- <block name="style">
- <link rel="stylesheet" href="__PUBLIC__/libs/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="__PUBLIC__/libs/css/page.css" media="all">
- </block>
- <block name="script">
- <script src="__PUBLIC__/libs/guide/bootstrap-tour.js"></script>
- <script src="__PUBLIC__/libs/guide/guide.js?_t=2016121401"></script>
- </block>
- <block name="main">
- <fieldset name="meta_title" class="layui-elem-field layui-field-title" style="margin-top: 20px;">
- <legend>{$meta_title}</legend>
- </fieldset>
- <div style="margin-left: 30px;">
- <button class="layui-btn layui-btn-fluid layui-btn-radius small-add">新增</button>
- <button class="layui-btn layui-btn-radius layui-btn-warm small-edit">修改</button>
- <button class="layui-btn layui-btn-radius layui-btn-danger small-del">删除</button>
- <button class="layui-btn layui-btn-fluid layui-btn-radius small-print">打印</button>
- <button class="layui-btn layui-btn-fluid layui-btn-radius small-export">导出</button>
- <div class="bg">
- <form action="/index.php?s=/Admin/Bar/small.html" autocomplete="off" method="POST" >
- <input type="text" name="search" value="<?php echo isset($search)?$search:'';?>" placeholder="请输入搜素关键词" class="serchInput">
- <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal">立即搜索</button>
- </form>
- </div>
- </div>
- <div class="builder-table">
- <!-- 列表 -->
- <table class="layui-table">
- <colgroup>
- <col width="150">
- <col width="200">
- <col>
- </colgroup>
- <thead>
- <tr>
- <th ></th>
- <th>条码</th>
- <th>工单编号</th>
- <th>自定义名称</th>
- <th>标准名称</th>
- <th>规格</th>
- <th>包内数量</th>
- <th>日期</th>
- <th>生产批号</th>
- <th>工艺编号</th>
- <th>板号</th>
- <th>混板号</th>
- <th>板包序号</th>
- <th>质量批识别号</th>
- <th>检验工号</th>
- </tr>
- </thead>
- <notempty name="page">
- <tfoot>
- <tr><td colspan="15"><div class="pages">{$page}</div></td></tr>
- </tfoot>
- </notempty>
- <tbody>
- <empty name="list">
- <tr><td colspan="15">亲,暂时还没数据</td></tr>
- <else/>
- <volist name="list" id="v">
- <tr>
- <td ><input type="checkbox" name="id[]" value="{$v.id}"></td>
- <td class="update" data-id = {$v.id}>{$v.sn}</td>
- <td>{$v.no}</td>
- <td >{$v.name}</td>
- <td >{$v.title}</td>
- <td >{$v.standard}</td>
- <td>{$v.num}</td>
- <td>{$v.time|date="Y-m-d",###}</td>
- <td>{$v.batch_number}</td>
- <td>{$v.technics_number}</td>
- <td>{$v.board_no}</td>
- <td>
- {$v.mix_board}
- </td>
- <td>{$v.board_no_serial}</td>
- <td>{$v.quality_no}</td>
- <td>{$v.inspector}</td>
- </tr>
- </volist>
- </empty>
- </tbody>
- </table>
- <notempty name="bach_page">
- <ul class="pagination">{$task_page}</ul>
- </notempty>
- </div>
- <script src="__PUBLIC__/libs/layui/layui.js"></script>
- <script src="__PUBLIC__/libs/jquery/2.x/jquery.js"></script>
- <script>
- <if condition="C('ismobile') eq 1">width=$('.container').width() * 0.9;<else/>width=800;</if>
- layui.use('form', function(){
- var form = layui.form;
- });
- $('.update').click(function(){
- var id = $(this).attr('data-id');
- layer.open({
- type: 2,
- title: '小件编辑',
- skin: 'layui-layer-rim', //加上边框
- area: ['1000px', '700px'], //宽高
- content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/smallEdit/id/'+id+'.html',
- end: function () {
- location.reload();
- }
- });
- });
- $('.small-add').click(function(){
- layer.open({
- type: 2,
- title: '小件新增',
- skin: 'layui-layer-rim', //加上边框
- area: ['1000px', '700px'], //宽高
- content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/smallAdd.html'
- });
- });
- $('.small-edit').click(function(){
- $this = $('input[type=checkbox]:checked');
- $len = $this .length;
- if($len==0 || $len>1){
- layer.msg('请选择一个选项');
- return false;
- }else{
- $.each($('input:checkbox:checked'),function(){
- var id = $(this).val();
- layer.open({
- type: 2,
- title: '小件编辑',
- skin: 'layui-layer-rim', //加上边框
- area: ['1000px', '700px'], //宽高
- content: 'http://dm.7in6.com/index.php?s=/Admin/Bar/smallEdit/id/'+id+'.html',
- end: function () {
- location.reload();
- }
- });
- });
- }
- });
- $('.small-del').click(function(){
- $this = $('input[type=checkbox]:checked');
- $len = $this .length;
- if($len==0){
- layer.msg('请选择一个选项');
- return false;
- }else{
- var Id = '';
- $.each($('input:checkbox:checked'),function(){
- Id = Id+','+$(this).val();
- });
- Id = Id.slice(1);
- $.ajax({
- async: true,//同步
- url: "{:U('Bar/smallDel')}",
- type: 'POST',
- data: {
- id:Id
- },
- timeout: 5000,//1秒
- dataType: 'json',
- success: function (data) {
- layer.msg(data.msg);
- location.reload();
- },
- error:function(data){
- layer.msg(data.msg);
- location.reload();
- }
- });
- }
- })
- $('.small-print').click(function(){
- $this = $('input[type=checkbox]:checked');
- $len = $this .length;
- if($len==0){
- layer.msg('请选择一个选项');
- return false;
- }else{
- var Id = '';
- $.each($('input:checkbox:checked'),function(){
- Id = Id+','+$(this).val();
- });
- Id = Id.slice(1);
- $.ajax({
- async: true,//同步
- url: "{:U('Bar/getSmallDate')}",
- type: 'POST',
- data: {
- id:Id
- },
- timeout: 5000,//1秒
- //dataType: 'json',
- success: function (data) {
- data.forEach(function(item,index){
- pre(item.name,0,item.date,item.num,item.standard,item.inspector,item.batch_number,item.board_no,0,item.quality_no,item.sn,1);
- });
- /*layer.msg(data.msg);
- location.reload();*/
- },
- error:function(data){
- /*layer.msg(data.msg);
- location.reload();*/
- }
- });
- }
- })
- </script>
- </block>
|