xiaoyi
5 天以前 27c8277d717b34b55f3ea967027b53b067f77df3
src/views/mes/pro/task/data.ts
@@ -1,5 +1,7 @@
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VbenFormApi, VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { z } from '#/adapter/form';
import { getSimpleUserListByRoleCode } from '#/api/system/user';
import type { MesProTaskApi } from '#/api/mes/pro/task';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
@@ -17,6 +19,7 @@
import { getRangePickerDefaultProps } from '#/utils';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdWorkstationSelect } from '#/views/mes/md/workstation/components';
import { CalTeamSelect } from '#/views/mes/cal/team/components';
import { ProProcessSelect } from '#/views/mes/process-design/process/components';
import { RouteColorPicker } from '#/views/mes/process-design/route/components';
import { ProWorkOrderSelect } from '#/views/mes/pro/workorder/components';
@@ -345,6 +348,11 @@
      width: 120,
    },
    {
      field: 'teamName',
      title: '班组',
      width: 120,
    },
    {
      field: 'quantity',
      title: '排产数量',
      width: 100,
@@ -402,6 +410,14 @@
        onChange: () => recalcDuration(formApi),
      },
      rules: 'selectRequired',
    },
    {
      fieldName: 'teamId',
      label: '班组',
      component: markRaw(CalTeamSelect),
      componentProps: {
        placeholder: '请选择班组',
      },
    },
    {
      fieldName: 'quantity',
@@ -468,6 +484,20 @@
      },
    },
    {
      fieldName: 'assigneeUserIds',
      label: '报工人',
      component: 'ApiSelect',
      componentProps: {
        placeholder: '请选择报工人',
        api: getSimpleUserListByRoleCode,
        params: { code: 'production_submit_work' },
        labelField: 'nickname',
        valueField: 'id',
        mode: 'multiple',
      },
      rules: z.array(z.number()).min(1, '请选择报工人').default([]),
    },
    {
      fieldName: 'remark',
      label: '备注',
      component: 'Textarea',