From 95ac4b7c03db9dd23fb7b917a34e30420fed3fa7 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 19 Jun 2024 16:32:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/supplierinvoiceRequestMain/index.ts | 6 ++++++ .../supplierinvoiceRequestMain/index.vue | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index 9dd8e60e8..ec37ab88c 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -141,3 +141,9 @@ export const queryUserInfoByRoleCode = async (params) => { return await request.get({ url: `/wms/supplierinvoice-request-main/queryUserInfoByRoleCodePage`, params }) } +// 获取供应商角色 +export const getLoginUserRoleList = async () => { + return await request.get({ url: `/wms/supplierinvoice-request-main/getLoginUserRoleList`}) + +} + diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 70e11f5fe..b3867aba9 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -558,7 +558,7 @@ const handleImport = () => { clicKRowId.value = row.id // 合同附件 - if(row.status=='1'||row.status=='2'||row.status=='3'||row.status=='6'||row.status=='7'){ + if((roleList.value.indexOf('supplier_operator')>-1||roleList.value.indexOf('purchase')>-1)&&(row.status=='1'||row.status=='2'||row.status=='3'||row.status=='6'||row.status=='7')){ detailAnnexTable.value[0].hiddenDelete = false detailAnnexTable.value[0].hiddenUpload = false }else{ @@ -566,7 +566,7 @@ const handleImport = () => { detailAnnexTable.value[0].hiddenUpload = true } // 发票附件 - if(row.status=='3' || row.status=='7'){ + if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='3'||row.status=='7')){ detailAnnexTable.value[1].hiddenDelete = false detailAnnexTable.value[1].hiddenUpload = false }else{ @@ -978,11 +978,21 @@ const importSuccess = () => { } }) } - + const roleList = ref([]) + const getLoginUserRoleList = async ()=>{ + let res = await SupplierinvoiceRequestMainApi.getLoginUserRoleList() + console.log('roleList',res) + if(res&&res.length>0){ + roleList.value = res + }else{ + roleList.value = [] + } + } /** 初始化 **/ onMounted(async () => { getList() getDefaultSupplier() + getLoginUserRoleList() importTemplateData.templateUrl = await SupplierinvoiceRequestMainApi.importTemplate() })