From 3f4c60630a161bcc0e1abf2a298522d19a56c938 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 13 二月 2026 14:04:50 +0800
Subject: [PATCH] 客户问题优化调整11
---
fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js b/fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
index 77d367e..4031ce7 100644
--- a/fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
+++ b/fzzy-igdss-web/src/main/resources/static/inout/inout-weight.js
@@ -29,6 +29,12 @@
}
});
+
+ //鐩戝惉浠撳簱閫夋嫨,閫夋嫨鍚庤嚜鍔ㄨ皟鐢ㄤ粨搴撶殑绮鍝佺淇℃伅
+ form.on('select(select_depotId)', function (obj) {
+ updateFoodVarietyByDepot(obj.value);
+ })
+
});
//鏄剧ず娴佺▼鐜妭
@@ -62,6 +68,24 @@
});
});
};
+
+//鏍规嵁閫夋嫨鐨勪粨搴撲俊鎭�,鏇存柊绮鍝佺
+function updateFoodVarietyByDepot(selectId) {
+ var selectDepot;
+ $.each(listDepot, function (index, data) {
+ if (data.id === selectId) {
+ selectDepot = data;
+ return false;
+ }
+ });
+
+ if (selectDepot) {
+ form.val("form-data", {
+ foodVariety: selectDepot.foodVariety
+ });
+ form.render();
+ }
+}
/**
* 绉伴噸鍙婃姄鎷�
@@ -99,13 +123,17 @@
id3: snapDto3.id,
sort: $("#scaleName").val()
};
-
+ if (!gatewaySer) {
+ layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛屾姄鍥惧け璐ワ紒");
+ return;
+ }
+ var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.snapUrl;
//褰撳墠AJAX鏈嶅姟涓哄悓姝ユ湇鍔★紝杩斿洖鏁版嵁鍖呰鐓х墖淇℃伅
var index = layer.load();
$.ajax({
sync: false,
type: "POST",
- url: "/inout/api/snap-img",
+ url: url,
dataType: "json",
contentType: "application/json;charset=UTF-8",
data: JSON.stringify(snapData),
@@ -309,11 +337,16 @@
* 璇诲彇杞︾墝鍙�
*/
function flushPlateNum() {
+ if (!gatewaySer) {
+ layer.msg("鏈幏鍙栧埌搴撳尯缃戝叧淇℃伅锛岃溅鐗岃鍙栧け璐ワ紒");
+ return;
+ }
+ var url = "http://" + gatewaySer.ip + ":" + gatewaySer.apiPort + gatewaySer.plateNumUrl;
var param = JSON.stringify(snapDto1);
var index = layer.load();
$.ajax({
type: "POST",
- url: "/inout/api/get-plateNum",
+ url: url,
dataType: "json",
contentType: "application/json;charset=UTF-8",
data: param,
--
Gitblit v1.9.3