feat: 添加锁仓模式设置,优化编辑和入库功能提示

This commit is contained in:
2026-03-12 14:10:35 +08:00
parent 8928da3929
commit 61ffab497f
3 changed files with 28 additions and 1 deletions

View File

@@ -72,6 +72,10 @@
立创接口超时(秒) 立创接口超时(秒)
<input type="number" name="lcsc_timeout" min="5" value="{{ settings.lcsc_timeout }}"> <input type="number" name="lcsc_timeout" min="5" value="{{ settings.lcsc_timeout }}">
</label> </label>
<label class="full">
<input type="checkbox" name="lock_storage_mode" value="1" {% if settings.lock_storage_mode %}checked{% endif %}>
开启锁仓模式(禁止删除位置绑定、禁止替换当前位置料号)
</label>
<p class="hint full">输入 C 编号(如 <code>C23186</code>)时,系统按 <code>productCode</code> 查询;输入纯数字时按 <code>productId</code> 查询。</p> <p class="hint full">输入 C 编号(如 <code>C23186</code>)时,系统按 <code>productCode</code> 查询;输入纯数字时按 <code>productId</code> 查询。</p>
<div class="actions full"> <div class="actions full">
<button class="btn" type="submit">保存参数</button> <button class="btn" type="submit">保存参数</button>

View File

@@ -76,7 +76,7 @@
<h2 id="quick-inbound-title">快速入库</h2> <h2 id="quick-inbound-title">快速入库</h2>
<button class="btn btn-light" type="button" id="close-quick-inbound">关闭</button> <button class="btn btn-light" type="button" id="close-quick-inbound">关闭</button>
</div> </div>
<p class="hint">每行一条: 料号, 名称, 数量, 规格, 备注。支持英文逗号或Tab分隔同料号会自动累加数量</p> <p class="hint">每行一条: 料号, 名称, 数量, 规格, 备注。支持英文逗号或Tab分隔检测到同料号或同参数时不会自动合并,需要人工确认</p>
<form method="post" action="{{ url_for('quick_inbound', box_id=box.id) }}"> <form method="post" action="{{ url_for('quick_inbound', box_id=box.id) }}">
<textarea class="batch-input" name="lines" rows="8" placeholder="10K-0603, 电阻10K 0603, 500, 1%, 常用\n100nF-0603, 电容100nF 0603, 300, 50V X7R, 去耦"></textarea> <textarea class="batch-input" name="lines" rows="8" placeholder="10K-0603, 电阻10K 0603, 500, 1%, 常用\n100nF-0603, 电容100nF 0603, 300, 50V X7R, 去耦"></textarea>
<p class="hint">建议: part_no 用厂家型号name 用品类+型号specification 只写关键参数。</p> <p class="hint">建议: part_no 用厂家型号name 用品类+型号specification 只写关键参数。</p>

View File

@@ -26,6 +26,9 @@
{% if notice %} {% if notice %}
<p class="notice">{{ notice }}</p> <p class="notice">{{ notice }}</p>
{% endif %} {% endif %}
{% if lock_storage_mode %}
<p class="notice">当前为锁仓模式: 禁止删除位置绑定,禁止替换当前位置料号。</p>
{% endif %}
<div class="entry-shell"> <div class="entry-shell">
<section class="entry-main"> <section class="entry-main">
@@ -51,6 +54,14 @@
备注 备注
<textarea name="note" rows="3" placeholder="如 LCSC item 9243">{{ component.note if component else '' }}</textarea> <textarea name="note" rows="3" placeholder="如 LCSC item 9243">{{ component.note if component else '' }}</textarea>
</label> </label>
<label class="full">
<input type="checkbox" name="confirm_merge" value="1">
人工确认后合并: 若检测到同料号或同参数物料,保存时将数量合并到已存在位置
</label>
<label class="full">
<input type="checkbox" name="confirm_position_change" value="1">
我确认替换当前位物料(会改变该位置原有绑定)
</label>
<div class="actions full"> <div class="actions full">
<button class="btn" type="submit" name="action" value="save">保存</button> <button class="btn" type="submit" name="action" value="save">保存</button>
@@ -60,6 +71,10 @@
{% else %} {% else %}
<button class="btn btn-light" type="submit" name="action" value="toggle_enable">启用</button> <button class="btn btn-light" type="submit" name="action" value="toggle_enable">启用</button>
{% endif %} {% endif %}
<label class="full">
删除确认(输入当前位置编号 {{ slot_code }}
<input type="text" name="delete_confirm_slot" placeholder="请输入 {{ slot_code }}">
</label>
<button class="btn btn-danger" type="submit" name="action" value="delete" onclick="return confirm('确认删除这个元件记录吗?')">删除</button> <button class="btn btn-danger" type="submit" name="action" value="delete" onclick="return confirm('确认删除这个元件记录吗?')">删除</button>
{% endif %} {% endif %}
</div> </div>
@@ -79,6 +94,14 @@
数量 数量
<input type="number" name="quantity" min="0" value="0"> <input type="number" name="quantity" min="0" value="0">
</label> </label>
<label class="full">
<input type="checkbox" name="confirm_merge" value="1">
人工确认后合并: 若检测到同料号或同参数物料,将合并到已存在位置
</label>
<label class="full">
<input type="checkbox" name="confirm_position_change" value="1">
我确认替换当前位物料(会改变该位置原有绑定)
</label>
<div class="actions full"> <div class="actions full">
<button class="btn" type="submit">拉取并写入当前位</button> <button class="btn" type="submit">拉取并写入当前位</button>
<a class="btn btn-light" href="{{ url_for('ai_settings_page') }}">接口参数</a> <a class="btn btn-light" href="{{ url_for('ai_settings_page') }}">接口参数</a>