Commit ed5ebaf8 by 张恒

feat(scgl): 为入库申请和质检申请功能添加确认弹窗

- 引入 Modal、ExclamationCircleOutlined 和 deleteSale 相关依赖
- 在 handleRksq 方法中添加确认弹窗逻辑,确保用户确认后执行入库申请
- 在 handleZjsq 方法中添加确认弹窗逻辑,确保用户确认后执行质检申请
- 重构导入语句以支持新增的 createVNode 函数
- 添加 reload 操作以在操作完成后刷新表格数据
parent 81eb2131
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed,provide,Ref, import {
ref, computed, provide, Ref, createVNode,
} from 'vue'; } from 'vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
...@@ -110,6 +111,9 @@ ...@@ -110,6 +111,9 @@
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import {Modal} from "ant-design-vue";
import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
import {deleteSale} from "/@/api/erp/sale/order";
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } = const { enableLockeData,handleOpenFormEnableLockeData, handleCloseFormEnableLocke, handleHasEnableLocke } =
...@@ -285,12 +289,23 @@ ...@@ -285,12 +289,23 @@
*/ */
async function handleRksq(record: Recordable) { async function handleRksq(record: Recordable) {
try { try {
Modal.confirm({
title: t('提示信息'),
icon: createVNode(ExclamationCircleOutlined),
content: t('是否提交入库申请?'),
okText: t('确认'),
cancelText: t('取消'),
async onOk() {
await rksqMesProductOutput({ id: record.id }); await rksqMesProductOutput({ id: record.id });
notification.success({ notification.success({
message: t('成功'), message: t('成功'),
description: '入库申请成功', description: '入库申请成功',
}); });
handleSuccess(); handleSuccess();
reload();
},
onCancel() {},
});
} catch (error) { } catch (error) {
console.error('入库申请失败:', error); console.error('入库申请失败:', error);
} }
...@@ -301,12 +316,23 @@ ...@@ -301,12 +316,23 @@
*/ */
async function handleZjsq(record: Recordable) { async function handleZjsq(record: Recordable) {
try { try {
Modal.confirm({
title: t('提示信息'),
icon: createVNode(ExclamationCircleOutlined),
content: t('是否提交质检申请?'),
okText: t('确认'),
cancelText: t('取消'),
async onOk() {
await zjsqMesProductOutput({ id: record.id }); await zjsqMesProductOutput({ id: record.id });
notification.success({ notification.success({
message: t('成功'), message: t('成功'),
description: '质检申请成功', description: '质检申请成功',
}); });
handleSuccess(); handleSuccess();
reload();
},
onCancel() {},
});
} catch (error) { } catch (error) {
console.error('质检申请失败:', error); console.error('质检申请失败:', error);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment