export type itemType = {
  key: string;
  label: string;
  value: string | number;
  labelZH?: string;
  labelEN?: string;
  color?: string;
};

type treeChild = {
  id: string;
  name: string;
  children: treeChild[];
  [key: string]: any;
};

interface treeType extends treeChild {
  children: treeChild[];
}

type tableBtnOption = {
  label: string;
  color: string;
  icon: string;
  divider: boolean;
  ifShow: boolean;
  tooltip: string;
  type: string;
  btnKey: string;
};
export type ColStruct = {
  Field: string;
  NameZH: string;
  NameEN: string;
  Width: number;
  Fix: boolean;
  fixed?: boolean;
  Visible: boolean;
  Style: string;
  ifShow: boolean;
  title?: string;
  dataIndex?: string;
  width?: string | number;
  Option: itemType[];
  treeOption: treeType[];
  btnOption: tableBtnOption[];
  isEdit?: boolean;
  dataType?: string;
  isRequire?: boolean;
  ReadOnly?: boolean;
  isShowInForm?: boolean;
  maxlength?: number;
  Name: string;
  ifshowInQueryForm?: boolean;
  Mode?: string;
};

export type funParamaStruct = {
  FuncId: number
  OrderId: number
  ParamName: string
  MixValue: number
  MaxValue: number
  Unit: null
  MustHaveValue: boolean
  FieldName: string
  DisplayProperty: number
  EditProperty: number
  ParamStyle: number
  SelectItemTemplate: string
  SelectItems: SelectItemsStruct[]
  ItemFilterField: string
  Script: string,
  ChildItemFields: string[]
}

type SelectItemsStruct = {
  ItemId: number
  ItemName: string
  FilterField: string
  FilterValue: number[]
}

export type funOptionStruct = {
  FuncId: number
  FuncStyle: number
  FunctionCode: string
  FunctionName: string
  FunctionName2: string
  IsManual: boolean
  IsAidFunc: boolean
  IsNegative: boolean
  IsPreperaFunc: boolean
  IsValid: boolean
  IsMaterial: boolean
  IsRequired: boolean
  HaveMaterialCode: boolean
  HaveSrcDeviceCode: boolean
  IsAutoPipe: boolean
  IsSupportCode: boolean
  IsDefault: boolean
  IsRemoteDisplay: boolean
  IsQc: boolean
  IsOnlyDisplayMaterial: boolean
  SupportFactory: number[],
}

export type ExpressionItemStruct = {
  ExpressionId: string;
  MaterialCode: string;
  ResultVariantId: string;
  Expression: string;
  Remark: string;
  TechMaterialName: string;
  MaterialName: string;
};

export type MCIItemStruct = {
  FormularMCIId: string;
  MCIValiantId: string;
  DefaultMCI: number;
  RecipeID: string;
  DetailOrderKey: number;
  MaterialCode: string;
  OrderId: number;
  AidParam: string;
};

export type RawMCItemStruct = {
  FormularMCIId: string;
  MCIValiantId: string;
  MaterialCode: string;
  TechMaterialName: string;
  MaterialName: string;
};

export type ComBoxOptionStrct = {
  value: string;
  label: string;
  key: string
};

export type MCIValiantOptionStruct = {
  PropertyId: string
  Description: string
  QCStyle: number
  QCClass: number
  QCPointer: string
  QCVenue: number
  CompanyId: string
  Status: number
}

export interface ExpressionsItemStruct {
  ExpressionId: string;
  MaterialCode: string;
  ResultVariantId: string;
  Expression: string;
  Remark: string;
  TechMaterialName: string;
  MaterialName: string;
}

export type formularMcisItemStruct = {
  FormularMCIId: string;
  MCIValiantId: string;
  DefaultMCI: number;
  RecipeID: string;
  DetailOrderKey: number;
  MaterialCode: string;
  OrderId: number;
  AidParam: string;
};

export interface materialItemStruct {
  MaterialId: string;
  MaterialCode: string;
  TechMaterialName: string;
  MaterialName: string;
  IsValid: boolean;
  MaterialStyle: string;
  PackageDesc: string;
  Unit: string;
  Remark: string;
  MaterialCategory: string;
  PackageSize: number;
  PackageSizeDesc: string;
  PackCosumCoefficient: number;
  Field01: string;
  Field02: string;
  Field03: string;
  Field04: string;
  Field05: string;
  Field06: string;
  Field07: string;
  Field08: string;
  Field09: string;
  Field10: string;
  IfNeedlessWeighing: boolean;
  BufferDays: number;
  IsAnaphylactogen: boolean;
  AlarmDays: number;
  MinCapacity: number;
  EXPIRY_DAY: number;
  MaxCapacity: number;
  SupplyCycleDay: number;
  ERPMaterialId: string;
  ERPCategory: string;
  TareQty: number;
  GrossQty: number;
  NetQty: number;
  STOCK_UNIT: string;
  PACK_UNIT: string;
  SEFTLIFE: string;
  SEFTLIFE_EXP_DAY: number;
  UnNeedQc: boolean;
  ErrorMessage: string;
  MaterialCategoryDescription: string;
  MaterialStyleDescription: string;
  CategoryStyle: "RawMaterial";
  [key: string]: any;
  HighWeight: number
  TargetVal: number
  EditMatName: string
  RealValue: number
}

export type SelectItem = {
  Key: string,
  Label: string
}

export type DeviceParamaStruct = {
  DeviceParamId: number,
  Items: currentDeviceItemStruct[]
  ModelName?: string
  DeviceId: number | string
}

export type DeviceMainCtrDataStruct = {
  DeviceParamId: number
  Items: currentDeviceItemStruct[]
  DeviceId: number
  Description: string
}

export type currentDeviceItemStruct = {
  ModelName?: string
}

export type DeviceStruct = {
  DeviceId: number
  DeviceName: string
  Description: string
}

export type receipStyleStruct = {
  ParamId: number //索引值
  ParamName: string//设备类型名称
  ParamValue: number//设备类型
  Remark: string,
  AidParamList: [],
  AidParamValue: number
}

export type QCItemOptionsStruct = {
  key: number
  description: string
}

export type QCVariableStruct = {
  VariableId: string
  Description: string
}

export type reactStruct = {
  x: number, y: number, width: number, height: number
}

export type pointStruct = {
  x: number, y: number,
}

export type showParentStruct = {
  id: number,
  value: string,
  groupLayer: number
}

export type phaseComd = {
  PlanBatch: string
  Command: number
  StartMode: number
  IsFormular: boolean
}









