|
|
@ -347,6 +347,15 @@ |
|
|
|
}, |
|
|
|
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']) }), // 关闭 |
|
|
|
{ |
|
|
|
label: t('ts.作废'), |
|
|
|
name: 'repeal', |
|
|
|
hide: isShowMainButton(row, ['1','8','6']), |
|
|
|
type: 'danger', |
|
|
|
color: '', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
hasPermi: 'wms:supplierinvoice-request-main:repeal' |
|
|
|
}, |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-request-main:delete'}), // 删除 |
|
|
|
{ |
|
|
|
label: t('ts.打印'), |
|
|
@ -392,6 +401,8 @@ const handleImport = () => { |
|
|
|
handleDelete(row.masterId) |
|
|
|
} else if( val == 'mian_print'){ // 打印 |
|
|
|
handleDocumentPrint(row.masterId) |
|
|
|
} else if( val == 'repeal'){ // 作废 |
|
|
|
handleRepeal(row.masterId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -456,6 +467,23 @@ const handleImport = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 关闭按钮操作 */ |
|
|
|
const handleRepeal = async (id : number) => { |
|
|
|
try { |
|
|
|
// 关闭的二次确认 |
|
|
|
await message.confirm(t('ts.是否作废所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
|
// 发起关闭 |
|
|
|
await SupplierinvoiceRequestMainApi.repealSupplierinvoiceRequestMain(id) |
|
|
|
message.success(t('ts.作废成功!')) |
|
|
|
tableObject.loading = false |
|
|
|
// 刷新列表 |
|
|
|
await getList() |
|
|
|
} catch { }finally{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 打开按钮操作 */ |
|
|
|
const handleOpe = async (id : number) => { |
|
|
|
try { |
|
|
|