| | |
| | | <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"> |
| | | <style type="text/css"> |
| | | .layui-input-block { |
| | | width: 200px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HShortNumber" id="HShortNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料代码</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HNumber" id="HNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">产品名称</label> |
| | | <label class="layui-form-label">物料名称</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HName" id="HName"> |
| | | </div> |
| | |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>条码打印</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button> |
| | | |
| | | </div> |
| | |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , laydate = layui.laydate |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | , admin = layui.admin |
| | | , layer = layui.layer |
| | | , laydate = layui.laydate |
| | | , table = layui.table |
| | | , form = layui.form |
| | | , element = layui.element; |
| | | //常规用法 |
| | | laydate.render({ |
| | | elem: '#HDate1' |
| | |
| | | , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板 |
| | | , defaultToolbar: ['filter', 'exports', 'print'] |
| | | // , where: { msg: "", NowPage: 1, OnePage: 10 } |
| | | , cellMinWidth: 100 |
| | | , cols: [[ |
| | | { checkbox: true, fixed: true } |
| | | , { field: 'sorderid', title: '序号', width: 80, fixed: true } |
| | | , { field: 'HItemID', title: '主键', width: 100, hide: true } |
| | | , { field: '状态', title: '状态', width: 100, sort: true, fixed: true } |
| | | , { field: '条码编号', title: '条码编号', width: 180, sort: true, fixed: true } |
| | | , { field: '物料代码', title: '物料代码', width: 180, sort: true, fixed: true } |
| | | , { field: '物料名称', title: '物料名称', width: 180, sort: true } |
| | | , { field: '规格型号', title: '规格型号', width: 180, sort: true } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '数量', title: '数量', width: 100, sort: true } |
| | | , { field: '批次', title: '批次', width: 100 } |
| | | , { field: '供应商', title: '供应商', width: 180 } |
| | | , { field: '日期', title: '生成日期', width: 150, sort: true } |
| | | , { field: '源单主ID', title: '源单主ID', width: 100, hide: true } |
| | | , { field: '源单子ID', title: '源单子ID', width: 100, hide: true } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '源单类型', title: '源单类型', width: 100 } |
| | | ]] |
| | | , cellMinWidth: 100 |
| | | , cols: [[ |
| | | { checkbox: true/*, fixed: true*/ } |
| | | , { field: 'sorderid', title: '序号', width: 80/*, fixed: true*/ } |
| | | , { field: 'HItemID', title: '主键', width: 100, hide: true } |
| | | , { field: '状态', title: '状态', width: 100, sort: true/*, fixed: true*/ } |
| | | , { field: '条码编号', title: '条码编号', width: 180, sort: true/*, fixed: true*/ } |
| | | , { field: '物料编码', title: '物料编码', width: 120, sort: true/*, fixed: true*/ } |
| | | , { field: '物料代码', title: '物料代码', width: 120, sort: true/*, fixed: true*/ } |
| | | , { field: '物料名称', title: '物料名称', width: 120, sort: true } |
| | | , { field: '数量', title: '数量', width: 100, sort: true } |
| | | , { field: '内外箱标识', title: '内外箱标识', width: 100, sort: true } |
| | | , { field: '当前托数', title: '当前托数', width: 100, sort: true } |
| | | , { field: '总托数', title: '总托数', width: 100, sort: true } |
| | | , { field: '规格型号', title: '规格型号', width: 120, sort: true } |
| | | , { field: '计量单位', title: '计量单位', width: 80, sort: true } |
| | | , { field: '批次', title: '批次', width: 100 } |
| | | , { field: '供应商', title: '供应商', width: 180 } |
| | | , { field: '日期', title: '生成日期', width: 150, sort: true } |
| | | , { field: '源单主ID', title: '源单主ID', width: 100, hide: true } |
| | | , { field: '源单子ID', title: '源单子ID', width: 100, hide: true } |
| | | , { field: '源单单号', title: '源单单号', width: 180 } |
| | | , { field: '源单类型', title: '源单类型', width: 100 } |
| | | ]] |
| | | //, skin: 'row' //表格风格 |
| | | // , even: true |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limit: 50 //每页默认显示的数量 |
| | | , page: true //是否显示分页 |
| | | , limits: [10, 20, 50, 100] |
| | | , limit: 50 //每页默认显示的数量 |
| | | //, height: 500 |
| | | , done: function (res, curr, count) { |
| | | _cur_page = curr; |
| | | layer.closeAll("loading"); |
| | | } |
| | | , done: function (res, curr, count) { |
| | | _cur_page = curr; |
| | | layer.closeAll("loading"); |
| | | } |
| | | |
| | | }); |
| | | //头工具栏事件 |
| | |
| | | var data = checkStatus.data; |
| | | layer.alert(JSON.stringify(data)); |
| | | break; |
| | | //case 'getCheckLength': |
| | | // var data = checkStatus.data; |
| | | // layer.msg('选中了:' + data.length + ' 个'); |
| | | // break; |
| | | //case 'isAll': |
| | | // layer.msg(checkStatus.isAll ? '全选' : '未全选'); |
| | | // break; |
| | | //case 'getCheckLength': |
| | | // var data = checkStatus.data; |
| | | // layer.msg('选中了:' + data.length + ' 个'); |
| | | // break; |
| | | //case 'isAll': |
| | | // layer.msg(checkStatus.isAll ? '全选' : '未全选'); |
| | | // break; |
| | | |
| | | //自定义头工具栏右侧图标 - 提示 |
| | | //自定义头工具栏右侧图标 - 提示 |
| | | case 'btn-reload': |
| | | _cur_page = $(".layui-laypage-em").next().html(); |
| | | RoadHBillNo(sql); |
| | |
| | | break; |
| | | case "btn-print": |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | , data = checkStatus.data; |
| | | var rows = ''; |
| | | var rows2 = ''; |
| | | for (var i = 0; i < data.length; i++) { |
| | |
| | | } |
| | | rows = rows.substring(rows.length - 1, 0); |
| | | rows2 = rows2.substring(rows2.length - 1, 0); |
| | | if(rows=="") |
| | | { |
| | | if (rows == "") { |
| | | layer.msg("至少选择一行记录!") |
| | | } |
| | | else{ |
| | | else { |
| | | layer.open({ |
| | | type: 2 |
| | | , area: ['50%', '50%'] |
| | |
| | | // }); |
| | | //} |
| | | break; |
| | | case 'btn-Delete': |
| | | var checkStatus = table.checkStatus('mainTable') |
| | | , data = checkStatus.data; |
| | | if (checkStatus.data.length == 0) { |
| | | layer.msg('请选择要删除的数据!'); |
| | | return; |
| | | } |
| | | var InterID = ""; |
| | | for (i = 0; i < data.length; i++) { |
| | | InterID += data[i].HItemID.toString() + ","; |
| | | } |
| | | InterID = InterID.substring(0, InterID.length - 1) |
| | | //逻辑删除方法 |
| | | layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) { |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: GetWEBURL() + "/DeltetBarCodeBill", //方法所在页面和方法名 |
| | | data: { "HInterID": InterID, "HUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () { |
| | | // 得到frame索引 |
| | | var index = layer.getFrameIndex(window.name); |
| | | //关闭当前frame |
| | | layer.close(index); |
| | | //修改为功后刷新界面 |
| | | window.location.reload(); |
| | | }); |
| | | |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }); |
| | | }) |
| | | |
| | | |
| | | break; |
| | | case 'btn-exit': |
| | | parent.layui.admin.events.closeThisTabs(); |
| | | break; |
| | |
| | | where = sqlWhere; |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL()+"GetBarCodeShowList", |
| | | url: GetWEBURL() + "GetBarCodeShowList", |
| | | async: true, |
| | | data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere }, |
| | | success: function (result) { |
| | |
| | | sqlWhere += " and 条码编号 like ^^%" + $("#HBarCode").val() + "%^^"; |
| | | if ($("#HSourceBillNo").val() != "") |
| | | sqlWhere += " and 源单单号 like ^^%" + $("#HSourceBillNo").val() + "%^^"; |
| | | if ($("#HShortNumber").val() != "") |
| | | sqlWhere += " and 物料编码 like ^^%" + $("#HShortNumber").val() + "%^^"; |
| | | if ($("#HNumber").val() != "") |
| | | sqlWhere += " and 物料代码 like ^^%" + $("#HNumber").val() + "%^^"; |
| | | if ($("#HName").val() != "") |
| | |
| | | sqlWhere += " and 日期 <= ^^" + $("#HDate2").val() + "^^"; |
| | | } |
| | | |
| | | |
| | | |
| | | sql = sqlWhere; |
| | | //从第一页开始 |
| | | _cur_page = 1; |