优化采购品目列表懒加载显示

This commit is contained in:
吴红兵
2026-02-23 10:40:19 +08:00
parent f893b9efc9
commit c80fb3d5c1
2 changed files with 55 additions and 10 deletions

View File

@@ -18,17 +18,39 @@
import request from '/@/utils/request';
/**
* 获取树形列表
* 获取树形列表(全量,数据量大时建议用懒加载接口)
* @param params 查询参数
*/
export function getTree(params?: any) {
return request({
return request({
url: '/purchase/purchasingcategory/tree',
method: 'get',
params
});
}
/**
* 获取树根节点(懒加载用)
*/
export function getTreeRoots() {
return request({
url: '/purchase/purchasingcategory/tree/roots',
method: 'get'
});
}
/**
* 获取子节点(懒加载用)
* @param parentCode 父节点编码
*/
export function getTreeChildren(parentCode: string) {
return request({
url: '/purchase/purchasingcategory/tree/children',
method: 'get',
params: { parentCode }
});
}
/**
* 新增
* @param obj 对象数据