Browse Source

获取供应商角色

master_hella_20240701
wangyufei 5 months ago
parent
commit
95ac4b7c03
  1. 6
      src/api/wms/supplierinvoiceRequestMain/index.ts
  2. 16
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

6
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`})
}

16
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<string[]>([])
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()
})
</script>

Loading…
Cancel
Save