This commit is contained in:
hero920103 committed 2026-10-19 01:13:17 +08:00
1 parent 5718a00e31
commit 1850ac640e
226 files changed
+37772 -12071

No files matched your search

+74
View File
@@ -0,0 +1,74 @@
import request from '@/utils/request'
/**
* 进销存商品档案接口(/backend/erp/product*)
* 商品支持基础单位+辅助单位换算、五级价格、安全/最高库存与保质期批次开关。
*/
export function getProductList(params) {
return request({
url: '/backend/erp/product/list',
method: 'get',
params
})
}
export function getProductDetail(id) {
return request({
url: `/backend/erp/product/${id}`,
method: 'get'
})
}
export function createProduct(data) {
return request({
url: '/backend/erp/product',
method: 'post',
data
})
}
export function updateProduct(id, data) {
return request({
url: `/backend/erp/product/${id}`,
method: 'put',
data
})
}
export function deleteProduct(id) {
return request({
url: `/backend/erp/product/${id}`,
method: 'delete'
})
}
export function toggleProductStatus(id, status) {
return request({
url: `/backend/erp/product/${id}/status`,
method: 'post',
data: { status }
})
}
export function getCategoryList() {
return request({
url: '/backend/erp/product/category/list',
method: 'get'
})
}
export function saveCategory(data) {
return request({
url: '/backend/erp/product/category',
method: 'post',
data
})
}
export function deleteCategory(id) {
return request({
url: `/backend/erp/product/category/${id}`,
method: 'delete'
})
}