- 更新MES和WMS服务端口配置说明 - 详细说明产线工位设备配置(扫码枪+拧紧枪) - 明确AGV配送和接驳台的模拟模式与真实对接方案 - 更新WMS中AGV配送默认模拟模式说明 - 完善厂内物流(AGV/接驳台)的业务架构约束 - 修订临时文档为详细的项目问题和解决方案规划
26 lines
953 B
JavaScript
26 lines
953 B
JavaScript
import { ElMessageBox } from 'element-plus'
|
|
|
|
// 统一二次确认工具(需求6):
|
|
// 所有「单次、不可逆、影响面大」的操作——新建 / 编辑 / 保存 / 删除 / 停用启用 / 差异写回 / 批量导入——
|
|
// 都必须先弹此确认框,且 message 需回显影响范围(对象、数量、区域等摘要)。
|
|
// 高频连续操作(连续扫码入库、工位报工、叫料)不使用本工具,避免打断作业。
|
|
//
|
|
// 用法:
|
|
// if (!(await confirmAction('确认删除物料「X」?将影响 N 条库存记录。', '删除确认'))) return
|
|
// await doDelete()
|
|
export async function confirmAction(message, title = '操作确认', options = {}) {
|
|
try {
|
|
await ElMessageBox.confirm(message, title, {
|
|
type: 'warning',
|
|
confirmButtonText: '确认',
|
|
cancelButtonText: '取消',
|
|
...options
|
|
})
|
|
return true
|
|
} catch {
|
|
return false
|
|
}
|
|
}
|
|
|
|
export default confirmAction
|