|
@@ -23,7 +23,7 @@
|
|
|
<div class="select-box--item">
|
|
<div class="select-box--item">
|
|
|
<span>单号:</span>
|
|
<span>单号:</span>
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="tableQuery.queryParam.stuffName"
|
|
|
|
|
|
|
+ v-model="tableQuery.queryParam.queryKey"
|
|
|
placeholder="搜索申请单号/工号/姓名"
|
|
placeholder="搜索申请单号/工号/姓名"
|
|
|
class="act-search-input"
|
|
class="act-search-input"
|
|
|
/>
|
|
/>
|
|
@@ -87,12 +87,12 @@
|
|
|
<!-- 待审核:查看、审核 -->
|
|
<!-- 待审核:查看、审核 -->
|
|
|
<template v-if="scope.row.status === 1 || scope.row.status === '1'">
|
|
<template v-if="scope.row.status === 1 || scope.row.status === '1'">
|
|
|
<ActionButton text="查看" @click="handleView(scope.row.id)" />
|
|
<ActionButton text="查看" @click="handleView(scope.row.id)" />
|
|
|
- <ActionButton text="审核" @click="handleAudit(scope.row.id,scope.row)" />
|
|
|
|
|
|
|
+ <!-- <ActionButton text="审核" @click="handleAudit(scope.row.id,scope.row)" /> -->
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 申请加盖公章及材料申请 -->
|
|
<!-- 申请加盖公章及材料申请 -->
|
|
|
<template v-else-if="scope.row.status === 2 || scope.row.status === '2'">
|
|
<template v-else-if="scope.row.status === 2 || scope.row.status === '2'">
|
|
|
<ActionButton text="查看" @click="handleView(scope.row.id)" />
|
|
<ActionButton text="查看" @click="handleView(scope.row.id)" />
|
|
|
- <ActionButton text="确认" @click="confirmDialog = true;confirmId = scope.row.id;" />
|
|
|
|
|
|
|
+ <!-- <ActionButton text="确认" @click="confirmDialog = true;confirmId = scope.row.id;" /> -->
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 审核不通过:编辑、删除、查看 -->
|
|
<!-- 审核不通过:编辑、删除、查看 -->
|
|
|
<template v-else-if="scope.row.status === 3 || scope.row.status === '3'">
|
|
<template v-else-if="scope.row.status === 3 || scope.row.status === '3'">
|
|
@@ -212,7 +212,7 @@
|
|
|
pageNumber: pagination.pageNumber,
|
|
pageNumber: pagination.pageNumber,
|
|
|
pageSize: pagination.pageSize,
|
|
pageSize: pagination.pageSize,
|
|
|
queryParam: {
|
|
queryParam: {
|
|
|
- stuffName: '', // 物品名称
|
|
|
|
|
|
|
+ queryKey: '', // 名称
|
|
|
status: '', // 状态,默认启用
|
|
status: '', // 状态,默认启用
|
|
|
ids: [], // 选择数据的ID
|
|
ids: [], // 选择数据的ID
|
|
|
applicationDepartmentId: '', // 所属部门ID
|
|
applicationDepartmentId: '', // 所属部门ID
|
|
@@ -258,7 +258,7 @@
|
|
|
pagination.total = res.totalRow;
|
|
pagination.total = res.totalRow;
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- console.error('获取物品库存列表失败:', e);
|
|
|
|
|
|
|
+ console.error('获取库存列表失败:', e);
|
|
|
tableData.value = [];
|
|
tableData.value = [];
|
|
|
pagination.total = 0;
|
|
pagination.total = 0;
|
|
|
} finally {
|
|
} finally {
|
|
@@ -273,7 +273,7 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const handleReset = () => {
|
|
const handleReset = () => {
|
|
|
- tableQuery.queryParam.stuffName = '';
|
|
|
|
|
|
|
+ tableQuery.queryParam.queryKey = '';
|
|
|
tableQuery.queryParam.status = true; // 重置为默认启用状态
|
|
tableQuery.queryParam.status = true; // 重置为默认启用状态
|
|
|
tableQuery.queryParam.ids = [];
|
|
tableQuery.queryParam.ids = [];
|
|
|
handleSearch();
|
|
handleSearch();
|
|
@@ -297,18 +297,18 @@
|
|
|
const handleDownload = async () => {
|
|
const handleDownload = async () => {
|
|
|
try {
|
|
try {
|
|
|
const exportParams = {
|
|
const exportParams = {
|
|
|
- stuffName: tableQuery.queryParam.stuffName || undefined,
|
|
|
|
|
|
|
+ queryKey: tableQuery.queryParam.queryKey || undefined,
|
|
|
status: tableQuery.queryParam.status,
|
|
status: tableQuery.queryParam.status,
|
|
|
ids: tableQuery.queryParam.ids.length > 0 ? tableQuery.queryParam.ids : undefined,
|
|
ids: tableQuery.queryParam.ids.length > 0 ? tableQuery.queryParam.ids : undefined,
|
|
|
};
|
|
};
|
|
|
const response = await exportInventory(exportParams);
|
|
const response = await exportInventory(exportParams);
|
|
|
if (response) {
|
|
if (response) {
|
|
|
- const fileName = `物品库存管理_${new Date().toISOString().split('T')[0]}.xlsx`;
|
|
|
|
|
|
|
+ const fileName = `库存管理_${new Date().toISOString().split('T')[0]}.xlsx`;
|
|
|
downloadByData(response, fileName);
|
|
downloadByData(response, fileName);
|
|
|
ElMessage.success('导出成功');
|
|
ElMessage.success('导出成功');
|
|
|
}
|
|
}
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- console.error('导出物品库存失败:', e);
|
|
|
|
|
|
|
+ console.error('导出库存失败:', e);
|
|
|
ElMessage.error('导出失败,请重试');
|
|
ElMessage.error('导出失败,请重试');
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -355,7 +355,7 @@
|
|
|
ElMessage.success('删除成功');
|
|
ElMessage.success('删除成功');
|
|
|
getTableData();
|
|
getTableData();
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
- console.error('删除物品库存失败:', e);
|
|
|
|
|
|
|
+ console.error('删除库存失败:', e);
|
|
|
ElMessage.error('删除失败,请重试');
|
|
ElMessage.error('删除失败,请重试');
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|