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,4 @@
<!-- 质检 -->
<!-- 入库 -->
<template>
<div class="table-box">
<div style="padding-bottom: 16px">
@@ -11,7 +11,7 @@
<ProTable
ref="proTable"
:columns="dataStore.columns"
:request-api="getMaterialListApi"
:request-api="getSubscribeWrrListApi"
:init-param="dataStore.initParam"
@selectionChange="selectionChange"
>
@@ -32,7 +32,7 @@ import ProTable from "@/components/ProTable/index.vue";
// import { useMsg } from "@/hooks/useMsg";
import PermissionButton from "@/components/PermissionButton/index.vue";
import { getMaterialListApi } from "@/api/modules/foundationMaterial";
import { getSubscribeWrrListApi } from "@/api/modules/warehousing";
import SearchForm from "@/components/SearchForm/index.vue";
import { RULE_FORM, FORM_DATA, COLUMNS, BUTTON } from "./constant/list/index";
//表格TS
@@ -59,6 +59,10 @@ const dataStore = reactive<any>({
});
//设置组织数组
dataStore.formData[5].options = userStore.orgIdArr;
//订阅人
dataStore.initParam.subscriber_name = userStore.userInfo.nickname;
// 表格选择事件
const selectionChange = (selection: any) => {
dataStore.selectionList = selection;
@@ -67,8 +71,22 @@ const handleButtonClickCallback = (item: any) => {
const { type } = item;
btnClick[type](item, dataStore.selectionList, proTable);
};
const handleSearch = () => {};
const handleReset = () => {};
//搜索
const handleSearch = async (params: any) => {
dataStore.initParam = cloneDeep(params);
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTable.value!.getTableList();
});
};
//重置
const handleReset = () => {
dataStore.initParam = cloneDeep(RULE_FORM);
//这里需要等到表格刷新以后才去请求
nextTick(() => {
proTable.value!.getTableList();
});
};
</script>
<style scope lang="scss">