From 59a91fadefd16806964ab9f6e2ca0fb90c23854c Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期一, 11 三月 2024 19:00:27 +0800
Subject: [PATCH] Merge branch 'csc'

---
 Wms/Wms/Controllers/PdaSoController.cs       |   33 +
 Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs      |   30 +
 Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs      |    7 
 Pda/View/SoSetting/SampleOut.html            | 1484 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs |   26 
 5 files changed, 1,569 insertions(+), 11 deletions(-)

diff --git a/Pda/View/SoSetting/SampleOut.html b/Pda/View/SoSetting/SampleOut.html
new file mode 100644
index 0000000..75d9bf8
--- /dev/null
+++ b/Pda/View/SoSetting/SampleOut.html
@@ -0,0 +1,1484 @@
+<!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="layout-skuLotNo" class="layui-form-item layout-dropdownlist">
+                                <label class="layui-form-label lableWidth">鐗╂枡 - 鎵规锛�</label>
+                                <div class="layui-input-block">
+                                    <select id="skuLotNo" lay-filter="getSkuLotNo" 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" border="" cellspacing="" cellpadding="">
+                                    <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>
+                                    <tr>
+                                        <td colspan="3">
+                                            <div class="layui-form-item">
+                                                <label class="layui-form-label" style="width: 17%;">瑙勬牸锛�</label>
+                                                <div class="layui-input-block" style="width: 83%;margin-left:17%;">
+                                                    <input id="standard" type="text" lay-verify="" disabled placeholder=""
+                                                        class="layui-input">
+                                                </div>
+                                            </div>
+                                        </td>
+                                        
+                                    </tr>
+                                </table>
+                            </div>
+                        </div>
+                        <div id="kuqianlabel" >
+                            <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>
+						<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">鎷h揣鏁伴噺锛�</label>
+											<div class="layui-input-block">
+												<input id="pickQty1" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
+													class="layui-input" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+											</div>
+										</div>
+									</td>
+								</tr>						
+							</table>						
+						</div>
+						<div id="" class="layout-tab-page">
+							<table class="layout-tab-content" border="" cellspacing="" cellpadding="">
+								<tr>
+									<td>
+										<table class="tbl-box-sim-info" border="" cellspacing="" cellpadding="">
+											<tr>
+												<td>
+													<div class="layui-form-item">
+														<label class="layui-form-label lableWidth">寰呮嫞鏁伴噺锛�</label>
+														<div class="layui-input-block">
+															<input id="pickQty" type="text" lay-verify="" disabled
+																placeholder="" class="layui-input">
+														</div>
+													</div>
+												</td>
+												<td>
+													<div class="layui-form-item">
+														<label class="layui-form-label lableWidth">宸叉嫞鏁伴噺锛�</label>
+														<div class="layui-input-block">
+															<input id="pickedQty" type="text" lay-verify="" disabled
+																placeholder="" class="layui-input">
+														</div>
+													</div>
+												</td>
+											</tr>
+										</table>
+									</td>
+								</tr>
+							</table>
+							<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">鎷h揣</button>
+									</td>
+									<td style="width: 33%;"></td>
+									
+								</tr>
+							</table>
+							<div id="" style="text-align: right;margin-top: 10px;">
+								<div id="" class="cut-line">
+									<img src="/assets/fengexian.png">
+								</div>
+							</div>
+						</div>
+
+					</form>
+				</div>
+
+				<div class="layout-tbl-paging" id="">
+					<table id="tableBoxList" class="tbl-box-list" border="" cellspacing="" cellpadding="">
+						<tr id="tableHead">
+							<th style="width: 54%;">瀹瑰櫒缂栫爜</th>
+							<th style="width: 20%;">绠卞唴<br>鏁伴噺</th>
+							<th style="width: 20%;">宸叉嫞<br>鏁伴噺</th>
+							<!-- <th style="width: 14%;">宸叉嫞<br>鏁伴噺</th> -->
+							<!-- <th style="width: 8%;">鎷h揣</th> -->
+						</tr>
+						<tr id="boxCell" style="display: none;">
+							<td name="boxNo">AG000001</td> 
+							<td name="qty">30</td>
+							<td name="pickedQty">30</td> 
+						</tr>
+					</table>
+
+					<!-- 鍒嗛〉 -->
+					<table id="tableBoxPages" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+						<tr>
+							<td class="page-prev">涓婁竴椤�</td>
+							<td class="page-num page-num-select">1</td>
+							<td class="page-num">2</td>
+							<td class="page-num">3</td>
+							<td class="page-num">4</td>
+							<td class="page-num">5</td>
+							<td class="page-next">涓嬩竴椤�</td>
+						</tr>
+					</table>
+				</div>
+			</div>
+			<!-- 鏃犵爜 -->
+			<div id="content2">
+				
+				<div id="" class="layout-bill-info">
+					<form class="layui-form" action="" style="height: auto;">
+
+						<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="layout-skuLotNo2" class="layui-form-item layout-dropdownlist">
+							<label class="layui-form-label lableWidth">鐗╂枡 - 鎵规锛�</label>
+							<div class="layui-input-block">
+								<select id="skuLotNo2" lay-filter="getSkuLotNo2" 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" border="" cellspacing="" cellpadding="">
+								<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>
+								<tr>
+									<td colspan="3">
+										<div class="layui-form-item">
+											<label class="layui-form-label" style="width: 17%;">瑙勬牸锛�</label>
+											<div class="layui-input-block" style="width: 83%;margin-left:17%;">
+												<input id="standard2" type="text" lay-verify="" disabled placeholder=""
+													class="layui-input">
+											</div>
+										</div>
+									</td>
+									
+								</tr>
+							</table>
+						</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 class="layui-form-item layout-input" style="display: flex; justify-content: space-between;">
+							<div style="width: 49%;">
+								<label class="layui-form-label" style="width: 34%;">鍑哄簱鍙o細</label>
+								<div class="layui-input-block" style="width: 62%;margin-left:34%;">
+									<input id="outModel2" type="text" lay-verify="" disabled placeholder=""
+										class="layui-input" > <!-- style="border: 0px;" -->
+								</div>
+							</div>
+							<div style="width: 49%;">
+								<label class="layui-form-label" style="width: 70px;">宸叉嫞鏁伴噺锛�</label>
+								<div class="layui-input-block" style="width: 120px; margin-left:70px;">
+									<input id="pickedQty2" type="text" lay-verify="" disabled
+									placeholder="" class="layui-input" >
+								</div>
+							</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" >鎷h揣鏁伴噺锛�</label>
+											<div id="" class="local-input">
+												<div class="layui-input-block">
+													<input id="pickQty2" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
+														autocomplete="off" class="layui-input" style="padding-left:0.1rem;"
+														oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
+												</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;">
+								<div id="" class="cut-line">
+									<img src="/assets/fengexian.png">
+								</div>
+							</div>
+						</div>
+
+					</form>
+				</div>
+
+				<div class="layout-tbl-paging" id="">
+					<table id="tableBoxList2" class="tbl-box-list" border="" cellspacing="" cellpadding="">
+						<tr id="tableHead2">
+							<th style="width: 54%;">鐗╂枡缂栫爜</th>
+							<th style="width: 20%;">鎵樺唴<br>鏁伴噺</th>
+							<th style="width: 20%;">宸叉嫞<br>鏁伴噺</th>
+							<!-- <th style="width: 14%;">宸叉嫞<br>鏁伴噺</th> -->
+							<!-- <th style="width: 8%;">鎷h揣</th> -->
+						</tr>
+						<tr id="boxCell2" style="display: none;">
+							<td name="SkuNo">AG000001</td> 
+							<td name="Qty">30</td>
+							<td name="pickedQty">30</td> 
+						</tr>
+					</table>
+
+					<!-- 鍒嗛〉 -->
+					<table id="tableBoxPages2" class="tbl-box-pages" border="" cellspacing="" cellpadding="">
+						<tr>
+							<td class="page-prev">涓婁竴椤�</td>
+							<td class="page-num page-num-select">1</td>
+							<td class="page-num">2</td>
+							<td class="page-num">3</td>
+							<td class="page-num">4</td>
+							<td class="page-num">5</td>
+							<td class="page-next">涓嬩竴椤�</td>
+						</tr>
+					</table>
+				</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;
+
+			/* 鏍囩鍒囨崲浠g爜 */
+
+			var xianshiyemian = 0;
+            
+            $('#kuneilabel').hide();
+            $('#kuqianlabel').hide();
+			$('#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 curPageIndex = 1
+			//鏄惁鏁存墭鎷h揣
+			var isContinue = "0";
+			var tableData = null
+			var tableData2 = null
+			var canPickBox = true
+			$("#palletNo").focus();//鍏夋爣榛樿閫変腑		
+
+			function clear1() {
+				$('#outModel').val("");//鍑哄簱鍙�
+				$('#standard').val("");//瑙勬牸
+
+				$('#pickQty').val("");//寰呮嫞鏁伴噺
+				$('#pickedQty').val("");//宸叉嫞鏁伴噺
+			}
+			function clear2() {
+				//鐗╂枡鎵规
+				$("#skuLotNo").empty()
+				$("#skuLotNo").append('<option value =>' + '</option>');
+				form.render('select');
+			}
+			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()
+			})
+
+			form.on('switch(IsZhengTuo)', function (obj) {
+				if (obj.elem.checked) {
+					$('#BoxDIv').attr("style", "display:none")
+					isContinue="1";
+				} else {					
+					$('#BoxDIv').attr("style", "display:block")
+					isContinue="0";
+				}
+				$('#boxNo').val("");
+				$('#boxNo3').val("");
+			});
+
+			//绠辩爜鏂囨湰妗嗗洖杞︿簨浠�
+			$("#boxNo").blur(function () {
+				GetBoxInfo();
+
+			});
+			
+			$("#boxNo3").blur(function () {
+				
+				GetBoxInfo();
+			});
+
+			//妫�鏌ユ墭鐩樼姸鎬�
+			function checkPalletState() {
+                
+				var param = {
+					"PalletNo": $("#palletNo").val()
+				}
+				synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
+                    
+					if (res.code == 0) { //鎴愬姛 
+                        synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
+                            if (res.code == 0){
+                                if (res.data == "0") {//搴撳唴鍙栨牱
+                                    $('#kuneilabel').show();
+                                    $('#kuqianlabel').hide();
+                                }
+                                if (res.data == "1") {//搴撳墠鍙栨牱
+                                    $('#kuqianlabel').show();
+                                    $('#kuneilabel').hide();
+                                }
+                                // updateBillList();
+                                // if ($('#bar').val() == "") {
+                                //     clear1();
+                                //     return;
+                                // } else {
+                                //     updateSkuLotNoList();
+                                //     updateQtyList();
+                                //     getBar();
+                                //     GetBoxInfo();
+                                // }
+                            }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 ($('#palletNo').val() == "") {
+					layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}, function () {
+						//鍥炶皟
+					});
+					return
+				}
+				if ($('#bar').val() == "") {
+					clear1();
+					clear2();
+					clear3();
+					return
+				}
+				updateSkuLotNoList();
+				updateQtyList();
+				getBar();
+				GetBoxInfo();
+			});
+			//涓嬫媺鐗╂枡鎵规閫変腑鍚庝簨浠�
+			form.on('select(getSkuLotNo)', function (data) {
+				if ($('#palletNo').val() == "") {
+					layer.msg("璇疯緭鍏ユ墭鐩樻潯鐮�", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}, function () {
+						clear1();
+						clear3();
+					});
+					return
+				}
+				if ($('#skuLotNo').val() == "") {
+					clear1();
+					clear3();
+					return
+				}
+				updateQtyList();
+				getBar();
+				GetBoxInfo();
+			});
+
+			//鍒濆鍖栨覆鏌� 鍑哄簱鍗�
+			function updateBillList() {
+
+				$("#bar").empty()
+				$("#bar").append('<option value =>' + '</option>');
+				form.render('select');
+
+				var param = {
+					PalletNo: $("#palletNo").val(),
+				};
+				synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						console.log(res.data);
+						for (var i = 0; i < res.data.length; i++) {
+							if (i == 0) {
+								$("#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 updateSkuLotNoList() {
+				clear2();
+
+				var param = {
+					PalletNo: $("#palletNo").val(),
+					SoNo: $("#bar").val(),
+				};
+				synData(IP + "/PdaSo/GetSoSkuLotNoListByPallet", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						for (var i = 0; i < res.data.length; i++) {
+							if (i == 0) {
+								$("#skuLotNo").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i].SkuName + " - " + res.data[i].LotNo + '</option>');
+
+							} else {
+								$("#skuLotNo").append('<option value =' + res.data[i].SoDetailId + '>' + res.data[i].SkuName + " - " + res.data[i].LotNo + '</option>');
+							}
+						}
+						form.render('select');
+
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//鍒濆鍖栨覆鍗曟嵁鐨勮鍒掓暟閲忓拰瀹屾垚鏁伴噺
+			function updateQtyList() {
+				clear3();
+				var param = {
+					SoDetailId: $("#skuLotNo").val(),
+				};
+				synData(IP + "/PdaSo/GetPlanAndFinishQty", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						console.log(res.data);
+						$("#planQty").val(res.data.PlanQty)
+						$("#finishQty").val(res.data.FinishQty)
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//鏍规嵁鍗曟嵁鑾峰彇鍑哄簱鍙�
+			function getBar() {
+				clear1();
+
+				var param = {
+					PalletNo: $("#palletNo").val(),
+					SoDetailId: $("#skuLotNo").val(),
+				}
+				synData(IP + "/PdaSo/GetOutlets", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						let data = res.data
+						console.log(res.data);
+						$('#outModel').val(res.data.OutModel);
+						$('#standard').val(res.data.Standard);
+
+						$('#pickQty').val(res.data.PickQty);
+						$('#pickedQty').val(res.data.PickedQty);
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+
+			}
+
+			//娓叉煋琛ㄦ牸鏁版嵁				
+			function refreshTable(list) {
+				//鍏堟竻绌轰竴涓嬩俊鎭垪琛�
+				let trs = $("#tableBoxList tr")
+				let len = trs.length
+				//console.log("tr 鏁伴噺 + " + trs.length)
+				for (i = len - 1; i >= 2; i--) {
+					trs[i].remove();
+				}
+
+				console.log(list != null);
+				console.log(list);
+				if (list != null && list.length > 0) { //鎴愬姛
+
+					var arrTrs = new Array()
+					let idx = 0
+					for (var i in list) {
+						// list[i].BoxCode
+						var tr = $("#boxCell").eq(0).clone();
+						tr.appendTo("#tableBoxList");
+						// tr.attr('id', list[i].BoxCode)
+						idx++;
+						tr.attr('index', idx)
+						// tr.find("td[name='skuNo']").attr('style', 'max-width:90px;');
+						// tr.find("td[name='skuName']").attr('style', 'max-width:120px;');
+						tr.find("td[name='boxNo']").html(list[i].BoxNo); 
+						tr.find("td[name='qty']").html(list[i].Qty);
+						tr.find("td[name='pickedQty']").html(list[i].PickedQty);
+
+						tr.show();
+						arrTrs[i] = tr
+					}
+					setPages(1, list.length)
+					canPickBox = true
+
+				} else { //涓嶆垚鍔�
+					layer.msg("鏃犳暟鎹�", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}, function () { });
+					// $("#boxNum").val(0)
+					setPages(1, 0)
+				}
+			}
+
+			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
+			function GetBoxInfo() { 
+				let param2 = {
+					"SoDetailId": $("#skuLotNo").val(),
+					"PalletNo": $("#palletNo").val(),
+					"BoxNo": $("#boxNo").val(),
+					"BoxNo3": $("#boxNo3").val(),
+				}
+				synData(IP + "/PdaSo/GetDataComBoxInfo", param2, 'post', function (res) {
+					if (res.code == 0) {
+						tableData = deepCopy(res.data)
+
+						refreshTable(tableData)
+					} else {
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//鍗曟嫞璐э紙纭鎸夐挳锛�
+			form.on('submit(formPickScatter)', function (data) {
+
+				if ($('#bar').val() == "") {
+					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(isContinue=="0"){
+					if ($('#boxNo').val() == "") {
+						layer.msg("璇疯緭鍏ョ鐮�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}); return;
+					}
+					if ($('#boxQty').val() == "") {
+						layer.msg("绠卞唴鏁伴噺涓虹┖锛屼笉鑳芥嫞璐�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+					if(($('#boxNo3').val() != "" && ($('#pickQty1').val() != "" || $('#pickQty1').val() != 0))){
+						layer.msg("杩芥函鏉$爜鍜屾嫞璐ф暟閲忎笉鑳藉悓鏃惰緭鍏ワ紒", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+					if($('#pickQty1').val() != "" && $('#pickQty1').val()>parseInt($('#pickQty').val())){
+						layer.msg("鎷h揣鏁伴噺涓嶈兘澶т簬寰呮嫞鏁伴噺锛�", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return;
+					}
+				}				
+				// let boxQty = parseInt($('#boxQty').val())
+				// let qty = parseInt($('#qty').val()) 
+				// if (qty <= 0 || qty > boxQty) {
+				// 	layer.msg("鎷h揣鏁伴噺闇�澶т簬0锛屽苟涓斾笉鑳借秴杩囧緟鎷g鍐呮暟閲�", {
+				// 		icon: 2,
+				// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+				// 	});
+				// 	return;
+				// }
+
+				if (canPickBox == false) {
+
+					layer.msg("璇锋眰鏈畬鎴愶紝涓嶈閲嶅璇锋眰", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					});
+					return;
+				}
+
+				reqPickScatter()
+
+				return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+			});
+
+			//纭鎷h揣 
+			function reqPickScatter() {
+				var param = {
+					"SoNo": $("#bar").val(),
+					"SoDetailId": $("#skuLotNo").val(),
+					"PalletNo": $('#palletNo').val(),
+					"BoxNo": $('#boxNo').val(),
+					"BoxNo3": $('#boxNo3').val(),
+					"PickQty":$('#pickQty1').val()
+				}
+				sendData(IP + "/PdaSo/SoSetPick", param, 'post', function (res) {
+					//console.log(res);
+					
+					if (res.code == 0) { //鎴愬姛
+						layer.msg(res.msg, {
+							icon: 1,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
+							canPickBox = true//鍥炶皟
+							$("#boxNo").val('');
+							$("#boxNo3").val('');
+							updateQtyList();
+							getBar();
+							GetBoxInfo();
+						});
+					} 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 setPages(pageIndex, boxNum){
+					if(boxNum <= 0){
+						//鍒楄〃涓虹┖锛岄殣钘忓垎椤甸〉鐮�
+						$("#tableBoxPages").hide()
+						return
+					}
+					
+					let pageNum = Math.floor(boxNum / 10);
+					if(boxNum % 10 > 0){
+						pageNum += 1;
+					}
+					//console.log("pageNum is " + pageNum)
+					
+					$("#tableBoxPages").find("tr").remove()
+					let table = $("#tableBoxPages")
+					$("<tr></tr>").appendTo("#tableBoxPages")
+					
+					// let newTr = table.append("<tr></tr>")
+					// newTr.append("<td class='page-prev'>涓婁竴椤�</td>")
+					$("<td id='prevPage' class='page-prev'>涓婁竴椤�</td>").appendTo("#tableBoxPages tr")
+					$("#tableBoxPages tr").eq(0).find("td[id^='prevPage']").click(function(){
+						onClickPrevPage()
+					})
+					for(i=1; i < pageNum + 1; i++){
+						// newTr.append("<td class='page-num'>"+ i +"</td>")
+						$("<td class='page-num'>"+ i +"</td>").appendTo("#tableBoxPages tr")
+					}
+					// newTr.append("<td class='page-next'>涓嬩竴椤�</td>")
+					$("<td id='nextPage' class='page-next'>涓嬩竴椤�</td>").appendTo("#tableBoxPages tr")
+					$("#tableBoxPages tr").eq(0).find("td[id^='nextPage']").click(function(){
+						onClickNextPage()
+					})
+					// pages.show()
+					$("#tableBoxPages").show()
+					
+					setCurPage(1)
+				}
+				
+			//璁剧疆褰撳墠鍒嗛〉
+			function setCurPage(pageIndex){
+				let totalTrNum = $("#tableBoxList tr").length
+				if(totalTrNum <= 2 ){
+					//console.log("tableBoxList 涓虹┖ totalTrNum: " + totalTrNum)
+					//curPageIndex = 1
+					return
+				}
+				
+				let pageNum = getBoxPageNum()
+				if(pageIndex > pageNum){
+					//console.log("璁剧疆鐨勯〉鐮佽秴鍑洪〉鏁�, pageIndex : " + pageIndex)
+					//curPageIndex = 1
+					return
+				}
+				
+				let startIndex = (pageIndex - 1) * 10 + 1
+				let n = totalTrNum - startIndex
+				let endIndex = 0
+				if(n > 9){
+					endIndex = startIndex + 9
+				}else{
+					endIndex = startIndex + n
+				}
+				//console.log("startIndex is "+startIndex)
+				//console.log("endIndex is "+endIndex)
+				//startIndex =2
+				//endIndex = 2
+				let trs = $("#tableBoxList tr")
+				//console.log("琛屾暟 "+trs.length)
+				let d = 0
+				for(let i = 2; i < trs.length; i++){
+					//console.log("琛岀储寮� " + trs.eq(i).attr('index'))
+					let t = trs.eq(i)
+					d = t.attr('index')
+					if(d >= startIndex && d <= endIndex){
+						//console.log("闇�瑕佹樉绀�")
+						//鏄剧ず琛�
+						t.show()
+					}else{
+						//闅愯棌琛�
+						t.hide()
+					}
+				}
+				
+				curPageIndex = pageIndex
+				
+				let ptr = $("#tableBoxPages tr")
+				for(let i = 1; i < pageNum+1; i++){
+					ptr.eq(0).find("td").eq(i).removeClass("page-num-select")
+					if(i == curPageIndex){
+						ptr.eq(0).find("td").eq(i).addClass("page-num-select")
+					}
+				}
+				//console.log("totalTrNum is " + totalTrNum)
+			}
+			
+			function onClickPrevPage(){
+				//console.log("涓婁竴椤垫寜閽鐐瑰嚮")
+				if(curPageIndex == 1){
+					return
+				}
+				setCurPage(curPageIndex - 1)
+			}
+			
+			function onClickNextPage(){
+				//console.log("涓嬩竴椤垫寜閽鐐瑰嚮")
+				let n = getBoxPageNum()
+				if(curPageIndex == n){
+					return
+				}
+				setCurPage(curPageIndex + 1)
+			}
+							
+			function getBoxPageNum()
+			{
+				let num = $("#tableBoxList tr").length
+				if(num <= 2 ){
+					return 0
+				}
+				
+				let pageNum = Math.floor(num / 10);
+				if(num % 10 > 0){
+					pageNum += 1;
+				}
+				
+				return pageNum
+			}
+
+
+			//鏁伴噺鏍囩-------------------------------------------------------------------------------
+
+			function clear21() {
+				$('#outModel2').val("");//鍑哄簱鍙�
+				$('#standard2').val("");//瑙勬牸
+
+				$('#pickQty2').val("");//寰呮嫞鏁伴噺
+				$('#pickedQty2').val("");//宸叉嫞鏁伴噺
+			}
+			function clear22() {
+				//鐗╂枡鎵规
+				$("#skuLotNo2").empty()
+				$("#skuLotNo2").append('<option value =>' + '</option>');
+				form.render('select');
+			}
+			function clear23() {
+				$("#planQty2").val("");  //璁″垝鏁伴噺
+				$("#finishQty2").val("");//瀹屾垚鏁伴噺
+			}
+			function clear24() {
+				$('#boxNo2').val("");//绠辩爜
+				$('#boxQty2').val("");//绠卞唴鏁伴噺
+			}
+			
+
+			//褰撴墭鐩樻潯鐮佽緭鍏ユ鏂囨湰鏀瑰彉鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬� 
+			$("#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) { //鎴愬姛 
+						updateBillList2();
+						console.log($('#bar2').val())
+						if ($('#bar2').val() == "") {
+							console.log(1)
+							clear21();
+							return;
+						} else {
+							console.log(2)
+							updateSkuLotNoList2();
+							updateQtyList2();
+							getBar2();
+							GetDataInfo();
+						}
+
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+			//鍒濆鍖栨覆鏌� 鍑哄簱鍗�
+			function updateBillList2() {
+				$("#bar2").empty()
+				$("#bar2").append('<option value =>' + '</option>');
+				form.render('select');
+
+				var param = {
+					PalletNo: $("#palletNo2").val(),
+				};
+				synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						console.log(res.data);
+						for (var i = 0; i < res.data.length; i++) {
+							if (i == 0) {
+								$("#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 updateSkuLotNoList2() {
+				clear22(); 
+				var param = {
+					PalletNo: $("#palletNo2").val(),
+					SoNo: $("#bar2").val(),
+				};
+				synData(IP + "/PdaSo/GetSoSkuLotNoListByPallet", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						for (var i = 0; i < res.data.length; i++) {
+							if (i == 0) {
+								$("#skuLotNo2").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i].SkuName);
+									if(res.data[i].LotNo == null)
+									{
+										$("#skuLotNo2").append(" - " + res.data[i].LotNo);
+									}
+								$("#skuLotNo2").append('</option>');
+
+							} else {
+								$("#skuLotNo2").append('<option value =' + res.data[i].SoDetailId + '>' + res.data[i].SkuName);
+									if(res.data[i].LotNo == null)
+									{
+										$("#skuLotNo2").append(" - " + res.data[i].LotNo);
+									}
+								$("#skuLotNo2").append('</option>');
+							}
+						}
+						form.render('select');
+
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//鍒濆鍖栨覆鍗曟嵁鐨勮鍒掓暟閲忓拰瀹屾垚鏁伴噺
+			function updateQtyList2() {
+				clear23();
+				var param = {
+					SoDetailId: $("#skuLotNo2").val(),
+				};
+				synData(IP + "/PdaSo/GetPlanAndFinishQty", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						console.log(res.data);
+						$("#planQty2").val(res.data.PlanQty)
+						$("#finishQty2").val(res.data.FinishQty)
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//鏍规嵁鍗曟嵁鑾峰彇鍑哄簱鍙c�佽鏍笺�佸緟妫�鏁伴噺銆佸凡鎷f暟閲�
+			function getBar2() {
+				clear21();
+
+				var param = {
+					PalletNo: $("#palletNo2").val(),
+					SoDetailId: $("#skuLotNo2").val(),
+				}
+				synData(IP + "/PdaSo/GetOutlets", param, 'post', function (res) {
+					if (res.code == 0) { //鎴愬姛
+						let data = res.data
+						console.log(res.data);
+						$('#outModel2').val(res.data.OutModel);
+						$('#standard2').val(res.data.Standard);
+
+						$('#pickQty2').val(res.data.PickQty - res.data.PickedQty);
+						$('#pickedQty2').val(res.data.PickedQty);
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+
+			}
+
+			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
+			function GetDataInfo() { 
+				let param2 = {
+					"SoDetailId": $("#skuLotNo2").val(),
+					"PalletNo": $("#palletNo2").val(),
+				}
+				console.log(param2);
+				synData(IP + "/PdaSo/GetAllotPlnInfo", param2, 'post', function (res) {
+					if (res.code == 0) {
+						tableData2 = deepCopy(res.data)
+
+						refreshTable2(tableData2)
+					} else {
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () { });
+					}
+				});
+			}
+
+			//娓叉煋琛ㄦ牸鏁版嵁				
+			function refreshTable2(list) {
+				//鍏堟竻绌轰竴涓嬩俊鎭垪琛�
+				let trs = $("#tableBoxList2 tr")
+				let len = trs.length
+				//console.log("tr 鏁伴噺 + " + trs.length)
+				for (i = len - 1; i >= 2; i--) {
+					trs[i].remove();
+				}
+
+				console.log(list != null);
+				console.log(list);
+				if (list != null && list.length > 0) { //鎴愬姛
+
+					var arrTrs = new Array()
+					let idx = 0
+					for (var i in list) {
+						// list[i].BoxCode
+						var tr = $("#boxCell2").eq(0).clone();
+						tr.appendTo("#tableBoxList2");
+						// tr.attr('id', list[i].BoxCode)
+						idx++;
+						tr.attr('index', idx)
+						// tr.find("td[name='skuNo']").attr('style', 'max-width:90px;');
+						// tr.find("td[name='skuName']").attr('style', 'max-width:120px;');
+						tr.find("td[name='SkuNo']").html(list[i].BoxNo); 
+						tr.find("td[name='Qty']").html(list[i].Qty);
+						tr.find("td[name='pickedQty']").html(list[i].PickedQty);
+
+						tr.show();
+						arrTrs[i] = tr
+					}
+					setPages(1, list.length)
+					canPickBox = true
+
+				} else { //涓嶆垚鍔�
+					layer.msg("鏃犳暟鎹�", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}, function () { });
+					// $("#boxNum").val(0)
+					setPages(1, 0)
+				}
+			}
+
+			//鍗曟嫞璐э紙纭鎸夐挳锛�
+			form.on('submit(formPickScatter2)', function (data) {
+
+				if ($('#bar2').val() == "") {
+					layer.msg("璇烽�夋嫨鍑哄簱鍗�", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}); return;
+				}
+				if ($('#skuLotNo2').val() == "") {
+					layer.msg("璇烽�夋嫨鐗╂枡-鎵规", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}); return;
+				}
+				if ($('#palletNo2').val() == "") {
+					layer.msg("璇疯緭鍏ユ墭鐩樼爜", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					}); return;
+				}			
+				let pickedQty = parseInt($('#pickedQty2').val()) //宸叉嫞鏁伴噺
+				let pickQty = parseInt($('#pickQty2').val())  //鎷h揣鏁伴噺
+				if (pickQty <= 0) {
+					layer.msg("鎷h揣鏁伴噺闇�澶т簬0", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					});
+					return;
+				}
+
+				if (canPickBox == false) {
+
+					layer.msg("璇锋眰鏈畬鎴愶紝涓嶈閲嶅璇锋眰", {
+						icon: 2,
+						time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+					});
+					return;
+				}
+
+				reqPickScatter2()
+
+				return false; //闃绘琛ㄥ崟璺宠浆銆傚鏋滈渶瑕佽〃鍗曡烦杞紝鍘绘帀杩欐鍗冲彲銆�
+			});
+
+			//纭鎷h揣 
+			function reqPickScatter2() {
+				var param = {
+					"SoNo": $("#bar2").val(),
+					"SoDetailId": $("#skuLotNo2").val(),
+					"PalletNo": $('#palletNo2').val(),
+					"PickQty": $('#pickQty2').val(),
+				}
+				sendData(IP + "/PdaSo/SoSetQtyPick", param, 'post', function (res) {
+					//console.log(res);
+					
+					if (res.code == 0) { //鎴愬姛
+						layer.msg(res.msg, {
+							icon: 1,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
+							canPickBox = true//鍥炶皟
+							updateQtyList2();
+							getBar2();
+							GetDataInfo();
+						});
+					} else { //涓嶆垚鍔�
+						layer.msg(res.msg, {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						}, function () {
+							canPickBox = true;//鍥炶皟
+						});
+					}
+				});
+			}
+
+
+		})
+	</script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index a9b7c7a..8a95a3a 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -1230,17 +1230,23 @@
                         throw new Exception($"{palletNo}鎵樼洏鏉$爜涓嶅叿鏈夌鐮佷俊鎭紝涓嶅彲鍏ュ簱锛�");
                     }
                     skuNo = stockDetail.First().SkuNo;
-                    //else
-                    //{
-                    //    //鍒ゆ柇鏄惁鏈夐浂绠�
-                    //    var detailIdList = stockDetail.Select(m => m.Id).ToList();
-                    //    var dataBoxInfo = Db.Queryable<DataBoxInfo>().Where(m => detailIdList.Contains(m.StockDetailId)).ToList();
-                    //    if (dataBoxInfo.Count(m => m.BitBoxMark == "1")>0)
-                    //    {
-                    //        throw new Exception($"{palletNo}鎵樼洏涓婃湁闆剁锛屼笉鍙叆搴擄紒");
-                    //    }
+                    if (!string.IsNullOrWhiteSpace(stockDetail.First().WareHouseNo))
+                    {
+                        if (stockDetail.First().WareHouseNo == "W01")//绔嬪簱
+                        {
+                            throw new Exception($"{palletNo}鎵樼洏涓婂湪绔嬪簱涓湁搴撳瓨鍌ㄤ綅淇℃伅锛岃鏍稿疄锛�");
+                        }
 
-                    //}
+                        if (stockDetail.First().WareHouseNo == "W02")//骞冲簱
+                        {
+                            var locatePingKu = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == stockDetail.First().LocatNo);
+                            if (locatePingKu != null)
+                            {
+                                locatePingKu.Status = "0";
+                                Db.Updateable(locatePingKu).ExecuteCommand();
+                            }
+                        }
+                    }
 
 
                     //鑾峰彇瀵瑰簲鍥炲簱瑙勫垯
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index fd358ae..87286b4 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -1284,6 +1284,34 @@
             }
         }
 
-
+        //鏍规嵁鎵樼洏鍙疯幏鍙栧彇鏍风被鍨�
+        public string GetSampleType(string palletNo)
+        {
+            try
+            {
+                var type = "";
+                var detail = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == palletNo);
+                if (detail== null)
+                {
+                    throw new Exception("褰撳墠鎵樼洏鏈湪搴撳瓨涓�");
+                }
+                //鎬庝箞鍒ゆ柇褰撳墠鎵樼洏鏄簱澶栬鍙栨牱鐨勬墭鐩橈紝姝e父鍑哄簱鍓╀綑鎵樼洏鐩墠杩欑鎯呭喌涔熻兘鎷h揣鍟婏紝涔熸病鏈夊垎閰嶄俊鎭�
+                var allot = Db.Queryable<BllExportAllot>().First(m =>
+                    m.IsDel == "0" && m.PalletNo == palletNo && m.Status != "5" && m.Status != "6");
+                if (allot!=null)
+                {
+                    type = "0";//搴撳唴鍙栨牱
+                }
+                else
+                {
+                    type = "1";//搴撳墠鍙栨牱
+                }
+                return type;
+            }
+            catch (Exception e)
+            {
+                throw new Exception(e.Message);
+            }
+        }
     }
 }
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
index fd73bd2..fbaedcf 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaSoServer.cs
@@ -115,5 +115,12 @@
         /// <returns></returns>
         void PlaneExportSuccess(string soNo, string palletNo,int userId);
 
+        /// <summary>
+        /// 鏍规嵁鎵樼洏鍙疯幏鍙栧彇鏍风被鍨� 
+        /// </summary>
+        /// <param name="palletNo"></param>
+        /// <returns>0锛氬簱鍐呭彇鏍枫��1锛氬簱鍓嶅彇鏍�</returns>
+        string GetSampleType(string palletNo);
+
     }
 }
diff --git a/Wms/Wms/Controllers/PdaSoController.cs b/Wms/Wms/Controllers/PdaSoController.cs
index cc41c9c..b320755 100644
--- a/Wms/Wms/Controllers/PdaSoController.cs
+++ b/Wms/Wms/Controllers/PdaSoController.cs
@@ -340,5 +340,38 @@
            
         }
 
+
+        /// <summary>
+        /// 鏍规嵁鎵樼洏鍙疯幏鍙栧彇鏍风被鍨�
+        /// </summary>
+        /// <param name="palletNo">鎵樼洏鍙�</param>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetSampleType(string palletNo)
+        {
+            try
+            {
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+                string UserId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(UserId))
+                {
+                    throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                } 
+
+                var type = _pdaSoSvc.GetSampleType(palletNo);
+
+                return Ok(new { data = type, code = 0, msg = "鑾峰彇鍙栨牱绫诲瀷" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = "鑾峰彇鍙栨牱绫诲瀷閿欒锛�" + e.Message });
+            }
+
+        }
+
     }
 }

--
Gitblit v1.8.0