From 06f3df285a24234e60883cd5ae73c6153abf4155 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 26 八月 2026 15:46:38 +0800
Subject: [PATCH] feat(mes): 添加生产任务进度显示和工艺参数模板功能
---
src/views/mes/pro/task/modules/task-list.vue | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/src/views/mes/pro/task/modules/task-list.vue b/src/views/mes/pro/task/modules/task-list.vue
index f7c53a0..da4a1f6 100644
--- a/src/views/mes/pro/task/modules/task-list.vue
+++ b/src/views/mes/pro/task/modules/task-list.vue
@@ -4,7 +4,7 @@
import { computed, watch } from 'vue';
-import { useVbenModal } from '..\..\..\..\..\packages\effects\common-ui\src';
+import { useVbenModal } from '@vben/common-ui';
import { message } from 'ant-design-vue';
@@ -14,6 +14,7 @@
import { useTaskGridColumns } from '../data';
import TaskForm from './task-form.vue';
+import QuickFeedbackForm from '../../workorder-center/modules/quick-feedback.vue';
const props = defineProps<{
colorCode?: string;
@@ -22,12 +23,18 @@
processId: number;
routeId: number;
workOrderId: number;
+ workOrderQuantity?: number;
}>();
const editable = computed(() => !props.disabled); // 鏄惁鍙淮鎶や换鍔�
const [TaskFormModal, taskFormModalApi] = useVbenModal({
connectedComponent: TaskForm,
+ destroyOnClose: true,
+});
+
+const [QuickFeedbackModal, quickFeedbackModalApi] = useVbenModal({
+ connectedComponent: QuickFeedbackForm,
destroyOnClose: true,
});
@@ -43,6 +50,7 @@
colorCode: props.colorCode,
itemId: props.itemId,
processId: props.processId,
+ quantity: props.workOrderQuantity,
routeId: props.routeId,
workOrderId: props.workOrderId,
})
@@ -52,6 +60,18 @@
/** 缂栬緫浠诲姟 */
function handleEdit(row: MesProTaskApi.Task) {
taskFormModalApi.setData({ id: row.id }).open();
+}
+
+/** 蹇�熸姤宸� */
+function handleQuickFeedback(row: MesProTaskApi.Task) {
+ quickFeedbackModalApi
+ .setData({
+ taskId: row.id,
+ taskCode: row.code,
+ taskQuantity: row.quantity,
+ taskProducedQuantity: row.producedQuantity,
+ })
+ .open();
}
/** 鍒犻櫎浠诲姟 */
@@ -105,14 +125,17 @@
// 宸ュ簭姝ラ鍒囨崲鏃堕噸鏂板姞杞藉綋鍓嶅伐搴忕殑浠诲姟
watch(
- () => props.processId,
+ () => [props.workOrderId, props.routeId, props.processId],
() => handleRefresh(),
);
+
+
</script>
<template>
<div>
<TaskFormModal @success="handleRefresh" />
+ <QuickFeedbackModal @success="handleRefresh" />
<Grid table-title="鐢熶骇浠诲姟">
<template v-if="editable" #toolbar-tools>
<TableAction
@@ -137,6 +160,13 @@
<TableAction
:actions="[
{
+ label: '鎶ュ伐',
+ type: 'link',
+ auth: ['mes:pro-feedback:create'],
+ ifShow: (row.quantity ?? 0) > (row.producedQuantity ?? 0),
+ onClick: handleQuickFeedback.bind(null, row),
+ },
+ {
label: $t('common.edit'),
type: 'link',
icon: ACTION_ICON.EDIT,
--
Gitblit v1.9.3