From 84517be26377b8fe4a021d852cdedfac12204e5e Mon Sep 17 00:00:00 2001 From: zhang_li Date: Fri, 27 Jun 2025 09:07:25 +0800 Subject: [PATCH] =?UTF-8?q?YT-2822=E5=B7=AE=E5=BC=82=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8D=95=E6=8D=AE?= =?UTF-8?q?=E5=8F=B7=E8=BF=9B=E5=85=A5=E6=98=8E=E7=BB=86=EF=BC=8C=E7=AC=AC?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E5=BA=93=E5=AD=98=E4=BA=8B=E5=8A=A1=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=EF=BC=8C=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E9=A1=B5=E9=9D=A2=E5=9C=A8=E5=88=87=E5=9B=9E?= =?UTF-8?q?=E6=9D=A5=E6=98=BE=E7=A4=BA=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 28 +++++++++++++++---- .../balanceDifference/index.vue | 6 ++-- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 1d4877afe..19854cc1e 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -390,6 +390,12 @@ const props = defineProps({ type: Array, required: false, default: null + }, + // tableObject 数据过滤条件 针对 详情扩展标签页 传入不同条件 + tableObjectExtendObj: { + type: Array, + required: false, + default: null }, // tableObject 数据过滤条件 针对 详情扩展标签页 传入不同条件 extendRowKeyValue: { @@ -892,14 +898,24 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: // buttondata.value = [...detailButtonEdit,...detailButtonDelete,...buttondataTable.value] // 如果tab第一列就是列表 if (props.tabsExtend) { - if (props.tableObjectExtend) { - props.tableObjectExtend.forEach(item => { - tableObject.params[item.key] = row[item.value] - }) - } + const { tableObject, tableMethods } = useTable({ + getListApi: props.apiPage // 分页接口 + }) + tableObject.params.masterId = masterParmas.value.masterId + detailAllSchemasRef.value = props.detailAllSchemas + if (props.extendRowKeyValue) { + // params 扩展的字段 + props.extendRowKeyValue.forEach(item => { + tableObject.params[item.key] = row[item.value] + masterParmas.value[item.key] =row[item.value] + + }) + } + tableObjectRef.value = tableObject + tableMethodsRef.value = tableMethods + const { getList } = tableMethods await getList() } - } finally { detailLoading.value = false } diff --git a/src/views/wms/inventoryManage/balanceDifference/index.vue b/src/views/wms/inventoryManage/balanceDifference/index.vue index fea37cc79..790d3ac57 100644 --- a/src/views/wms/inventoryManage/balanceDifference/index.vue +++ b/src/views/wms/inventoryManage/balanceDifference/index.vue @@ -66,6 +66,7 @@ }]" @changeTabs="changeTabs" :tableObjectExtend="tableObjectExtend" + :extendRowKeyValue="extendRowKeyValue" /> @@ -103,10 +104,11 @@ routeName.value = route.name const tableColumns = ref(Balance.allSchemas.tableColumns) const tabsExtend = ref(true) const apiPage = ref( BalanceApi.getTransactionBalancePage) -const tableObjectExtend = ref([{ +const tableObjectExtend = ref([]) + const extendRowKeyValue= ref([{ key: 'masterId', value: 'id' - }]) +}]) //字段设置 更新主列表字段 const updataTableColumns = (val) => {