From 716b29fea5945ca7dc4419d9f1f980c379312b32 Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期四, 24 十月 2024 18:46:48 +0800
Subject: [PATCH] 修改问题

---
 Pda/View/SoSetting/productOut.html                   |   28 ++
 Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs |    4 
 HTML/views/ASNSetting/PalletBind.html                |    2 
 Pda/View/SoSetting/pinTuoOut.html                    |   28 ++
 Wms/Wms/Controllers/BllAsnController.cs              |    4 
 Wms/Wms/Controllers/PdaAsnController.cs              |   21 ++
 Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs             |  205 +++++++++++++++++++---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs        |    2 
 Pda/View/AsnSetting/productEnterQuantity.html        |  134 ++++++++++++--
 Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs             |    2 
 HTML/views/ASNSetting/BindBoxInfo.html               |    4 
 Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs              |   16 +
 Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs      |    2 
 HTML/views/SOSetting/ExportNotice.html               |    2 
 Pda/View/SoSetting/SampleOut.html                    |   28 ++
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs         |    5 
 16 files changed, 407 insertions(+), 80 deletions(-)

diff --git a/HTML/views/ASNSetting/BindBoxInfo.html b/HTML/views/ASNSetting/BindBoxInfo.html
index 5b6eec2..c60dfca 100644
--- a/HTML/views/ASNSetting/BindBoxInfo.html
+++ b/HTML/views/ASNSetting/BindBoxInfo.html
@@ -72,14 +72,17 @@
 					form = layui.form,
 					layer = layui.layer;
 				var boxNo = getQueryString('BoxNo');
