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
+12 -1
View File
@@ -31,7 +31,9 @@ func TestInnerCodeTemplate_独立导航与安全表单(t *testing.T) {
`action="/inner-codes/import"`, `action="/inner-codes/match"`,
`action="/inner-codes/apply"`, `action="/inner-codes/recheck"`,
`name="csrf_token"`, `data-check-all`, `data-inner-code-apply-open`,
`{{if not .CanSelect}}disabled{{end}}`, `aria-label="档口入库码记录列表"`,
`data-need-checked="inner-code-match"`, `data-inner-code-id="{{.ID}}"`,
`inner-code-match{{end}}{{if .CanApply}} inner-code-apply`,
`{{if not .CanMatch}}disabled{{end}}`, `匹配已选`, `aria-label="档口入库码记录列表"`,
} {
if !strings.Contains(page, want) {
t.Errorf("正式页面缺少 %s", want)
@@ -47,4 +49,13 @@ func TestInnerCodeTemplate_模块状态白名单已登记(t *testing.T) {
if !strings.Contains(string(raw), `"/inner-codes": ["date", "status", "q", "page"]`) {
t.Fatal("档口入库码页面切换模块后应保持稳定筛选和页码")
}
for _, want := range []string{
`appendSelectedIDs(matchForm, "inner-code-match")`,
`appendSelectedIDs(applyForm, "inner-code-apply")`,
`field.name = "ids"`,
} {
if !strings.Contains(string(raw), want) {
t.Errorf("档口入库码选中 ID 提交缺少 %s", want)
}
}
}