【crm:优化产品及产品分类】

This commit is contained in:
ZanGe丶
2023-12-03 21:24:38 +08:00
parent c322959c40
commit dde61c29a0
6 changed files with 86 additions and 91 deletions

View File

@ -0,0 +1,33 @@
import request from '@/config/axios'
// TODO @zange挪到 product 下,建个 category 包,挪进去哈;
export interface ProductCategoryVO {
id: number
name: string
parentId: number
}
// 查询产品分类详情
export const getProductCategory = async (id: number) => {
return await request.get({ url: `/crm/product-category/get?id=` + id })
}
// 新增产品分类
export const createProductCategory = async (data: ProductCategoryVO) => {
return await request.post({ url: `/crm/product-category/create`, data })
}
// 修改产品分类
export const updateProductCategory = async (data: ProductCategoryVO) => {
return await request.put({ url: `/crm/product-category/update`, data })
}
// 删除产品分类
export const deleteProductCategory = async (id: number) => {
return await request.delete({ url: `/crm/product-category/delete?id=` + id })
}
// 产品分类列表
export const getProductCategoryList = async (params) => {
return await request.get({ url: `/crm/product-category/list`, params })
}