<!DOCTYPE html>
|
<html>
|
|
<head>
|
<meta charset="UTF-8" />
|
<meta name="viewport" content="user-scalable=0,width=device-width,initial-scale=1.0" />
|
<!-- <meta name="viewport" content="width=device-width, initial-scale=0.665, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" /> -->
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<title>Boxline PDA</title>
|
|
<link rel="stylesheet" href="/layui/css/layui.css" />
|
<link rel="stylesheet" href="/css/style.css" />
|
<script src="/js/adaptive.js"></script>
|
|
<link rel="stylesheet" href="/css/my.css" />
|
<style type="text/css">
|
.layout-bill-info {
|
height: auto;
|
/* background-color: #009E94; */
|
}
|
|
.layout-tbl-submit {
|
margin-top: 10px;
|
}
|
|
/* .out-scatter-num {
|
background-color: #009688;
|
|
} */
|
.out-scatter-num .local-input {
|
width: 40%;
|
height: 25px;
|
float: left;
|
}
|
|
.out-scatter-num .local-ok button {
|
height: 25px;
|
border: 0;
|
color: #FFFFFF;
|
background-color: #0a93e3;
|
border-radius: 3px;
|
padding: 2px;
|
margin-left: 10px;
|
width: 100%;
|
}
|
|
.out-scatter-num .layui-input-block {
|
width: 100%;
|
/* background-color: #009E94; */
|
margin-left: 0;
|
}
|
|
.out-scatter-num .local-ok {
|
width: 20%;
|
height: 25px;
|
float: left;
|
}
|
|
.btn-ok-blue {
|
border: none;
|
color: #FFFFFF;
|
background-color: #0a93e3;
|
width: 48%;
|
height: 36px;
|
border-radius: 5px;
|
}
|
|
.btn-ok-red {
|
border: none;
|
color: #FFFFFF;
|
background-color: #9f1707;
|
width: 48%;
|
height: 36px;
|
border-radius: 5px;
|
}
|
|
.btn-ok-blue:active {
|
opacity: 0.8;
|
}
|
|
.btn-ok-red:active {
|
opacity: 0.8;
|
}
|
|
.layout-tbl-paging {
|
margin-top: 20px;
|
}
|
|
.foot-container {
|
text-align: center;
|
}
|
|
.layout-tab-page {
|
height: auto;
|
}
|
|
.layui-form-checkbox {
|
margin: auto;
|
/* padding-left: 2px; */
|
/* padding-right: 2px; */
|
}
|
|
.div-tbl-title {
|
width: 98%;
|
margin: auto;
|
/* background-color: #4476A7; */
|
height: 30px;
|
}
|
|
.div-tbl-title table {
|
width: 100%;
|
height: 30px;
|
}
|
|
td {
|
word-break: break-all;
|
word-wrap: break-word;
|
}
|
|
.layui-input-block .layui-input,
|
.layui-input-block .layui-textarea {
|
padding-left: 0rem;
|
font-size: 13px;
|
}
|
|
.lableWidth {
|
width: 17%;
|
}
|
|
.layui-input-block {
|
width: 83%;
|
margin-left: 17%;
|
}
|
|
.layui-form-switch {
|
margin-top: 0;
|
}
|
|
ul {
|
list-style-type: none;
|
padding: 0;
|
}
|
|
li {
|
cursor: pointer;
|
background-color: lightgray;
|
padding: 10px;
|
margin-bottom: 5px;
|
}
|
</style>
|
<link rel="stylesheet" href="/css/adapter.css" />
|
</head>
|
|
<body>
|
<div id="" class="main-content">
|
<div id="" class="layout-title">
|
<table border="" cellspacing="" cellpadding="">
|
<tr>
|
<td class="img-back"><a href="../index.html"><img src="/assets/back.jpg"></a></td>
|
<td class="title-text">取样出库</td>
|
<td class="title-menu-icon"><img id="menuImg" src="/assets/menu.jpg"></td>
|
</tr>
|
</table>
|
</div>
|
<div id="" class="layout-sub-content">
|
<div id="menuList" class="menu">
|
<ul class="" style="text-align: center;">
|
<li><a href="../index.html">主页</a></li>
|
<li><a href="../login.html">重新登录</a></li>
|
</ul>
|
</div>
|
|
<ul>
|
<li id="option1">标签</li>
|
<li id="option2">数量</li>
|
</ul>
|
|
<br />
|
|
<!-- 有码 -->
|
<div id="content1">
|
|
<div id="" class="layout-bill-info">
|
<form class="layui-form" action="" style="height: auto;">
|
|
<div id="kuneilabel">
|
<div id="layout-bill" class="layui-form-item layout-dropdownlist">
|
<label class="layui-form-label lableWidth">请验单:</label>
|
<div class="layui-input-block" id="selectDiv">
|
<select id="bar" lay-filter="getbar" lay-search>
|
<option value=""></option>
|
</select>
|
<img src="/assets/down_arraw.png">
|
</div>
|
</div>
|
|
<div id="" class="layout-tab-page">
|
<table class="tbl-box-sim-info" cellspacing="" cellpadding="">
|
<tr>
|
<td colspan="3">
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 20%;">物料:</label>
|
<div class="layui-input-block" style="width: 80%;margin-left:20%;">
|
<input id="sku" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="3">
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 20%;">批次号</label>
|
<div class="layui-input-block" style="width: 80%;margin-left:20%;">
|
<input id="lotNo" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 50%;">计划数量:</label>
|
<div class="layui-input-block" style="width: 50%;margin-left:50%;">
|
<input id="planQty" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
<td>
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 50%">完成数量:</label>
|
<div class="layui-input-block" style="width: 50%;margin-left:50%;">
|
<input id="finishQty" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
|
</td>
|
</tr>
|
|
</table>
|
</div>
|
</div>
|
|
<div id="layout-pallet" class="layui-form-item layout-input">
|
<label class="layui-form-label lableWidth">托盘条码:</label>
|
<div class="layui-input-block">
|
<input id="palletNo" type="text" lay-verify="stock" placeholder="请扫描托盘条码"
|
autocomplete="off" class="layui-input" style="height:24px">
|
</div>
|
</div>
|
|
<div id="BoxDIv" class="layout-tab-page">
|
<table class="layout-tab-content" border="" cellspacing="" cellpadding="">
|
<tr>
|
<td>
|
<div class="layui-form-item layout-input">
|
<label class="layui-form-label lableWidth">外箱条码:</label>
|
<div class="layui-input-block">
|
<input id="boxNo" type="text" placeholder="请扫描外箱条码" autocomplete="off"
|
class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<div class="layui-form-item layout-input" style="margin-top: 6px;">
|
<label class="layui-form-label lableWidth">追溯条码:</label>
|
<div class="layui-input-block">
|
<input id="boxNo3" type="text" lang langholder placeholder="请扫描追溯条码"
|
autocomplete="off" class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr class="divPickQty1">
|
<td>
|
<div class="layui-form-item layout-input" style="margin-top: 6px;">
|
<label class="layui-form-label lableWidth">拣货数量:</label>
|
<div class="layui-input-block">
|
<input id="pickQty1" type="text" placeholder="请输入拣货数量"
|
autocomplete="off" class="layui-input"
|
oninput="value=value.replace(/[^\d^\.]+/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3')"
|
onafterpaste="this.value=this.value.replace(/[^\d^\.]+/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3')">
|
</div>
|
</div>
|
</td>
|
</tr>
|
</table>
|
</div>
|
<div id="" class="layout-tab-page">
|
<table class="layout-tab-content">
|
<tr>
|
<td style="width: 33%;"></td>
|
<td>
|
<button class="layout-btn layout-btn-red" lang type="button" lay-submit
|
lay-filter="formPickScatter">拣货</button>
|
</td>
|
<td style="width: 33%;"></td>
|
|
</tr>
|
</table>
|
<div id="" style="text-align: right;margin-top: 10px; display: none;">
|
<div id="" class="cut-line">
|
<img src="/assets/fengexian.png">
|
</div>
|
</div>
|
</div>
|
|
</form>
|
</div>
|
|
|
</div>
|
<!-- 无码 -->
|
<div id="content2">
|
|
<div id="" class="layout-bill-info">
|
<form class="layui-form" action="" style="height: auto;">
|
<div id="kuneilabel2">
|
<div id="layout-bill2" class="layui-form-item layout-dropdownlist">
|
<label class="layui-form-label lableWidth">请验单:</label>
|
<div class="layui-input-block" id="selectDiv2">
|
<select id="bar2" lay-filter="getbar2" lay-search>
|
<option value=""></option>
|
</select>
|
<img src="/assets/down_arraw.png">
|
</div>
|
</div>
|
|
<div id="" class="layout-tab-page">
|
<table class="tbl-box-sim-info" cellspacing="" cellpadding="">
|
<tr>
|
<td colspan="3">
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 20%;">物料:</label>
|
<div class="layui-input-block" style="width: 80%;margin-left:20%;">
|
<input id="sku2" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="3">
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 20%;">批次号</label>
|
<div class="layui-input-block" style="width: 80%;margin-left:20%;">
|
<input id="lotNo2" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td>
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 50%;">计划数量:</label>
|
<div class="layui-input-block" style="width: 50%;margin-left:50%;">
|
<input id="planQty2" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
</td>
|
<td>
|
<div class="layui-form-item">
|
<label class="layui-form-label" style="width: 50%">完成数量:</label>
|
<div class="layui-input-block" style="width: 50%;margin-left:50%;">
|
<input id="finishQty2" type="text" lay-verify="" disabled
|
placeholder="" class="layui-input">
|
</div>
|
</div>
|
|
</td>
|
</tr>
|
|
</table>
|
</div>
|
</div>
|
|
<div id="layout-pallet" class="layui-form-item layout-input">
|
<label class="layui-form-label lableWidth">托盘条码:</label>
|
<div class="layui-input-block">
|
<input id="palletNo2" type="text" lay-verify="stock" placeholder="请扫描托盘条码"
|
autocomplete="off" class="layui-input" style="height:24px">
|
</div>
|
</div>
|
|
<div id="" class="layout-tab-page">
|
|
<table class="layout-tab-content">
|
<tr>
|
<td>
|
<div id="layout-qty" class="layui-form-item out-scatter-num">
|
<label class="layui-form-label lableWidth">拣货数量:</label>
|
<div id="" class="local-input">
|
<div class="layui-input-block">
|
<input id="pickQty2" type="text" placeholder="请输入拣货数量"
|
autocomplete="off" class="layui-input"
|
style="padding-left:0.1rem;"
|
oninput="value=value.replace(/[^\d^\.]+/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3')"
|
onafterpaste="this.value=this.value.replace(/[^\d^\.]+/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.').replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3')">
|
</div>
|
</div>
|
<div id="" class="local-ok">
|
<button type="button" lay-submit
|
lay-filter="formPickScatter2">确认</button>
|
</div>
|
</div>
|
</td>
|
</tr>
|
</table>
|
<div id="" style="text-align: right;margin-top: 10px; display: none;">
|
<div id="" class="cut-line">
|
<img src="/assets/fengexian.png">
|
</div>
|
</div>
|
</div>
|
|
</form>
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
<script src="/js/jquery-3.5.1.min.js"></script>
|
<script src="/layui/layui.js"></script>
|
<script src="/js/jquery.cookie.js"></script>
|
<script src="/js/public.js"></script>
|
|
<script>
|
layui.use(['form', 'jquery'], function () {
|
var form = layui.form;
|
|
/* 标签切换代码 */
|
var xianshiyemian = 0;
|
|
$('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //选中后颜色
|
$('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //默认颜色
|
$('#content2').hide();
|
$(document).ready(function () {
|
$('#option1').click(function () {
|
// qingkong();
|
xianshiyemian = 0;
|
$('#content1').show();
|
$('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //选中后颜色
|
|
$('#content2').hide();
|
$('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //默认颜色
|
$("#palletNo").focus();//光标默认选中
|
});
|
|
$('#option2').click(function () {
|
// qingkong();
|
xianshiyemian = 1;
|
$('#content1').hide();
|
$('#option1').attr("style", "background-color: #999;width: 45.77%;float: left;text-align: center;"); //默认颜色
|
|
$('#content2').show();
|
$('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //选中后颜色
|
$("#palletNo2").focus();//光标默认选中
|
});
|
});
|
|
|
var canPickBox = true
|
$("#palletNo").focus();//光标默认选中
|
|
|
function clear2() {
|
$("#sku").val("")//物料
|
$("#lotNo").val("") //批次
|
}
|
function clear3() {
|
$("#planQty").val(""); //计划数量
|
$("#finishQty").val("");//完成数量
|
}
|
function clear4() {
|
$('#boxNo').val("");//箱码
|
$('#boxQty').val("");//箱内数量
|
}
|
//当托盘条码输入框文本改变时,检查一下托盘状态
|
$("#palletNo").on('input', function () {
|
|
if ($("#palletNo").val() == "" || $("#palletNo").val().length < 8) {
|
return
|
}
|
if ($("#palletNo").val().length >= 8) {
|
$("#palletNo").val($("#palletNo").val().substr(-8))
|
}
|
checkPalletState()
|
})
|
updateBillList();
|
|
//检查托盘状态
|
function checkPalletState() {
|
|
var param = {
|
"PalletNo": $("#palletNo").val()
|
}
|
synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
|
|
if (res.code == 0) { //成功
|
synData(IP + "/PdaSo/GetSampleType2", param, 'get', function (res) {
|
if (res.code == 0) {
|
if (res.data != "0") {//库内取样
|
layer.msg("当前托盘不含标签,请在数量页取样", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
}
|
|
//下拉请验单据选中后事件
|
form.on('select(getbar)', function (data) {
|
|
if ($('#bar').val() == "") {
|
clear2();
|
clear3();
|
return
|
}
|
updateInspectionInfo();
|
});
|
|
//初始化渲染 请验单
|
function updateBillList() {
|
var bar = $("#bar").val();
|
$("#bar").empty()
|
$("#bar").append('<option value =>' + '</option>');
|
form.render('select');
|
|
synData(IP + "/PdaSo/GetInspectionNo", {}, 'get', function (res) {
|
if (res.code == 0) { //成功
|
|
for (var i = 0; i < res.data.length; i++) {
|
if (bar == res.data[i]) {
|
$("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
|
} else {
|
$("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
|
}
|
}
|
form.render('select');
|
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
});
|
}
|
});
|
}
|
|
//初始化渲染 请验单的信息 物料-批次、数量等
|
function updateInspectionInfo() {
|
clear2();
|
clear3();
|
var param = {
|
qcNo: $("#bar").val(),
|
};
|
synData(IP + "/PdaSo/GetInspectionRequestInfo", param, 'get', function (res) {
|
if (res.code == 0) { //成功
|
console.log(res.data);
|
$("#sku").val(res.data.Sku)
|
$("#lotNo").val(res.data.LotNo)
|
$("#planQty").val(res.data.Qty)
|
$("#finishQty").val(res.data.SamplingQty)
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
}
|
|
//单拣货(确认按钮)
|
form.on('submit(formPickScatter)', function (data) {
|
|
if (canPickBox == false) {
|
|
layer.msg("请求未完成,不要重复请求", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
});
|
return;
|
}
|
|
if ($('#bar').val() == "") {
|
layer.msg("请选择请验单", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}); return;
|
}
|
if ($('#palletNo').val() == "") {
|
layer.msg("请输入托盘码", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}); return;
|
}
|
|
if ($('#boxNo').val() == "") {
|
layer.msg("请输入箱码", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}); return;
|
}
|
|
reqPickScatter()
|
|
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
});
|
|
//确认拣货
|
function reqPickScatter() {
|
canPickBox = false//回调
|
var param = {
|
"QcNo": $("#bar").val(),
|
"PalletNo": $('#palletNo').val(),
|
"BoxNo": $('#boxNo').val(),
|
"BoxNo3": $('#boxNo3').val(),
|
"PickQty": $('#pickQty1').val(),
|
|
}
|
|
sendData(IP + "/PdaSo/SampleSetPick", param, 'post', function (res) {
|
|
if (res.code == 0) { //成功
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () {
|
|
canPickBox = true//回调
|
// $("#boxNo").val('');
|
$("#boxNo3").val('');
|
$("#pickQty1").val('');
|
updateInspectionInfo();
|
|
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () {
|
canPickBox = true;//回调
|
});
|
}
|
});
|
}
|
|
//----------------------------------------------------------------------------------
|
//主页及重新登录
|
$("#menuImg").click(function (e) {
|
//console.log("menuImg")
|
e.stopPropagation()
|
|
if ($("#menuList").is(":hidden")) {
|
$("#menuList").show()
|
} else {
|
$("#menuList").hide()
|
}
|
})
|
$('body').click(function () {
|
// //console.log("body")
|
$("#menuList").hide()
|
})
|
|
//数量标签-------------------------------------------------------------------------------
|
|
function clear22() {
|
//物料批次
|
$("#sku2").val("")//物料
|
$("#lotNo2").val("") //批次
|
}
|
function clear23() {
|
$("#planQty2").val(""); //计划数量
|
$("#finishQty2").val("");//完成数量
|
}
|
updateBillList2();
|
//当托盘条码输入框文本改变时,检查一下托盘状态
|
$("#palletNo2").on('input', function () {
|
if ($("#palletNo2").val() == "" || $("#palletNo2").val().length < 8) {
|
return
|
}
|
if ($("#palletNo2").val().length >= 8) {
|
$("#palletNo2").val($("#palletNo2").val().substr(-8))
|
}
|
checkPalletState2()
|
})
|
|
//检查托盘状态
|
function checkPalletState2() {
|
var param = {
|
"PalletNo": $("#palletNo2").val()
|
}
|
synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
|
|
if (res.code == 0) { //成功
|
synData(IP + "/PdaSo/GetSampleType2", param, 'get', function (res) {
|
if (res.code == 0) {
|
if (res.data != "1") {//库内取样
|
layer.msg("当前托盘含标签,请在标签 页取样", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
}
|
|
|
//下拉请验单据选中后事件
|
form.on('select(getbar2)', function (data) {
|
|
if ($('#bar2').val() == "") {
|
clear22();
|
clear23();
|
return
|
}
|
updateInspectionInfo2();
|
});
|
|
|
//初始化渲染 请验单
|
function updateBillList2() {
|
$("#bar2").empty()
|
$("#bar2").append('<option value =>' + '</option>');
|
form.render('select');
|
|
synData(IP + "/PdaSo/GetInspectionNo", {}, 'get', function (res) {
|
if (res.code == 0) { //成功
|
|
for (var i = 0; i < res.data.length; i++) {
|
if (bar == res.data[i]) {
|
$("#bar2").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
|
} else {
|
$("#bar2").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
|
}
|
}
|
form.render('select');
|
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
});
|
}
|
});
|
}
|
|
//初始化渲染 物料-批次
|
function updateInspectionInfo2() {
|
clear22();
|
clear23();
|
var param = {
|
qcNo: $("#bar2").val(),
|
};
|
synData(IP + "/PdaSo/GetInspectionRequestInfo", param, 'get', function (res) {
|
if (res.code == 0) { //成功
|
console.log(res.data);
|
$("#sku2").val(res.data.Sku)
|
$("#lotNo2").val(res.data.LotNo)
|
$("#planQty2").val(res.data.Qty)
|
$("#finishQty2").val(res.data.SamplingQty)
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () { });
|
}
|
});
|
}
|
|
//单拣货(确认按钮)
|
form.on('submit(formPickScatter2)', function (data) {
|
if (canPickBox == false) {
|
|
layer.msg("请求未完成,不要重复请求", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
});
|
return;
|
}
|
if ($('#bar2').val() == "") {
|
layer.msg("请选择出库单", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}); return;
|
}
|
|
if ($('#palletNo2').val() == "") {
|
layer.msg("请输入托盘码", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}); return;
|
}
|
let pickQty = parseFloat($('#pickQty2').val()) //拣货数量
|
if (pickQty <= 0) {
|
layer.msg("拣货数量需大于0", {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
});
|
return;
|
}
|
|
|
|
reqPickScatter2()
|
|
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
});
|
|
//确认拣货
|
function reqPickScatter2() {
|
canPickBox = false//回调
|
var param = {
|
"QcNo": $("#bar2").val(),
|
"PalletNo": $('#palletNo2').val(),
|
"PickQty": $('#pickQty2').val(),
|
}
|
sendData(IP + "/PdaSo/SampleSetQtyPick", param, 'post', function (res) {
|
//console.log(res);
|
|
if (res.code == 0) { //成功
|
|
layer.msg(res.msg, {
|
icon: 1,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () {
|
|
canPickBox = true//回调
|
|
$("#pickQty2").val('');
|
updateInspectionInfo2();
|
});
|
} else { //不成功
|
layer.msg(res.msg, {
|
icon: 2,
|
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
}, function () {
|
canPickBox = true;//回调
|
});
|
}
|
});
|
}
|
|
|
})
|
</script>
|
</body>
|
|
</html>
|