freight-web/src/services/receive.ts

87 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-03-04 07:10:11 +00:00
// 存放路径: src/services/home.ts
import type { Result } from '@/types/global'
import { http } from "@/utils/http";
// 收库单分页查询
export const getOrderPage = (data: PageParams) => {
2024-03-09 12:37:17 +00:00
return http<OrderPage<Order>>({
2024-03-04 07:10:11 +00:00
method: "GET",
url: "/api/orderIn/getOrderPage",
data,
});
};
// 获取收货单集合
export const getList = () => {
return http<Result>({
method: "GET",
url: "/api/orderIn/getList"
});
};
//根据id获取收货单详情
export const getDetailById = (data: {id: number}) => {
2024-03-09 12:37:17 +00:00
return http<Order>({
2024-03-04 07:10:11 +00:00
method: "GET",
url: "/api/orderIn/getOne",
data
});
};
// 新增收货单
export const addOrderIn = (data: any) => {
return http<Result>({
method: "POST",
url: "/api/orderIn/addOrderIn",
data,
});
};
// 批量修改收货单
export const updateOrderIn = (data: any) => {
return http<Result>({
method: "POST",
url: "/api/orderIn/updateOrderIn",
data,
});
};
// 用于过皮和零皮重
export const getTare = (data: any) => {
return http<Result>({
method: "POST",
url: "/api/orderIn/getTare",
data,
});
};
// 用于单个或批量作废收货单
export const deleteOrder = (data: any) => {
return http<Result>({
method: "POST",
url: "/api/orderIn/delete",
data,
});
};
// 统计首页的本月总收获以及总支出
// 收货类型
2024-03-09 12:37:17 +00:00
2024-03-04 07:10:11 +00:00
export const countOrderByMonth = () => {
return http<ReceiveSummary>({
method: "GET",
url: "/api/orderIn/countOrderByMonth"
});
};
2024-03-09 12:37:17 +00:00
// 更新定价详情
export const updateOne = (data: any) => {
return http<Result>({
method: "POST",
url: "/api/orderIn/updateOne",
data,
});
};
2024-03-04 07:10:11 +00:00