Module: DFC::Common::Lib
Overview
物料中心相关API
Defined Under Namespace
Modules: MaterialInfo Classes: LibObj
Class Method Summary # collapse
-
.add_obj(hash, clazz) ⇒ String
添加本地产品.
-
.add_obj_to_user(ids) ⇒ Object
收藏数据到用户库.
-
.clear_none_use ⇒ Object
清理未使用项目(项目库).
-
.copy_obj(id) ⇒ String
在项目库复制数据 复制数据时 id和名称不一样 其它一致.
-
.delete_obj(ids, type = DFC::Common::Lib::LibType::USER) ⇒ Object
删除库数据.
-
.dialog_show(fitter_str, attach) {|Object| ... } ⇒ Object
显示物料中心窗口.
-
.dynamic_get_all_type(type = DFC::Common::Lib::LibType::PROJECT, filter = nil) ⇒ Array
动态的获取对应类型库的分类.
-
.exist?(obj) ⇒ True/False
判断材料是否存在于库.
-
.export(path, ids) ⇒ Object
导出数据指定产品到文件夹中.
-
.find_obj_by_manu(manu_id) ⇒ Array
根据商家id查询产品.
-
.get_all_ext_name ⇒ Object
获取产品类与后缀的关系.
-
.get_data_by_id(classify, obj_id, type = DFC::Common::Lib::LibType::PROJECT, key_word = nil, num = nil, filter = nil) ⇒ Hash
查询产品所在页码(分类、关键字).
-
.get_data_by_type(classify, type = DFC::Common::Lib::LibType::PROJECT, key_word = nil, page = nil, num = nil, filter = nil) ⇒ Hash
查询分页(分类、关键字).
-
.get_obj_by_id(id, type = nil) ⇒ LibObj
通过id获取对象.
-
.handle_files(files, dest_path) ⇒ Object
文件名采用文件MD5 移动到 dest_path.
-
.import(path) ⇒ Object
从指定文件夹导入数据.
-
.is_exist_name(name, &block) ⇒ Object
判断当前商家是否已经存在某个名称的商品.
-
.load_file(type, file) ⇒ LibObj
加载产品文件到对应的库中.
-
.modify_obj(id, hash) ⇒ LibObj
修改数据.
-
.modify_obj_type(id, type) ⇒ Object
修改本地产品.
-
.name_exist?(name, manu_id, type = nil, id_ext = nil) ⇒ True/False
判断产品名称是否存在.
-
.parse_ext_name(ext_name) ⇒ Object
通过文件后缀获取产品类.
-
.set_mats_info_to_ent(ent, libs) ⇒ Object
给模型设置物料信息 单个组上多个物料信息.
-
.type_exist?(type, obj) ⇒ Boolean
判断材料是否存在于某个类型的库.
-
.type_of(obj) ⇒ String
判断对象类型.
-
.use_obj_by_id(id) ⇒ LibObj
通过id使用对象 此操作会将产品移入项目库.
Class Method Details
↑ .add_obj(hash, clazz) ⇒ String
添加本地产品
↑ .copy_obj(id) ⇒ String
在项目库复制数据 复制数据时 id和名称不一样 其它一致
↑ .dynamic_get_all_type(type = DFC::Common::Lib::LibType::PROJECT, filter = nil) ⇒ Array
动态的获取对应类型库的分类
↑ .exist?(obj) ⇒ True/False
判断材料是否存在于库
↑ .find_obj_by_manu(manu_id) ⇒ Array
根据商家id查询产品
↑ .get_data_by_id(classify, obj_id, type = DFC::Common::Lib::LibType::PROJECT, key_word = nil, num = nil, filter = nil) ⇒ Hash
查询产品所在页码(分类、关键字)
↑ .get_data_by_type(classify, type = DFC::Common::Lib::LibType::PROJECT, key_word = nil, page = nil, num = nil, filter = nil) ⇒ Hash
查询分页(分类、关键字)
↑ .name_exist?(name, manu_id, type = nil, id_ext = nil) ⇒ True/False
判断产品名称是否存在
↑ .type_exist?(type, obj) ⇒ Boolean
判断材料是否存在于某个类型的库
↑ .type_of(obj) ⇒ String
判断对象类型