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: 按易制毒/易制爆/双属性区分所需证书(1~3 种),新增 legal_use_cert_url;上传/查看/列表动态展示;历史数据迁移。
Architecture: pl_plan_product 三 URL 字段语义固定;前端 getRequiredCertSlots() 为单一规则源;安排运输仍只校验 hazard_cert_ready(2026-07-04 不变)。
Tech Stack: FastAPI + SQLAlchemy + Pydantic v2;Vue 3 + Element Plus
Spec: docs/superpowers/specs/2026-07-05-pl-hazard-cert-by-type-design.md
Status: ✅ 已实现(2026-07-05)
| 文件 | 职责 |
|---|---|
backend/scripts/migrate_pl_plan_product_legal_use_cert_url.sql |
DDL + 历史 DML |
docs/sql/pl_tables.sql |
CREATE TABLE 同步 |
docs/sql/shanxia2.0.sql |
CREATE TABLE 同步 |
backend/app/models/pl_models.py |
legal_use_cert_url + comment |
backend/app/schemas/pl/plan.py |
Schema 三字段 |
backend/app/services/pl_plan_service.py |
build/update certs |
backend/app/api/pl/plan.py |
编辑计划合并证书 URL |
web-admin/src/api/pl/index.ts |
TS 类型 |
web-admin/src/composables/usePlToxicProductCertCheck.ts |
槽位规则 |
web-admin/src/components/business/pl-plan-cert-upload-dialog/index.vue |
动态上传 |
web-admin/src/components/business/pl-plan-hazard-cert-view-table/index.vue |
卡片查看 |
web-admin/src/components/business/pl-plan-list-cert-cell/index.vue |
列表证书 |
web-admin/src/components/business/pl-plan-list-product-cell/index.vue |
计划列表 |
web-admin/src/views/pl/plan-cert/index.vue |
齐备确认文案 |
web-admin/src/components/business/pl-plan-form-dialog/index.vue |
透传第三字段 |
pl_tables.sql / shanxia2.0.sql CREATE TABLEPlPlanProduct.legal_use_cert_urlplan.py schemas 三字段build_plan_product / update_plan_product_certsplan.py 编辑计划合并三证书 URLPlanProduct.legalUseCertUrlgetRequiredCertSlots 等 helperplan-cert/index.vue 确认框pl-plan-form-dialog / usePlContractToPlanmysql ... < backend/scripts/migrate_pl_plan_product_legal_use_cert_url.sql