From 25df87113f92a1ad32e8e5f3b0dc9252e38575c9 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 29 八月 2024 09:07:39 +0800
Subject: [PATCH] Merge branch 'zwc'

---
 Pda/View/SoSetting/pingKuOut.html |   82 +++++++++++++++++++++++++++++------------
 1 files changed, 58 insertions(+), 24 deletions(-)

diff --git a/Pda/View/SoSetting/pingKuOut.html b/Pda/View/SoSetting/pingKuOut.html
index 3f0cecb..3f8ed4a 100644
--- a/Pda/View/SoSetting/pingKuOut.html
+++ b/Pda/View/SoSetting/pingKuOut.html
@@ -175,37 +175,71 @@
 				}
 				GetBoxInfo();
 			});
+
+			$("#selectDiv").click(function () {
+				var input = $('select[id="bar"]').next().find('.layui-select-title input')
+				var val = input.val()
+				//鍏堟洿鏂颁竴涓嬪嚭搴撳崟
+				updateBillList(function (data) {
+					$('select[id="bar"]').next().addClass('layui-form-selected')
+
+					$('select[id="bar"]').next().find('.layui-select-title input').val(val)
+				})
+			})
 			//鍒濆鍖栨覆鏌� 鍑哄簱鍗�
 			function updateBillList() {
 				$("#bar").empty()
 				$("#bar").append('<option value =>' + '</option>');
 				form.render('select');
-
-				var param = {
-					PalletNo: $("#PalletNo").val(),
-					Type: "1",
-				};
-				synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
-					console.log(res);
-
-					if (res.code == 0) { //鎴愬姛
-						console.log(res.data);
-						for (var i = 0; i < res.data.length; i++) {
-							if (i == 0) {
-								$("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
-							} else {
-								$("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
+				var PalletNo =  $("#PalletNo").val();
+				if(PalletNo == null && PalletNo == ""){ //涓嬫媺妗嗚幏鍙栧钩搴撳嚭搴撳崟
+					synData(IP + "/PdaSo/GetSoNoticeList", 'post', function (res) {
+						console.log(res);
+						if (res.code == 0) { //鎴愬姛
+							console.log(res.data);
+							for (var i = 0; i < res.data.length; i++) {
+								if (i == 0) {
+									$("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
+								} else {
+									$("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
+								}
 							}
-						}
-						form.render('select');
+							form.render('select');
 
-					} else { //涓嶆垚鍔�
-						layer.msg(res.msg, {
-							icon: 2,
-							time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
-						});
-					}
-				});
+						} else { //涓嶆垚鍔�
+							layer.msg(res.msg, {
+								icon: 2,
+								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+							});
+						}
+					});
+				}else{//鏍规嵁鎵樼洏鍙疯幏鍙栧嚭搴撳崟
+					var param = {
+						PalletNo: $("#PalletNo").val(),
+						Type: "1",
+					};
+					synData(IP + "/PdaSo/GetRunSoNoticeList", param, 'post', function (res) {
+						console.log(res);
+
+						if (res.code == 0) { //鎴愬姛
+							console.log(res.data);
+							for (var i = 0; i < res.data.length; i++) {
+								if (i == 0) {
+									$("#bar").append('<option value =' + res.data[i] + ' selected>' + res.data[i] + '</option>');
+								} else {
+									$("#bar").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>');
+								}
+							}
+							form.render('select');
+
+						} else { //涓嶆垚鍔�
+							layer.msg(res.msg, {
+								icon: 2,
+								time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+							});
+						}
+					});
+				}
 			}
 
 			//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏

--
Gitblit v1.8.0