src/views/mes/pro/feedback/index.vue
@@ -15,14 +15,13 @@
  exportFeedback,
  getFeedbackPage,
} from '#/api/mes/pro/feedback';
import { getWorkOrder } from '#/api/mes/pro/workorder';
import { $t } from '#/locales';
import { ref } from 'vue';
import { useGridColumns, useGridFormSchema } from './data';
import Form from './modules/form.vue';
import QuickFeedbackForm from '../workorder-center/modules/quick-feedback.vue';
import BatchFeedbackForm from './modules/batch-feedback.vue';
import ArchiveDetail from '#/views/mes/pd/archive/modules/detail.vue';
const userStore = useUserStore();
@@ -30,16 +29,6 @@
const [FormModal, formModalApi] = useVbenModal({
  connectedComponent: Form,
  destroyOnClose: true,
});
const [QuickFeedbackModal, quickFeedbackModalApi] = useVbenModal({
  connectedComponent: QuickFeedbackForm,
  destroyOnClose: true,
});
const [BatchFeedbackModal, batchFeedbackModalApi] = useVbenModal({
  connectedComponent: BatchFeedbackForm,
  destroyOnClose: true,
});
@@ -96,14 +85,15 @@
  downloadFileFromBlobPart({ fileName: '生产报工.xls', source: data });
}
/** 快速报工 */
function handleQuickCreate() {
  quickFeedbackModalApi.setData({}).open();
}
/** 批量报工 */
function handleBatchCreate() {
  batchFeedbackModalApi.setData({}).open();
/** 查看归档 */
async function handleArchive(row: MesProFeedbackApi.Feedback) {
  if (!row.workOrderId) return;
  try {
    const workOrder = await getWorkOrder(row.workOrderId);
    archiveDetailRef.value?.open(workOrder.productCode);
  } catch {
    message.error('获取工单信息失败');
  }
}
const [Grid, gridApi] = useVbenVxeGrid({
@@ -132,8 +122,6 @@
<template>
  <Page auto-content-height>
    <FormModal @success="handleRefresh" />
    <QuickFeedbackModal @success="handleRefresh" />
    <BatchFeedbackModal @success="handleRefresh" />
    <Grid table-title="生产报工列表">
      <template #toolbar-tools>
        <TableAction
@@ -144,19 +132,6 @@
              icon: ACTION_ICON.ADD,
              auth: ['mes:pro-feedback:create'],
              onClick: handleCreate,
            },
            {
              label: '快速报工',
              type: 'primary',
              icon: ACTION_ICON.ADD,
              auth: ['mes:pro-feedback:create'],
              onClick: handleQuickCreate,
            },
            {
              label: '批量报工',
              type: 'primary',
              auth: ['mes:pro-feedback:create'],
              onClick: handleBatchCreate,
            },
            {
              label: $t('ui.actionTitle.export'),
@@ -213,7 +188,7 @@
            {
              label: '归档',
              type: 'link',
              onClick: () => archiveDetailRef.value?.open(row.itemCode),
              onClick: handleArchive.bind(null, row),
            },
          ]"
        />