From 2c7fd9ab24c75583c4aab8ac59c8459539fcd59e Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Sun, 7 Apr 2024 14:03:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86--=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7--=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E6=89=A9=E5=B1=95=E6=96=B0=E5=A2=9E=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 12 ++++++++++-- .../supplierinvoiceRequestMain/index.vue | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 5a865fca5..3971d6463 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -322,6 +322,12 @@ const props = defineProps({ required: false, default: false }, + //扩展其他按钮 + otherHeadButttonData:{ + type:Array, + required: false, + default: () => [] + } }) const isShowDrawer = ref(false) const detailLoading = ref(false) @@ -544,7 +550,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: defaultButtons.defaultFilterBtn(null) // 筛选 ] } - + HeadButttondata.value = [...HeadButttondata.value,...props.otherHeadButttonData] let detailButtonEdit: any = [] let detailButtonDelete: any = [] if (props.detailButtonIsShowEdit) { @@ -654,6 +660,7 @@ const buttonBaseClick = (val, item) => { } else { // 其他按钮 console.log('其他按钮', item) + emit('buttonBaseClick',val, item) } } @@ -781,7 +788,8 @@ const emit = defineEmits([ 'openImage', 'onBlur', 'detailBasicFormOnChange', - 'formFormDateChange' + 'formFormDateChange', + 'buttonBaseClick' ]) /** 删除按钮操作 */ const handleDelete = async (id: number) => { diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 4ea2598d4..ed73ce4a9 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -83,6 +83,16 @@ prop: 'Annex', tableName:'waybill' }]" + :otherHeadButttonData="[{ + label: '打印', + name: 'kuozhan', + hide: false, + type: 'primary', + // icon: 'ep:operation', + color: '', + float:'left', + hasPermi: '' + }]" :isBasic="false" :allSchemas="SupplierinvoiceRequestMain.allSchemas" :detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" @@ -93,6 +103,7 @@ :apiPage="SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage" :apiDelete="SupplierinvoiceRequestDetailApi.deleteSupplierinvoiceRequestDetail" :Echo="Echo" + @buttonBaseClick="detailButtonBaseClick" /> @@ -571,6 +582,10 @@ const importSuccess = () => { getList() // 刷新当前列表 } + // 详情--头部按钮事件 + const detailButtonBaseClick = (val, item) => { + console.log(1111) + } /** 初始化 **/ onMounted(async () => { getList()