mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 20:29:19 +08:00
feat: 商品/规格删除增加影响确认,并优化列表操作列与编辑 SKU 滚动体验
This commit is contained in:
@@ -44,6 +44,15 @@ export async function deleteProductApi(id: number) {
|
||||
return requestClient.delete(`/ec/product/delete/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品前影响预览
|
||||
*/
|
||||
export async function getProductDeleteImpactApi(id: number) {
|
||||
return requestClient.get<ProductVO.DeleteImpact>(
|
||||
`/ec/product/delete-impact/${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将他品 SKU 迁入当前商品
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,15 @@ export async function deleteProductSkuApi(id: number) {
|
||||
return requestClient.delete(`/ec/product-sku/delete/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规格前影响预览
|
||||
*/
|
||||
export async function getProductSkuDeleteImpactApi(id: number) {
|
||||
return requestClient.get<ProductSkuVO.DeleteImpact>(
|
||||
`/ec/product-sku/delete-impact/${id}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取商品 SKU 列表
|
||||
*/
|
||||
|
||||
@@ -40,4 +40,19 @@ export namespace ProductSkuVO {
|
||||
/** 成本是否变更(本次更新中成本字段有变化) */
|
||||
costChanged?: boolean;
|
||||
}
|
||||
|
||||
/** 删除规格前影响预览 */
|
||||
export interface DeleteImpact {
|
||||
skuId: number;
|
||||
skuName: string;
|
||||
skuCode?: string;
|
||||
productId: number;
|
||||
productName: string;
|
||||
/** 已绑定该规格的订单明细数(删除后解绑,订单本身保留) */
|
||||
orderItemCount: number;
|
||||
/** 成本历史条数(将级联删除) */
|
||||
costRecordCount: number;
|
||||
/** 刷单费条数(将解绑规格,记录保留) */
|
||||
fakeOrdersFeeCount: number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,20 @@ export namespace ProductVO {
|
||||
product: ProductVO.Info;
|
||||
}
|
||||
|
||||
/** 删除商品前影响预览 */
|
||||
export interface DeleteImpact {
|
||||
productId: number;
|
||||
productName: string;
|
||||
/** 规格数(将级联删除) */
|
||||
skuCount: number;
|
||||
/** 已绑定该商品规格的订单明细数(删除后解绑,订单本身保留) */
|
||||
orderItemCount: number;
|
||||
/** 商品广告费条数(将级联删除) */
|
||||
adFeeCount: number;
|
||||
/** 刷单费条数(将解绑商品,记录保留) */
|
||||
fakeOrdersFeeCount: number;
|
||||
}
|
||||
|
||||
/** 商品 SKU 信息 */
|
||||
export interface SkuInfo {
|
||||
/** SKU ID */
|
||||
|
||||
Reference in New Issue
Block a user