| | |
| | | <!DOCTYPE html> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>临期预警列表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <link rel="stylesheet" href="../../css/public.css" media="all"> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function() { |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | //判断是否开启table列表列宽调整功能。 |
| | | GetIsSetColW(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0; "> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> |
| | | <div class="layui-form-item"> |
| | | |
| | | <div class="layui-inline zongdan" > |
| | | <label class="layui-form-label" style="width: 60px;">物料编码</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="物料编码" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zongdan" > |
| | | <label class="layui-form-label" style="width: 60px;">物料名称</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="物料名称" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zongdan" > |
| | | <label class="layui-form-label" style="width: 60px;">托盘号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline "> |
| | | <label class="layui-form-label" style="width: 60px;">库存状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="Status" id="Status" lay-filter="Status" |
| | | lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待分配</option> |
| | | <option value="1">部分分配</option> |
| | | <option value="2">已分配</option> |
| | | <option value="3">盘点锁定</option> |
| | | <option value="4">移库锁定</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">抽检标记</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectMark" id="InspectMark" lay-filter="InspectMark" |
| | | lay-search> |
| | | <option value=""></option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" |
| | | lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="daochu"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>导出 |
| | | </button> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>临期预警列表</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" |
| | | content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
| | | <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> |
| | | <link rel="stylesheet" href="../../css/public.css" media="all"> |
| | | <script> |
| | | // 这里是需要在页面渲染之前执行的代码 |
| | | document.addEventListener("DOMContentLoaded", function () { |
| | | //获取table默认显示数 |
| | | pageCntFirst(); |
| | | //判断是否开启table列表列宽调整功能。 |
| | | GetIsSetColW(); |
| | | }); |
| | | </script> |
| | | </head> |
| | | |
| | | <body id="body"> |
| | | <div class="layui-fluid" style="padding-bottom: 0; "> |
| | | <div class="layui-card"> |
| | | <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> |
| | | <div class="layui-form-item"> |
| | | |
| | | <div class="layui-inline zongdan"> |
| | | <label class="layui-form-label" style="width: 60px;">物料编码</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="SkuNo" name="SkuNo" placeholder="物料编码" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="center"></div> |
| | | |
| | | <div class="layui-card-body"> |
| | | <div class="position-relative"><!-- class="position-relative" --><!-- 自定义表头加上 --> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> |
| | | <i class="layui-icon"></i> |
| | | </button> |
| | | <div class="layui-inline zongdan"> |
| | | <label class="layui-form-label" style="width: 60px;">物料名称</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="物料名称" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | <!-- #endregion --> |
| | | </div> |
| | | <div class="layui-inline zongdan"> |
| | | <label class="layui-form-label" style="width: 60px;">托盘号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline mingxi"> |
| | | <label class="layui-form-label" style="width: 60px;">批次号</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <input type="text" id="LotNo" name="LotNo" placeholder="批次号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline "> |
| | | <label class="layui-form-label" style="width: 60px;">库存状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="Status" id="Status" lay-filter="Status" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待分配</option> |
| | | <option value="1">部分分配</option> |
| | | <option value="2">已分配</option> |
| | | <option value="3">盘点锁定</option> |
| | | <option value="4">移库锁定</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">抽检标记</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectMark" id="InspectMark" lay-filter="InspectMark" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">否</option> |
| | | <option value="1">是</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline zhijian"> |
| | | <label class="layui-form-label" style="width: 60px;">质检状态</label> |
| | | <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> |
| | | <select name="InspectStatus" id="InspectStatus" lay-filter="InspectStatus" lay-search> |
| | | <option value=""></option> |
| | | <option value="0">待质检</option><!-- 待检验 --> |
| | | <option value="1">检验合格</option><!-- 合格品 --> |
| | | <option value="2">不合格</option><!-- 不合格 --> |
| | | <option value="3">放置期</option><!-- 不合格 --> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- #region 自定义表头 --> |
| | | <script type="text/html" id="templetProductionTime"> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="daochu"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>导出 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="center"></div> |
| | | |
| | | <div class="layui-card-body"> |
| | | <div class="position-relative"><!-- class="position-relative" --><!-- 自定义表头加上 --> |
| | | <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> |
| | | <!-- #region 自定义表头 --> |
| | | <div class="headerSetIcon"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> |
| | | <i class="layui-icon"></i> |
| | | </button> |
| | | </div> |
| | | <!-- #endregion --> |
| | | |
| | | <!-- #region 自定义表头 --> |
| | | <script type="text/html" id="templetProductionTime"> |
| | | {{# function GetBtn(d){ |
| | | return formatDate(d.ProductionTime); |
| | | } |
| | | }} |
| | | {{ GetBtn(d) }} |
| | | </script> |
| | | <script type="text/html" id="templetExpirationTime"> |
| | | <script type="text/html" id="templetExpirationTime"> |
| | | {{# function GetBtn(d){ |
| | | return formatDate(d.ExpirationTime); |
| | | } |
| | | }} |
| | | {{GetBtn(d)}} |
| | | </script> |
| | | <!-- #endregion --> |
| | | </div> |
| | | <!-- #endregion --> |
| | | </div> |
| | | |
| | | |
| | | <!-- 物料状态 --> |
| | | <script type="text/html" id="buttonTpl"> |
| | | <!-- 物料状态 --> |
| | | <script type="text/html" id="buttonTpl"> |
| | | {{# if(d.Status=='0'){ }} |
| | | <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">待分配</button> |
| | | {{# } else if(d.Status == '1') { }} |
| | |
| | | <button class="layui-btn layui-btn-radius layui-btn-xs">移库锁定</button> |
| | | {{# } }} |
| | | </script> |
| | | <!-- 质检状态 --> |
| | | <script type="text/html" id="InspectStatus1"> |
| | | <!-- 质检状态 --> |
| | | <script type="text/html" id="InspectStatus1"> |
| | | {{# if(d.InspectStatus == '0') { }} |
| | | <p>待检验</p> |
| | | {{# } else if(d.InspectStatus == '1'){ }} |
| | |
| | | <p>放置期</p> |
| | | {{# } }} |
| | | </script> |
| | | <!-- 检验标记 --> |
| | | <script type="text/html" id="InspectMarkStatus"> |
| | | <!-- 检验标记 --> |
| | | <script type="text/html" id="InspectMarkStatus"> |
| | | {{# if(d.InspectMark=='0'){ }} |
| | | <p>否</p> |
| | | {{# } else if(d.InspectMark == '1') { }} |
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var uid = $.cookie('userId'); |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function() { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | |
| | | var h1 = GetTableHeight(); |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var uid = $.cookie('userId'); |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'table', 'laypage', 'layer'], function () { |
| | | var table = layui.table, |
| | | form = layui.form, |
| | | laypage = layui.laypage, |
| | | layer = layui.layer; |
| | | |
| | | refreshTable("","","","","","","","",""); |
| | | var tableIns; |
| | | var h1 = GetTableHeight(); |
| | | |
| | | //获取当前时间 |
| | | function getNowTime() { |
| | | var date = new Date(); |
| | | //年 getFullYear():四位数字返回年份 |
| | | var year = date.getFullYear(); //getFullYear()代替getYear() |
| | | //月 getMonth():0 ~ 11 |
| | | var month = date.getMonth() + 1; |
| | | //日 getDate():(1 ~ 31) |
| | | var day = date.getDate(); |
| | | //时 getHours():(0 ~ 23) |
| | | var hour = date.getHours(); |
| | | //分 getMinutes(): (0 ~ 59) |
| | | var minute = date.getMinutes(); |
| | | //秒 getSeconds():(0 ~ 59) |
| | | var second = date.getSeconds(); |
| | | refreshTable("", "", "", "", "", "", "", "", ""); |
| | | var tableIns; |
| | | |
| | | var time = year + addZero(month) + addZero(day) + addZero(hour) + addZero(minute) + addZero(second); |
| | | return time; |
| | | //获取当前时间 |
| | | function getNowTime() { |
| | | var date = new Date(); |
| | | //年 getFullYear():四位数字返回年份 |
| | | var year = date.getFullYear(); //getFullYear()代替getYear() |
| | | //月 getMonth():0 ~ 11 |
| | | var month = date.getMonth() + 1; |
| | | //日 getDate():(1 ~ 31) |
| | | var day = date.getDate(); |
| | | //时 getHours():(0 ~ 23) |
| | | var hour = date.getHours(); |
| | | //分 getMinutes(): (0 ~ 59) |
| | | var minute = date.getMinutes(); |
| | | //秒 getSeconds():(0 ~ 59) |
| | | var second = date.getSeconds(); |
| | | |
| | | //小于10的拼接上0字符串 |
| | | var time = year + addZero(month) + addZero(day) + addZero(hour) + addZero(minute) + addZero(second); |
| | | return time; |
| | | |
| | | }; |
| | | function addZero(s) { |
| | | return s < 10 ? ('0' + s) : s; |
| | | }; |
| | | //小于10的拼接上0字符串 |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions; |
| | | //#region 原始非自定义列 |
| | | // infoOptions = { |
| | | // elem: '#LAY-app-content-list', |
| | | // height: 'full-142', |
| | | // id: 'LAY-app-content-list', |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: [ |
| | | // [ |
| | | // { |
| | | // title: '序号',type: 'numbers',fixed: 'left',width:65 |
| | | // }, |
| | | // { |
| | | // field: 'WareHouseName', title: '仓库', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'RoadwayName', title: '巷道', align: 'center', width:100,hide:true |
| | | // }, |
| | | // { |
| | | // field: 'AreaName', title: '区域', align: 'center', width:100,hide:true |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo', title: '托盘号', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'LocatNo', title: '储位地址', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'BoxNo', title: '箱号', align: 'center', width:220 |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', title: '物料编码', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'SkuName', title: '物料名称', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'Qty', title: '库存数量', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'Standard', title: '物料规格', align: 'center',width:130 |
| | | // }, |
| | | // { |
| | | // title: '批次号', field: 'LotNo', align: 'center', width:140 |
| | | // }, |
| | | // { |
| | | // title: '批次描述', field: 'LotText', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // title: '供货批次', field: 'SupplierLot', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'LocatNo', title: '储位地址', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'ProductionTime', title: '生产时间', align: 'center',width:150, |
| | | // templet: function(d) { |
| | | // return formatDate2(d.ProductionTime); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // field: 'ExpirationTime', title: '过期时间', align: 'center',width:150, |
| | | // templet: function(d) { |
| | | // return formatDate2(d.ExpirationTime); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // field: 'Status', title: '物料状态', align: 'center',width:100, templet: '#buttonTpl' |
| | | // }, |
| | | // { |
| | | // field: 'InspectMark', title: '抽检标记', align: 'center',width:100, templet: '#InspectMarkStatus' |
| | | // }, |
| | | // { |
| | | // field: 'InspectStatus', title: '质量状态', align: 'center',width:100, templet: '#InspectStatus1' |
| | | // }, |
| | | // ] |
| | | // ], |
| | | }; |
| | | function addZero(s) { |
| | | return s < 10 ? ('0' + s) : s; |
| | | }; |
| | | |
| | | // }; |
| | | //#endregion |
| | | |
| | | // 表单需要的变量 |
| | | var infoOptions; |
| | | //#region 原始非自定义列 |
| | | // infoOptions = { |
| | | // elem: '#LAY-app-content-list', |
| | | // height: 'full-142', |
| | | // id: 'LAY-app-content-list', |
| | | // page: true, |
| | | // limit: pageCnt, |
| | | // limits: pageLimits, |
| | | // cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | // cols: [ |
| | | // [ |
| | | // { |
| | | // title: '序号',type: 'numbers',fixed: 'left',width:65 |
| | | // }, |
| | | // { |
| | | // field: 'WareHouseName', title: '仓库', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'RoadwayName', title: '巷道', align: 'center', width:100,hide:true |
| | | // }, |
| | | // { |
| | | // field: 'AreaName', title: '区域', align: 'center', width:100,hide:true |
| | | // }, |
| | | // { |
| | | // field: 'PalletNo', title: '托盘号', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'LocatNo', title: '储位地址', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'BoxNo', title: '箱号', align: 'center', width:220 |
| | | // }, |
| | | // { |
| | | // field: 'SkuNo', title: '物料编码', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'SkuName', title: '物料名称', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'Qty', title: '库存数量', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'Standard', title: '物料规格', align: 'center',width:130 |
| | | // }, |
| | | // { |
| | | // title: '批次号', field: 'LotNo', align: 'center', width:140 |
| | | // }, |
| | | // { |
| | | // title: '批次描述', field: 'LotText', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // title: '供货批次', field: 'SupplierLot', align: 'center', width:100 |
| | | // }, |
| | | // { |
| | | // field: 'LocatNo', title: '储位地址', align: 'center',width:100 |
| | | // }, |
| | | // { |
| | | // field: 'ProductionTime', title: '生产时间', align: 'center',width:150, |
| | | // templet: function(d) { |
| | | // return formatDate2(d.ProductionTime); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // field: 'ExpirationTime', title: '过期时间', align: 'center',width:150, |
| | | // templet: function(d) { |
| | | // return formatDate2(d.ExpirationTime); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // field: 'Status', title: '物料状态', align: 'center',width:100, templet: '#buttonTpl' |
| | | // }, |
| | | // { |
| | | // field: 'InspectMark', title: '抽检标记', align: 'center',width:100, templet: '#InspectMarkStatus' |
| | | // }, |
| | | // { |
| | | // field: 'InspectStatus', title: '质量状态', align: 'center',width:100, templet: '#InspectStatus1' |
| | | // }, |
| | | // ] |
| | | // ], |
| | | |
| | | // }; |
| | | //#endregion |
| | | |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | | { field: '', title: '序号', type: 'numbers', fixed: 'left', width: 65, "disabled": true }, |
| | | { field: 'WareHouseName', title: '仓库', align: 'center', width: 100 }, |
| | | { field: 'RoadwayName', title: '巷道', align: 'center', width: 100 }, |
| | | { field: 'AreaName', title: '区域', align: 'center', width: 100 }, |
| | | { field: 'PalletNo', title: '托盘号', align: 'center', width: 100 }, |
| | | { field: 'LocatNo', title: '储位地址', align: 'center', width: 100 }, |
| | | { field: 'BoxNo', title: '箱号', align: 'center', width: 220 }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 100 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center', width: 100 }, |
| | | { field: 'Qty', title: '库存数量', align: 'center', width: 100 }, |
| | | { field: 'Standard', title: '物料规格', align: 'center', width: 130 }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 140 }, |
| | | { field: 'LotText', title: '批次描述', align: 'center', width: 100 }, |
| | | { field: 'SupplierLot', title: '供货批次', align: 'center', width: 100 }, |
| | | { field: 'ProductionTime', title: '生产时间', align: 'center', width: 150, templet: '#templetProductionTime' }, |
| | | { field: 'ExpirationTime', title: '过期时间', align: 'center', width: 150, templet: '#templetExpirationTime' }, |
| | | { field: 'Status', title: '物料状态', align: 'center', width: 100, templet: '#buttonTpl' }, |
| | | { field: 'InspectMark', title: '抽检标记', align: 'center', width: 100, templet: '#InspectMarkStatus' }, |
| | | { field: 'InspectStatus', title: '质量状态', align: 'center', width: 100, templet: '#InspectStatus1' }, |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | console.log(TotalColsSysArr); |
| | | //#endregion |
| | | //获取总量信息 |
| | | function refreshTable(SkuNo, SkuName, LotNo, PalletNo, Status, InspectMark, InspectStatus, IsBale, IsBelt) { |
| | | //#region 自定义表头 |
| | | var TotalColsArr = [[ |
| | | {field: '',title: '序号',type:'numbers',fixed: 'left',width:65, "disabled": true}, |
| | | {field: 'WareHouseName', title: '仓库', align: 'center', width:100}, |
| | | {field: 'RoadwayName', title: '巷道', align: 'center', width:100}, |
| | | {field: 'AreaName', title: '区域', align: 'center', width:100}, |
| | | {field: 'PalletNo', title: '托盘号', align: 'center',width:100}, |
| | | {field: 'LocatNo', title: '储位地址', align: 'center', width:100}, |
| | | {field: 'BoxNo', title: '箱号', align: 'center', width:220}, |
| | | {field: 'SkuNo', title: '物料编码', align: 'center', width:100}, |
| | | {field: 'SkuName', title: '物料名称', align: 'center',width:100}, |
| | | {field: 'Qty', title: '库存数量', align: 'center',width:100}, |
| | | {field: 'Standard', title: '物料规格', align: 'center',width:130}, |
| | | {field: 'LotNo',title: '批次号', align: 'center', width:140}, |
| | | {field: 'LotText',title: '批次描述', align: 'center', width:100}, |
| | | {field: 'SupplierLot',title: '供货批次', align: 'center', width:100}, |
| | | {field: 'ProductionTime', title: '生产时间', align: 'center',width:150,templet: '#templetProductionTime'}, |
| | | {field: 'ExpirationTime', title: '过期时间', align: 'center',width:150,templet: '#templetExpirationTime'}, |
| | | {field: 'Status', title: '物料状态', align: 'center',width:100, templet: '#buttonTpl'}, |
| | | {field: 'InspectMark', title: '抽检标记', align: 'center',width:100, templet: '#InspectMarkStatus'}, |
| | | {field: 'InspectStatus', title: '质量状态', align: 'center',width:100, templet: '#InspectStatus1'}, |
| | | ]]; |
| | | var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | console.log(TotalColsSysArr); |
| | | //#endregion |
| | | //获取总量信息 |
| | | function refreshTable(SkuNo,SkuName,LotNo,PalletNo,Status,InspectMark,InspectStatus,IsBale,IsBelt) { |
| | | //#region 自定义表头 |
| | | var colsJson |
| | | var param1={ |
| | | Href:'Statistical/GetEmergencyWarning' |
| | | }; |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function(res) { |
| | | if (res.code == 0){ |
| | | if(res.data=='' || res.data==undefined || res.data==null){ |
| | | colsJson=TotalColsArr |
| | | }else{ |
| | | colsJson= eval(res.data); |
| | | } |
| | | }else{ |
| | | colsJson=TotalColsArr |
| | | var colsJson |
| | | var param1 = { |
| | | Href: 'Statistical/GetEmergencyWarning' |
| | | }; |
| | | sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { |
| | | if (res.code == 0) { |
| | | if (res.data == '' || res.data == undefined || res.data == null) { |
| | | colsJson = TotalColsArr |
| | | } else { |
| | | colsJson = eval(res.data); |
| | | } |
| | | infoOptions = { |
| | | elem: '#LAY-app-content-list', |
| | | height: h1, |
| | | id: 'LAY-app-content-list', |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function(){ |
| | | //自定义列宽 |
| | | SetTableColW('LAY-app-content-list','Statistical/GetEmergencyWarning',TotalColsSysArr); |
| | | }, |
| | | cols:colsJson |
| | | }; |
| | | |
| | | var param = { |
| | | SkuNo:SkuNo, |
| | | SkuName:SkuName, |
| | | LotNo:LotNo, |
| | | PalletNo:PalletNo, |
| | | Status:Status, |
| | | InspectMark:InspectMark, |
| | | InspectStatus:InspectStatus, |
| | | }; |
| | | sendData(IP + "/Statistical/GetEmergencyWarning", param, 'get', function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | var list = res.data; |
| | | $.extend(infoOptions, { |
| | | data: list |
| | | }); |
| | | infoOptions.page = { |
| | | curr: 1 |
| | | } |
| | | tableIns = table.render(infoOptions); |
| | | } else { //不成功 |
| | | layer.msg('获取临期物料信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {}); |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | } |
| | | // table.reload() |
| | | |
| | | var $ = layui.$; |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function(data) { |
| | | var SkuNo=data.field.SkuNo; |
| | | var SkuName=data.field.SkuName; |
| | | var LotNo=data.field.LotNo; |
| | | var PalletNo=data.field.PalletNo; |
| | | var Status=data.field.Status; |
| | | var InspectMark=data.field.InspectMark; |
| | | var InspectStatus=data.field.InspectStatus; |
| | | var IsBale=data.field.IsBale; |
| | | var IsBelt=data.field.IsBelt; |
| | | refreshTable(SkuNo,SkuName,LotNo,PalletNo,Status,InspectMark,InspectStatus,IsBale,IsBelt); |
| | | }); |
| | | |
| | | form.on('submit(daochu)', function () { |
| | | layer.confirm('确定导出当前数据吗?', function(index) { |
| | | var param = { |
| | | SkuNo:$("#SkuNo").val(), |
| | | SkuName:$("#SkuName").val(), |
| | | LotNo:$("#LotNo").val(), |
| | | PalletNo:$("#PalletNo").val(), |
| | | Status:$("#Status").val(), |
| | | InspectMark:$("#InspectMark").val(), |
| | | InspectStatus:$("#InspectStatus").val(), |
| | | IsBale:$("#IsBale").val(), |
| | | IsBelt:$("#IsBelt").val() |
| | | |
| | | }; |
| | | sendData(IP + "/Statistical/GetEmergencyWarning", param, 'get', function (res) { |
| | | //console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | var list = res.data; |
| | | table.exportFile(tableIns.config.id, list,'xls',"临期预警"+getNowTime(),); //data 为该实例中的任意数量的数据 |
| | | layer.msg('导出成功!', { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | |
| | | }); |
| | | |
| | | } else { //不成功 |
| | | layer.msg('获取信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | //#region 自定义表头 |
| | | //自定义表头 |
| | | active = { |
| | | customCols: function(){ |
| | | layer.open({ |
| | | type: 2, |
| | | title: '自定义列', |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetEmergencyWarning&ColsSysArr='+TotalColsSysArr, |
| | | maxmin: false, |
| | | resize: false, |
| | | area: ['970px', '650px'] |
| | | }); |
| | | } else { |
| | | colsJson = TotalColsArr |
| | | } |
| | | infoOptions = { |
| | | elem: '#LAY-app-content-list', |
| | | height: h1, |
| | | id: 'LAY-app-content-list', |
| | | page: true, |
| | | limit: pageCnt, |
| | | limits: pageLimits, |
| | | cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function () { |
| | | //自定义列宽 |
| | | SetTableColW('LAY-app-content-list', 'Statistical/GetEmergencyWarning', TotalColsSysArr); |
| | | }, |
| | | cols: colsJson |
| | | }; |
| | | |
| | | }; |
| | | $('.layui-btn').on('click', function() { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | var param = { |
| | | SkuNo: SkuNo, |
| | | SkuName: SkuName, |
| | | LotNo: LotNo, |
| | | PalletNo: PalletNo, |
| | | Status: Status, |
| | | InspectMark: InspectMark, |
| | | InspectStatus: InspectStatus, |
| | | }; |
| | | sendData(IP + "/Statistical/GetEmergencyWarning", param, 'get', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | var list = res.data; |
| | | $.extend(infoOptions, { |
| | | data: list |
| | | }); |
| | | infoOptions.page = { |
| | | curr: 1 |
| | | } |
| | | tableIns = table.render(infoOptions); |
| | | } else { //不成功 |
| | | layer.msg('获取临期物料信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | } |
| | | // table.reload() |
| | | |
| | | var $ = layui.$; |
| | | //监听搜索 |
| | | form.on('submit(LAY-app-contlist-search)', function (data) { |
| | | var SkuNo = data.field.SkuNo; |
| | | var SkuName = data.field.SkuName; |
| | | var LotNo = data.field.LotNo; |
| | | var PalletNo = data.field.PalletNo; |
| | | var Status = data.field.Status; |
| | | var InspectMark = data.field.InspectMark; |
| | | var InspectStatus = data.field.InspectStatus; |
| | | var IsBale = data.field.IsBale; |
| | | var IsBelt = data.field.IsBelt; |
| | | refreshTable(SkuNo, SkuName, LotNo, PalletNo, Status, InspectMark, InspectStatus, IsBale, IsBelt); |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | | form.on('submit(daochu)', function () { |
| | | layer.confirm('确定导出当前数据吗?', function (index) { |
| | | var param = { |
| | | SkuNo: $("#SkuNo").val(), |
| | | SkuName: $("#SkuName").val(), |
| | | LotNo: $("#LotNo").val(), |
| | | PalletNo: $("#PalletNo").val(), |
| | | Status: $("#Status").val(), |
| | | InspectMark: $("#InspectMark").val(), |
| | | InspectStatus: $("#InspectStatus").val(), |
| | | IsBale: $("#IsBale").val(), |
| | | IsBelt: $("#IsBelt").val() |
| | | |
| | | }; |
| | | sendData(IP + "/Statistical/GetEmergencyWarning", param, 'get', function (res) { |
| | | //console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | var list = res.data; |
| | | table.exportFile(tableIns.config.id, list, 'xls', "临期预警" + getNowTime(),); //data 为该实例中的任意数量的数据 |
| | | layer.msg('导出成功!', { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { |
| | | |
| | | }); |
| | | |
| | | } else { //不成功 |
| | | layer.msg('获取信息失败!', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | //#region 自定义表头 |
| | | //自定义表头 |
| | | active = { |
| | | customCols: function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '自定义列', |
| | | content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetEmergencyWarning&ColsSysArr=' + TotalColsSysArr, |
| | | maxmin: false, |
| | | resize: false, |
| | | area: ['970px', '650px'] |
| | | }); |
| | | } |
| | | |
| | | }; |
| | | $('.layui-btn').on('click', function () { |
| | | var type = $(this).data('type'); |
| | | active[type] ? active[type].call(this) : ''; |
| | | }); |
| | | //#endregion |
| | | }); |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |