mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
82 lines
1.3 KiB
JavaScript
82 lines
1.3 KiB
JavaScript
|
|
import http from "@/util/http.js"
|
||
|
|
|
||
|
|
export function getSupplier(params) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier",
|
||
|
|
method: "get",
|
||
|
|
params
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function removeSupplier(id) {
|
||
|
|
return http({
|
||
|
|
url: `/api/supplier/${id}`,
|
||
|
|
method: "delete"
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function addSupplier(data) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier",
|
||
|
|
method: "post",
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function updateSupplier(id, data) {
|
||
|
|
return http({
|
||
|
|
url: `/api/supplier/${id}`,
|
||
|
|
method: "patch",
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getPurchaseLog(params) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier/purchase_record",
|
||
|
|
method: "get",
|
||
|
|
params
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getLossLog(params) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier/loss_record",
|
||
|
|
method: "get",
|
||
|
|
params
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function addLossLog(data) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier/loss_record",
|
||
|
|
method: "post",
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function updateLossLog(id, data) {
|
||
|
|
return http({
|
||
|
|
url: `/api/supplier/loss_record/${id}`,
|
||
|
|
method: "patch",
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getDailyStock(params) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier/daily_stock_record",
|
||
|
|
method: "get",
|
||
|
|
params
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
export function addDailyStock(data) {
|
||
|
|
return http({
|
||
|
|
url: "/api/supplier/daily_stock_record",
|
||
|
|
method: "post",
|
||
|
|
data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|