| | |
| | | } |
| | | |
| | | /** 删除 MPS */ |
| | | export function deleteMps(ids: number[]) { |
| | | export function deleteMps(id: number) { |
| | | return requestClient.delete('/mes/pro-mps/delete', { |
| | | params: { ids: ids.join(',') }, |
| | | params: { id }, |
| | | }); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** 删除 */ |
| | | async function handleDelete(ids: number[]) { |
| | | async function handleDelete(row: MesProMpsApi.Mps) { |
| | | const hideLoading = message.loading({ |
| | | content: $t('ui.actionMessage.deleting'), |
| | | duration: 0, |
| | | }); |
| | | try { |
| | | await deleteMps(ids); |
| | | await deleteMps(row.id!); |
| | | message.success($t('ui.actionMessage.deleteSuccess')); |
| | | handleRefresh(); |
| | | } finally { |
| | |
| | | ifShow: () => row.status === MpsStatusEnum.DRAFT, |
| | | popConfirm: { |
| | | title: $t('ui.actionMessage.deleteConfirm', [row.code]), |
| | | confirm: handleDelete.bind(null, [row.id!]), |
| | | confirm: handleDelete.bind(null, row), |
| | | }, |
| | | }, |
| | | ]" |