feat: 档口入库码后台批量回写 (#246)

This commit is contained in:
chengma
2026-08-15 17:08:17 +08:00
parent 6b30594f4c
commit f8f22a15c7
21 changed files with 708 additions and 134 deletions
+15 -1
View File
@@ -91,6 +91,19 @@
</div>
{{end}}
{{with .ApplyProgress}}
<section class="inner-code-batch-progress" role="status" aria-live="polite" aria-labelledby="inner-code-batch-title">
<div class="inner-code-batch-progress-head">
<strong id="inner-code-batch-title">后台回写进度</strong>
<a class="button-link" href="{{$.ApplyProgressURL}}">刷新进度</a>
</div>
<progress max="{{.Total}}" value="{{.Processed}}">{{.Processed}} / {{.Total}}</progress>
<p>共 {{.Total}} 条,已处理 {{.Processed}} 条;排队中 {{.Queued}} 条,回写中 {{.Applying}} 条,
成功 {{.Updated}} 条,已存在 {{.AlreadyFilled}} 条,跳过 {{.Skipped}} 条,失败 {{.Failed}} 条,需核对 {{.NeedsCheck}} 条。
{{if gt .Ready 0}}另有 {{.Ready}} 条未发送远端请求,已恢复为可回写。{{end}}</p>
</section>
{{end}}
<div class="table-wrap inner-code-table-wrap" role="region" aria-label="档口入库码记录列表" tabindex="0">
<table class="inner-code-table">
<thead>
@@ -170,12 +183,13 @@
<ul>
<li>每条写入前会重新读取顺运宝详情并核验商品。</li>
<li>写入后会再次读取;只有远端值一致才标记“已回写”。</li>
<li>提交后页面立即返回;后台每次读取最多 20 条,但仍会逐条安全回写。</li>
<li class="missing">超时或结果不确定时只标记“需核对”,不会自动重复写入。</li>
</ul>
</div>
<div class="modal-foot">
<button type="button" data-modal-close>取消</button>
<button type="submit" class="primary" form="inner-code-apply-form">确认回写</button>
<button type="submit" class="primary" form="inner-code-apply-form">开始后台回写</button>
</div>
</section>
</div>