add ProductStockRecordDetail.vue

This commit is contained in:
Timi
2026-09-03 22:01:24 +08:00
parent 7a47e3a9f8
commit c593e404f6
7 changed files with 401 additions and 67 deletions
+24 -2
View File
@@ -1,5 +1,17 @@
import { axios } from "timi-web-api";
import type { Product, ProductCategory, ProductCategoryPage, ProductPage, ProductPageResult, ProductStock, ProductStockChangeRequest, ProductStockPage, StockRecord, StockRecordPage } from "@/types/Product";
import type {
Product,
ProductCategory,
ProductCategoryPage,
ProductPage,
ProductPageResult,
ProductStock,
ProductStockChangeRequest,
ProductStockManualRevokeRequest,
ProductStockPage,
StockRecord,
StockRecordPage
} from "@/types/Product";
import { getCurrentStoreId, withCurrentStoreId } from "@/utils/store";
const PRODUCT_URI = "/gao/product";
@@ -71,6 +83,10 @@ async function manualOut(request: ProductStockChangeRequest): Promise<ProductSto
return await axios.post(`${STOCK_URI}/manual-out`, withCurrentStoreId(request));
}
async function manualRevoke(request: ProductStockManualRevokeRequest): Promise<ProductStock> {
return await axios.post(`${STOCK_URI}/manual-revoke`, request);
}
async function stocktakeGain(request: ProductStockChangeRequest): Promise<ProductStock> {
return await axios.post(`${STOCK_URI}/stocktake-gain`, withCurrentStoreId(request));
}
@@ -83,6 +99,10 @@ async function recordList(page: StockRecordPage): Promise<ProductPageResult<Stoc
return await axios.post(`${STOCK_URI}/record/list`, withCurrentStoreId(page));
}
async function recordDetail(id: string): Promise<StockRecord> {
return await axios.post(`${STOCK_URI}/record/detail`, undefined, { params: { id } });
}
export default {
categoryList,
categoryCreate,
@@ -100,7 +120,9 @@ export default {
initialIn,
manualIn,
manualOut,
manualRevoke,
stocktakeGain,
stocktakeLoss,
recordList
recordList,
recordDetail
};