8 小时以前 08bb5d242135e2c1f0fc17d2b5f7ae548275a3a2
src/views/mes/pro/batch/data.ts
@@ -7,13 +7,13 @@
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdmItemSelect } from '#/views/basicData/mdm/components';
import { ProLineSelect } from '#/views/mes/pro/line/components';
import { UserSelect } from '#/views/system/user/components';
import { getRangePickerDefaultProps } from '#/utils';
/** 表单类型 */
export type FormType = 'create' | 'detail' | 'update';
/** 表单类型(fill:临时批次码补录正式信息) */
export type FormType = 'create' | 'detail' | 'update' | 'fill';
/** 新增/修改的表单 */
export function useFormSchema(formType: FormType): VbenFormSchema[] {
@@ -33,11 +33,24 @@
      component: 'Input',
      componentProps: {
        disabled: true,
        placeholder: '保存后自动生成',
        placeholder: '补录后自动生成',
      },
      dependencies: {
        triggerFields: [''],
        show: () => formType !== 'create',
      },
    },
    {
      fieldName: 'tempCode',
      label: '临时批次码',
      component: 'Input',
      componentProps: {
        disabled: true,
        placeholder: '预生成二维码阶段使用的临时码',
      },
      dependencies: {
        triggerFields: [''],
        show: () => formType === 'fill',
      },
    },
    {
@@ -56,7 +69,7 @@
    {
      fieldName: 'itemId',
      label: '品种',
      component: markRaw(MdItemSelect),
      component: markRaw(MdmItemSelect),
      componentProps: {
        disabled,
        placeholder: '请选择品种(产品品种)',
@@ -138,7 +151,7 @@
    {
      fieldName: 'itemId',
      label: '品种',
      component: markRaw(MdItemSelect),
      component: markRaw(MdmItemSelect),
      componentProps: {
        placeholder: '请选择品种',
      },
@@ -273,7 +286,7 @@
    },
    {
      title: '操作',
      width: 200,
      width: 350,
      fixed: 'right',
      slots: { default: 'actions' },
    },