6 小时以前 4039d50f086600706462d5e2e45b3397aa870d9c
src/views/mes/pro/task/data.ts
@@ -3,6 +3,8 @@
import type { MesProTaskApi } from '#/api/mes/pro/task';
import type { MesProWorkOrderApi } from '#/api/mes/pro/workorder';
import type { Ref } from 'vue';
import { markRaw } from 'vue';
import { DICT_TYPE } from '@vben/constants';
@@ -166,7 +168,7 @@
    },
    {
      title: '操作',
      width: 100,
      width: 160,
      fixed: 'right',
      slots: { default: 'actions' },
    },
@@ -376,7 +378,7 @@
}
/** 生产任务新增/修改的表单 */
export function useTaskFormSchema(formApi?: VbenFormApi): VbenFormSchema[] {
export function useTaskFormSchema(formApi?: VbenFormApi, workOrderQuantity?: Ref<number | undefined>): VbenFormSchema[] {
  return [
    {
      fieldName: 'workstationId',
@@ -391,6 +393,7 @@
      fieldName: 'quantity',
      label: '排产数量',
      component: 'InputNumber',
      description: () => workOrderQuantity?.value != null ? `订单数量:${workOrderQuantity.value}` : '',
      componentProps: {
        class: '!w-full',
        min: 0.01,