Files
shanxia2.0/docs/superpowers/plans/2026-08-08-crm-quote-reedit-to-draft.md
T
2026-08-08 20:43:48 +08:00

899 B

报价单再编辑回草稿 — 实现计划

For agentic workers: 按任务顺序执行;改完对照 design spec 验收。

Goal: 报价单 draft/submitted/accepted/rejected 可编辑,保存后回草稿(submitted 清待审)。

Architecture: 对齐合同 CONTRACT_EDITABLE_STATUSES + 前端 isContractEditableStatus 模式。

Task 1: Backend update_quote

  • File: backend/app/crud/crm/quote.py
  • Add QUOTE_EDITABLE_STATUSES / assert_quote_editable_for_update
  • On update: assert; if submitted → delete_pending_approvals; set status=draft; clear reject_reason when present

Task 2: Frontend helper

  • Create web-admin/src/views/crm/quote/quoteStatus.ts mirroring contractType.ts

Task 3: Wire UI entries

  • QuoteListPage.vue toolbar + handleUpdate
  • QuoteDetailDialog.vue 修改按钮 + confirm
  • detail.vue 修改按钮 + confirm