Files
shanxia2.0/docs/superpowers/plans/2026-06-09-db-product-id.md
T
2026-06-10 22:59:34 +08:00

21 lines
923 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 地磅三表 CRM 产品 ID + 规格 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development or superpowers:executing-plans.
**Goal:** 计划/出入库/地磅单三表存储 `product_id` + `specification`,新建与编辑必选 CRM 产品。
**Architecture:** 方案 B(ID + 名称/规格快照);`resolve_crm_product` 统一校验并回填;级联复制 product 字段。
**Tech Stack:** FastAPI + SQLAlchemy + Vue 3 + Element Plus
---
## 任务清单
- [x] DDL:`docs/sql/20260609_db_product_id_specification.sql` + `db_tables.sql`
- [x] 后端:`product_helpers.py`、ORM、Schema、Mapper、三模块 API、自动计划
- [x] 前端:`DbCrmProductSelect` 三 v-model、三页面表单与 API 类型
- [ ] 执行增量 SQL 到开发库
- [ ] 历史数据回填 `product_id`(可选脚本)
- [ ] 全链路验收:计划 → 出入库 → 地磅