云
19 小时以前 c2e8526f8f857be5e3a8c6f2b39c5efd424de33e
src/views/mes/qc/indicatorresult/components/data.ts
@@ -11,11 +11,12 @@
import { generateAutoCode } from '#/api/mes/md/autocode/record';
/** 表单类型 */
export type FormType = 'create' | 'update';
export type FormType = 'create' | 'update' | 'detail';
/** 新增/修改检测结果的表单 */
export function useQcIndicatorResultFormSchema(
  formApi?: VbenFormApi,
  readonly = false,
): VbenFormSchema[] {
  return [
    {
@@ -34,7 +35,7 @@
        placeholder: '请输入样品编号',
      },
      rules: 'required',
      suffix: () =>
      suffix: readonly ? undefined : () =>
        h(
          Button,
          {
@@ -48,14 +49,6 @@
          },
          { default: () => '生成' },
        ),
    },
    {
      fieldName: 'sn',
      label: '物资 SN',
      component: 'Input',
      componentProps: {
        placeholder: '请输入物资 SN',
      },
    },
    {
      fieldName: 'remark',
@@ -79,18 +72,13 @@
      width: 200,
    },
    {
      field: 'sn',
      title: '物资SN',
      minWidth: 200,
    },
    {
      field: 'remark',
      title: '备注',
      minWidth: 200,
    },
    {
      title: '操作',
      width: 150,
      width: 240,
      fixed: 'right',
      slots: { default: 'actions' },
    },