From 6901057a91549d986d61bee0ffe61239673ef535 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 06 三月 2024 15:25:46 +0800
Subject: [PATCH] 出库单页面修改

---
 HTML/views/SOSetting/ExportNotice.html |  224 ++++++++++++++++++++++++++++++-------------------------
 1 files changed, 121 insertions(+), 103 deletions(-)

diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html
index cbb0614..d9708df 100644
--- a/HTML/views/SOSetting/ExportNotice.html
+++ b/HTML/views/SOSetting/ExportNotice.html
@@ -1115,6 +1115,7 @@
 					console.log(data);
 					Id = data.Id;
 					SoNo = data.SONo;
+					var orderType=data.Type//鍗曟嵁绫诲瀷
 					if (obj.event === 'delete') {//鍒犻櫎
 						layer.confirm('纭畾鍒犻櫎姝ゅ崟鎹悧锛�', function(index) {
 							var param = {
@@ -1228,117 +1229,47 @@
 						});
 					}else if(obj.event === 'outKu'){	
 						$("#UnstackWay option[value='0']").attr("selected","selected");
-						$("#LoadingArea option[value='']").attr("selected","selected");
-						$("#PickingArea option[value='']").attr("selected","selected");
-						form.render('select'); 					
+						$("#UnstackWay").attr("disabled",false);						
 						var param = {
 							soNo: SoNo
 						};
-						// 鍒ゆ柇鏄惁闇�瑕佹媶绠憋紝闇�瑕佹媶绠卞氨闇�瑕侀�夋嫨鍑哄簱鍙�
-						sendData(IP + "/BllSo/IsNeedUnpack", param, 'get', function(res) {
-							if (res.code == 0) { //鎴愬姛
-								if(res.data=="1"){
-									isNeedUnpack='1'
-									$('.DivPickingArea2').show()//.attr("style", "display:block")
-								}else{
-									isNeedUnpack='0'
-									$('.DivPickingArea2').hide()//.attr("style", "display:none")									
-								}	
-								if($('#UnstackWay').val()=='1'){
-									$('.DivPickingArea2').show()//.attr("style", "display:block")
-								}							
-							} else { //涓嶆垚鍔�
-								layer.msg(res.msg, {
-									icon: 2,
-									time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-								}, function() {
-									return;
-								});
-							}
-						});
-						layer.open({
-							type: 1,
-							title: '纭鍑哄簱鍙�',
-							content: $('#divPickingArea'),
-							maxmin: true,
-							area: ['350px','285px'],
-							btn: ['纭畾', '鍙栨秷'],
-							yes: function(index, layero) {
-								var pa = $('#PickingArea').val();
-								console.log(pa)
-								if (isChongFu== true) {
-									isChongFu= false;
-									if(pa == null)
-									{
-										layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
-											icon: 2,
-											time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-										});
-										return;
-									}
-									if($('#UnstackWay').val()=='0'){
-										if($('#LoadingArea').val()==''){
-											layer.msg("璇烽�夋嫨瑁呰溅鍙�", {
-												icon: 2,
-												time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-											});
-											return;
-										}
-										if(isNeedUnpack=='1'){
-											if(pa==''){
-												layer.msg("璇烽�夋嫨鍑哄簱鍙�", {
-													icon: 2,
-													time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-												});
-												return;
-											}
-										}
+						if(orderType=="0"){
+							// 鍒ゆ柇鏄惁闇�瑕佹媶绠憋紝闇�瑕佹媶绠卞氨闇�瑕侀�夋嫨鍑哄簱鍙�
+							sendData(IP + "/BllSo/IsNeedUnpack", param, 'get', function(res) {
+								if (res.code == 0) { //鎴愬姛
+									if(res.data=="1"){
+										isNeedUnpack='1'
+										$('.DivPickingArea2').show()
 									}else{
-										if(pa==''){
-											layer.msg("璇烽�夋嫨鍑哄簱鍙�", {
-												icon: 2,
-												time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-											});
-											return;
-										}
-									}
-									var param = {
-										soNo: data.SONo, 
-										unstackingMode:$('#UnstackWay').val(),
-										outMode: pa,
-										loadingAddre:$('#LoadingArea').val()
-									};
-									console.log(param);
-									sendData(IP + "/DownApi/IssueOutHouse", param, 'get', function(res) {
-										console.log(res);
-										if (res.code == 0) { //鎴愬姛
-											layer.msg(res.msg, {
-												icon: 1,
-												time: 3000 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-											}, function() {
-												refreshTable();
-												isChongFu= true;
-											});
-										} else { //涓嶆垚鍔�
-											layer.msg(res.msg, {
-												icon: 2,
-												time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-											}, function() {
-												refreshTable();
-												isChongFu= true;
-											});
-										}
-										layer.close(index);
-									});
-								}else{
-									layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
+										isNeedUnpack='0'
+										$('.DivPickingArea2').hide()								
+									}	
+									if($('#UnstackWay').val()=='1'){
+										$('.DivPickingArea2').show()
+									}										
+									
+									form.render('select'); 					
+									outFunction()
+								} else { //涓嶆垚鍔�
+									layer.msg(res.msg, {
 										icon: 2,
 										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+									}, function() {
+										return;
 									});
 								}
-								
-							}
-						}); 
+							});
+						}else{
+							$("#UnstackWay option[value='1']").attr("selected","selected");
+							$("#UnstackWay").attr("disabled",true);
+							form.render('select'); 	
+							
+							$('.DivLoadingArea').hide()
+
+							outFunction()
+						}
+						
+						
 					}else if(obj.event === 'xml'){//缂栬緫
 						layer.confirm('纭畾瑕佸皢閫変腑鐨勫崟鎹笂浼犲悧锛�', function() {
 							if (isChongFu== true) {
@@ -1436,6 +1367,93 @@
 					}
 				});
 				
+				//閫夋嫨鍑哄簱鍙e脊绐楁柟娉�
+				function outFunction(){
+					layer.open({
+						type: 1,
+						title: '纭鍑哄簱鍙�',
+						content: $('#divPickingArea'),
+						maxmin: true,
+						area: ['350px','285px'],
+						btn: ['纭畾', '鍙栨秷'],
+						yes: function(index, layero) {
+							var pa = $('#PickingArea').val();
+							console.log(pa)
+							if (isChongFu== true) {
+								isChongFu= false;
+								if(pa == null)
+								{
+									layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
+										icon: 2,
+										time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+									});
+									return;
+								}
+								if($('#UnstackWay').val()=='0'){
+									if($('#LoadingArea').val()==''){
+										layer.msg("璇烽�夋嫨瑁呰溅鍙�", {
+											icon: 2,
+											time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										});
+										return;
+									}
+									if(isNeedUnpack=='1'){
+										if(pa==''){
+											layer.msg("璇烽�夋嫨鍑哄簱鍙�", {
+												icon: 2,
+												time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+											});
+											return;
+										}
+									}
+								}else{
+									if(pa==''){
+										layer.msg("璇烽�夋嫨鍑哄簱鍙�", {
+											icon: 2,
+											time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										});
+										return;
+									}
+								}
+								var param = {
+									soNo: data.SONo, 
+									unstackingMode:$('#UnstackWay').val(),
+									outMode: pa,
+									loadingAddre:$('#LoadingArea').val()
+								};
+								console.log(param);
+								sendData(IP + "/DownApi/IssueOutHouse", param, 'get', function(res) {
+									console.log(res);
+									if (res.code == 0) { //鎴愬姛
+										layer.msg(res.msg, {
+											icon: 1,
+											time: 3000 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										}, function() {
+											refreshTable();
+											isChongFu= true;
+										});
+									} else { //涓嶆垚鍔�
+										layer.msg(res.msg, {
+											icon: 2,
+											time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+										}, function() {
+											refreshTable();
+											isChongFu= true;
+										});
+									}
+									layer.close(index);
+								});
+							}else{
+								layer.msg("璇峰嬁閲嶅鐐瑰嚮", {
+									icon: 2,
+									time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+								});
+							}
+							
+						}
+					}); 
+				}
+
 				table.on('tool(LAY-app-content-list2)', function(obj) {
 					var data = obj.data;
 					var id = data.Id;

--
Gitblit v1.8.0