From 1deae1d89a7039ef0b943be291f6c1b9aaa5ad2c Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期一, 17 八月 2026 10:30:33 +0800
Subject: [PATCH] feat(mes): 生产报工新增「可报工数量」展示 - `src/api/mes/pro/task/index.ts`: `MesProTaskApi.Task` 接口新增 `reportableQuantity` (可报工数量) 字段定义 - `src/views/mes/pro/feedback/data.ts`:   - 生产报工弹框表单中新增「可报工数量」字段展示,设置为不可编辑,且仅在新建/编辑模式下显示   - 在生产任务选择弹框 (`ProTaskSelect`) 的 `onChange` 事件中,自动从选中的任务对象中提取并带入 `reportableQuantity`   - 完善了表单联动的重置逻辑,确保更换工单等操作时正确清空此字段

---
 src/views/im/manager/sensitiveword/data.ts |  120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 120 insertions(+), 0 deletions(-)

diff --git a/src/views/im/manager/sensitiveword/data.ts b/src/views/im/manager/sensitiveword/data.ts
new file mode 100644
index 0000000..2fefb72
--- /dev/null
+++ b/src/views/im/manager/sensitiveword/data.ts
@@ -0,0 +1,120 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+
+import { CommonStatusEnum, DICT_TYPE } from '#/packages/constants/src';
+import { getDictOptions } from '#/packages/effects/hooks/src';
+
+import { z } from '#/adapter/form';
+import { getRangePickerDefaultProps } from '#/utils';
+
+/** 鏂板/淇敼鐨勮〃鍗� */
+export function useFormSchema(): VbenFormSchema[] {
+  return [
+    {
+      fieldName: 'id',
+      component: 'Input',
+      dependencies: {
+        triggerFields: [''],
+        show: () => false,
+      },
+    },
+    {
+      fieldName: 'word',
+      label: '鏁忔劅璇�',
+      component: 'Input',
+      componentProps: {
+        maxlength: 64,
+        placeholder: '璇疯緭鍏ユ晱鎰熻瘝',
+      },
+      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),
+    },
+  ];
+}
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+  return [
+    {
+      fieldName: 'word',
+      label: '鏁忔劅璇�',
+      component: 'Input',
+      componentProps: {
+        allowClear: true,
+        placeholder: '璇疯緭鍏ユ晱鎰熻瘝',
+      },
+    },
+    {
+      fieldName: 'status',
+      label: '鐘舵��',
+      component: 'Select',
+      componentProps: {
+        allowClear: true,
+        options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
+        placeholder: '璇烽�夋嫨鐘舵��',
+      },
+    },
+    {
+      fieldName: 'createTime',
+      label: '鍒涘缓鏃堕棿',
+      component: 'RangePicker',
+      componentProps: {
+        ...getRangePickerDefaultProps(),
+        allowClear: true,
+      },
+    },
+  ];
+}
+
+/** 鍒楄〃鐨勫瓧娈� */
+export function useGridColumns(): VxeTableGridOptions['columns'] {
+  return [
+    { type: 'checkbox', width: 40 },
+    {
+      field: 'id',
+      title: '缂栧彿',
+      width: 100,
+    },
+    {
+      field: 'word',
+      title: '鏁忔劅璇�',
+      minWidth: 180,
+    },
+    {
+      field: 'status',
+      title: '鐘舵��',
+      width: 100,
+      cellRender: {
+        name: 'CellDict',
+        props: { type: DICT_TYPE.COMMON_STATUS },
+      },
+    },
+    {
+      field: 'creatorName',
+      title: '鍒涘缓浜�',
+      minWidth: 120,
+    },
+    {
+      field: 'createTime',
+      title: '鍒涘缓鏃堕棿',
+      minWidth: 180,
+      formatter: 'formatDateTime',
+    },
+    {
+      title: '鎿嶄綔',
+      width: 160,
+      fixed: 'right',
+      slots: { default: 'actions' },
+    },
+  ];
+}

--
Gitblit v1.9.3