From eee91b191fcfaa66559e4bd0d7a117fbeb63cc74 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 19 May 2025 09:51:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=A3=9F=E5=A0=82=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/product-total-table.vue | 7 +++++++ src/views/hard/canteen-product-total/index.vue | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/views/hard/canteen-product-total/components/product-total-table.vue b/src/views/hard/canteen-product-total/components/product-total-table.vue index d025338..ee73000 100644 --- a/src/views/hard/canteen-product-total/components/product-total-table.vue +++ b/src/views/hard/canteen-product-total/components/product-total-table.vue @@ -98,8 +98,15 @@ const openDialog = (createTimeStr: any, hourType: any) => { getDataList() } +const updateQueryParams = (params: any) => { + if (!params) return + state.queryForm.merchantId = params.merchantId ?? null + getDataList() +} + // 暴露变量 defineExpose({ openDialog, + updateQueryParams, }) diff --git a/src/views/hard/canteen-product-total/index.vue b/src/views/hard/canteen-product-total/index.vue index 976e88d..b8a6aec 100644 --- a/src/views/hard/canteen-product-total/index.vue +++ b/src/views/hard/canteen-product-total/index.vue @@ -17,11 +17,14 @@ + + + - {{ $t("common.queryBtn") }} + {{ $t("common.queryBtn") }} {{ $t("common.resetBtn") }} @@ -167,6 +170,12 @@ const selectionChangHandle = (objs: { id: string }[]) => { multiple.value = !objs.length } +// 搜索 +const doSearch = () => { + productTotalTableRef.value.updateQueryParams(state.queryForm) + getDataList() +} + // 树节点选择时 const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepTree: any) => { state.queryForm.deptId = curClickedNode.id