|
|
@ -146,7 +146,7 @@ const butttondata = (row) =>{ |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // 删除 |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), |
|
|
|
defaultButtons.mainListReceveryBtn({hasPermi:'wms:supplierinvoice-invoiced:recevery'}),//恢复 |
|
|
|
{ |
|
|
|
label: t('ts.审核通过'), |
|
|
|
name: 'agree', |
|
|
@ -164,6 +164,15 @@ const butttondata = (row) =>{ |
|
|
|
color: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
hasPermi: 'wms:supplierinvoice-invoiced:refuse' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: t('ts.恢复'), |
|
|
|
name: 'recevery', |
|
|
|
hide: isShowMainButton(row, ['1']), |
|
|
|
type: 'danger', |
|
|
|
color: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
hasPermi: 'wms:supplierinvoice-invoiced:recevery' |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
@ -178,6 +187,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
handleAgree(row.id) |
|
|
|
} else if(val == 'refuse'){//作废 |
|
|
|
handleRefuse(row.id) |
|
|
|
}else if(val == 'recevery'){//恢复 |
|
|
|
handleRecevery(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -230,6 +241,19 @@ const handleDelete = async (id: number) => { |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 恢复按钮操作 */ |
|
|
|
const handleRecevery = async (id: number) => { |
|
|
|
try { |
|
|
|
// 恢复的二次确认 |
|
|
|
await message.confirm(t('是否恢复所选中数据?')) |
|
|
|
// 发起恢复 |
|
|
|
await SupplierinvoiceInvoicedApi.receverySupplierinvoiceInvoiced(id) |
|
|
|
message.success(t('恢复成功!')) |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id : number) => { |
|
|
|
try { |
|
|
|