add ProductStockRecordDetail.vue
This commit is contained in:
+24
-2
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user