2 天以前 46624ce480a3c14da21f39cc4ad5f7eecea2bb1e
src/views/basicData/mdm/unit/data.ts
@@ -6,6 +6,13 @@
import { z } from '#/adapter/form';
/** 计量单位类型选项 */
export const UNIT_TYPE_OPTIONS = [
  { label: '48千克', value: '48千克' },
  { label: '100千克', value: '100千克' },
  { label: '吨', value: '吨' },
];
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
  return [
@@ -33,6 +40,17 @@
      rules: 'required',
      componentProps: {
        placeholder: '请输入单位名称',
      },
    },
    {
      fieldName: 'type',
      label: '类型',
      component: 'Select',
      rules: 'required',
      componentProps: {
        placeholder: '请选择类型',
        allowClear: true,
        options: UNIT_TYPE_OPTIONS,
      },
    },
    {
@@ -107,6 +125,12 @@
      minWidth: 150,
    },
    {
      field: 'type',
      title: '类型',
      minWidth: 100,
      formatter: ({ cellValue }) => cellValue || '-',
    },
    {
      field: 'status',
      title: '状态',
      minWidth: 80,