gaoluyang
2026-08-04 29ef7c017c0dbbae7c62933d0fa3220f04cd8f56
src/views/mes/pro/task/index.vue
@@ -25,7 +25,8 @@
const router = useRouter();
const ganttTasks = ref<any[]>([]); // 甘特图预览数据
const archiveDetailRef = ref<InstanceType<typeof ArchiveDetail>>();
const archiveVisible = ref(false);
const archiveProductCode = ref('');
const [ScheduleModal, scheduleModalApi] = useVbenModal({
  connectedComponent: ScheduleForm,
@@ -82,6 +83,12 @@
  } catch {
    message.error('排产失败');
  }
}
/** 打开归档详情 */
function handleArchive(row: MesProWorkOrderApi.WorkOrder) {
  archiveProductCode.value = row.productCode || '';
  archiveVisible.value = true;
}
/** 打开甘特图编辑页面 */
@@ -169,14 +176,14 @@
              onClick: handleSchedule.bind(null, row),
            },
            {
              label: '归档',
              label: '归档详情',
              type: 'link',
              onClick: () => archiveDetailRef.value?.open(row.productCode),
              onClick: handleArchive.bind(null, row),
            },
          ]"
        />
      </template>
    </Grid>
    <ArchiveDetail ref="archiveDetailRef" />
    <ArchiveDetail :visible="archiveVisible" :product-code="archiveProductCode" @update:visible="archiveVisible = $event" />
  </Page>
</template>