feat(mes): 生产报工新增「可报工数量」展示
- `src/api/mes/pro/task/index.ts`: `MesProTaskApi.Task` 接口新增 `reportableQuantity` (可报工数量) 字段定义
- `src/views/mes/pro/feedback/data.ts`:
- 生产报工弹框表单中新增「可报工数量」字段展示,设置为不可编辑,且仅在新建/编辑模式下显示
- 在生产任务选择弹框 (`ProTaskSelect`) 的 `onChange` 事件中,自动从选中的任务对象中提取并带入 `reportableQuantity`
- 完善了表单联动的重置逻辑,确保更换工单等操作时正确清空此字段
已修改2个文件
19 ■■■■■ 文件已修改
src/api/mes/pro/task/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mes/pro/feedback/data.ts 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mes/pro/task/index.ts
@@ -55,6 +55,7 @@
    backflushFlag?: boolean; // 是否倒冲(派生自工艺路线工序)
    remark?: string; // 备注
    pauseRecords?: PauseRecord[]; // 停工记录
    reportableQuantity?: number; // 可报工数量
  }
  /** MES 生产任务分页查询参数 */
src/views/mes/pro/feedback/data.ts
@@ -1,4 +1,4 @@
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { MesProFeedbackApi } from '#/api/mes/pro/feedback';
import type { MesProTaskApi } from '#/api/mes/pro/task';
@@ -264,6 +264,7 @@
            taskId: undefined,
            unitMeasureName: undefined,
            workstationId: undefined,
            reportableQuantity: undefined,
          });
        },
      },
@@ -298,6 +299,7 @@
            routeId: task.routeId,
            unitMeasureName: task.unitMeasureName,
            workstationId: task.workstationId,
            reportableQuantity: task.reportableQuantity,
          });
          // 工艺路线工序的 checkFlag 决定数量区域展示
          if (task.routeId && task.processId) {
@@ -377,6 +379,20 @@
      },
    },
    {
      fieldName: 'reportableQuantity',
      label: '可报工数量',
      component: 'InputNumber',
      componentProps: {
        class: 'w-full',
        disabled: true,
        precision: 2,
      },
      dependencies: {
        triggerFields: ['taskId'],
        show: (values) => !!values.taskId && ['create', 'update'].includes(formType),
      },
    },
    {
      fieldName: 'feedbackQuantity',
      label: '报工数量',
      component: 'InputNumber',