Commit bc63fe15 by 张恒

feat(scgl): 更新生产计划下发功能

- 添加了下发前的确认对话框
- 集成了产品输出相关API接口
- 重构了下发逻辑以支持异步操作
- 改进了用户交互体验和错误提示机制
parent dfc0ee13
...@@ -119,6 +119,7 @@ ...@@ -119,6 +119,7 @@
import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock'; import { useConcurrentLock } from '/@/hooks/web/useConcurrentLock';
import {rksqMesProductOutput} from "/@/api/scgl/ccmx";
const pageParamsInfo = ref<any>({}); const pageParamsInfo = ref<any>({});
const { const {
...@@ -395,29 +396,40 @@ ...@@ -395,29 +396,40 @@
} }
function handleXiafa(record: Recordable) { function handleXiafa(record: Recordable) {
if (selectedKeys.value.length === 0) { Modal.confirm({
Modal.warning({ title: t('提示信息'),
title: '提示', icon: createVNode(ExclamationCircleOutlined),
content: '请选择计划', content: t('是否下发?'),
}); okText: t('确认'),
return; cancelText: t('取消'),
} async onOk() {
if (selectedKeys.value.length === 0) {
Modal.warning({
title: '提示',
content: '请选择计划',
});
return;
}
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿');
if (hasNonDraft) {
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
});
const hasNonDraft = selectedRowsData.value.some((item) => item.zt !== '草稿'); },
if (hasNonDraft) { onCancel() {},
Modal.warning({
title: '提示',
content: '非草稿计划无法下发任务任务',
});
return;
}
const ids = selectedRowsData.value.map((x) => x.id);
issueMesProductionPlan(ids).then((_) => {
handleSuccess();
notification.success({
message: 'Tip',
description: '下发成功!',
});
}); });
} }
......
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