From d19a7b49cb2121008f45924802660f2a17563a23 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 13 三月 2025 14:36:53 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/layuiadmin/modules/tableSelect.js | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/WebTM/layuiadmin/modules/tableSelect.js b/WebTM/layuiadmin/modules/tableSelect.js
index 5eb6848..17c16bb 100644
--- a/WebTM/layuiadmin/modules/tableSelect.js
+++ b/WebTM/layuiadmin/modules/tableSelect.js
@@ -23,9 +23,9 @@
opt.searchKey = opt.searchKey || 'keyword';//鍙涓敤锛屽垎鍓�
opt.table.page = opt.table.page || false;
opt.table.height = opt.table.height || 290;
- elem.off('click').on('click', function(e) {
+ elem.off('keyup').on('keyup', function(e) {
e.stopPropagation();
- if($('div.tableSelect').length >= 1){
+ if ($('div.tableSelect').length >= 1 || elem.val().length<=2) {
return false;
}
@@ -43,7 +43,7 @@
//娓叉煋TABLE
opt.table.elem = "#"+tableName;
opt.table.id = tableName;
- //鑻ユ病鏈墂here琛ㄧず涓哄墠绔垎椤�
+ //鑻ユ病鏈塽rl琛ㄧず涓哄墠绔垎椤�
if (opt.table.url != undefined) {
opt.table.where['sWhere'] = opt.sWhere
} else {
@@ -247,7 +247,13 @@
//鎸夐挳閫変腑
tableBox.find('.tableSelect_btn_select').on('click', function() {
var checkStatus = table.checkStatus(tableName);
- selectDone(checkStatus);
+ if (checkStatus.data.length > 0) {
+ selectDone(checkStatus);
+ } else {
+ tableBox.remove();
+ delete table.cache[tableName];
+ }
+
})
//鍐欏�煎洖璋冨拰鍏抽棴
--
Gitblit v1.9.1