From 75d1bcdfefd5b8dcbc0777fe1508404e79f8cc8c Mon Sep 17 00:00:00 2001
From: test <15284381150@163.com>
Date: 星期一, 11 八月 2025 10:05:24 +0800
Subject: [PATCH] 修改质检

---
 HTML/views/ASNSetting/ArrivalNoticeDetail.html |   87 ++++++++++++++++++++-----------------------
 1 files changed, 41 insertions(+), 46 deletions(-)

diff --git a/HTML/views/ASNSetting/ArrivalNoticeDetail.html b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
index d0e3685..ccbd5b2 100644
--- a/HTML/views/ASNSetting/ArrivalNoticeDetail.html
+++ b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -69,9 +69,9 @@
 				<select name="Type" id="Type" lay-filter="Type" lay-search>
 					<option value="0">鎴愬搧鍏ュ簱</option>
 					<option value="1">閲囪喘鍏ュ簱</option>
-					<option value="2">涓棿鍝佸叆搴�</option>
 					<option value="3">閫�璐у叆搴�</option>
 					<option value="4">浣欐枡閫�鍥炲叆搴�</option>
+					<option value="8">鐢熶骇閫�鏂欏叆搴�</option>
 				</select>
 			</div>
 
@@ -122,28 +122,7 @@
 							{{ GetBtn(d) }}
 						</script>
 
-						<script type="text/html" id="templetLotNo">
-							{{# function GetBtn1(d){
-									var html = ''; 
-									var TypeValue = $("#Type").val();
-									if(TypeValue=='1' || TypeValue=='5' || TypeValue=='6' || TypeValue=='7'){	
-										if(d.LotNo==null || d.LotNo==undefined || d.LotNo==''){
-											html+= '<input type="text" class="input-dis" value="" disabled>';
-										}else{
-											html+= '<input type="text" class="input-dis" value="'+d.LotNo+'" disabled>';
-										}
-										return html;
-									}else{
-										if(d.LotNo!=null && d.LotNo!=undefined && d.LotNo!=''){
-											return d.LotNo;
-										}else{
-											return '';
-										}										
-									}
-								}								
-							}}
-							{{ GetBtn1(d) }}
-						</script>
+
 						<!-- #endregion -->
 
 					</div>
@@ -202,8 +181,8 @@
 				{ field: 'Id', title: '鍏ュ簱鍗曟槑缁咺D', width: 120, align: 'center', fixed: 'left', hide: true, "disabled": true },
 				{ field: 'SkuNo', title: '鐗╂枡缂栫爜', minWidth: 100, align: 'center', fixed: 'left', "disabled": true },
 				{ field: 'SkuName', title: '鐗╂枡鍚嶇О', minWidth: 180, align: 'center', fixed: 'left', "disabled": true },
-				{ field: 'LotNo', title: '鎵规鍙�', align: 'center', edit: 'text', minWidth: 130, fixed: 'left', templet: '#templetLotNo', "disabled": true },
-				{ field: 'SupplierLot', title: '渚涜揣鎵规', width: 130, edit: 'text', event: 'setSign', fixed: 'left', "disabled": true },
+				{ field: 'LotNo', title: '鎵规鍙�', align: 'center', edit: 'text', event: 'setlot', width: 130, fixed: 'left', "disabled": true },
+				{ field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', width: 130, edit: 'text', event: 'setSign', fixed: 'left', "disabled": true },
 				{ field: 'Qty', title: '鏁伴噺', align: 'center', width: 80, edit: 'number', event: 'dataNumber', fixed: 'left', "disabled": true },
 				{ field: 'UnitName', title: '璁¢噺鍗曚綅', align: 'center', width: 70 },
 				{ field: 'Standard', title: '瑙勬牸', width: 160, align: 'center' },
@@ -240,6 +219,8 @@
 				} else {
 					colsJson = TotalColsArr
 				}
+				console.log(colsJson);
+
 				infoOptions = {
 					elem: '#LAY-app-content-list',
 					height: 'full-110',
@@ -323,8 +304,8 @@
 			}
 			else {
 				// 娣诲姞鐨勬椂鍊欑Щ闄も�橀噰璐叆搴撯�欓」
-				$('select[lay-filter="Type"]').find('option[value="1"]').remove();
-				form.render('select'); // 鏇存柊layui鐨剆elect娓叉煋
+				// $('select[lay-filter="Type"]').find('option[value="1"]').remove();
+				// form.render('select'); // 鏇存柊layui鐨剆elect娓叉煋
 			}
 
 
@@ -487,8 +468,8 @@
 					閲囪喘鍏ュ簱銆佸叾瀹冨叆搴�
 					1銆�5
 				2锛氳揣涓�
