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()