import { BasicColumn, FormSchema } from '/@/components/Table';
import { listDictModel } from '/@/api/common';

export const columns: BasicColumn[] = [
  {
    title: '药品类型',
    dataIndex: 'supplierCategory',
  },
  {
    title: '药品名称',
    dataIndex: 'name',
  },
  {
    title: '助记码',
    dataIndex: 'helpCode',
  },
  {
    title: '规格',
    dataIndex: 'supplierModel',
  },
  {
    title: '单位',
    dataIndex: 'unit',
  },
  {
    title: '生产厂商',
    dataIndex: 'makers',
  },
  {
    title: '药品状态',
    dataIndex: 'disable',
  },
  {
    title: '使用量',
    dataIndex: 'usageAmount',
  },
];
// 表单新增编辑
export const dataFormSchema: FormSchema[] = [
  {
    label: '药品类型',
    field: 'supplierCategory',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api: listDictModel,
      params: {
        dictCode: 'pht',
      },
      placeholder: '请选择药品类型',
    },
  },
  {
    label: '药品名称',
    field: 'name',
    component: 'Input',
    componentProps: {},
  },
  {
    label: '助记码',
    field: 'helpCode',
    component: 'Input',
  },
  {
    label: '规格',
    field: 'supplierModel',
    component: 'Input',
  },
  {
    label: '生产商',
    field: 'makers',
    component: 'Input',
    componentProps: {
      placeholder: '请输入生产商',
    },
  },
  {
    label: '单位',
    field: 'unit',
    component: 'Input',
    componentProps: {
      placeholder: '请输入单位',
    },
  },
];
