From bdd84cc48ba7b2527584c44d174da8e7d20c5375 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期三, 18 九月 2024 16:37:13 +0800
Subject: [PATCH] 增加对申请入库时对平库库位的校验

---
 HTML/views/ASNSetting/ArrivalNotice.html |  125 ++++++++++++++++-------------------------
 1 files changed, 50 insertions(+), 75 deletions(-)

diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html
index 7965c71..67fc0aa 100644
--- a/HTML/views/ASNSetting/ArrivalNotice.html
+++ b/HTML/views/ASNSetting/ArrivalNotice.html
@@ -95,36 +95,20 @@
 						<div class="layui-input-inline">
 							<select name="Type" id="Type" lay-filter="Type" lay-search>
 								<option value=""></option>
-								<!-- JC23 -->
+								<!--JC26-->
 								<option value="0">鎴愬搧鍏ュ簱</option>
 								<option value="1">閲囪喘鍏ュ簱</option>
-								<option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
-								<option value="5">鍏跺畠鍏ュ簱</option>
-								<option value="6">浠e偍鍏ュ簱</option>
-								<!-- JC24 -->
-								<!-- <option value="0">鎴愬搧鍏ュ簱</option>
-								<option value="1">閲囪喘鍏ュ簱</option>
-								<option value="2">涓棿鍝佸叆搴�</option>-->
-								<!-- <option value="3">閫�璐у叆搴�</option> -->
-								<!-- <option value="4">杞﹂棿浣欐枡閫�鍥炲叆搴�</option>
-								<option value="5">鍏跺畠鍏ュ簱</option>
-								<option value="6">浠e偍鍏ュ簱</option>
-								<option value="7">瀵勫瓨鍏ュ簱</option>  -->
-								<!-- JC09 -->
-								<!-- <option value="0">鏍囧噯浜у搧鍏ュ簱</option>
-								<option value="1">闈炴爣浜у搧鍏ュ簱</option> -->
-								<!-- JC08 -->
-								<!-- <option value="0">鎴愬搧鍏ュ簱</option>
-								<option value="1">鍘熸枡鍏ュ簱</option>
-								<option value="2">閫�璐у叆搴�</option> -->
+								<option value="2">涓棿鍝佸叆搴�</option>
+								<option value="3">閫�璐у叆搴�</option>
+								<option value="4">浣欐枡閫�鍥炲叆搴�</option>
 							</select>
 						</div>
 					</div>
 					<div class="layui-inline">
-						<label class="layui-form-label" style="width: 90px;">涓婃父绯荤粺鍗曞彿</label>
+						<label class="layui-form-label">涓嬪彂鍗曞彿</label>
 						<div class="layui-input-inline">
-							<input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺鍗曞彿" autocomplete="off"
-								class="layui-input">
+							<input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺涓嬪彂鐨勫崟鍙�"
+								autocomplete="off" class="layui-input">
 						</div>
 					</div>
 					<div class="layui-inline">
@@ -152,9 +136,9 @@
 						<label class="layui-form-label">鎾ら攢鍘熷洜</label>
 						<div class="layui-input-inline">
 							<textarea id="Reason" name="Reason" placeholder="璇疯緭鍏ュ唴瀹�" class="layui-textarea"></textarea>
-
 						</div>
 					</div>
+
 					<div class="layui-inline">
 						<button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
 							lay-filter="LAY-app-contlist-search">
