From bcfadd23d90070512cda6325a065c35820591fba Mon Sep 17 00:00:00 2001 From: zlwu <704541015@qq.com> Date: Tue, 28 Jul 2026 09:22:29 +0800 Subject: [PATCH] feat(web-admin): edit product brands and aliases in product form Co-authored-by: Cursor --- web-admin/src/api/crm/product.ts | 43 ++++++ web-admin/src/views/crm/product/index.vue | 163 +++++++++++++++++++++- 2 files changed, 204 insertions(+), 2 deletions(-) diff --git a/web-admin/src/api/crm/product.ts b/web-admin/src/api/crm/product.ts index 4f27fa77e..ae1bf6e12 100644 --- a/web-admin/src/api/crm/product.ts +++ b/web-admin/src/api/crm/product.ts @@ -1,5 +1,48 @@ import request from '@/utils/http' +export interface ProductBrandItem { + id?: string + brandName: string + status?: string + orderNum?: number +} + +export interface ProductAliasItem { + id?: string + aliasName: string + orderNum?: number +} + +export interface ProductFormData { + id?: string + productName: string + productNo?: string + categoryId?: string + model?: string + barcode?: string + stock?: number + lowStock?: number + taxRate?: number + status?: string + isToxic?: number + isExplosive?: number + description?: string + images?: string + remark?: string + brands?: ProductBrandItem[] + aliases?: ProductAliasItem[] +} + +export interface ProductDetail extends ProductFormData { + id: string + categoryName?: string + price?: number + costPrice?: number + cost?: number + saleCount?: number + createTime?: string +} + // ── 产品分类 ── /** 产品分类树(不分页) */ diff --git a/web-admin/src/views/crm/product/index.vue b/web-admin/src/views/crm/product/index.vue index 93cbbe433..a697e7733 100644 --- a/web-admin/src/views/crm/product/index.vue +++ b/web-admin/src/views/crm/product/index.vue @@ -192,6 +192,18 @@ header-align="center" show-overflow-tooltip /> + + + + +
+
+ 品牌 + + 新增品牌 + +
+ + + + + + + + + + + + +
+ +
+
+ 别名 + + 新增别名 + +
+ + + + + + + + + +