-					鎴愬搧鍏ュ簱銆佷腑闂村搧鍏ュ簱銆佽溅闂翠綑鏂欏叆搴撱�佷唬鍌ㄥ叆搴�
-					0銆�2銆�4銆�6
+					鎴愬搧鍏ュ簱銆佷腑闂村搧鍏ュ簱銆佽溅闂翠綑鏂欏叆搴撱�佷唬鍌ㄥ叆搴� 鐢熶骇閫�鏂欏叆搴�
+					0銆�2銆�4銆�6 8
 				*/
 				sendData(IP + "/Basis/GetCustomerSelect", {}, 'get', function (res) {
 					if (res.code == 0) { //鎴愬姛
@@ -514,6 +495,8 @@
 							case "7": //瀵勫瓨鍏ュ簱
 								TypeNum = 2;
 								console.log(TypeNum)
+							case "8": //鐢熶骇閫�鏂欏叆搴�
+								TypeNum = 2;
 								break;
 						}
 
@@ -559,10 +542,10 @@
 				for (var i in data) {
 					var isHave = false;
 					for (var j in arr) {
-						if (arr[j].SkuNo == data[i].SkuNo
-							// 娉ㄩ噴 liudl 鑻ュ瓨鍦ㄥ悓涓�鐗╂枡涓嶅悓鎵规鐗╂枡 鏀惧紑姝ゆ敞閲婏紝鍚庣宸查獙璇佹槸鍚﹂噸澶�
-							//&& arr[j].LotNo == data[i].LotNo   
-						) {
+						if (arr[j].SkuNo == data[i].SkuNo)
+						// 娉ㄩ噴 liudl 鑻ュ瓨鍦ㄥ悓涓�鐗╂枡涓嶅悓鎵规鐗╂枡 鏀惧紑姝ゆ敞閲婏紝鍚庣宸查獙璇佹槸鍚﹂噸澶�
+						//&& arr[j].LotNo == data[i].LotNo   
+						{
 							isHave = true;
 							break;
 						}
@@ -597,7 +580,7 @@
 								if (res.code == 0) { //鎴愬姛
 									layer.msg(res.msg, {
 										icon: 1,
-										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 
 									}, function () {
 										parent.location.reload();
 										parent.layer.close(layer.index);
@@ -664,7 +647,7 @@
 
 						switch ($("#Type").val()) {
 							//1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
-							case "1":
+
 							case "2":
 							case "5":
 							case "6":
@@ -675,23 +658,35 @@
 						}
 						console.log(TypeNum)
 
-						if (TypeNum == 0) {
-							layer.msg("璇疯緭鍏ユ壒娆★紒", {
-								icon: 2,
-								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-							});
-							return -1;
-						}
+						// if (TypeNum == 0) {
+						// 	layer.msg("璇疯緭鍏ユ壒娆★紒", {
+						// 		icon: 2,
+						// 		time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+						// 	});
+						// 	return -1;
+						// }
 
 					}
 
-					if (!reg.test(arr[i].Qty)) {
-						layer.msg("鍏ュ簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暣鏁�", {
+					var qtyValue = arr[i].Qty;
+					// 灏濊瘯灏嗗�艰浆鎹负鏁板瓧
+					var num = Number(qtyValue);
+
+					// 楠岃瘉瑙勫垯锛氬繀椤绘槸鏈夋晥鏁板瓧銆佸ぇ浜�0銆佸皬鏁颁綅鏁颁笉瓒呰繃4浣�    
+					if (
+						isNaN(num) ||  // 涓嶆槸鏈夋晥鏁板瓧   T2500009   鍦扮爜 B010109
+						num <= 0 ||    // 灏忎簬绛変簬0
+						// 妫�鏌ュ皬鏁颁綅鏁帮紙鍏堣浆涓哄瓧绗︿覆澶勭悊锛�
+						(qtyValue.toString().indexOf('.') !== -1 &&
+							qtyValue.toString().split('.')[1].length > 4)
+					) {
+						layer.msg("鍏ュ簱鏁伴噺蹇呴』鏄ぇ浜�0鐨勬暟", {
 							icon: 2,
-							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+							time: 2000
 						});
 						return -1;
 					}
+
 
 					var item = {
 						Id: arr[i].Id,
@@ -700,7 +695,7 @@
 						Standard: arr[i].Standard,
 						LotNo: arr[i].LotNo,
 						LotText: arr[i].LotText,
-						Qty: parseInt(arr[i].Qty),
+						Qty: Number(qtyValue),////decimal
 						PackagNo: arr[i].PackagNo,
 						Price: arr[i].Price,
 						IsBale: arr[i].IsBale,

--
Gitblit v1.8.0