| | |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { MesQcIqcApi } from '#/api/mes/qc/iqc'; |
| | | |
| | | import { onMounted } from 'vue'; |
| | | import { onMounted, ref } from 'vue'; |
| | | import { useRoute } from 'vue-router'; |
| | | |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | import { MesQcStatusEnum } from '@vben/constants'; |
| | | import { MesQcStatusEnum, MesQcTypeEnum } from '@vben/constants'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | |
| | | import { deleteIqc, exportIqc, getIqcPage } from '#/api/mes/qc/iqc'; |
| | | import { $t } from '#/locales'; |
| | | import QcExportRangeModal from '#/views/mes/qc/components/export-range-modal.vue'; |
| | | import QcReportPrint from '#/views/mes/qc/components/qc-report-print.vue'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | |
| | | defineOptions({ name: 'MesQcIqc' }); |
| | | |
| | | const route = useRoute(); |
| | | const printRef = ref<InstanceType<typeof QcReportPrint> | null>(null); |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | |
| | | } finally { |
| | | hideLoading(); |
| | | } |
| | | } |
| | | |
| | | /** 打印检验报告 */ |
| | | async function handlePrint(row: MesQcIqcApi.Iqc) { |
| | | await printRef.value?.print(row.id!, MesQcTypeEnum.IQC); |
| | | } |
| | | |
| | | /** 导出表格(弹窗选检验时间范围) */ |
| | |
| | | <Page auto-content-height> |
| | | <FormModal @success="handleRefresh" /> |
| | | <ExportRangeModal /> |
| | | <QcReportPrint ref="printRef" /> |
| | | <Grid table-title="来料检验单列表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: '打印报告', |
| | | type: 'link', |
| | | icon: 'ant-design:printer-outlined', |
| | | auth: ['mes:qc-iqc:query'], |
| | | onClick: handlePrint.bind(null, row), |
| | | }, |
| | | { |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |