import { useDictionaryStore } from "@/store";
const { dicts } = useDictionaryStore();
export const columns = [
  { label: "物料编码", prop: "materialCode", width: 130,overHidden: true,search: true ,rules: [{
      required: true,
      editDisabled:false,
      message: "请填写物料编码",
      trigger: "blur"
    }],},
  { label: "物料名称", prop: "materialName", width: 140,overHidden: true,search: true ,rules: [{
      required: true,
      message: "请填写物料名称",
      trigger: "blur"
    }],},
  {
    label: "物料属性",
    prop: "attributeDictValue",
    search: true,
    filterable: true,
    type: 'select',
    width: 100,overHidden: true,
    dicData:dicts.material_properties,
    props: { label: "dictLabel", value: "dictValue" },
    rules: [{
      required: true,
      message: "请选择物料属性",
      trigger: "blur"
    }],
  },
  { label: "物料规格", prop: "spec", width: 100,overHidden: true,rules: [{
      required: true,
      message: "请填写物料规格",
      trigger: "blur"
    }], },
  {
    label: "单位",
    prop: "unitDictValue",
    filterable: true,
    type: "select",
    dicData:dicts.danwei_type,
    props: { label: "dictLabel", value: "dictValue" },
    rules: [{
      required: true,
      message: "请选择单位",
      trigger: "blur"
    }],
  },
  {
    label: "物料级别",
    prop: "levelDictValue",
    search: true,
    filterable: true,
    type: "select",
    width: 100,overHidden: true,
    dicData:dicts.material_level,
    props: { label: "dictLabel", value: "dictValue" },
    rules: [{
      required: true,
      message: "请选择物料级别",
      trigger: "blur"
    }],
  },
  { label: "生产厂家", prop: "manufacturer",width: 100,overHidden: true ,rules: [{
      required: true,
      message: "请填写生产厂家",
      trigger: "blur"
    }],},
  {
    label: "质检方案",
    prop: "inspectDictValue",
    search: true,
    filterable: true,
    type: "select",
    width: 100,overHidden: true,
    dicData:dicts.quality_testing_plan,
    props: { label: "dictLabel", value: "dictValue" },
  },
  {
    label: "适用平台",
    prop: "applicablePlatformsDictValue",
    search: true,
    filterable: true,
    type: "select",
    width: 100,overHidden: true,
    dicData:dicts.applicable_platforms,
    props: { label: "dictLabel", value: "dictValue" },
    rules: [{
     required: true, message: "请选择适用平台",
     trigger: "blur"
    }],
  },
  {
    label: "质量等级",
    prop: "qualityLevelDictValue",
    search: true,
    width: 100,overHidden: true,
    filterable: true,
    type: "select",
    dicData:dicts.quality_grade,
    props: { label: "dictLabel", value: "dictValue" },
    rules: [{
      required: true,
      message: "请选择质量等级",
      trigger: "blur"
    }],
  },
  {
    label: "选用类型",
    prop: "selectionDictValue",
    search: true,
    filterable: true,
    width: 100,overHidden: true,
    type: "select",
    dicData:dicts.selection_type,
    props: { label: "dictLabel", value: "dictValue" },
  },
  {
    label: "产品阶段",
    prop: "stageDictValue",
    search: true,
    filterable: true,
    width: 100,overHidden: true,
    type: "select",
    dicData:dicts.stage,
    props: { label: "dictLabel", value: "dictValue" },
  },
  { label: "客户型号", prop: "customerModel",width: 100,overHidden: true,  },
  { label: "保质期(天)", prop: "qualityGuaranteePeriod",width: 100,overHidden: true,type:"number" ,min:0 },
  {
    label: "封装方法",
    prop: "packageDictValue",
    search: true,
    width: 100,overHidden: true,
    filterable: true,
    type: "select",
    dicData:dicts.packaging_method,
    props: { label: "dictLabel", value: "dictValue" },
  },

  {
    label: "是否工装",
    prop: "frock",
    search: true,
    width: 90,overHidden: true,
    filterable: true,
    type: "radio", //类型为单选框
    dicData: [
      {
        label: "是",
        value: "1",
      },
      {
        label: "否",
        value: "0",
      },

    ],
    value: "1",
    rules: [{
      required: true,
      message: "是否工装",
      trigger: "blur"
    }],
  },
  { label: "筛选规范", prop: "selectionSpec",width: 150,overHidden: true,  type: "textarea",span:18},

  { label: "备注", prop: "remark", width: 150,overHidden: true,type: "textarea", span:18 },
];
