From e1e0d48eb7ab2b305e6062f23610f8be9db3bed6 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期六, 29 八月 2026 13:46:26 +0800
Subject: [PATCH] feat(wms): 新增库存汇总统计与预警功能
---
src/views/wls/stocktaking/task/index.vue | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/src/views/wls/stocktaking/task/index.vue b/src/views/wls/stocktaking/task/index.vue
index 472ed33..8d52536 100644
--- a/src/views/wls/stocktaking/task/index.vue
+++ b/src/views/wls/stocktaking/task/index.vue
@@ -2,9 +2,9 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesWmStockTakingTaskApi } from '#/api/mes/wm/stocktaking/task';
-import { Page, useVbenModal } from '../../../../packages/effects/common-ui/src';
-import { MesWmStockTakingTaskStatusEnum } from '../../../../packages/constants/src';
-import { downloadFileFromBlobPart } from '../../../../packages/utils/src';
+import { Page, useVbenModal } from '@vben/common-ui';
+import { MesWmStockTakingTaskStatusEnum } from '@vben/constants';
+import { downloadFileFromBlobPart } from '@vben/utils';
import { Button, message } from 'ant-design-vue';
@@ -14,6 +14,7 @@
deleteStockTaking,
exportStockTaking,
getStockTakingPage,
+ processStockTakingDifference,
} from '#/api/mes/wm/stocktaking/task';
import { $t } from '#/locales';
@@ -60,6 +61,23 @@
await cancelStockTaking(row.id!);
message.success('鍙栨秷鎴愬姛');
handleRefresh();
+}
+
+/** 澶勭悊鐩樼偣宸紓锛堢洏鐩堝叆搴�/鐩樹簭鍑哄簱锛岃皟鏁村簱瀛橈級 */
+async function handleProcessDifference(
+ row: MesWmStockTakingTaskApi.StockTakingTask,
+) {
+ const hideLoading = message.loading({
+ content: '姝e湪澶勭悊鐩樼偣宸紓...',
+ duration: 0,
+ });
+ try {
+ await processStockTakingDifference(row.id!);
+ message.success('澶勭悊鐩樼偣宸紓鎴愬姛');
+ handleRefresh();
+ } finally {
+ hideLoading();
+ }
}
/** 鍒犻櫎鐩樼偣浠诲姟 */
@@ -193,6 +211,17 @@
confirm: handleCancel.bind(null, row),
},
},
+ {
+ label: '澶勭悊宸紓',
+ type: 'link',
+ icon: ACTION_ICON.AUDIT,
+ auth: ['mes:wm-stock-taking-task:update'],
+ ifShow: row.status === StatusEnum.FINISHED,
+ popConfirm: {
+ title: '纭澶勭悊鐩樼偣宸紓锛熷皢鎸夌洏鐐圭粨鏋滅洏鐩堝叆搴�/鐩樹簭鍑哄簱璋冩暣搴撳瓨銆�',
+ confirm: handleProcessDifference.bind(null, row),
+ },
+ },
]"
/>
</template>
--
Gitblit v1.9.3