2024-07-30 18:13:11 +08:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-03 17:34:54 +08:00
|
|
|
export function examinePurchase(data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: "/api/purchase_record/purchase_batch_check",
|
|
|
|
|
method: "post",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-05 18:04:49 +08:00
|
|
|
export function addPurchaseLog(data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: "/api/supplier/purchase_record",
|
|
|
|
|
method: "post",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-16 14:45:07 +08:00
|
|
|
export function batchAddPurchaseLog(data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: "/api/purchase_record/purchase_batch_store",
|
|
|
|
|
method: "post",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-05 18:04:49 +08:00
|
|
|
export function updatePurchaseLog(id, data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: `/api/supplier/purchase_record/${id}`,
|
|
|
|
|
method: "patch",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-30 18:13:11 +08:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-16 14:45:07 +08:00
|
|
|
export function batchAddLossLog(data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: "/api/loss_record/loss_batch_store",
|
|
|
|
|
method: "post",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-30 18:13:11 +08:00
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-16 14:45:07 +08:00
|
|
|
export function batchAddDailyStock(data) {
|
|
|
|
|
return http({
|
|
|
|
|
url: "/api/daily_stock_record/inventory_batch_store",
|
|
|
|
|
method: "post",
|
|
|
|
|
data
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|