| | |
| | | deleteFeedback, |
| | | exportFeedback, |
| | | getFeedbackPage, |
| | | importFeedback, |
| | | importFeedbackTemplate, |
| | | } from '#/api/mes/pro/feedback'; |
| | | import { getWorkOrder } from '#/api/mes/pro/workorder'; |
| | | import { $t } from '#/locales'; |
| | | import ImportModalComponent from '#/components/import-modal'; |
| | | |
| | | import { ref } from 'vue'; |
| | | |
| | |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ImportModal, importModalApi] = useVbenModal({ |
| | | connectedComponent: ImportModalComponent, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | downloadFileFromBlobPart({ fileName: '生产报工.xls', source: data }); |
| | | } |
| | | |
| | | /** 导入生产报工 */ |
| | | function handleImport() { |
| | | importModalApi |
| | | .setData({ |
| | | title: $t('ui.actionTitle.import', ['生产报工']), |
| | | fileName: '生产报工导入模板.xls', |
| | | importFn: importFeedback, |
| | | templateFn: importFeedbackTemplate, |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | /** 查看归档 */ |
| | | async function handleArchive(row: MesProFeedbackApi.Feedback) { |
| | | if (!row.workOrderId) return; |
| | |
| | | <template> |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ImportModal @success="handleRefresh" /> |
| | | <Grid table-title="生产报工列表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | auth: ['mes:pro-feedback:export'], |
| | | onClick: handleExport, |
| | | }, |
| | | { |
| | | label: $t('ui.actionTitle.import', ['生产报工']), |
| | | type: 'primary', |
| | | icon: ACTION_ICON.UPLOAD, |
| | | auth: ['mes:pro-feedback:import'], |
| | | onClick: handleImport, |
| | | }, |
| | | ]" |
| | | /> |
| | | </template> |