feat(syb): #340 phase 2 — merge main, recompute samples, frontend UI
Merge origin/main (through #345/e7c049d) into feat/340-syb-excluded-products. Resolved conflicts in sybimport/service.go, handler.go, service_test.go (kept #342's createdFrom/createdTo AND #340's purchaseType, all combined with processStage), and took origin/main's syb-products/index.vue as the base for the new UI work below. Renamed the migration version file from 1789801100000 to 1789801500000 (next free slot after main's highest, 1789801400000) — content unchanged, version comes from the filename. Backend: sybproductfilter recompute preview now also returns up to 20 sample rows (order code, shopee item id, change direction, matched rule) alongside the existing counts; execute stays count + audit-log only. Frontend (feat/340 issue "## 设计证据"/"## 页面", prototype v1): - SYB 订单商品页: 采购类型 filter (需 PDD 采购 default / 无需 PDD 采购 / 全部), 处理阶段 gains 无需采购 (pdd_excluded); selecting 退货待确认/已用退货/无需采购 auto-switches 采购类型 to 全部; pdd_excluded rows are tickable only for 匹配退货 (never collection/purchase/AI-match/image-search); rows show the stage tag plus 规则:<kind> <keyword>; detail drawer shows 采购类型 and rule. - SYB 过滤规则页: 跳过导入 -> 标记为无需 PDD 采购 wording, 上次同步命中 -> 上次同步标记, rewritten scope note, admin-only 按当前规则重算 button with preview dialog (4 counts + up to 20 samples) -> confirm -> execute. - SYB 同步记录: 结构/关键词过滤命中 -> 结构/关键词过滤标记 (see #340 point 8; the run-level "其中无需采购 N 条" count is derivable client-side from the existing char/keyword counts, no backend field added). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NTDbDcwbDw1TSAcE6wfh2F
This commit is contained in:
@@ -4,3 +4,5 @@ export function listSybProductFilters(params) { return request({ url: base, meth
|
||||
export function createSybProductFilter(data) { return request({ url: base, method: 'post', data }) }
|
||||
export function setSybProductFilterEnabled(id, data) { return request({ url: `${base}/${id}/enabled`, method: 'patch', data }) }
|
||||
export function deleteSybProductFilter(id) { return request({ url: `${base}/${id}`, method: 'delete' }) }
|
||||
export function previewSybProductFilterRecompute() { return request({ url: `${base}/recompute/preview`, method: 'get' }) }
|
||||
export function executeSybProductFilterRecompute() { return request({ url: `${base}/recompute/execute`, method: 'post' }) }
|
||||
|
||||
Reference in New Issue
Block a user