to stock detail when only once sku
This commit is contained in:
@@ -256,6 +256,14 @@ async function toSkuList(item: ProductStockProduct): Promise<void> {
|
|||||||
if (!item.productId) {
|
if (!item.productId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (item.skuCount === 1 && item.skuId) {
|
||||||
|
await router.push({
|
||||||
|
name: "ProductStockDetail",
|
||||||
|
params: { skuId: item.skuId },
|
||||||
|
query: { transitionDepth: String(getCurrentRouteDepth() + 1) }
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
await router.push({
|
await router.push({
|
||||||
name: "ProductStockSkuList",
|
name: "ProductStockSkuList",
|
||||||
params: { productId: item.productId },
|
params: { productId: item.productId },
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ export type ProductStockProduct = {
|
|||||||
attachmentList?: Attachment[];
|
attachmentList?: Attachment[];
|
||||||
productType?: ProductType;
|
productType?: ProductType;
|
||||||
skuCount?: number;
|
skuCount?: number;
|
||||||
|
skuId?: string;
|
||||||
onHandQuantity?: number | string;
|
onHandQuantity?: number | string;
|
||||||
reservedQuantity?: number | string;
|
reservedQuantity?: number | string;
|
||||||
availableQuantity?: number | string;
|
availableQuantity?: number | string;
|
||||||
|
|||||||
Reference in New Issue
Block a user