|
@@ -22,16 +22,16 @@ setTimeout(function() {
|
|
|
}, 1000);
|
|
|
|
|
|
// 库位号回车
|
|
|
-$('#locationCode').keyup(function(event) {
|
|
|
- if(event.keyCode != "13") {
|
|
|
- return false;
|
|
|
- }
|
|
|
- $("#locationCode").val(trimStr($("#locationCode").val()));
|
|
|
+// $('#locationCode').keyup(function(event) {
|
|
|
+// if(event.keyCode != "13") {
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// $("#locationCode").val(trimStr($("#locationCode").val()));
|
|
|
|
|
|
- //播放扫描声音
|
|
|
- playSound('../raw/scan.wav');
|
|
|
- $('#barcode').focus();
|
|
|
-});
|
|
|
+// //播放扫描声音
|
|
|
+// playSound('../raw/scan.wav');
|
|
|
+// $('#barcode').focus();
|
|
|
+// });
|
|
|
|
|
|
// 条码回车
|
|
|
$('#barcode').keyup(function(event) {
|
|
@@ -59,7 +59,7 @@ $('#productQty').keyup(function(event) {
|
|
|
|
|
|
function submitWaveNo() {
|
|
|
if($("#waveNo").val() == '') {
|
|
|
- mui.alert('波次号不能为空!', '注意');
|
|
|
+ mui.alert('波次号或运单号不能为空!', '注意');
|
|
|
return;
|
|
|
}
|
|
|
var appRequest = $appRequest; //复制请求封装对象
|
|
@@ -85,7 +85,7 @@ function submitWaveNo() {
|
|
|
$("#customerCode").val(wave.customerCode);
|
|
|
$("#statusName").val(wave.statusName);
|
|
|
|
|
|
- $('#locationCode').focus();
|
|
|
+ $('#barcode').focus();
|
|
|
},
|
|
|
error: function() {
|
|
|
mui.alert('网络断开或服务器发生异常', '注意');
|
|
@@ -103,10 +103,10 @@ function submitOutShelf() {
|
|
|
mui.alert('波次号不能为空!', '注意');
|
|
|
return;
|
|
|
}
|
|
|
- if($("#locationCode").val() == '') {
|
|
|
- mui.alert('货位号不能为空!', '注意');
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if($("#locationCode").val() == '') {
|
|
|
+ // mui.alert('货位号不能为空!', '注意');
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
if($("#barcode").val() == '') {
|
|
|
mui.alert('商品条码不能为空!', '注意');
|
|
|
return;
|
|
@@ -118,14 +118,14 @@ function submitOutShelf() {
|
|
|
isSubmintIng = true;
|
|
|
|
|
|
var waveNo = $("#waveNo").val();
|
|
|
- var locationCode = $('#locationCode').val();
|
|
|
+ // var locationCode = $('#locationCode').val();
|
|
|
var barcode = $('#barcode').val();
|
|
|
var quantity = $("#productQty").val();
|
|
|
|
|
|
var jsonData = {};
|
|
|
jsonData.waveNo = waveNo;
|
|
|
jsonData.quantity = quantity;
|
|
|
- jsonData.locationCode = locationCode;
|
|
|
+ // jsonData.locationCode = locationCode;
|
|
|
jsonData.barcode = barcode;
|
|
|
|
|
|
var appRequest = $appRequest; //复制请求封装对象
|
|
@@ -140,21 +140,22 @@ function submitOutShelf() {
|
|
|
data: JSON.stringify(appRequest),
|
|
|
contentType: "application/json",
|
|
|
success: function(result) {
|
|
|
+ console.log(JSON.stringify(result))
|
|
|
isSubmintIng = false;
|
|
|
mui(document.getElementById("subButton")).button('reset'); //重置button
|
|
|
|
|
|
if(!result.success) {
|
|
|
playSound('../raw/error.wav');
|
|
|
- mui.alert(result.msg, '警告', function() { setFocus('locationCode'); });
|
|
|
+ mui.alert(result.msg, '警告', function() { setFocus('barcode'); });
|
|
|
return;
|
|
|
}
|
|
|
mui.toast(result.msg);
|
|
|
//播放成功声音
|
|
|
playSound('../raw/ok.wav');
|
|
|
|
|
|
- nextLocationCode(); // 下一个库位
|
|
|
+ nextBarcode(); // 下一个库位
|
|
|
|
|
|
- if(result.extend == '3') { // 波次完成下架
|
|
|
+ if(result.extend.flag == '3') { // 波次完成下架
|
|
|
cleanAll();
|
|
|
}
|
|
|
},
|
|
@@ -167,12 +168,12 @@ function submitOutShelf() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function nextLocationCode() {
|
|
|
+function nextBarcode() {
|
|
|
// 下架完之后清空
|
|
|
$(".allowClear").each(function() {
|
|
|
$(this).val("")
|
|
|
})
|
|
|
- $('#locationCode').focus();
|
|
|
+ $('#barcode').focus();
|
|
|
}
|
|
|
|
|
|
function cleanAll() {
|