Przeglądaj źródła

扫码枪波次下架功能新增显示波次分拣框

lsp 4 lat temu
rodzic
commit
749fac5ce7
3 zmienionych plików z 246 dodań i 2 usunięć
  1. 106 1
      html/out/outhelfByWave.html
  2. 138 0
      js/out/waveOutShelf.js
  3. 2 1
      js/wms/appRequest.js

+ 106 - 1
html/out/outhelfByWave.html

@@ -55,6 +55,59 @@
 						<input type="search" class="mui-input-clear" placeholder="扫描波次单号或运单号" id="waveNo" style="text-align: left;">
 					</div>
 
+					<div class="mui-input-row" onclick="showUnOutShelfDetails()" style="width:100%;font-size: 10pt;height: 20px;line-height: 20px;">
+						<label style="width: 15%;height: 20px;padding-top: 1px;padding-bottom: 0px;">
+							&nbsp;<i class="fa fa-angle-double-down" id="showUnOutShelfIco"></i>
+						</label>
+						
+						<label style="width: 16%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="barcode1">&nbsp;</span>
+						</label>
+						
+						<label style="width: 16%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="productName">&nbsp;</span>
+						</label>
+						
+						<label style="width: 17%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="locationCode">&nbsp;</span>
+						</label>
+						
+						<label style="width: 5%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="quantity">&nbsp;</span>
+						</label>
+						
+						<label style="width: 17%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="extend4">&nbsp;</span>
+						</label>
+					</div>
+					<div class="mui-input-row" id="showUnOutShelfDetails" style="max-height: 60px;overflow-y: auto;display: none;" >
+						<label style="width: 100%;padding-right: 0px;height: auto;padding-top: 0px;">
+							<table style="border-left-width: 0px;border-right-width: 0px; margin-top: 0px;width:100%; height: auto;margin-bottom: 0px;padding-bottom: 0px;border-style:solid;border-color:#EFEFEF"  border="1px"  >
+								<thead>
+									<tr>
+										<th style="text-align: left;font-size: 10pt;width:16%;height: 15px;line-height: 10px">
+											商品条码
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:20%;height: 15px;line-height: 10px">
+											商品名称
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:16%;height: 15px;line-height: 10px">
+											库位号
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:5%;height: 15px;line-height: 10px">
+											数量
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:20%;height: 15px;line-height: 10px">
+											分拣
+										</th>
+									</tr>
+								</thead>
+								<tbody id="unOutShelfItemList">
+								</tbody>
+							</table>		
+						</label>
+					</div>
+
 					<div class="mui-input-row">
 						<label>仓库代码</label>
 						<input type="text" placeholder="" readonly="readonly" id="warehouseCode" name="warehouseCode" class="readonlyInput" >
@@ -84,7 +137,59 @@
 						<label>下架数量</label>
 						<input class="mui-input-numbox allowClear" type="number" pattern="\d*" id="productQty" placeholder="输入数量" style="float: left;" />
 					</div>
-					 
+					
+					<div class="mui-input-row" onclick="alreadyOutShelfDetails()" style="width:100%;font-size: 10pt;height: 20px;line-height: 20px;">
+						<label style="width: 15%;height: 20px;padding-top: 1px;padding-bottom: 0px;">
+							&nbsp;<i class="fa fa-angle-double-down" id="showAlreadyOutShelfIco"></i>
+						</label>
+						
+						<label style="width: 16%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="barcode">&nbsp;</span>
+						</label>
+						
+						<label style="width: 16%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="productName">&nbsp;</span>
+						</label>
+						
+						<label style="width: 17%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="locationCode">&nbsp;</span>
+						</label>
+						
+						<label style="width: 5%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="quantity">&nbsp;</span>
+						</label>
+						
+						<label style="width: 17%;height: 20px;padding-top: 3px;padding-bottom: 0px;">
+							<span id="extend4">&nbsp;</span>
+						</label>
+					</div>
+					<div class="mui-input-row" id="alreadyOutShelfDetails" style="max-height: 60px;overflow-y: auto;display: none;" >
+						<label style="width: 100%;padding-right: 0px;height: auto;padding-top: 0px;">
+							<table style="border-left-width: 0px;border-right-width: 0px; margin-top: 0px;width:100%; height: auto;margin-bottom: 0px;padding-bottom: 0px;border-style:solid;border-color:#EFEFEF"  border="1px"  >
+								<thead>
+									<tr>
+										<th style="text-align: left;font-size: 10pt;width:16%;height: 15px;line-height: 10px">
+											商品条码
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:20%;height: 15px;line-height: 10px">
+											商品名称
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:16%;height: 15px;line-height: 10px">
+											库位号
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:5%;height: 15px;line-height: 10px">
+											数量
+										</th>
+										<th style="text-align: left;font-size: 10pt;width:20%;height: 15px;line-height: 10px">
+											分拣
+										</th>
+									</tr>
+								</thead>
+								<tbody id="alreadyOutShelfItemList">
+								</tbody>
+							</table>		
+						</label>
+					</div>
 				</form>
 				
 				<div class="mui-content-padded">

