From 06bc1ebcdbc217a7f53be2926ee4c25eb2990903 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 29 八月 2024 09:07:25 +0800
Subject: [PATCH] 修改组托收货箱码关联,和平库出库单页面
---
Pda/View/SoSetting/pingKuOut.html | 96 ++++++++++++++++++++++++++++++++++-------------
1 files changed, 69 insertions(+), 27 deletions(-)
diff --git a/Pda/View/SoSetting/pingKuOut.html b/Pda/View/SoSetting/pingKuOut.html
index e8c5d73..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绉掞級
+ });
+ }
+ });
+ }
}
//鑾峰彇鎵樼洏鐗╂枡鍚嶇粏
@@ -277,12 +311,10 @@
//妫�鏌ユ墭鐩樼姸鎬�
function checkPalletState() {
-
var param = {
"PalletNo": $("#PalletNo").val()
}
synData(IP + "/PdaSo/IsEnableOkPalletNo", param, 'post', function (res) {
- console.log("AAA");
console.log(res);
if (res.code == 0) { //鎴愬姛
@@ -304,11 +336,21 @@
//褰撴墭鐩樻潯鐮佽緭鍏ユ澶卞幓鐒︾偣鏃�,妫�鏌ヤ竴涓嬫墭鐩樼姸鎬�
$("#PalletNo").blur(function () {
- checkPalletState()
+ if ($("#PalletNo").val().length == 8) {
+ checkPalletState()
+ }
+
})
$("#PalletNo").keydown(function (e) {
if (e.keyCode === 13) {
+ if ($("#PalletNo").val().length != 8) {
+ layer.msg('璇疯緭鍏ユ纭殑鎵樼洏鏉$爜', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ });
+ return;
+ }
checkPalletState();
}
});
--
Gitblit v1.8.0