feat(api): 🚀 入库单列表

This commit is contained in:
2025-09-24 17:27:03 +08:00
parent b9c5ded6ec
commit 629232a243
8 changed files with 115 additions and 39 deletions

View File

@@ -1,4 +1,5 @@
import { useMsg } from "@/hooks/useMsg";
import { getSubscribeResetListApi } from "@/api/modules/warehousing";
// 直接导出函数,无需额外包装对象
export const handleDel = (item: any, selectionList: any[], proTable: any) => {
console.log("导出操作", item);
@@ -25,16 +26,25 @@ export const handleDel = (item: any, selectionList: any[], proTable: any) => {
.catch(() => {});
};
// proTable: any
export const handleAdd = (item: any, selectionList: any[]) => {
export const handleReSet = async (item: any, selectionList: any[], proTable: any) => {
console.log("刷新操作", item);
let length = selectionList.length;
if (length && length > 100) {
useMsg("warning", "选中刷新数据最大100条");
return;
}
let ids: any = [];
selectionList.forEach((item: any) => {
ids.push(item.id);
});
const result = await getSubscribeResetListApi(ids);
if (result?.code === 0) {
useMsg("success", "数据刷新成功 ");
proTable.value!.getTableList();
}
};
export const btnClick: any = {
del: handleDel,
add: handleAdd
reset: handleReSet
};