|  |  |  | 
|---|
|  |  |  | <div id="search-box" class="layui-form layui-card-header"> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="loc_no" placeholder="货位" autocomplete="off"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="matnr" placeholder="物料号"  autocomplete="off"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="matnr" placeholder="商品编号"  autocomplete="off"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="maktx" placeholder="物料名称" autocomplete="off"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="type" placeholder="物料类别" autocomplete="off"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="lgnum" placeholder="规格" autocomplete="off"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="maktx" 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"> | 
|---|
|  |  |  | <input class="layui-input layui-laydate-range" name="update_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 待添加 --> | 
|---|
|  |  |  | 
|---|
|  |  |  | function getCol() { | 
|---|
|  |  |  | var cols = [ | 
|---|
|  |  |  | {type: 'checkbox'} | 
|---|
|  |  |  | ,{field: 'locNo$', align: 'center',title: '库位号'} | 
|---|
|  |  |  | ,{field: 'locNo', align: 'center',title: '货位'} | 
|---|
|  |  |  | ]; | 
|---|
|  |  |  | cols.push.apply(cols, detlCols); | 
|---|
|  |  |  | cols.push({field: 'modiUser$', align: 'center',title: '修改人员', hide: true} | 
|---|
|  |  |  | ,{field: 'modiTime$', align: 'center',title: '修改时间'}) | 
|---|
|  |  |  | cols.push({field: 'updateBy$', align: 'center',title: '修改人员', hide: true} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: '修改时间'}) | 
|---|
|  |  |  | return cols; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | locDetlTableIns = table.render({ | 
|---|
|  |  |  | elem: '#stockOut', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | url: baseUrl+'/stock/out/list/auth', | 
|---|
|  |  |  | url: baseUrl+'/locDetl/list/auth', | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | limit: 10, | 
|---|
|  |  |  | even: true, | 
|---|
|  |  |  | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pageCurr=curr; | 
|---|
|  |  |  | $('.layui-form-checkbox').css("pointer-events", "none"); | 
|---|
|  |  |  | $('td[data-field="0').css("cursor", "pointer") | 
|---|
|  |  |  | // $('.layui-form-checkbox').css("pointer-events", "none"); | 
|---|
|  |  |  | // $('td[data-field="0').css("cursor", "pointer") | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | layer.msg("请选择数据"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var locNos = []; | 
|---|
|  |  |  | data.forEach(function(elem) { | 
|---|
|  |  |  | locNos.push(elem.locNo); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/locDetl/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data: {locNos:locNos}, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | async: false, | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | data = res.data; | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl + "/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | parent.addTableData(data); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var b = true; | 
|---|
|  |  |  | $(function(){ | 
|---|
|  |  |  | $(document.body).on('click','td[data-field="0"]',function(){ | 
|---|
|  |  |  | var locNo = $(this).next().children("div").html(); | 
|---|
|  |  |  | if (b) { | 
|---|
|  |  |  | b = false; | 
|---|
|  |  |  | $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click(); | 
|---|
|  |  |  | setTimeout(function () { | 
|---|
|  |  |  | b = true; | 
|---|
|  |  |  | }, 200) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // var b = true; | 
|---|
|  |  |  | // $(function(){ | 
|---|
|  |  |  | //     $(document.body).on('click','td[data-field="0"]',function(){ | 
|---|
|  |  |  | //         var locNo = $(this).next().children("div").html(); | 
|---|
|  |  |  | //         if (b) { | 
|---|
|  |  |  | //             b = false; | 
|---|
|  |  |  | //             $("tr td[data-field=locNo\\$] div:contains("+ locNo +")").parent().prev().children().children("div").click(); | 
|---|
|  |  |  | //             setTimeout(function () { | 
|---|
|  |  |  | //                 b = true; | 
|---|
|  |  |  | //             }, 200) | 
|---|
|  |  |  | //         } | 
|---|
|  |  |  | //     }); | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function tableReload(child) { | 
|---|
|  |  |  | var searchData = {}; | 
|---|
|  |  |  | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pageCurr=curr; | 
|---|
|  |  |  | $('.layui-form-checkbox').css("pointer-events", "none"); | 
|---|
|  |  |  | $('td[data-field="0').css("cursor", "pointer") | 
|---|
|  |  |  | // $('.layui-form-checkbox').css("pointer-events", "none"); | 
|---|
|  |  |  | // $('td[data-field="0').css("cursor", "pointer") | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|