From 17ec08deeedae2c940622536353394cc776b8227 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Thu, 25 Apr 2024 15:49:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E5=AD=90=E8=A1=A8=E5=90=88=E5=B9=B6+?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E7=94=B3=E8=AF=B7-?= =?UTF-8?q?=E6=96=B0=E5=A2=9E-=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8F=B7=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicForm/src/BasicForm.vue | 13 ++- src/components/Form/src/Form.vue | 8 +- .../SearchTable/src/SearchTable.vue | 16 ++- .../purchasereceiptRequestMain/index.vue | 103 +++++++++++++++++- .../purchasereceiptRequestMain.data.ts | 49 +++++++-- .../sparereceiptRequestMain.data.ts | 17 ++- 6 files changed, 181 insertions(+), 25 deletions(-) diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index d7d018198..a0e36e748 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -350,7 +350,9 @@ const opensearchTable = ( searchCondition, multiple, type, - row + row, + isConcatDetailSchemas=false, + searchDetailSchemas: any ) => { const _searchCondition = {} // 判断查询条件中,是否存在指向主表的数据 @@ -410,7 +412,10 @@ const opensearchTable = ( multiple, type, row, - _searchCondition + _searchCondition, + undefined, + isConcatDetailSchemas, + searchDetailSchemas ) } @@ -670,7 +675,9 @@ const inpuFocus = (headerItem, row, index) => { headerItem.tableForm.searchCondition, headerItem.tableForm.multiple, 'tableForm', - row + row, + headerItem.tableForm?.isConcatDetailSchemas, + headerItem.tableForm?.searchDetailSchemas ) } /** diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 2c031b91e..8ecd0fe2b 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -120,8 +120,8 @@ export default defineComponent({ return unref(elFormRef) as ComponentRef } - const opensearchTable = (field, searchField,searchTitle,searchAllSchemas, searchPage, searchCondition,multiple) => { - emit('opensearchTable',field, searchField, searchTitle, searchAllSchemas, searchPage, searchCondition,multiple) + const opensearchTable = (field, searchField,searchTitle,searchAllSchemas, searchPage, searchCondition,multiple,isConcatDetailSchemas,searchDetailSchemas) => { + emit('opensearchTable',field, searchField, searchTitle, searchAllSchemas, searchPage, searchCondition,multiple,undefined,null,isConcatDetailSchemas,searchDetailSchemas) } const clearSearchInput = (field) => { @@ -275,6 +275,8 @@ export default defineComponent({ item?.componentProps?.searchPage, item?.componentProps?.searchCondition, item?.componentProps?.multiple, + item?.componentProps?.isConcatDetailSchemas, + item?.componentProps?.searchDetailSchemas, )}}/> ) @@ -311,6 +313,8 @@ export default defineComponent({ item?.componentProps?.searchPage, item?.componentProps?.searchCondition, item?.componentProps?.multiple, + item?.componentProps?.isConcatDetailSchemas, + item?.componentProps?.searchDetailSchemas, )}}/> ) diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index cfee305e9..db9440b9f 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -59,7 +59,7 @@ const getListRef = ref() const setSearchParamsRef = ref() const tableObjectRef = ref() const getPage:any = ref() -const searchSchema = ref() +// const searchSchema = ref() const tableColumns = ref() const formFieldRef = ref() const searchFieldRef = ref() @@ -75,16 +75,22 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any searchDialogVisible.value = true multipleBol.value = multiple allSchemasRef.value = allSchemas - searchSchema.value = allSchemas.searchSchema + // searchSchema.value = allSchemas.searchSchema tableColumns.value = allSchemas.tableColumns } -const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => { +const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => { searchDialogVisible.value = true formFieldRef.value = formField searchFieldRef.value = searchField allSchemasRef.value = allSchemas - searchSchema.value = allSchemas.searchSchema - tableColumns.value = allSchemas.tableColumns.filter(item => (item.field !== 'action')) + // searchSchema.value = allSchemas.searchSchema + if(isConcatDetailSchemas){ + //主子表合并 + console.log('detailSchemas',detailSchemas) + tableColumns.value = [...allSchemas.tableColumns,...detailSchemas.tableMainColumns].filter(item => (item.field !== 'action')) + }else{ + tableColumns.value = allSchemas.tableColumns.filter(item => (item.field !== 'action')) + } getPage.value = getApiPage typeRef.value = type rowRef.value = row diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index 562c3cdf1..eff020ab4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -59,7 +59,15 @@ @submitForm="submitForm" @formFormDateChange="formFormDateChange" @onEnter="onEnter" - /> + > + + + + +