feat:增强框类型管理和搜索功能
- 引入基于 JSON 的框类型覆盖,允许动态更新标签、描述和前缀。 - 增加了一种可调节容量的定制盒型。 - 实现了应用和保存盒子类型覆盖的函数。 - 更新仪表盘,显示按箱型分组的库存低库存商品。 - 创建了一个新的搜索页面,方便快速访问具有增强搜索功能的组件。 - 用搜索页面取代扫描页面,将出站功能直接集成到搜索结果中。 - 改进的界面元素,提升导航和用户体验,包括新增按钮和样式。 - 移除过时的 scanner.js 文件并将其功能集成到搜索页面。 - 更新了各种模板,以反映新的搜索和框类型管理功能。
This commit is contained in:
@@ -421,6 +421,34 @@ body {
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.type-card-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.type-card-more {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--line);
|
||||
background: var(--card-alt);
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.type-card-more:hover {
|
||||
color: var(--accent-press);
|
||||
border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
|
||||
background: color-mix(in srgb, var(--card-alt) 76%, var(--accent) 24%);
|
||||
}
|
||||
|
||||
.catalog-content {
|
||||
min-width: 0;
|
||||
}
|
||||
@@ -772,6 +800,16 @@ input[type="checkbox"] {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.search-outbound-form {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-outbound-form input[type="number"] {
|
||||
width: 88px;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
(function () {
|
||||
const input = document.getElementById("scan-input");
|
||||
const form = document.getElementById("scan-search-form");
|
||||
|
||||
function showToast(message) {
|
||||
let stack = document.querySelector(".toast-stack");
|
||||
if (!stack) {
|
||||
stack = document.createElement("div");
|
||||
stack.className = "toast-stack";
|
||||
document.body.appendChild(stack);
|
||||
}
|
||||
|
||||
const toast = document.createElement("div");
|
||||
toast.className = "toast";
|
||||
toast.textContent = message;
|
||||
stack.appendChild(toast);
|
||||
|
||||
setTimeout(function () {
|
||||
toast.remove();
|
||||
}, 1600);
|
||||
}
|
||||
|
||||
if (!input || !form) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Keep focus for barcode scanners that type and send Enter immediately.
|
||||
window.addEventListener("load", function () {
|
||||
input.focus();
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", function (event) {
|
||||
if (event.key === "Escape") {
|
||||
input.value = "";
|
||||
input.focus();
|
||||
showToast("已清空搜索词");
|
||||
}
|
||||
});
|
||||
|
||||
form.addEventListener("submit", function () {
|
||||
if (input.value.trim()) {
|
||||
showToast("正在搜索...");
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user