|  |  | 
 |  |  |     <legend>搜索栏</legend> | 
 |  |  |     <div id="search-box" class="layui-form layui-card-header"> | 
 |  |  |         <div class="layui-inline"> | 
 |  |  |             <label class="layui-form-label">物料编码:</label> | 
 |  |  |             <div class="layui-input-inline"> | 
 |  |  |                 <input class="layui-input" type="text" name="mat_no" placeholder="请输入" autocomplete="off"> | 
 |  |  |                 <input class="layui-input" type="text" name="mat_no" placeholder="物料编码" autocomplete="off"> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |  | 
 |  |  |         <!-- 日期范围 --> | 
 |  |  |         <div class="layui-inline" style="width: 300px"> | 
 |  |  |             <div class="layui-input-inline"> | 
 |  |  |                 <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <div class="layui-inline"> | 
 |  |  |             <div class="layui-input-inline"> | 
 |  |  |                 <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> | 
 |  |  |             </div> | 
 |  |  |         </div> | 
 |  |  |         <!-- 待添加 --> | 
 |  |  |         <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> | 
 |  |  |             <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> | 
 |  |  | 
 |  |  |  | 
 |  |  | </body> | 
 |  |  | <script> | 
 |  |  |  | 
 |  |  |     function getCol() { | 
 |  |  |         var cols = [ | 
 |  |  |             {type: 'checkbox', fixed: 'left'} | 
 |  |  |         ]; | 
 |  |  |         cols.push.apply(cols, matCols); | 
 |  |  |         cols.push( | 
 |  |  |             {field: 'modiUser$', align: 'center',title: '修改人员', hide: true}, | 
 |  |  |             {field: 'modiTime$', align: 'center',title: '修改时间'} | 
 |  |  |         ) | 
 |  |  |         return cols; | 
 |  |  |     } | 
 |  |  |     var pageCurr; | 
 |  |  |     layui.use(['table','laydate', 'form'], function() { | 
 |  |  |         var table = layui.table; | 
 |  |  |         var $ = layui.jquery; | 
 |  |  |         var layer = layui.layer; | 
 |  |  |         var layDate = layui.laydate; | 
 |  |  |         var form = layui.form; | 
 |  |  |         // 物料查询数据表 | 
 |  |  |         matQueryTable = table.render({ | 
 |  |  | 
 |  |  |             even: true, | 
 |  |  |             cellMinWidth: 50, | 
 |  |  |             toolbar: '#toolbar', | 
 |  |  |             cols: [[ | 
 |  |  |                 {type: 'checkbox', fixed: 'left'}, | 
 |  |  |                 {field: 'matNo', align: 'center', title: '物料编码'}, | 
 |  |  |                 {field: 'barcode', align: 'center', title: '条码'}, | 
 |  |  |                 {field: 'matName', align: 'center', title: '物料名称'}, | 
 |  |  |                 {field: 'str1', align: 'center', title: '物料单位'}, | 
 |  |  |                 {field: 'str2', align: 'center', title: '物料规格'}, | 
 |  |  |             ]], | 
 |  |  |             cols: [getCol()], | 
 |  |  |             request: { | 
 |  |  |                 pageName: 'curr', | 
 |  |  |                 pageSize: 'limit' | 
 |  |  | 
 |  |  |                         layer.msg("请选择数据"); | 
 |  |  |                         return; | 
 |  |  |                     } | 
 |  |  |                     for (var i=0;i<data.length;i++){ | 
 |  |  |                         data[i]["count"] = parent.initCountVal; | 
 |  |  |                     } | 
 |  |  |                     parent.matCodeData.push.apply(parent.matCodeData, data); | 
 |  |  |                     parent.tableIns.reload({data: parent.matCodeData}); | 
 |  |  |                     parent.layer.close(parent.matCodeLayerIdx); | 
 |  |  |                     parent.addTableData(data); | 
 |  |  |                     break; | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  | 
 |  |  |             clearFormVal($('#search-box')); | 
 |  |  |             tableReload(); | 
 |  |  |         }); | 
 |  |  |  | 
 |  |  |         layDate.render({ | 
 |  |  |             elem: '.layui-laydate-range' | 
 |  |  |             ,type: 'datetime' | 
 |  |  |             ,range: true | 
 |  |  |         }); | 
 |  |  |     }) | 
 |  |  |  | 
 |  |  |     function tableReload(child) { |