From 47ef575524af55330046697a35cc56040a97dba6 Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Sun, 9 Aug 2026 19:42:03 +0800 Subject: [PATCH] docs: add plan for bx-mobile reimburse invoice attachment picker Co-authored-by: Cursor --- ...-mobile-reimburse-invoice-attach-picker.md | 651 ++++++++++++++++++ 1 file changed, 651 insertions(+) create mode 100644 docs/superpowers/plans/2026-08-09-bx-mobile-reimburse-invoice-attach-picker.md diff --git a/docs/superpowers/plans/2026-08-09-bx-mobile-reimburse-invoice-attach-picker.md b/docs/superpowers/plans/2026-08-09-bx-mobile-reimburse-invoice-attach-picker.md new file mode 100644 index 000000000..cde96b058 --- /dev/null +++ b/docs/superpowers/plans/2026-08-09-bx-mobile-reimburse-invoice-attach-picker.md @@ -0,0 +1,651 @@ +# bx-mobile 报销申请发票附件选择 — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** 将 `bx-mobile` 报销申请页的「从发票夹选择」从发票级改为附件级,UI 与提交 payload 对齐 web-admin。 + +**Architecture:** 仅改造 `ReimburseApplyPage.vue`:用 `invoiceApi.list` 返回的 `attachments` flatten 为可选附件项;底部 sheet 按月 3 列缩略图多选;状态为 `selectedInvoicePicks`;提交 `invoiceLinks: [{ invoiceId, attachmentId }]`。预览用现有 `attachmentApi.preview`。后端契约已支持,不改 API。 + +**Tech Stack:** Vue 3 + Vant 4 + TypeScript;bx-mobile Fresh Mint tokens;对照 Demo `mobile-ui/shanxia-mp-bx-reimburse-invoice-picker-demo.html`。 + +**Spec:** `docs/superpowers/specs/2026-08-09-bx-mobile-reimburse-invoice-attach-picker-design.md` + +--- + +## 文件结构 + +| 操作 | 文件 | 职责 | +|------|------|------| +| Modify | `bx-mobile/src/views/reimburse/ReimburseApplyPage.vue` | 附件级状态、flatten、picker UI、payload、编辑回显、样式 | +| Reference | `mobile-ui/shanxia-mp-bx-reimburse-invoice-picker-demo.html` | 视觉/交互对照(已提交,勿改除非 Demo 纠错) | +| Reference | `web-admin/src/components/bx/base/BxInvoiceSelectDialog.vue` | flatten / key / 月份分组语义对照 | +| Reference | `bx-mobile/src/views/invoice/InvoiceWalletMinePage.vue` | `normalizeInvoiceFiles` / preview 模式可抄 | + +**不新建文件**(YAGNI:无 vitest、不抽公共组件)。 + +**验证:** `pnpm`/`npm` 在 `bx-mobile` 下 `vue-tsc --noEmit`(或 `npm run build`);手工打开 `/reimburse/apply` 验收。 + +--- + +### Task 1: 替换状态模型与纯函数(script) + +**Files:** +- Modify: `bx-mobile/src/views/reimburse/ReimburseApplyPage.vue`(`