+				var bindNo = getQueryString('BindNo');
 				if (!boxNo)
 				{
 					boxNo = "";
+					bindNo = "";
 				}
 				else
 				{
 					var param = {
 						boxNo: boxNo,
+						bindNo: bindNo,
 					};
                    
                     console.log(getQueryString('BoxNo'))
@@ -87,6 +90,7 @@
                     refreshTable();
                     function refreshTable() {
 						var param={
+							BindNo:getQueryString('BindNo'),
 							BoxNo:getQueryString('BoxNo'),
 							BoxNo3:$("#BoxNo3").val()
 						}
diff --git a/HTML/views/ASNSetting/PalletBind.html b/HTML/views/ASNSetting/PalletBind.html
index c819d22..611e486 100644
--- a/HTML/views/ASNSetting/PalletBind.html
+++ b/HTML/views/ASNSetting/PalletBind.html
@@ -808,7 +808,7 @@
 						layer.open({
 							type: 2,
 							title: '绠辨敮璇︽儏淇℃伅',
-							content: 'BindBoxInfo.html?BoxNo=' + BoxNo,
+							content: 'BindBoxInfo.html?BoxNo=' + BoxNo+'&BindNo='+data.BindNo,
 							maxmin: true,
 							area: ['80%', '85%'],
 							btn: ['鍏抽棴'],
diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html
index cc00349..0cda1be 100644
--- a/HTML/views/SOSetting/ExportNotice.html
+++ b/HTML/views/SOSetting/ExportNotice.html
@@ -372,7 +372,7 @@
 													<i class="layui-icon layui-icon-delete"></i>鍙栨秷鍒嗛厤
 												</a>`;
 									}
-									if( d.Status == '2' || d.Status == '3'){
+									if( d.Status == '2' || d.Status == '3'|| (d.Status == '4' && d.Type == "1")){
 										html += `<a class="layui-btn layui-btn-normal layui-btn-xs outClass" lay-event="outKu">
 													<i class="layui-icon layui-icon-ok"></i>鍑哄簱
 												</a>`;
diff --git a/Pda/View/AsnSetting/productEnterQuantity.html b/Pda/View/AsnSetting/productEnterQuantity.html
index 9365895..ee6ef29 100644
--- a/Pda/View/AsnSetting/productEnterQuantity.html
+++ b/Pda/View/AsnSetting/productEnterQuantity.html
@@ -138,8 +138,15 @@
                         <div id="BOX" class="layui-form-item layout-input">
                             <label class="layui-form-label" lang>澶栫鏉$爜锛�</label>
                             <div class="layui-input-block">
-                                <input id="BOXCODE" type="text" lay-verify="required" lang langholder
+                                <input id="BOXCODE" type="text"  lang langholder
                                     placeholder="璇锋壂鎻忓绠辨潯鐮�" autocomplete="off" class="layui-input">
+                            </div>
+                        </div>
+                        <div id="BOX" class="layui-form-item layout-input">
+                            <label class="layui-form-label" lang>杩芥函鏉$爜锛�</label>
+                            <div class="layui-input-block">
+                                <input id="BOXCODE3" type="text" lang langholder
+                                    placeholder="璇锋壂鎻忚拷婧潯鐮�" autocomplete="off" class="layui-input">
                             </div>
                         </div>
                         <div id="" class="layui-form-item layout-input">
@@ -540,7 +547,29 @@
                     checkBoxInfo()
                 }
             });
+            //绠辩爜鍥炶溅浜嬩欢
+            $("#BOXCODE3").keydown(function (e) {
+                if (e.keyCode === 13) {
+                    if ($("#BOXCODE3").val() == "") {
+                        layer.msg('璇峰厛鎵弿杩芥函鐮�', {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                        return
+                    }
 
+                    // if ($("#STOCKCODE").val() == "") {
+                    // 	layer.msg('璇峰厛鎵弿鎵樼洏鐮�', {
+                    // 		icon: 2,
+                    // 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                    // 	});
+                    // 	$("#BOXCODE").val("");
+                    // 	$("#STOCKCODE").focus();
+                    // 	return;
+                    // }
+                    checkBoxInfo3()
+                }
+            });
             /* 鍏ュ簱鍗曟嵁涓嬫媺妗� */
             //鐐瑰嚮鍏ュ簱鍗曟嵁涓嬫媺妗嗕簨浠�
             // $("#selectDiv").click(function () {
@@ -713,19 +742,20 @@
                         });
                         return;
                     }
-                    if ($("#BOXCODE").val() == "") {
-                        layer.msg('璇锋壂鎻忓绠辨潯鐮�', {
-                            icon: 2,
-                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-                        });
-                        return;
-                    }
+                    // if ($("#BOXCODE").val() == "") {
+                    //     layer.msg('璇锋壂鎻忓绠辨潯鐮�', {
+                    //         icon: 2,
+                    //         time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                    //     });
+                    //     return;
+                    // }
                     var param = {
                         AsnNo: $("#goodSelect").val(),
                         PalletNo: $("#STOCKCODE").val(),
                         //AsnDetailId: parseInt($("#goodSelect").val()),
                         LotNo: $("#goodSelect").find("option:selected").text(),
                         BoxNo: $("#BOXCODE").val(),
+                        BoxNo01: $("#BOXCODE3").val(),
                         IsContinue: isContinue,
                         TailBoxNo: $("#BOXCODE2").val(),
                         Origin: "PDA",
@@ -763,6 +793,7 @@
                     //     });
                     //     return;
                     // }
+                    var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                     if ($("#goodSelect1").val() == "") {
                         layer.msg('璇烽�夋嫨鐗╂枡鍙婃槑缁�', {
                             icon: 2,
@@ -777,12 +808,19 @@
                         });
                         return;
                     }
+                    if (!reg.test($("#SkuQty").val())) {
+						layer.msg("鍏ュ簱鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
                     var param = {
                         AsnNo: $("#goodSelect1").val(), //鍑哄簱鍗曟嵁
                         PalletNo: $("#STOCKCODE1").val(), //鎵樼洏鏉$爜
                         //AsnDetailId: parseInt($("#goodSelect1").val()), //鍏ュ簱鍗曟槑缁咺D
                         LotNo: $("#goodSelect1").find("option:selected").text(),  //鐗╂枡鎵规
-                        SkuQty: parseInt($("#SkuQty").val()), //鐗╂枡鏁伴噺
+                        SkuQty: parseFloat($("#SkuQty").val()), //鐗╂枡鏁伴噺
                         Demo: $("#NoticeDemo").val(), //鐗╂枡鏁伴噺
                         Origin: "PDA",
                         TableType: xianshiyemian,
@@ -880,6 +918,7 @@
                             $("#Standard1").val(res.data.Standard);
                             $("#ImportFactQuantity1").val(res.data.FactQty + "");
                             if (res.data.SkuNo == "100088") {
+                                $("textarea[name='NoticeDemo']").val(res.data.UDF5); //澶囨敞
                                 $('#demodiv').show();
                                 $('#demodiv1').show();
                             }else{
@@ -1373,7 +1412,7 @@
             function checkBoxInfo() {
                 var param = {
                     "BoxNo": $("#BOXCODE").val(),
-                    "AsnNo":$("#bar").val(),
+                    "AsnNo":$("#goodSelect").val(),
                 }
                 sendData(IP + "/PdaAsn/GetBindBoxInfos", param, 'post', function (res) {
                     if (res.code == 0) { //鎴愬姛
@@ -1385,24 +1424,24 @@
                             });
                             return;
                         }
-                        if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) {
-                            $("#bar").empty()
-                            $("#bar").append('<option value =>' + '</option>');
-                            form.render('select');
+                        // if (res.data[0].ASNNo != '' && res.data[0].ASNNo != null) {
+                        //     $("#bar").empty()
+                        //     $("#bar").append('<option value =>' + '</option>');
+                        //     form.render('select');
 
-                            $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>');
+                        //     $("#bar").append('<option value =' + res.data[0].ASNNo + ' selected>' + res.data[0].ASNNo + '</option>');
 
-                            // updateGoodList(res.data[0].SkuNo)
-                            setOrderGoods();
-                        } else {
-                            if (asnDetails == '') {
-                                layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
-                                    icon: 2,
-                                    time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-                                });
-                                return;
-                            }
-                        }
+                        //     // updateGoodList(res.data[0].SkuNo)
+                        //     setOrderGoods();
+                        // } else {
+                        //     if (asnDetails == '') {
+                        //         layer.msg("璇峰厛閫夋嫨鍏ュ簱鍗曟嵁!", {
+                        //             icon: 2,
+                        //             time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        //         });
+                        //         return;
+                        //     }
+                        // }
                         asnDetails.forEach(element => {
                             console.log(element);
 
@@ -1431,6 +1470,49 @@
 
             }
 
+            function checkBoxInfo3() {
+                var param = {
+                    "BoxNo3": $("#BOXCODE3").val(),
+                    "AsnNo":$("#goodSelect").val(),
+                }
+                sendData(IP + "/PdaAsn/GetBindBoxInfo2s", param, 'post', function (res) {
+                    if (res.code == 0) { //鎴愬姛
+                        var bl = false;
+                        if (res.data.length == 0) {
+                            layer.msg("鏈煡璇㈠埌姝ょ鐗╂枡淇℃伅锛岃鏍稿疄!", {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
+                            return;
+                        }
+                    
+                        asnDetails.forEach(element => {
+                            console.log(element);
+
+                            if (element.SkuNo == res.data[0].SkuNo && element.LotNo == res.data[0].LotNo) {
+                                var sel = 'dd[lay-value=' + element.id + ']';
+                                $('#goodSelect').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this');
+                                bl = true;
+                            }
+                        });
+                        if (!bl) {
+                            layer.msg("姝ょ鐗╂枡涓嶇鍚堣鍏ュ簱鍗曪紝璇锋牳瀹�!", {
+                                icon: 2,
+                                time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                            });
+                        } else {
+                            $("#BoxQty").val(res.data[0].Qty);
+                        }
+
+                    } else { //涓嶆垚鍔�
+                        layer.msg(res.msg, {
+                            icon: 2,
+                            time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+                        });
+                    }
+                });
+
+            }
 
             /* 鍒嗛〉 */
             //璁剧疆鍒嗛〉
diff --git a/Pda/View/SoSetting/SampleOut.html b/Pda/View/SoSetting/SampleOut.html
index 2602607..8386836 100644
--- a/Pda/View/SoSetting/SampleOut.html
+++ b/Pda/View/SoSetting/SampleOut.html
@@ -288,8 +288,8 @@
 										<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,'')">
+												<input id="pickQty1" type="text" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
+													class="layui-input" >
 											</div>
 										</div>
 									</td>
@@ -482,9 +482,9 @@
 											<label class="layui-form-label lableWidth" >鎷h揣鏁伴噺锛�</label>
 											<div id="" class="local-input">
 												<div class="layui-input-block">
-													<input id="pickQty2" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
+													<input id="pickQty2" type="text" 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">
@@ -1044,6 +1044,16 @@
 			//纭鎷h揣 
 			function reqPickScatter() {
                 canPickBox = false//鍥炶皟
+				if($('#pickQty1').val()!= "" && $('#pickQty1').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty1").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar").val(),
 					"SoDetailId": $("#skuLotNo").val(),
@@ -1609,6 +1619,16 @@
 			//纭鎷h揣 
 			function reqPickScatter2() {
 				canPickBox = false//鍥炶皟
+				if($('#pickQty2').val()!= "" && $('#pickQty2').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty2").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar2").val(),
 					"SoDetailId": $("#skuLotNo2").val(),
diff --git a/Pda/View/SoSetting/pinTuoOut.html b/Pda/View/SoSetting/pinTuoOut.html
index 8670568..9dd59d2 100644
--- a/Pda/View/SoSetting/pinTuoOut.html
+++ b/Pda/View/SoSetting/pinTuoOut.html
@@ -303,8 +303,8 @@
 										<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,'')">
+												<input id="pickQty1" type="text" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
+													class="layui-input">
 											</div>
 										</div>
 									</td>
@@ -525,9 +525,9 @@
 											<label class="layui-form-label lableWidth" >鎷h揣鏁伴噺锛�</label>
 											<div id="" class="local-input">
 												<div class="layui-input-block">
-													<input id="pickQty2" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
+													<input id="pickQty2" type="text" 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">
@@ -1019,6 +1019,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter() {
+				if($('#pickQty1').val()!= "" && $('#pickQty1').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty1").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar").val(),
 					"SoDetailId": $("#skuLotNo").val(),
@@ -1498,6 +1508,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter2() {
+				if($('#pickQty2').val()!= "" && $('#pickQty2').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty2").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar2").val(),
 					"SoDetailId": $("#skuLotNo2").val(),
diff --git a/Pda/View/SoSetting/productOut.html b/Pda/View/SoSetting/productOut.html
index cda229e..b538ac9 100644
--- a/Pda/View/SoSetting/productOut.html
+++ b/Pda/View/SoSetting/productOut.html
@@ -303,8 +303,8 @@
 										<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,'')">
+												<input id="pickQty1" type="text" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"autocomplete="off" 
+													class="layui-input" >
 											</div>
 										</div>
 									</td>
@@ -509,9 +509,9 @@
 											<label class="layui-form-label lableWidth" >鎷h揣鏁伴噺锛�</label>
 											<div id="" class="local-input">
 												<div class="layui-input-block">
-													<input id="pickQty2" type="number" placeholder="璇疯緭鍏ユ嫞璐ф暟閲�"
+													<input id="pickQty2" type="text" 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">
@@ -1009,6 +1009,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter() {
+				if($('#pickQty1').val()!= "" && $('#pickQty1').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty1").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar").val(),
 					"SoDetailId": $("#skuLotNo").val(),
@@ -1489,6 +1499,16 @@
 
 			//纭鎷h揣 
 			function reqPickScatter2() {
+				if($('#pickQty2').val()!= "" && $('#pickQty2').val()!= undefined){
+					var reg = /(^[1-9]([0-9]+)?(\.[0-9]{1,4})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
+					if (!reg.test($("#pickQty2").val())) {
+						layer.msg("鏁伴噺蹇呴』澶т簬0(鍙繚鐣�4浣嶅皬鏁�)", {
+							icon: 2,
+							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						});
+						return -1;
+					}
+				}
 				var param = {
 					"SoNo": $("#bar2").val(),
 					"SoDetailId": $("#skuLotNo2").val(),
diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index c8f8338..7af51a0 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -493,6 +493,7 @@
                     .GroupBy((a, b) => new
                     {
                         a.PalletNo,
+                        a.BindNo,
                         a.BoxNo,
                         a.SkuNo,
                         a.SkuName,
@@ -510,6 +511,7 @@
                     .Select((a, b) => new BoxInfoDto()
                     {
                         BoxNo = a.BoxNo,
+                        BindNo = a.BindNo,
                         PalletNo = a.PalletNo,
                         Qty = SqlFunc.AggregateSum(a.Qty),
                         FullQty = a.FullQty,
@@ -540,9 +542,10 @@
         /// <param name="boxNo">绠辩爜</param>
         /// <param name="boxNo3">鏀爜</param>
         /// <returns></returns>
-        public List<BoxInfoDto> GetBoxInfoByBoxNo(string boxNo, string boxNo3)
+        public List<BoxInfoDto> GetBoxInfoByBoxNo(string bindNo, string boxNo, string boxNo3)
         {
             Expression<Func<BllBoxInfo, bool>> item = Expressionable.Create<BllBoxInfo>()
+                .AndIF(!string.IsNullOrWhiteSpace(bindNo), it => it.BindNo == int.Parse(bindNo))
                 .AndIF(!string.IsNullOrWhiteSpace(boxNo), it => it.BoxNo == boxNo.Trim())
                 .AndIF(!string.IsNullOrWhiteSpace(boxNo3), it => it.BoxNo3.Contains(boxNo3.Trim()))
                 .And(m => m.IsDel == "0")
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
index b3d758e..47e501b 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -23,6 +23,7 @@
 using System.Reflection;
 using System.IO;
 using System.Security.Cryptography.X509Certificates;
+using System.Net.WebSockets;
 
 namespace WMS.BLL.BllPdaServer
 {
@@ -208,6 +209,8 @@
 
                 if (modelList.Count > 0)
                 {
+                    var notice = Db.Queryable<BllArrivalNotice>().First(m=>m.IsDel == "0" && m.ASNNo == modelList[0].ASNNo);
+                    modelList[0].UDF5 = notice.Demo;
                     return modelList[0];
                 }
 
@@ -1903,15 +1906,21 @@
                 }
                 if (!string.IsNullOrWhiteSpace(model.ASNNo))
                 {
-                    var asnData = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == model.ASNNo);
-                    if (asnData != null && (asnData.Type == "0" || asnData.Type == "3"))
+                    var detailId = model.ASNNo.Split("-")[0];
+                    var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m=>m.IsDel =="0" && m.Id == int.Parse(detailId));
+                    if (detail != null)
                     {
-                        var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo == model.BoxNo);
-                        if (count == 0)
+                        var asnData = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == detail.ASNNo);
+                        if (asnData != null && (asnData.Type == "0" || asnData.Type == "3"))
                         {
-                            GetBoxInfoByFuMa(model.BoxNo, ""); //浠庤祴鐮佺郴缁熻幏鍙栫鐮佷俊鎭�
+                            var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo == model.BoxNo);
+                            if (count == 0)
+                            {
+                                GetBoxInfoByFuMa(model.BoxNo, ""); //浠庤祴鐮佺郴缁熻幏鍙栫鐮佷俊鎭�
+                            }
                         }
                     }
+                    
 
                 }
                 string sqlString = $@"SELECT 
@@ -1938,6 +1947,111 @@
                 throw ex;
             }
         }
+
+        /// <summary>
+        /// 鏍规嵁绠辩爜鑾峰彇鏍囩鏈�灏忚拷婧爜淇℃伅
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        public List<BoxInfoDto> GetBindBoxInfo2s(BoxInfoVm model)
+        {
+            try
+            {
+                if (string.IsNullOrEmpty(model.BoxNo3))
+                {
+                    throw new Exception("璇锋壂鎻忔渶灏忚拷婧潯鐮�!");
+                }
+                if (!string.IsNullOrWhiteSpace(model.ASNNo))
+                {
+                    var detailId = model.ASNNo.Split("-")[0];
+                    var detail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == int.Parse(detailId));
+                    if (detail != null)
+                    {
+                        var asnData = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == detail.ASNNo);
+                        if (asnData != null)
+                        {
+                            if (asnData.Type != "3")
+                            {
+                                throw new Exception("鍗曟嵁璇烽�夋嫨閫�璐у叆搴撳崟!");
+                            }
+                            var count = Db.Queryable<BllBoxInfo>().Count(m => m.IsDel == "0" && m.Status == "0" && m.BoxNo3 == model.BoxNo3);
+                            if (count == 0)
+                            {
+                                //浼樺厛WMS鏌ユ壘
+                                
+                                var comDetail = Db.Queryable<BllBoxInfo>().First(m=>m.BoxNo3 == model.BoxNo3 && m.IsDel =="0" && m.Status =="2");
+                                if (comDetail!= null)
+                                {
+                                    var boxInfo = new BllBoxInfo()
+                                    {
+                                        ASNNo = "",
+                                        //ASNDetailNo = 0,
+                                        OrderCode = "",
+                                        //BindNo = 0,
+                                        BoxNo = comDetail.BoxNo,
+                                        BoxNo2 = comDetail.BoxNo2,
+                                        BoxNo3 = comDetail.BoxNo3,
+                                        PalletNo = "",
+                                        Qty = comDetail.Qty,
+                                        FullQty = comDetail.FullQty,
+                                        Status = "0",
+                                        SkuNo = comDetail.SkuNo,
+                                        SkuName = comDetail.SkuName,
+                                        LotNo = comDetail.LotNo,
+                                        LotText = comDetail.LotText,
+                                        SupplierLot = comDetail.SupplierLot,
+                                        ProductionTime = comDetail.ProductionTime,
+                                        ExpirationTime = comDetail.ExpirationTime,
+                                        //CompleteTime = comTime,
+                                        InspectMark = comDetail.InspectMark,
+                                        BitBoxMark = "1",
+                                        InspectStatus = comDetail.InspectStatus,
+                                        Origin = "璧嬬爜",
+                                        Standard = comDetail.Standard,
+                                        PackageStandard = comDetail.PackageStandard,
+                                        StoreTime = comDetail.StoreTime,
+                                        QtyOrd = comDetail.QtyOrd,
+                                        QtyCount = comDetail.QtyCount,
+                                        CreateUser = 0,
+                                        CreateTime = DateTime.Now,
+                                    };
+                                    Db.Insertable(boxInfo).ExecuteCommand();
+                                }
+                                else
+                                {
+                                   // GetBoxInfoByFuMa(model.BoxNo3, ""); //浠庤祴鐮佺郴缁熻幏鍙栫鐮佷俊鎭�
+                                }                          
+                            }
+                        }
+                    }
+
+
+                }
+                string sqlString = $@"SELECT 
+                                        ASNNo,
+                                        BoxNo, 
+                                        SkuNo,
+                                        SkuName, 
+                                        LotNo, 
+                                        SUM(Qty) as Qty 
+                                      FROM BllBoxInfo 
+                                      WHERE IsDel = '0' 
+                                        AND Status='0'  
+                                        AND BoxNo3 = '{model.BoxNo3}'
+                                      GROUP BY ASNNo,BoxNo,SkuNo,SkuName,LotNo; ";
+                var models = Db.Ado.SqlQuery<BoxInfoDto>(sqlString);
+                if (models.Count == 0)
+                {
+                    throw new Exception("鏈�灏忚拷婧爜淇℃伅涓嶅瓨鍦�!");
+                }
+                return models;
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+        }
+
         // 鏍规嵁鍗曟嵁鍙疯幏鍙栧崟鎹槑缁嗗垪琛�
         public List<ArrivalNoticeDetailDto> GetBindArrivalNoticeDetails(ArrivalNoticeVm model)
         {
@@ -2090,19 +2204,35 @@
                 //鍒ゆ柇鐗╂枡鏁伴噺鏄惁涓�0 涓�0鍒ゆ柇绠辩爜淇℃伅 涓嶄负0缁х画
                 if (model.TableType == 0)
                 {
-                    if (string.IsNullOrEmpty(model.BoxNo))
+                    if (notice.Type != "3")
                     {
-                        throw new Exception("-1:绠辩爜淇℃伅涓嶅彲涓虹┖!");
-                    }
-
-                    if (model.IsContinue == "1")
-                    {
-                        if (string.IsNullOrWhiteSpace(model.TailBoxNo))
+                        if (string.IsNullOrEmpty(model.BoxNo))
                         {
-                            throw new Exception("-1:寮�鍚繛缁粍鎵樻椂锛屽熬绠辩爜淇℃伅涓嶅彲涓虹┖!");
+                            throw new Exception("-1:绠辩爜淇℃伅涓嶅彲涓虹┖!");
                         }
+                        if (model.IsContinue == "1")
+                        {
+                            if (string.IsNullOrWhiteSpace(model.TailBoxNo))
+                            {
+                                throw new Exception("-1:寮�鍚繛缁粍鎵樻椂锛屽熬绠辩爜淇℃伅涓嶅彲涓虹┖!");
+                            }
 
+                        }
                     }
+                    else
+                    {
+                        if (string.IsNullOrEmpty(model.BoxNo01))
+                        {
+                            throw new Exception("-1:杩芥函鐮佷俊鎭笉鍙负绌�!");
+                        }
+                        if (model.IsContinue == "1")
+                        {
+                            throw new Exception("-1:杩芥函鐮佷笉鍙繛缁粍鎵橈紒");
+                        }
+                    }
+
+                    
+                    
                 }
                 int isTextTable = model.TableType;
                 int isDeposit = 0;
@@ -2302,27 +2432,40 @@
                 var boxInfoList = new List<BllBoxInfo>();
                 if (model.SkuQty == 0)
                 {
-                    //棣栫
-                    var boxInfo = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == model.BoxNo && m.Status == "0").ToList();
-                    if (boxInfo.Count == 0)
+                    if (notice.Type == "3")
                     {
-                        throw new Exception("-1:绠辩爜淇℃伅涓嶅瓨鍦�!");
-                    }
-                    boxInfoList.AddRange(boxInfo);
-                    //鏄惁杩炵画缁勬墭
-                    if (model.IsContinue == "1")
-                    {
-                        //灏剧
-                        var boxInfo2 = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == model.TailBoxNo && m.Status == "0").ToList();
-                        if (boxInfo2.Count == 0)
+                        //棣栫
+                        var boxInfo = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo3 == model.BoxNo01 && m.Status == "0").ToList();
+                        if (boxInfo.Count == 0)
                         {
-                            throw new Exception("-1:灏剧鐮佷俊鎭笉瀛樺湪!");
+                            throw new Exception("-1:绠辩爜淇℃伅涓嶅瓨鍦�!");
                         }
-                        boxInfoList.AddRange(boxInfo2);
-                        var sql = $"select * from BllBoxInfo where IsDel = '0' and Status = '0' and boxNo>'{model.BoxNo}' and boxNo<'{model.TailBoxNo}'; ";
-                        var list = Db.Ado.SqlQuery<BllBoxInfo>(sql);
-                        boxInfoList.AddRange(list);
-                        msgStr += $"灏剧鍙蜂负{model.TailBoxNo}";
+                        boxInfoList.AddRange(boxInfo);
+                    }
+                    else
+                    {
+                        //棣栫
+                        var boxInfo = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == model.BoxNo && m.Status == "0").ToList();
+                        if (boxInfo.Count == 0)
+                        {
+                            throw new Exception("-1:绠辩爜淇℃伅涓嶅瓨鍦�!");
+                        }
+                        boxInfoList.AddRange(boxInfo);
+                        //鏄惁杩炵画缁勬墭
+                        if (model.IsContinue == "1")
+                        {
+                            //灏剧
+                            var boxInfo2 = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.BoxNo == model.TailBoxNo && m.Status == "0").ToList();
+                            if (boxInfo2.Count == 0)
+                            {
+                                throw new Exception("-1:灏剧鐮佷俊鎭笉瀛樺湪!");
+                            }
+                            boxInfoList.AddRange(boxInfo2);
+                            var sql = $"select * from BllBoxInfo where IsDel = '0' and Status = '0' and boxNo>'{model.BoxNo}' and boxNo<'{model.TailBoxNo}'; ";
+                            var list = Db.Ado.SqlQuery<BllBoxInfo>(sql);
+                            boxInfoList.AddRange(list);
+                            msgStr += $"灏剧鍙蜂负{model.TailBoxNo}";
+                        }
                     }
                 }
                 #endregion
diff --git a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
index 1b59027..5d6d22b 100644
--- a/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
+++ b/Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -399,9 +399,21 @@
                 {
                     throw new Exception("鏈煡璇㈠埌璇ュ嚭搴撳崟鐨勪俊鎭�");
                 }
-                if (notice.Status != "3")
+                var type1 = new List<string>() { "0", "4" }; //鎷h揣涓嶅彲澶氬嚭
+                var type2 = new List<string>() { "1", "2", "3", "5", "6", "7", "8" };//鎷h揣鍙鍑�
+                if (type1.Contains(notice.Type))
                 {
-                    throw new Exception("鍑哄簱鍗曠殑鐘舵�佷笉鏄鍦ㄦ墽琛岋紝涓嶈兘鎷h揣");
+                    if (notice.Status != "3")
+                    {
+                        throw new Exception("鍑哄簱鍗曠殑鐘舵�佷笉鏄鍦ㄦ墽琛岋紝涓嶈兘鎷h揣");
+                    }
+                }
+                if (type2.Contains(notice.Type))
+                {
+                    if (notice.Status != "3" && notice.Status != "4")
+                    {
+                        throw new Exception("鍑哄簱鍗曠殑鐘舵�佷笉鏄鍦ㄦ墽琛屾垨鎵ц瀹屾垚锛屼笉鑳芥嫞璐�");
+                    }
                 }
                 //鍑哄簱鍗曟槑缁�
                 var noticeDetail = Db.Queryable<BllExportNoticeDetail>()
diff --git a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
index a60709d..a446c6b 100644
--- a/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
+++ b/Wms/WMS.BLL/BllQualityServer/QualityInspectServer.cs
@@ -111,10 +111,10 @@
             if (!string.IsNullOrEmpty(model.ASNNo))
             {
                 //鏌ヨ鏄惁涓洪��璐у叆搴撳崟鎹�
-                var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && a.Type == "3");
+                var Arrival = Db.Queryable<BllArrivalNotice>().First(a => a.IsDel == "0" && a.ASNNo == model.ASNNo && (a.Type == "3" || a.Type == "4"));
                 if (Arrival == null)
                 {
-                    throw new Exception("鍙湁鍏ュ簱鍗曟嵁涓洪��璐у叆搴撳崟鍙緭鍏� 鍏ュ簱鍗曞彿锛岃鏍告煡锛�");
+                    throw new Exception("鍙湁鍏ュ簱鍗曟嵁涓洪��璐у叆搴撳崟鍙緭鍏ュ叆搴撳崟鍙凤紝璇锋牳鏌ワ紒");
                 }
 
                 //鑾峰彇鍏ュ簱鍗曟槑缁�
diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index c714390..4c7aba8 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -450,7 +450,7 @@
                         break;
                     case "5"://涓棿鍝佸嚭搴�
                         skuType = "(4)";
-                        inspectStatus = "1";
+                        inspectStatus = "0,1";
                         break;
                     case "6"://浠e偍鍑哄簱
                         skuType = "(0,1,2,3,4)";
diff --git a/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
index 3dc8720..721b8e6 100644
--- a/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
+++ b/Wms/WMS.IBLL/IBllAsnServer/IPalletBindServer.cs
@@ -24,7 +24,7 @@
 
         List<BoxInfoDto> GetBoxInfoList(BoxInfoVm model, out int count);
 
-        List<BoxInfoDto> GetBoxInfoByBoxNo(string boxNo, string boxNo3);
+        List<BoxInfoDto> GetBoxInfoByBoxNo(string bindNo,string boxNo, string boxNo3);
 
         /// <summary>
         /// 鍒犻櫎鎵樼洏缁戝畾淇℃伅
diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
index ab1606d..fcc6f1c 100644
--- a/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
+++ b/Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -78,6 +78,8 @@
 
         // 鏍规嵁绠辩爜鑾峰彇鏍囩绠辩爜淇℃伅
         List<BoxInfoDto> GetBindBoxInfos(BoxInfoVm model);
+        // 鏍规嵁绠辩爜鑾峰彇鏍囩鏈�灏忚拷婧爜淇℃伅
+        List<BoxInfoDto> GetBindBoxInfo2s(BoxInfoVm model);
 
         //鏍规嵁鍗曟嵁鍙疯幏鍙栧崟鎹槑缁嗗垪琛�
         List<ArrivalNoticeDetailDto> GetBindArrivalNoticeDetails(ArrivalNoticeVm model);
diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 17f36a3..d73c8ce 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -366,11 +366,11 @@
         }
 
         [HttpGet]
-        public IActionResult GetBoxInfoByBoxNo(string boxNo, string boxNo3)
+        public IActionResult GetBoxInfoByBoxNo(string bindNo, string boxNo, string boxNo3)
         {
             try
             {
-                var models = _PalletBindSvc.GetBoxInfoByBoxNo(boxNo, boxNo3);
+                var models = _PalletBindSvc.GetBoxInfoByBoxNo(bindNo,boxNo, boxNo3);
 
                 return Ok(new { code = 0, count= models.Count, msg = "绠辨敮鏄庣粏淇℃伅", data = models });
             }
diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index 80c67b6..44647ca 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -533,6 +533,27 @@
                 return Ok(new { code = 1, msg = e.Message });
             }
         }
+
+        /// <summary>
+        /// 鏍规嵁绠辩爜鑾峰彇鏍囩鏈�灏忚拷婧爜淇℃伅
+        /// </summary>
+        /// <param name="model">BoxNo:绠卞彿</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetBindBoxInfo2s(BoxInfoVm model)
+        {
+            try
+            {
+                var models = _PdaAsnSvc.GetBindBoxInfo2s(model);
+
+                return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
         [HttpPost]
         public IActionResult GetBindArrivalNoticeDetails(ArrivalNoticeVm model)
         {

--
Gitblit v1.8.0