From 5c243d9d05da668a32b1bc9a4f543ea081488d11 Mon Sep 17 00:00:00 2001
From: xiaoyi <908147524@qq.com>
Date: 星期四, 20 八月 2026 14:08:03 +0800
Subject: [PATCH] feat 功能变更
---
src/views/mes/pro/feedback/index.vue | 54 ++++++++++++++++++++----------------------------------
1 files changed, 20 insertions(+), 34 deletions(-)
diff --git a/src/views/mes/pro/feedback/index.vue b/src/views/mes/pro/feedback/index.vue
index 239da4a..adb6ae1 100644
--- a/src/views/mes/pro/feedback/index.vue
+++ b/src/views/mes/pro/feedback/index.vue
@@ -15,12 +15,14 @@
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();
const currentUserId = userStore.userInfo?.id; // 褰撳墠鐧诲綍鐢ㄦ埛 ID锛岀敤浜庡鎵逛汉鏉冮檺鍒ゆ柇
@@ -30,15 +32,7 @@
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() {
@@ -91,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({
@@ -127,8 +122,6 @@
<template>
<Page auto-content-height>
<FormModal @success="handleRefresh" />
- <QuickFeedbackModal @success="handleRefresh" />
- <BatchFeedbackModal @success="handleRefresh" />
<Grid table-title="鐢熶骇鎶ュ伐鍒楄〃">
<template #toolbar-tools>
<TableAction
@@ -139,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'),
@@ -205,9 +185,15 @@
confirm: handleDelete.bind(null, row),
},
},
+ {
+ label: '褰掓。',
+ type: 'link',
+ onClick: handleArchive.bind(null, row),
+ },
]"
/>
</template>
</Grid>
+ <ArchiveDetail ref="archiveDetailRef" />
</Page>
</template>
--
Gitblit v1.9.3