@@ -224,19 +208,16 @@
 					<script type="text/html" id="buttonTpl">
 						{{# function GetBtn3(d){
 								var html = ``;
-								if(d.Status=='0'){ 
-									html = `<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鎵ц</button>`; 
-								} else if(d.Status=='1') { 
-									html = `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">姝e湪鎵ц</button>`; 
-								} else if(d.Status=='2') { 
-									html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">鎵ц瀹屾瘯</button>`; 
-								} else if(d.Status=='3') { 
-									html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">璁㈠崟鍏抽棴</button>`; 
-								} else if(d.Status=='4') { 
-									html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">涓婁紶瀹屾瘯</button>`; 
-								} else {
-									
+								switch(d.Status)
+								{
+									case "0" : html = `<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鎵ц</button>`;break; 
+									case "1" : html = `<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">姝e湪鎵ц</button>`; break; 
+									case "2" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">鎵ц瀹屾瘯</button>`; break;
+									case "3" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">璁㈠崟鍏抽棴</button>`; break;
+									case "4" : html = `<button class="layui-btn layui-btn-radius layui-btn-normal layui-btn-xs">涓婁紶瀹屾瘯</button>`; break;
+									default : break; 
 								}
+
 								return html;
 							}	
 						}}
@@ -246,24 +227,16 @@
 					<script type="text/html" id="templetType">
 						{{# function GetBtn4(d){
 								var html = ``;
-								if(d.Type=='0'){ 
-									html = `鎴愬搧鍏ュ簱`; 
-								} else if(d.Type=='1') { 
-									html = `閲囪喘鍏ュ簱`; 
-								} else if(d.Type=='2') { 
-									html = `涓棿鍝佸叆搴揱; 
+								switch(d.Type)
+								{
+									case "0" : html = `鎴愬搧鍏ュ簱`;break; 
+									case "1" : html = `閲囪喘鍏ュ簱`; break; 
+									case "2" : html = `涓棿鍝佸叆搴揱; break;
+									case "3" : html = `閫�璐у叆搴揱; break;
+									case "4" : html = `浣欐枡閫�鍥炲叆搴揱; break;
+									default : break; 
 								}
-								else if(d.Type=='4') { 
-									html = `杞﹂棿浣欐枡閫�鍥炲叆搴揱; 
-								}else if(d.Type=='5') { 
-									html = `鍏跺畠鍏ュ簱`; 
-								}else if(d.Type=='6') { 
-									html = `浠e偍鍏ュ簱`; 
-								}else if(d.Type=='7') { 
-									html = `瀵勫瓨鍏ュ簱`; 
-								}else {
-									
-								}
+								
 								return html;
 							}	
 						}}
@@ -318,7 +291,10 @@
 							<i class="layui-icon">&#xe654;</i>娣诲姞
 						</button>
 					</script>
-
+					<!-- if((d.AsnType =="1" || d.AsnType == "4" || d.AsnType == "5" || d.AsnType == "6") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){  
+							html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> 
+								<i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`; 
+						} -->
 					<script type="text/html" id="toolbarDemoList">
 						{{# function GetBtn2(d){ 
 							console.log(d);
@@ -327,10 +303,7 @@
 									html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del"> 
 										<i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`; 
 								}
-								if((d.AsnType =="1" || d.AsnType == "4" || d.AsnType == "5" || d.AsnType == "6") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){  
-									html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> 
-										<i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`; 
-								}
+								
 								
 								return html;
 							} 
@@ -428,7 +401,7 @@
 			base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
 		}).extend({
 			index: 'lib/index' //涓诲叆鍙fā鍧�
-		}).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () {
+		}).use(['index', 'form', 'table', 'laypage', 'layer', 'laydate'], function () {
 
 			var doing = true;
 
@@ -463,9 +436,10 @@
 				{ field: 'Origin', title: '鏉ユ簮', align: 'center', width: 80 },
 				{ field: 'CustomerName', title: '瀹㈡埛鍚嶇О', align: 'center' },
 				{ field: 'Type', title: '鍗曟嵁绫诲瀷', align: 'center', templet: '#templetType' },
-				{ field: 'OrderCode', title: '涓婃父绯荤粺鍗曞彿', align: 'center', width: 180 },
+				{ field: 'OrderCode', title: '涓嬪彂鍗曞彿', align: 'center', width: 180 },
 				{ field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', templet: '#templetCompleteTime' },
 				{ field: 'Demo', title: '澶囨敞', align: 'center', width: 180 },
+				{ field: 'UserName', title: '鍒跺崟浜�', align: 'center', width: 110 },
 				{ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 110 },
 				{ field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', templet: '#templetCreateTime' },
 				{ field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 110 },
@@ -512,7 +486,6 @@
 						height: h1,
 						id: 'LAY-app-content-list',
 						where: param,
-						parseData: FnParseData,
 						contentType: 'application/json',
 						headers: { ToKen: $.cookie('token') },
 						page: true,
@@ -557,13 +530,15 @@
 				// {field: 'Money',title: '閲戦',align: 'center',width: 65},
 				{ field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 120 },
 				{ field: 'PackagName', title: '鍖呰鍚嶇О', align: 'center', width: 110, },
-				{ field: 'IsBale', title: '鏄惁瑁瑰寘', align: 'center', width: 150 },
-				{ field: 'IsBelt', title: '鏄惁鎵撳甫', align: 'center', width: 150 },
-				{ field: 'UDF1', title: '鑷畾涔夊垪1', align: 'center', width: 140 },
-				{ field: 'UDF2', title: '鑷畾涔夊垪2', align: 'center', width: 140 },
-				{ field: 'UDF3', title: '鑷畾涔夊垪3', align: 'center', width: 140 },
-				{ field: 'UDF4', title: '鑷畾涔夊垪4', align: 'center', width: 140 },
-				{ field: 'UDF5', title: '鑷畾涔夊垪5', align: 'center', width: 140, templet: '#templetUDF5' },
+				{ field: 'Lot1', title: '鐢熶骇鏃ユ湡', align: 'center', width: 140 },
+				{ field: 'Lot2', title: '杩囨湡鏃ユ湡', align: 'center', width: 140 },
+				// { field: 'IsBale', title: '鏄惁瑁瑰寘', align: 'center', width: 150 },
+				// { field: 'IsBelt', title: '鏄惁鎵撳甫', align: 'center', width: 150 },
+				// { field: 'UDF1', title: '鑷畾涔夊垪1', align: 'center', width: 140 },
+				// { field: 'UDF2', title: '鑷畾涔夊垪2', align: 'center', width: 140 },
+				// { field: 'UDF3', title: '鑷畾涔夊垪3', align: 'center', width: 140 },
+				// { field: 'UDF4', title: '鑷畾涔夊垪4', align: 'center', width: 140 },
+				// { field: 'UDF5', title: '鑷畾涔夊垪5', align: 'center', width: 140, templet: '#templetUDF5' },
 				{ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 },
 				{ field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime2' },
 				{ field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 150, },
@@ -627,11 +602,11 @@
 					$(".clossClass").hide();
 					$(".editDemoClass").hide();//澶囨敞
 					$(".checkClass").hide(); //澶嶆牳
-					$(".addLabelClass").hide(); //澶嶆牳
+					//$(".addLabelClass").hide(); //鐢熸垚鏍囩
 
 				});
 				sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) {
-					if (res.code == 200) { //鎴愬姛 
+					if (res.code == 0) { //鎴愬姛 
 						for (var k = 0; k < res.data.length; k++) {
 							if (res.data[k].MenuName == "娣诲姞鍏ュ簱鍗�") {
 								$(function () {
@@ -668,11 +643,11 @@
 									$(".checkClass").show();
 								});
 							}
-							if (res.data[k].MenuName == "鐢熸垚鏍囩") {
-								$(function () {
-									$(".addLabelClass").show();
-								});
-							}
+							// if (res.data[k].MenuName == "鐢熸垚鏍囩") {
+							// 	$(function () {
+							// 		$(".addLabelClass").show();
+							// 	});
+							// }
 						}
 					} else { //涓嶆垚鍔�
 						layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', {

--
Gitblit v1.8.0