瀏覽代碼

Merge branch 'master' of xwh/wms-pda-app into master

肖文浩 4 年之前
父節點
當前提交
a387d64453
共有 2 個文件被更改,包括 26 次插入25 次删除
  1. 3 3
      html/out/outhelfByWave.html
  2. 23 22
      js/out/waveOutShelf.js

+ 3 - 3
html/out/outhelfByWave.html

@@ -52,7 +52,7 @@
 				<form class="mui-input-group">
 					<div class="mui-input-row">
 						<label>波次单号</label>
-						<input type="search" class="mui-input-clear" placeholder="扫描波次单号" id="waveNo" style="text-align: left;">
+						<input type="search" class="mui-input-clear" placeholder="扫描波次单号或运单号" id="waveNo" style="text-align: left;">
 					</div>
 
 					<div class="mui-input-row">
@@ -70,10 +70,10 @@
 						<input type="text" placeholder="" readonly="readonly" id="statusName" class="readonlyInput">
 					</div>					
 				
-					<div class="mui-input-row">
+				<!-- 	<div class="mui-input-row">
 						<label>库位号码</label>
 						<input type="text" class="allowClear" placeholder="库位号码" id="locationCode">
-					</div>
+					</div> -->
 
 					<div class="mui-input-row">
 						<label>商品条码</label>

+ 23 - 22
js/out/waveOutShelf.js

@@ -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() {