| | |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { MesQcRqcApi } from '#/api/mes/qc/rqc'; |
| | | |
| | | import { ref } from 'vue'; |
| | | |
| | | 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 { deleteRqc, exportRqc, getRqcPage } from '#/api/mes/qc/rqc'; |
| | | 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'; |
| | |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const printRef = ref<InstanceType<typeof QcReportPrint> | null>(null); |
| | | |
| | | /** 刷新表格 */ |
| | | function handleRefresh() { |
| | | gridApi.query(); |
| | | } |
| | | |
| | | /** 打印检验报告 */ |
| | | async function handlePrint(row: MesQcRqcApi.Rqc) { |
| | | await printRef.value?.print(row.id!, MesQcTypeEnum.RQC); |
| | | } |
| | | |
| | | /** 创建退货检验单 */ |
| | |
| | | <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-rqc:query'], |
| | | onClick: handlePrint.bind(null, row), |
| | | }, |
| | | { |
| | | label: $t('common.detail'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.VIEW, |