update product edit

This commit is contained in:
Timi
2026-10-05 15:37:40 +08:00
parent c8e0c554b3
commit f643656eb4
9 changed files with 158 additions and 38 deletions
+15
View File
@@ -62,6 +62,10 @@ async function disable(id: string): Promise<void> {
await axios.post(`${PRODUCT_URI}/disable`, undefined, { params: { id } });
}
async function remove(id: string): Promise<void> {
await axios.post(`${PRODUCT_URI}/delete`, undefined, { params: { id } });
}
async function skuDetail(id: string): Promise<ProductSku> {
return await axios.post(`${PRODUCT_URI}/sku/detail`, undefined, { params: { id } });
}
@@ -86,10 +90,18 @@ async function specCreate(spec: ProductSpec): Promise<string> {
return await axios.post(`${PRODUCT_URI}/spec/create`, spec);
}
async function specUpdate(spec: ProductSpec): Promise<void> {
await axios.post(`${PRODUCT_URI}/spec/update`, spec);
}
async function specValueCreate(value: ProductSpecValue): Promise<string> {
return await axios.post(`${PRODUCT_URI}/spec/value/create`, value);
}
async function specValueUpdate(value: ProductSpecValue): Promise<void> {
await axios.post(`${PRODUCT_URI}/spec/value/update`, value);
}
async function sellableList(page: ProductPage): Promise<Product[]> {
return await axios.post(`${PRODUCT_URI}/sellable/list`, withCurrentStoreId(page));
}
@@ -155,13 +167,16 @@ export default {
create,
update,
disable,
remove,
skuDetail,
skuCreate,
skuUpdate,
skuDisable,
specList,
specCreate,
specUpdate,
specValueCreate,
specValueUpdate,
sellableList,
stockList,
stockProductList,