From 142327d5f901db7737e9c14038be526a16d0b331 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期六, 18 十二月 2021 13:28:35 +0800
Subject: [PATCH] #
---
static/js/utils.js | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/static/js/utils.js b/static/js/utils.js
index 2999835..6488db8 100644
--- a/static/js/utils.js
+++ b/static/js/utils.js
@@ -1,13 +1,33 @@
+// 鏁扮粍鏍规嵁key鍙栧��
function getArrVal(arrObj, key, condition) {
if (!arrObj instanceof Array) {
return null;
}
- for (var i = 0;i<arrObj.length;i++) {
- let element = arrObj[i];
- if (element[key] === condition) {
- return element;
+ if (arrObj == null || arrObj.length === 0) {
+ return null;
+ }
+ for (let obj of arrObj) {
+ if (obj[key] === condition) {
+ return obj;
}
}
return null;
}
+
+// 鏍规嵁搴撲綅鍙疯幏鍙栧叾瀹氫綅
+function getBinPosition(locNo) {
+ var position;
+ $.ajax({
+ url: 'http://localhost:9090/jkwcs/three/query/goods/position/v1',
+ type: "GET",
+ data: {
+ locNo: locNo
+ },
+ async: false,
+ success: function (res) {
+ position = res.data;
+ }
+ })
+ return position;
+}
--
Gitblit v1.9.1