商品列表、分类管理、客户等级

This commit is contained in:
liu
2026-08-05 19:28:53 +08:00
parent dfa471bf22
commit 258df92e6c
36 changed files with 472 additions and 516 deletions
+4 -1
View File
@@ -1,3 +1,5 @@
import type {ISysFileInfo} from "@/domain/iSysFile.ts";
/** 客户等级 */
export default interface ICustomerLevel {
id?: number;
@@ -5,7 +7,8 @@ export default interface ICustomerLevel {
name?: string;
sort?: number;
status?: number;
icon?: number;
icon_id?: number;
icon?: ISysFileInfo;
icon_url?: string;
created_at?: string;
updated_at?: string;
+20 -3
View File
@@ -1,5 +1,6 @@
import type IProductCategory from '@/domain/iProductCategory.ts';
import type ISupplier from '@/domain/iSupplier.ts';
import type {ISysFileInfo} from "@/domain/iSysFile.ts";
/** 商品等级价格行 */
export interface IProductPrice {
@@ -12,24 +13,40 @@ export interface IProductPrice {
/** 商品档案 */
export default interface IProduct {
/** 商品ID */
id?: number;
/** 分类ID */
category_id?: number;
/** 供应商ID */
supplier_id?: number;
/** 商品名称 */
name?: string;
/** 规格/包规 */
spec?: string;
/** 商品等级 */
grade?: string;
/** 计价单位 */
unit?: string;
image?: string;
/** 封面 */
image_ids?: string;
images_arr?: ISysFileInfo[];
/** 商品图文详情(富文本 HTML) */
content?: string;
/** 排序 */
sort?: number;
/** 保质期 */
shelf_life?: number;
/** 库存 */
stock?: number;
/** 状态 */
status?: number;
/** 描述 */
remark?: string;
/** 分类关联数据 */
category?: IProductCategory;
/** 供应商关联数据 */
supplier?: ISupplier;
/** 多等级价格 */
prices?: IProductPrice[];
/** 创建时间 */
created_at?: string;
}
+12 -1
View File
@@ -1,3 +1,5 @@
import type {ISysFileInfo} from "@/domain/iSysFile.ts";
/** 商品分类(多级,children 由后端组装) */
export default interface IProductCategory {
id?: number;
@@ -5,12 +7,21 @@ export default interface IProductCategory {
name?: string;
sort?: number;
status?: number;
icon?: number;
icon_id?: number;
icon?: ISysFileInfo;
icon_url?: string;
children?: IProductCategory[];
created_at?: string;
}
/** 商品分类(多级,children 由后端组装) */
export interface IProductCategoryTree {
id?: number;
parent_id?: number;
name?: string;
children?: IProductCategoryTree[];
}
export const CATEGORY_STATUS_MAP: Record<number, { text: string; color: string }> = {
0: { text: '停用', color: 'error' },
1: { text: '正常', color: 'success' },