From 439877c6ba4b9e43a9cbe86fe658b75d80097c3f Mon Sep 17 00:00:00 2001 From: star <395723461@qq.com> Date: Wed, 23 Sep 2026 11:14:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A5=E5=BA=93/=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E5=8D=95=E7=AC=94=E5=BD=95=E5=85=A5=E6=96=B0=E5=A2=9E=E7=89=A9?= =?UTF-8?q?=E6=96=99=E7=BC=96=E7=A0=81=E8=BE=93=E5=85=A5=E6=A1=86(?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=88=96=E6=89=AB=E7=A0=81=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 单笔录入表单顶部新增「物料编码」输入框, 输入或扫码物料编码即自动定位下拉物料: 精确命中/前缀唯一立即锁定并把光标跳到数量; 多个前缀候选提示继续输入; 编码不存在标红提示 - 下拉保留作后备, 手选下拉会反向自动填入编码, 两种方式互通 - option 加 data-pn 携带物料编码供前端精确匹配, 不改后端提交逻辑(仍用 material_id) - 新增 .pn-lookup / .pn-hint 样式(状态色与系统 ok/danger/warn 一致) - 教程补充单笔录入物料编码输入框说明 (注: 此前模拟齐套 commit 9f29139 因网络断连未推送, 本次一并推送) --- static/style.css | 8 ++++++ templates/txn.html | 52 ++++++++++++++++++++++++++++++++++-- 物料入库出库系统_使用教程.md | 5 +++- 3 files changed, 62 insertions(+), 3 deletions(-) diff --git a/static/style.css b/static/style.css index 3b07a00..0095f51 100644 --- a/static/style.css +++ b/static/style.css @@ -78,6 +78,14 @@ button:hover, .btn:hover { filter: brightness(.96); } .bom-filter label { margin: 0; white-space: nowrap; } .bom-filter select { width: auto; min-width: 260px; } +/* 入库/出库: 物料编码输入框(输入或扫码自动定位) */ +.pn-lookup { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } +.pn-lookup input { width: 280px; } +.pn-hint { font-size: 13px; white-space: nowrap; } +.pn-hint.ok { color: #1a7f47; } +.pn-hint.warn { color: #ad6800; } +.pn-hint.danger { color: #cf1322; } + /* BOM 模拟齐套模式 */ .sim-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; padding: 10px 12px; background: #f7f9fc; border: 1px solid #e3e8ef; border-radius: 8px; } .sim-bar label { margin: 0; white-space: nowrap; } diff --git a/templates/txn.html b/templates/txn.html index ee7eca5..59c0166 100644 --- a/templates/txn.html +++ b/templates/txn.html @@ -11,11 +11,16 @@