first version
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type IProductCategory from '@/domain/iProductCategory.ts';
|
||||
|
||||
/** 分类级联树(商品表单分类下拉、对账筛选用,仅启用分类) */
|
||||
export async function getCategoryTree() {
|
||||
return createAxios<IProductCategory[]>({
|
||||
url: '/product/category/tree',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/** 完整分类树(后台树表展示) */
|
||||
export async function getCategoryTable() {
|
||||
return createAxios<IProductCategory[]>({
|
||||
url: '/product/category',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type IProduct from '@/domain/iProduct.ts';
|
||||
import type { IBatchPriceUpdate, IPriceMatrix } from '@/domain/iProduct.ts';
|
||||
|
||||
export interface PriceMatrixParams {
|
||||
category_id?: number;
|
||||
keyword?: string;
|
||||
}
|
||||
|
||||
/** A2 价格矩阵:行=商品,列=启用等级,值=price(缺失 null) */
|
||||
export async function getPriceMatrix(params?: PriceMatrixParams) {
|
||||
return createAxios<IPriceMatrix>({
|
||||
url: '/product/goods/priceMatrix',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** A2 批量调价(提交后给受影响门店生成价格变更通知) */
|
||||
export async function batchPrice(updates: IBatchPriceUpdate[]) {
|
||||
return createAxios({
|
||||
url: '/product/goods/batchPrice',
|
||||
method: 'put',
|
||||
data: { updates },
|
||||
});
|
||||
}
|
||||
|
||||
/** 商品下拉选项(仅上架) */
|
||||
export async function getProductOptions(keyword?: string) {
|
||||
return createAxios<IProduct[]>({
|
||||
url: '/product/goods/options',
|
||||
method: 'get',
|
||||
params: keyword ? { keyword } : {},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user