|
|
@ -362,7 +362,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
|
{ |
|
|
|
label: t('ts.供应商确认'), |
|
|
|
name: 'invoice_sent_out', |
|
|
|
hide: isShowMainButton(row, ['8']), |
|
|
|
hide: isShowMainButton(row, ['3','7']), |
|
|
|
type: 'danger', |
|
|
|
color: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
@ -386,12 +386,12 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
hasPermi: 'wms:supplierinvoice-request-main:financeRej' |
|
|
|
}, |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','8','6'])}), // 编辑 |
|
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hasPermi: 'wms:supplierinvoice-request-main:close' ,hide: isShowMainButton(row, ['1','8','6']) }), // 关闭 |
|
|
|
defaultButtons.mainListEditBtn({ hasPermi: 'wms:supplierinvoice-request-main:update' , hide: isShowMainButton(row, ['1','3','6'])}), // 编辑 |
|
|
|
defaultButtons.mainListPurchasePlanCloBtn({ hasPermi: 'wms:supplierinvoice-request-main:close' ,hide: isShowMainButton(row, ['1','3','6']) }), // 关闭 |
|
|
|
{ |
|
|
|
label: t('ts.作废'), |
|
|
|
name: 'repeal', |
|
|
|
hide: isShowMainButton(row, ['1','8','6']), |
|
|
|
hide: isShowMainButton(row, ['1','3','6']), |
|
|
|
type: 'danger', |
|
|
|
color: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
@ -499,7 +499,7 @@ const handleImport = () => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if(row && row.status == '8'){ |
|
|
|
if(row && (row.status == '3' || row.status == '7')){ |
|
|
|
SupplierinvoiceRequestMainRules.invoiceTime[0].required = true |
|
|
|
SupplierinvoiceRequestMainRules.goldenTaxInvoiceNumber[0].required = true |
|
|
|
}else{ |
|
|
@ -544,7 +544,9 @@ const handleImport = () => { |
|
|
|
},{ |
|
|
|
label: t('ts.发票附件'), |
|
|
|
prop: 'Annex', |
|
|
|
tableName:'invoice' |
|
|
|
tableName:'invoice', |
|
|
|
hiddenDelete:false, |
|
|
|
hiddenUpload:false |
|
|
|
},{ |
|
|
|
label: t('ts.货运单附件'), |
|
|
|
prop: 'Annex', |
|
|
@ -554,13 +556,23 @@ const handleImport = () => { |
|
|
|
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) |
|
|
|
clicKRowId.value = row.id |
|
|
|
if(row.status=='1'||row.status=='2'||row.status=='3'||row.status=='6'){ |
|
|
|
|
|
|
|
// 合同附件 |
|
|
|
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{ |
|
|
|
detailAnnexTable.value[0].hiddenDelete = true |
|
|
|
detailAnnexTable.value[0].hiddenUpload = true |
|
|
|
} |
|
|
|
// 发票附件 |
|
|
|
if(roleList.value.indexOf('supplier_operator')>-1&&(row.status=='3'||row.status=='7')){ |
|
|
|
detailAnnexTable.value[1].hiddenDelete = false |
|
|
|
detailAnnexTable.value[1].hiddenUpload = false |
|
|
|
}else{ |
|
|
|
detailAnnexTable.value[1].hiddenDelete = true |
|
|
|
detailAnnexTable.value[1].hiddenUpload = true |
|
|
|
} |
|
|
|
|
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
|
} |
|
|
@ -966,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> |
|
|
|