fix(wms): 对齐商品分类树筛选查询

pull/345/head
YunaiV 2026-05-19 13:00:05 +08:00
parent 4821d49017
commit a70fcc9616
4 changed files with 8 additions and 20 deletions

View File

@ -92,14 +92,6 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] {
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
component: 'Input',
fieldName: 'categoryId',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'code',
label: '商品编号',

View File

@ -89,8 +89,9 @@ async function handleExport() {
}
/** 分类树点击 */
async function handleCategoryNodeClick(categoryId: number | undefined) {
await gridApi.formApi.setValues({ categoryId });
const searchCategoryId = ref<number | undefined>(undefined);
function handleCategoryNodeClick(categoryId: number | undefined) {
searchCategoryId.value = categoryId;
handleRefresh();
}
@ -143,6 +144,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
pageNo: page.currentPage,
pageSize: page.pageSize,
...formValues,
categoryId: searchCategoryId.value,
});
currentRows.value = buildItemSkuRows(data.list || []);
return {

View File

@ -92,14 +92,6 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] {
/** 列表的搜索表单 */
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
component: 'Input',
fieldName: 'categoryId',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
fieldName: 'code',
label: '商品编号',

View File

@ -88,8 +88,9 @@ async function handleExport() {
}
/** 分类树点击 */
async function handleCategoryNodeClick(categoryId: number | undefined) {
await gridApi.formApi.setValues({ categoryId });
const searchCategoryId = ref<number | undefined>(undefined);
function handleCategoryNodeClick(categoryId: number | undefined) {
searchCategoryId.value = categoryId;
handleRefresh();
}
@ -142,6 +143,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
pageNo: page.currentPage,
pageSize: page.pageSize,
...formValues,
categoryId: searchCategoryId.value,
});
currentRows.value = buildItemSkuRows(data.list || []);
return {