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) => {