| | |
| | | <div id="content1"> |
| | | <div id="zongDiv" class="layout-bill-info" style="height: 285px;"> |
| | | <form class="layui-form" action=""> |
| | | |
| | | |
| | | <div id="" class="layui-form-item layout-input"> |
| | | <label class="layui-form-label" lang>托盘条码:</label> |
| | | <div class="layui-input-block"> |
| | |
| | | placeholder="请扫描外箱条码" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <table class="layout-tbl-input" border="" cellspacing="" cellpadding=""> |
| | | <tr> |
| | | <td> |
| | | <div id="" class="layui-form-item layout-boxinfo"> |
| | | <label class="layui-form-label" style=" width: 21%;" lang>批次:</label> |
| | | <div class="layui-input-block" style=" width: 79%;margin-left: 21%;" > |
| | | <div class="layui-input-block" style=" width: 79%;margin-left: 21%;"> |
| | | <input id="LotNo" type="text" disabled placeholder="" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <tr> |
| | | <td> |
| | | <div id="" class="layui-form-item layout-boxinfo"> |
| | | <label class="layui-form-label" style=" width: 21%;" lang>物料名称:</label> |
| | | <div class="layui-input-block" style=" width: 79%;margin-left: 21%;" > |
| | | <div class="layui-input-block" style=" width: 79%;margin-left: 21%;"> |
| | | <input id="SkuName" type="text" disabled placeholder="" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | |
| | | <div id="content2"> |
| | | <div id="zongDiv2" class="layout-bill-info" style="height: 255px;"> |
| | | <form class="layui-form" id="form2" action=""> |
| | | <div id="" class="layui-form-item layout-input"> |
| | | <div id="" class="layui-form-item layout-input"> |
| | | <label class="layui-form-label" lang>物料编码:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="SkuNo" type="text" lay-verify="stock" lang langholder |
| | | placeholder="请输入物料编码" autocomplete="off" class="layui-input"> |
| | | <input id="SkuNo" type="text" lay-verify="stock" lang langholder placeholder="请输入物料编码" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div><div id="" class="layui-form-item layout-input"> |
| | | </div> |
| | | <div id="" class="layui-form-item layout-input"> |
| | | <label class="layui-form-label" lang>批次号:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="LotNo2" type="text" lay-verify="stock" lang langholder |
| | | placeholder="请输入批次" autocomplete="off" class="layui-input"> |
| | | <input id="LotNo2" type="text" lay-verify="stock" lang langholder placeholder="请输入批次" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div id="" class="layui-form-item layout-input"> |
| | |
| | | initLanguage() |
| | | setLanguage() |
| | | |
| | | |
| | | |
| | | //是否连续组托 |
| | | isContinue = "0"; |
| | | |
| | |
| | | |
| | | |
| | | //箱码回车事件 |
| | | $("#BoxCode").keydown(function (e) { |
| | | if (e.keyCode === 13) { |
| | | if ($("#BoxCode").val() == "") { |
| | | layer.msg('请先扫描箱码', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return |
| | | } |
| | | checkBoxInfo() |
| | | // $("#BoxCode").keydown(function (e) { |
| | | // if (e.keyCode === 13) { |
| | | // if ($("#BoxCode").val() == "") { |
| | | // layer.msg('请先扫描箱码', { |
| | | // icon: 2, |
| | | // time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | // }); |
| | | // return |
| | | // } |
| | | // checkBoxInfo() |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | // 箱码失去焦点时出发 |
| | | $("#BoxCode").blur(function () { |
| | | if ($("#BoxCode").val() == "") { |
| | | layer.msg('请先扫描箱码', { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | return |
| | | } |
| | | }); |
| | | checkBoxInfo() |
| | | }) |
| | | |
| | | |
| | | //箱回车事件 |
| | | function checkBoxInfo() { |
| | |
| | | "BoxNo": $("#BoxCode").val(), |
| | | } |
| | | sendData(IP + "/PdaSo/GetWmsBoxInfos", param, 'get', function (res) { |
| | | |
| | | |
| | | if (res.code == 0) { //成功 |
| | | $("#SkuName").val(res.data[0].SkuName); |
| | | $("#LotNo").val(res.data[0].LotNo); |
| | | |
| | | |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | //绑定到托盘事件 |
| | | form.on('submit(formBind)', function (data) { |
| | | if (xianshiyemian == 0) { |
| | | |
| | | |
| | | if ($("#PalletNo").val() == "") { |
| | | layer.msg('请扫描托盘条码', { |
| | | icon: 2, |
| | |
| | | $("#BoxCode").val(""); |
| | | $("#SkuName").val(""); |
| | | $("#LotNo").val(""); |
| | | |
| | | |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | |
| | | }); |
| | | return; |
| | | } |
| | | var param = { |
| | | var param = { |
| | | PalletNo: $("#PalletNo2").val(), |
| | | SkuNo: $("#SkuNo").val(), |
| | | LotNo: $("#LotNo2").val(), |
| | | SkuQty: parseFloat($("#SkuQty2").val()), //物料数量 |
| | | AreaNo:$("#area").val(), |
| | | AreaNo: $("#area").val(), |
| | | TableType: xianshiyemian, |
| | | } |
| | | console.log(param) |
| | |
| | | $("#SkuNo").val(""); |
| | | $("#SkuQty2").val(""); |
| | | $("#LotNo2").val(""); |
| | | |
| | | |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | |
| | | return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | /*——————————————————————————————————————————————————————————*/ |
| | | |