feat: 库存管理前端页面
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Agent
2026-03-24 04:18:12 +00:00
parent f6e9c28f71
commit 24375d6d00
5 changed files with 706 additions and 0 deletions

41
src/api/stock.js Normal file
View File

@@ -0,0 +1,41 @@
import api from './index'
/**
* 库存相关API
*/
export default {
/**
* 获取库存列表
*/
getStockList(params) {
return api.request('/stock', 'GET', params)
},
/**
* 获取单商品库存
*/
getStock(productId) {
return api.request(`/stock/${productId}`, 'GET')
},
/**
* 入库
*/
stockIn(data) {
return api.request('/stock/in', 'POST', null, data)
},
/**
* 库存调整
*/
adjustStock(data) {
return api.request('/stock/adjust', 'POST', null, data)
},
/**
* 获取库存流水
*/
getStockFlow(params) {
return api.request('/stock/flow', 'GET', params)
}
}