feat: 支持勾选部分档口入库码匹配 (#235)

This commit is contained in:
chengma
2026-08-15 09:41:45 +08:00
parent 05b59974e8
commit 63f8407780
10 changed files with 342 additions and 55 deletions
+7 -5
View File
@@ -37,7 +37,8 @@
<input type="hidden" name="q" value="{{.Keyword}}">
<input type="hidden" name="page" value="{{.CurrentPage}}">
</form>
<button type="submit" class="primary" form="inner-code-match-form">匹配顺运宝商品</button>
<button type="submit" class="primary" form="inner-code-match-form"
data-need-checked="inner-code-match" disabled>匹配已选 <span data-inner-code-match-count>0</span> 条</button>
<form id="inner-code-apply-form" method="post" action="/inner-codes/apply" hidden>
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
@@ -56,7 +57,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>
@@ -74,9 +75,10 @@
{{range .Rows}}
<tr {{if or (eq .Status "failed") (eq .Status "needs_check")}}class="row-warn"{{end}}>
<td class="col-check">
<input type="checkbox" name="ids" value="{{.ID}}" form="inner-code-apply-form"
data-select-action="inner-code-apply" data-inner-code-old-value="{{if .HasRemoteOldCode}}1{{else}}0{{end}}"
aria-label="选择订单 {{.OrderNumber}}" {{if not .CanSelect}}disabled{{end}}>
<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-inner-code-old-value="{{if .HasRemoteOldCode}}1{{else}}0{{end}}"
aria-label="选择订单 {{.OrderNumber}}" {{if not .CanMatch}}disabled{{end}}>
</td>
<td>{{.BusinessDate}}</td>
<td>{{.OrderNumber}}</td>