| | |
| | | import { ElMessageBox } from 'element-plus' |
| | | import { $t } from '@/locales' |
| | | |
| | | function normalizeText(value) { |
| | | return String(value ?? '').trim() |
| | |
| | | return [ |
| | | { |
| | | key: 'view', |
| | | label: '查看详情', |
| | | label: $t('pages.task.actions.view'), |
| | | icon: 'ri:eye-line' |
| | | }, |
| | | { |
| | | key: 'flowStep', |
| | | label: '流程步骤', |
| | | label: $t('pages.task.actions.flowStep'), |
| | | icon: 'ri:node-tree' |
| | | }, |
| | | ...(row.canComplete |
| | | ? [ |
| | | { |
| | | key: 'complete', |
| | | label: '完成任务', |
| | | label: $t('pages.task.actions.complete'), |
| | | icon: 'ri:checkbox-circle-line', |
| | | auth: 'update' |
| | | } |
| | |
| | | ? [ |
| | | { |
| | | key: 'check', |
| | | label: '盘点出库', |
| | | label: $t('pages.task.actions.check'), |
| | | icon: 'ri:file-check-line', |
| | | auth: 'update' |
| | | } |
| | |
| | | ? [ |
| | | { |
| | | key: 'pick', |
| | | label: '拣料出库', |
| | | label: $t('pages.task.actions.pick'), |
| | | icon: 'ri:paint-line', |
| | | auth: 'update' |
| | | } |
| | |
| | | ? [ |
| | | { |
| | | key: 'top', |
| | | label: '任务置顶', |
| | | label: $t('pages.task.actions.top'), |
| | | icon: 'ri:pushpin-line', |
| | | auth: 'update' |
| | | } |
| | |
| | | ? [ |
| | | { |
| | | key: 'remove', |
| | | label: '取消任务', |
| | | label: $t('pages.task.actions.remove'), |
| | | icon: 'ri:close-circle-line', |
| | | color: '#f56c6c', |
| | | auth: 'delete' |
| | |
| | | } |
| | | |
| | | export async function confirmTaskAction(message) { |
| | | await ElMessageBox.confirm(message, '提示', { |
| | | await ElMessageBox.confirm(message, $t('crud.confirm.deleteTitle'), { |
| | | type: 'warning', |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消' |
| | | confirmButtonText: $t('common.confirm'), |
| | | cancelButtonText: $t('common.cancel') |
| | | }) |
| | | } |