+ 138 - 0
js/out/waveOutShelf.js

@@ -81,6 +81,9 @@ function submitWaveNo() {
 			}
 			var wave = result.extend;
 			
+			//刷新待下架列表
+			showUnOutShelfDetails();
+			
 			$("#warehouseCode").val(wave.warehouseCode);
 			$("#customerCode").val(wave.customerCode);
 			$("#statusName").val(wave.statusName);
@@ -153,6 +156,10 @@ function submitOutShelf() {
         	//播放成功声音
         	playSound('../raw/ok.wav');
         	
+			//刷新下架列表
+			refreshUnOutShelfItems();
+			refreshAlreadyOutShelfItems();
+			
         	nextBarcode(); // 下一个库位
         	
 			if(result.extend.flag == '3') { // 波次完成下架
@@ -181,4 +188,135 @@ function cleanAll() {
 		$(this).val("")
 	})
 	$('#waveNo').focus();
+}
+
+
+//下架列表
+var isShowUnOutShelfDetails = false;
+function showUnOutShelfDetails(){
+	if(!isShowUnOutShelfDetails){
+		$("#showUnOutShelfDetails").show();
+		isShowUnOutShelfDetails = true;
+		$("#showUnOutShelfIco").attr("class", "fa fa-angle-double-up");
+		
+		//刷新明细
+		refreshUnOutShelfItems();
+	}else{
+		$("#showUnOutShelfDetails").hide();
+		isShowUnOutShelfDetails = false;
+		$("#showUnOutShelfIco").attr("class", "fa fa-angle-double-down");
+	}
+	//回到上次焦点地方
+	// if(focusId!=null && focusId != ''){
+	// 	$("#"+focusId).focus();		
+	// }
+}
+
+//显示待下架明细
+function refreshUnOutShelfItems(){
+	var waveNo = $('#waveNo').val();
+   
+   	var appRequest = $appRequest;//复制请求封装对象
+   	appRequest.opType = OP_TYPE_MENU.BATCH_OUT_SHELF_3;
+   	appRequest.msg = waveNo;//msg是消息内容主体
+	
+	$("#unOutShelfItemList").empty();
+	$.ajax({
+        type: 'POST',
+        url: $appRequestUrl,
+        contentType: "application/json; charset=utf-8",
+        data: JSON.stringify(appRequest),
+        success: function (appResponse) {
+        	if(!appResponse.success){
+    			return;
+    		}
+			
+        	var waitQtyTotal = 0;
+    		var itemList = appResponse.extend;
+			// console.log(JSON.stringify(itemList));
+			
+			var unOutShelfList = itemList.unOutShelfList;
+    		for(var index = 0; index < unOutShelfList.length; index ++){
+				var unOutShelf = unOutShelfList[index];
+				var tr = "<tr id='item_"+unOutShelf.id+"'>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+unOutShelf.barcode+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+unOutShelf.productName+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+unOutShelf.locationCode+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+unOutShelf.quantity+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+unOutShelf.extend4+"</div></th>";
+					tr += "</tr>";
+				
+				$("#unOutShelfItemList").append(tr);
+    		}
+        },
+        error: function () {
+        	playSound('../raw/error.wav');
+        	mui.toast('网络断开或服务器发生异常');  
+        }
+	});
+}
+
+//已下架列表
+var isAlreadyOutShelfDetails = false;
+function alreadyOutShelfDetails(){
+	if(!isAlreadyOutShelfDetails){
+		$("#alreadyOutShelfDetails").show();
+		isAlreadyOutShelfDetails = true;
+		$("#showAlreadyOutShelfIco").attr("class", "fa fa-angle-double-up");
+		
+		//刷新明细
+		refreshAlreadyOutShelfItems();
+	}else{
+		$("#alreadyOutShelfDetails").hide();
+		isAlreadyOutShelfDetails = false;
+		$("#showAlreadyOutShelfIco").attr("class", "fa fa-angle-double-down");
+	}
+	//回到上次焦点地方
+	/* if(focusId!=null && focusId != ''){
+		$("#"+focusId).focus();		
+	} */
+}
+
+//显示已下架明细
+function refreshAlreadyOutShelfItems(){
+	var waveNo = $('#waveNo').val();
+   
+   	var appRequest = $appRequest;//复制请求封装对象
+   	appRequest.opType = OP_TYPE_MENU.BATCH_OUT_SHELF_3;
+   	appRequest.msg = waveNo;//msg是消息内容主体
+	
+	$("#alreadyOutShelfItemList").empty();
+	$.ajax({
+        type: 'POST',
+        url: $appRequestUrl,
+        contentType: "application/json; charset=utf-8",
+        data: JSON.stringify(appRequest),
+        success: function (appResponse) {
+        	if(!appResponse.success){
+    			return;
+    		}
+			
+        	var waitQtyTotal = 0;
+    		var itemList = appResponse.extend;
+			// console.log(JSON.stringify(itemList));
+			
+			var alreadyOutShelfList = itemList.alreadyOutShelfList;
+    		for(var index = 0; index < alreadyOutShelfList.length; index ++){
+				var alreadyOutShelf = alreadyOutShelfList[index];
+				var tr = "<tr id='item_"+alreadyOutShelf.id+"'>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+alreadyOutShelf.barcode+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+alreadyOutShelf.productName+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+alreadyOutShelf.locationCode+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+alreadyOutShelf.quantity+"</div></th>";
+					tr += "<th><div style='width:100%;overflow: hidden;font-size: 9pt;text-align: left;'>"+alreadyOutShelf.extend4+"</div></th>";
+					tr += "</tr>";
+				
+				$("#alreadyOutShelfItemList").append(tr);
+    		}
+        },
+        error: function () {
+        	playSound('../raw/error.wav');
+        	mui.toast('网络断开或服务器发生异常');  
+        }
+	});
 }

+ 2 - 1
js/wms/appRequest.js

@@ -30,6 +30,7 @@ OP_TYPE_MENU.OUT_BOXED_4 = 'OUT_BOXED_4';// 下架步骤4:提交条码,提交装
 
 OP_TYPE_MENU.BATCH_OUT_SHELF_1 = 'BATCH_OUT_SHELF_1';// 波次下架步骤1:提交波次单 查看是否允许下架
 OP_TYPE_MENU.BATCH_OUT_SHELF_2 = 'BATCH_OUT_SHELF_2';// 波次下架步骤2:提交
+OP_TYPE_MENU.BATCH_OUT_SHELF_3 = 'BATCH_OUT_SHELF_3';// 波次下架步骤3:订单列表
 
 OP_TYPE_MENU.BATCH_OUT_SHELF_PICK_1='BATCH_OUT_SHELF_PICK_1';//波次分拣
 
@@ -99,4 +100,4 @@ var $appResponse = {}
 $appResponse.success = true;//是否成功
 $appResponse.code = '' //消息代码
 $appResponse.msg = '';//消息内容体
-$appResponse.extend = '';//扩展
+$appResponse.extend = '';//扩展