feat: 档口入库码支持软删除与重导恢复 (#238)

This commit is contained in:
chengma
2026-08-15 10:49:28 +08:00
parent 4cbdc81a30
commit 2aea22b44d
13 changed files with 515 additions and 26 deletions
+15 -3
View File
@@ -48,6 +48,18 @@
</form>
<button type="button" data-modal-open="inner-code-apply-modal" data-need-checked="inner-code-apply"
data-inner-code-apply-open disabled>回写已选 <span data-inner-code-selected-count>0</span> 条</button>
<form id="inner-code-delete-form" method="post" action="/inner-codes/delete" hidden
data-confirm-delete="将删除 {n} 条档口入库码记录。删除不会撤销顺运宝已写入的快递单号,也不会取消正在回写的请求;重新导入相同数据可以恢复。"
data-confirm-delete-action="inner-code-delete">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<input type="hidden" name="date" value="{{.BusinessDate}}" data-inner-code-date-field>
<input type="hidden" name="status" value="{{.StatusFilter}}">
<input type="hidden" name="q" value="{{.Keyword}}">
<input type="hidden" name="page" value="{{.CurrentPage}}">
</form>
<button type="submit" class="danger" form="inner-code-delete-form"
data-need-checked="inner-code-delete" disabled>删除已选 <span data-inner-code-delete-count>0</span> 条</button>
</div>
{{if .Message}}<p class="notice inner-code-notice" role="status" aria-live="polite">{{.Message}}</p>{{end}}
@@ -56,7 +68,7 @@
<table class="inner-code-table">
<thead>
<tr>
<th class="col-check"><input type="checkbox" data-check-all aria-label="全选当前页可匹配记录"></th>
<th class="col-check"><input type="checkbox" data-check-all aria-label="全选当前页记录"></th>
<th>业务日期</th>
<th>订单号</th>
<th>档口及货号</th>
@@ -75,9 +87,9 @@
<tr {{if or (eq .Status "failed") (eq .Status "needs_check")}}class="row-warn"{{end}}>
<td class="col-check">
<input type="checkbox" value="{{.ID}}" data-inner-code-id="{{.ID}}"
data-select-action="{{if .CanMatch}}inner-code-match{{end}}{{if .CanApply}} inner-code-apply{{end}}"
data-select-action="inner-code-delete {{if .CanMatch}}inner-code-match{{end}}{{if .CanApply}} inner-code-apply{{end}}"
data-inner-code-old-value="{{if .HasRemoteOldCode}}1{{else}}0{{end}}"
aria-label="选择订单 {{.OrderNumber}}" {{if not .CanMatch}}disabled{{end}}>
aria-label="选择订单 {{.OrderNumber}}">
</td>
<td>{{.BusinessDate}}</td>
<td>{{.OrderNumber}}</td>