From 14817696a26eb142ccae03fa7c43050840e057f5 Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期一, 17 八月 2026 09:35:03 +0800
Subject: [PATCH] feat(mes): 优化生产订单与排产任务列表显示,新增启停工及校验逻辑 1. 生产订单列表展示优化 (WorkOrder)   - 新增「生产状态」列,全局注册 `ORDER_PRODUCTION_STATUS` 常量并绑定系统动态字典。   - 彻底重构「工序生产进度」单元格显示:弃用臃肿的 Steps 组件,改为极简横向布局(彩色状态圆点 + 进度百分比),解决表格行高被强行撑开及内容截断问题,支持横向滚动。   - 优化「完成进度」列宽及展示样式,将百分比数值外置同行显示,更加直观。 2. 排产任务列表改造 (Task)   - 顶部表头重构,由单一标题重构为「全部 / 未完成 / 已完成」的 Tabs 标签页切换结构。   - 重写数据过滤逻辑,剥离写死的 status 查询,改为使用 `scheduleStatus` 字段动态响应 Tabs 切换 (0: 未完成, 1: 已完成)。 3. 工单业务逻辑增强与状态流转   - 落实「工单查询逻辑设计方案」,优化底层的工单条件检索逻辑。   - 实现「添加工单启停功能」与「停工状态」,支持工单在执行过程中的暂停与恢复业务流转。   - 强化容错与防呆设计:操作「完成订单」时增加前置校验 `handleCheckFinish`,若生产状态为未完成,强制弹出二次确认 Modal,避免误操作。 # 相关讨论/参考方案 # - 添加工单启停功能 # - 停工状态功能设计方案 # - 工单查询逻辑设计方案 # - 工单完成进度显示优化

---
 src/views/ai/knowledge/document/data.ts |   86 +------------------------------------------
 1 files changed, 2 insertions(+), 84 deletions(-)

diff --git a/src/views/ai/knowledge/document/data.ts b/src/views/ai/knowledge/document/data.ts
index bffad93..5556582 100644
--- a/src/views/ai/knowledge/document/data.ts
+++ b/src/views/ai/knowledge/document/data.ts
@@ -2,90 +2,8 @@
 import type { VxeTableGridOptions } from '#/adapter/vxe-table';
 import type { AiKnowledgeDocumentApi } from '#/api/ai/knowledge/document';
 
-import { AiModelTypeEnum, CommonStatusEnum, DICT_TYPE } from '..\..\..\..\packages\constants\src';
-import { getDictOptions } from '..\..\..\..\packages\effects\hooks\src';
-
-import { z } from '#/adapter/form';
-import { getModelSimpleList } from '#/api/ai/model/model';
-
-/** 鏂板/淇敼鐨勮〃鍗� */
-export function useFormSchema(): VbenFormSchema[] {
-  return [
-    {
-      component: 'Input',
-      fieldName: 'id',
-      dependencies: {
-        triggerFields: [''],
-        show: () => false,
-      },
-    },
-    {
-      component: 'Input',
-      fieldName: 'name',
-      label: '鐭ヨ瘑搴撳悕绉�',
-      rules: 'required',
-    },
-    {
-      fieldName: 'description',
-      label: '鐭ヨ瘑搴撴弿杩�',
-      component: 'Textarea',
-      componentProps: {
-        rows: 3,
-        placeholder: '璇疯緭鍏ョ煡璇嗗簱鎻忚堪',
-      },
-    },
-    {
-      component: 'ApiSelect',
-      fieldName: 'embeddingModelId',
-      label: '鍚戦噺妯″瀷',
-      componentProps: {
-        api: () => getModelSimpleList(AiModelTypeEnum.EMBEDDING),
-        labelField: 'name',
-        valueField: 'id',
-        allowClear: true,
-        placeholder: '璇烽�夋嫨鍚戦噺妯″瀷',
-      },
-      rules: 'required',
-    },
-    {
-      fieldName: 'topK',
-      label: '妫�绱� topK',
-      component: 'InputNumber',
-      componentProps: {
-        class: '!w-full',
-        placeholder: '璇疯緭鍏ユ绱� topK',
-        min: 0,
-        max: 10,
-      },
-      rules: 'required',
-    },
-    {
-      fieldName: 'similarityThreshold',
-      label: '妫�绱㈢浉浼煎害闃堝��',
-      component: 'InputNumber',
-      componentProps: {
-        class: '!w-full',
-        placeholder: '璇疯緭鍏ユ绱㈢浉浼煎害闃堝��',
-        min: 0,
-        max: 1,
-        step: 0.01,
-        precision: 2,
-      },
-      rules: 'required',
-    },
-    {
-      fieldName: 'status',
-      label: '鏄惁鍚敤',
-      component: 'RadioGroup',
-      componentProps: {
-        options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
-        buttonStyle: 'solid',
-        optionType: 'button',
-      },
-      rules: z.number().default(CommonStatusEnum.ENABLE),
-    },
-  ];
-}
+import { CommonStatusEnum, DICT_TYPE } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
 
 /** 鍒楄〃鐨勬悳绱㈣〃鍗� */
 export function useGridFormSchema(): VbenFormSchema[] {

--
Gitblit v1.9.3