| | |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-table-body.layui-table-main { |
| | | overflow: scroll; |
| | | } |
| | | body { |
| | | padding: 0 20px; |
| | | } |
| | |
| | | <legend>搜索栏</legend> |
| | | <!-- 搜索栏 --> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-input-inline" style="margin-top: -10px"> |
| | | <select id="crnNo" name="crnNo"> |
| | | <option value="" style="display: none">请选择巷道</option> |
| | | <option value="1">1号</option> |
| | | <option value="2">2号</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> |
| | |
| | | </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="mat_no" 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"> |
| | | <input class="layui-input" type="text" name="mat_name" placeholder="物料描述" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="memo" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | |
| | | </div> |
| | | </script> |
| | | |
| | | <div class="layui-form"> |
| | | <div class="layui-form" style="width: 100%"> |
| | | <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table> |
| | | </div> |
| | | |
| | |
| | | <script> |
| | | |
| | | var pageCurr; |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox'} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ,{field: 'matNo', align: 'center',title: '产品编码'} |
| | | ,{field: 'matName', align: 'center',title: '产品名称', width: 180} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'qty', align: 'center',title: '数量'} |
| | | ,{field: 'source', title: '来源', align: 'center'} |
| | | ,{field: 'vendor', title: '供应商', align: 'center'} |
| | | ,{field: 'qtyBox', align: 'center', title: '每箱数量(PCS)', width: 130} |
| | | ,{field: 'allQty', title: '总数量(PCS)', align: 'center', width: 120} |
| | | ,{field: 'weight', align: 'center', title: '每箱重量(KG)', width: 130} |
| | | ,{field: 'allWeight', title: '总重量(KG)', align: 'center', width: 120} |
| | | ,{field: 'unit', align: 'center',title: '单位', width:80, hide: true} |
| | | ,{field: 'supplier', align: 'center',title: '批号'} |
| | | ,{field: 'color', align: 'center',title: '颜色'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'bname', align: 'center',title: '库位名称'} |
| | | ,{field: 'memo', align: 'center',title: '生产日期'} |
| | | ,{field: 'str3', align: 'center',title: '客户名称'} |
| | | ,{field: 'str4', align: 'center',title: '项目信息'} |
| | | ,{field: 'str5$', align: 'center',title: '类别'} |
| | | // {type: 'checkbox'} |
| | | // ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ]; |
| | | // cols.push.apply(cols, detlCols); |
| | | cols.push( |
| | | // {field: 'str3', align: 'center',title: '客户名称'} |
| | | // ,{field: 'str4', align: 'center',title: '项目信息'} |
| | | // ,{field: 'str5$', align: 'center',title: '类别'} |
| | | {field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 180}) |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limit: 10, |
| | | limits: [10, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', event: 'checkbox', templet:function(row){ |
| | | var html = "<input type='checkbox' lay-skin='primary' lay-filter='tableCheckbox' table-index='"+row.LAY_TABLE_INDEX+"'"; |
| | | return html; |
| | | }} |
| | | ,{field: 'locNo$', align: 'center',title: '库位号'} |
| | | ,{field: 'matnr', align: 'center',title: '物料'} |
| | | // ,{field: 'lgnum', align: 'center',title: '仓库号', width:80} |
| | | // ,{field: 'tbnum', align: 'center',title: '转储请求编号'} |
| | | // ,{field: 'tbpos', align: 'center',title: '行项目'} |
| | | // ,{field: 'zmatid', align: 'center',title: '物料标签ID', width:200} |
| | | ,{field: 'maktx', align: 'center',title: '物料描述'} |
| | | // ,{field: 'werks', align: 'center',title: '工厂'} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'altme', align: 'center',title: '单位'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | // ,{field: 'bname', align: 'center',title: '用户ID'} |
| | | // ,{field: 'memo', align: 'center',title: '备注'} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'} |
| | | |
| | | ]], |
| | | cellMinWidth: 100, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | | res.data[_index][data.value] = 'Y'; |
| | | }else{ |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | |
| | | 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; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(stockOut)', function(obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'checkbox': |
| | | var currDom = obj.tr.children("td:first").children().children("div"); |
| | | console.log(currDom.attr("class")) |
| | | var otherDom = $("td[data-field=locNo\\$] div:contains("+ data.locNo +")").parent().prev().children().children("div"); |
| | | if (currDom.hasClass("layui-form-checked")){ |
| | | otherDom.addClass("layui-form-checked"); |
| | | } else { |
| | | otherDom.removeClass("layui-form-checked"); |
| | | } |
| | | break; |
| | | } |
| | | }) |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |