From b5eec4dc738e4abc20c652c041fa7b17ba0e636f Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期一, 19 二月 2024 09:37:46 +0800
Subject: [PATCH] Merge branch 'csc'

---
 HTML/views/ASNSetting/ArrivalNoticeDetail.html |   98 +++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 90 insertions(+), 8 deletions(-)

diff --git a/HTML/views/ASNSetting/ArrivalNoticeDetail.html b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
index 11938fc..c3f0575 100644
--- a/HTML/views/ASNSetting/ArrivalNoticeDetail.html
+++ b/HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -55,6 +55,7 @@
 					<option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
 					<option value="5">鍏跺畠鍏ュ簱</option>
 					<option value="6">浠e偍鍏ュ簱</option>
+					<option value="7">瀵勫瓨鍏ュ簱</option>
 					<!-- JC08 -->
 					<!-- <option value="0">鎴愬搧鍏ュ簱</option>
 					<option value="1">鍘熸枡鍏ュ簱</option>
@@ -62,7 +63,7 @@
 				</select>
 			</div>
 
-			<label class="layui-form-label">瀹㈡埛鍚嶇О</label>
+			<label class="layui-form-label" style="width: 70px;"><p id="CustomerNamep">瀹㈡埛</p></label>
 			<div class="layui-input-inline">
 				<select name="CustomerName" id="CustomerName" lay-verify="" lay-search>
 					<option value=""></option>
@@ -463,6 +464,7 @@
 				var value = data.value;
 				if(value!=TypeValue){
 					console.log(value);
+					getCustomerList();
 					arr = [];
 					// 娓叉煋Table
 					refreshTable(null);
@@ -584,13 +586,72 @@
 
 			// 缁戝畾涓嬫媺淇℃伅
 			function getCustomerList() {
+				/*
+				0锛氬鎴�
+					閫�璐у叆搴�
+					3
+				1锛氫緵搴斿晢
+					閲囪喘鍏ュ簱銆佸叾瀹冨叆搴�
+					1銆�5
+				2锛氳揣涓�
+					鎴愬搧鍏ュ簱銆佷腑闂村搧鍏ュ簱銆佽溅闂翠綑鏂欏叆搴撱�佷唬鍌ㄥ叆搴�
+					0銆�2銆�4銆�6
+				*/
 				sendData(IP + "/Basis/GetCustomerSelect", {}, 'get', function (res) {
 					if (res.code == 0) { //鎴愬姛
 						$("#CustomerName").empty();
 						$("#CustomerName").append('<option value =""></option>');
 						for (var i = 0; i < res.data.length; i++) {
-							$("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
-								res.data[i].CustomerName + '</option>');
+							var TypeNum = 0;
+							
+							switch($("#Type").val())
+							{
+								case "3": //閫�璐у叆搴�
+									TypeNum = 0;
+									console.log(TypeNum)
+									break;
+								case "1": //閲囪喘鍏ュ簱
+								case "5": //鍏跺畠鍏ュ簱
+									TypeNum = 1;
+									console.log(TypeNum)
+									break;
+								case "0": //鎴愬搧鍏ュ簱
+								case "2": //涓棿鍝佸叆搴�
+								case "4": //杞﹂棿浣欐枡鍏ュ簱
+								case "6": //浠e偍鍏ュ簱
+								case "7": //瀵勫瓨鍏ュ簱
+									TypeNum = 2;
+									console.log(TypeNum)
+									break;
+							}
+							//鍒ゆ柇鍗曟嵁绫诲瀷
+							if (TypeNum == 0)
+							{
+								if (res.data[i].Type == 0)
+								{
+									$("#CustomerNamep").html("瀹㈡埛");
+									$("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+									res.data[i].CustomerName + '</option>');
+								}
+							}
+							else if (TypeNum == 1)
+							{
+								if (res.data[i].Type == 1)
+								{
+									$("#CustomerNamep").html("渚涘簲鍟�");
+									$("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+									res.data[i].CustomerName + '</option>');
+								}
+							}
+							else if (TypeNum == 2)
+							{
+								if (res.data[i].Type == 2)
+								{
+									$("#CustomerNamep").html("璐т富");
+									$("#CustomerName").append('<option value =' + res.data[i].CustomerNo + '>' +
+									res.data[i].CustomerName + '</option>');
+								}
+							}
 						}
 						form.render('select');
 					} else { //涓嶆垚鍔�
@@ -705,11 +766,32 @@
 						return -1;
 					}
 					if (arr[i].LotNo == "" || arr[i].LotNo ==undefined) {
-						layer.msg("璇疯緭鍏ユ壒娆★紒", {
-							icon: 2,
-							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-						});
-						return -1;
+						//鍒ゆ柇鏄惁涓哄搴斾笉闇�瑕佹壒娆$殑鍗曟嵁
+						var TypeNum = 0;
+							
+						switch($("#Type").val())
+						{
+							//1锛氶噰璐叆搴� 2锛氫腑闂村搧鍏ュ簱 5锛氬叾瀹冨叆搴� 6锛氫唬鍌ㄥ叆搴� 7锛氬瘎瀛樺叆搴�
+							case "1" :
+							case "2" :
+							case "5" :
+							case "6" :
+							case "7" : 
+								console.log($("#Type").val())
+								TypeNum = 1;
+								break;
+						}
+						console.log(TypeNum)
+
+						if (TypeNum == 0)
+						{
+							layer.msg("璇疯緭鍏ユ壒娆★紒1", {
+								icon: 2,
+								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+							});
+							return -1;
+						}
+						
 					}
 					
 					if (!reg.test(arr[i].Qty)) {

--
Gitblit v1.8.0