gaoluyang
2026-07-31 bff63ed3dd1a585f84b8c41f9396fa6f7a4ff4c7
src/views/mes/pro/feedback/index.vue
@@ -17,8 +17,13 @@
} from '#/api/mes/pro/feedback';
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();
const currentUserId = userStore.userInfo?.id; // 当前登录用户 ID,用于审批人权限判断
@@ -27,6 +32,18 @@
  connectedComponent: Form,
  destroyOnClose: true,
});
const [QuickFeedbackModal, quickFeedbackModalApi] = useVbenModal({
  connectedComponent: QuickFeedbackForm,
  destroyOnClose: true,
});
const [BatchFeedbackModal, batchFeedbackModalApi] = useVbenModal({
  connectedComponent: BatchFeedbackForm,
  destroyOnClose: true,
});
const archiveDetailRef = ref<InstanceType<typeof ArchiveDetail>>();
/** 刷新表格 */
function handleRefresh() {
@@ -79,6 +96,16 @@
  downloadFileFromBlobPart({ fileName: '生产报工.xls', source: data });
}
/** 快速报工 */
function handleQuickCreate() {
  quickFeedbackModalApi.setData({}).open();
}
/** 批量报工 */
function handleBatchCreate() {
  batchFeedbackModalApi.setData({}).open();
}
const [Grid, gridApi] = useVbenVxeGrid({
  formOptions: { schema: useGridFormSchema() },
  gridOptions: {
@@ -103,7 +130,10 @@
</script>
<template>
  <Page auto-content-height><FormModal @success="handleRefresh" />
  <Page auto-content-height>
    <FormModal @success="handleRefresh" />
    <QuickFeedbackModal @success="handleRefresh" />
    <BatchFeedbackModal @success="handleRefresh" />
    <Grid table-title="生产报工列表">
      <template #toolbar-tools>
        <TableAction
@@ -114,6 +144,19 @@
              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'),
@@ -167,9 +210,15 @@
                confirm: handleDelete.bind(null, row),
              },
            },
            {
              label: '归档',
              type: 'link',
              onClick: () => archiveDetailRef.value?.open(row.itemCode),
            },
          ]"
        />
      </template>
    </Grid>
    <ArchiveDetail ref="archiveDetailRef" />
  </Page>
</template>