export type TableDataType = {
	goodsAndEquipmentData: DataType [];
	goodsBigClassifyList: BigClassifyType [];
	departmentList: DepartmentType [];
	listQuery: {
		pageSize: number;
		pageIndex: number;
		searchParams: {
			bigClassifyId: number | null;
			materialName: string;
		}
	};
	total: number;
}

export type SafetyGoodsAndEquipmentDialogStateType = {
	safetyGoodsAndEquipmentForm: safetyGoodsAndEquipmentFormType,
	safetyGoodsAndEquipmentRules: {

	},
	showSafetyGoodsAndEquipmentDialog: Boolean,
	title: string,
	loading: Boolean,
	depList: DepartmentType [];
	consumableList: Type [];
	departmentList: DepListType [];
	goodsBigClassifyList: BigClassifyType [];
	goodsSmallClassifyList: BigClassifyType [];
}

export type AddGoodsStateType = {
	title: string;
	goodsClassifyTitle: string;
	showAddGoodsDialog: boolean;
	showAddGoodsClassifyDialog: boolean;
	activeName: string;
	goodsData: BigClassifyType [];
	goodsBigClassifyList: BigClassifyType [];
	consumableList?: Type [];
	total: number;
	listQuery: {
		pageSize: number;
		pageIndex: number;
		searchParams: {
			classifyName: string;
		}
	};
	goodsClassifyForm: {
		id: null | number;
		materialClassifyName: string;
		parentId: number | null;
		consumable?: number | null;
	};
	goodsClassifyRules: {

	}
}

export type BatchInStorageStateType = {
	title: string;
	loading: boolean;
	materialName: string;
	batchInStorageDialogVisible: boolean;
	inStorageData: {
		smId: null | number,
		wareHousingCount: null | number,
		validType: null | number,
		validTime: null | string,
		rfid: null | string,
	},
	inStorageDataRules: {
	},
}

export type BatchOutStorageStateType = {
	title: string;
	loading: boolean;
	materialName: string;
	batchOutStorageDialogVisible: boolean;
	outStorageData: {
		smId: null | number,
		count: null | number,
		receiveUid: null | number,
		rfid: null | string,
	};
	outStorageDataRules: {
	};
	userList: [];
}

export type Type = {
	id: number;
	name: string;
}

export type safetyGoodsAndEquipmentFormType = {
	id: null | number,
	bigClassifyId: null | number,
	smallClassifyId: null | number,
	depId: null | number,
	// consumable: null | number,
}

export type DataType = {
	id: number | null;
	materialName: string;
}

export type DepListType = {

}

export function isValidKey(key: string | number | symbol, object:object): key is keyof typeof object{
	return key in object;
}

export type DepartmentType = {

}

export type BigClassifyType = {
	id: number;
	materialClassifyName: string;
	consumable?: number | null;
	parentId?: number;
	childList?: BigClassifyType [];
}


