diff --git a/src/api/wms/supplierinvoiceRequestMain/index.ts b/src/api/wms/supplierinvoiceRequestMain/index.ts index 89ef00539..49298715f 100644 --- a/src/api/wms/supplierinvoiceRequestMain/index.ts +++ b/src/api/wms/supplierinvoiceRequestMain/index.ts @@ -97,6 +97,11 @@ export const financerejSupplierinvoiceRequestMain = async (id: number) => { return await request.post({ url: `/wms/supplierinvoice-request-main/financeRej?id=` + id }) } +// 作废--供应商发货申请主 +export const repealSupplierinvoiceRequestMain = async (id: number) => { + return await request.post({ url: `/wms/supplierinvoice-request-main/repeal?id=` + id }) +} + // 生成记录 export const genRecordsSupplierinvoiceRequestMain = async (id) => { return await request.post({ url: `/wms/supplierinvoice-request-main/genRecords?id=` + id }) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index a1b887cfa..49b7ca904 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -939,6 +939,7 @@ export default { 单价:'Unit Price', '是否发布所选中数据?':'Do you publish the selected data?', '是否关闭所选中数据?':'Do you want to close the selected data?', + '是否作废所选中数据?':'Do you want to void the selected data?', '发布成功!':'Release Successfully!', '是否下架所选中数据?':'Do you want to remove selected data?', '下架成功!':'Removed Successfully!', @@ -947,6 +948,7 @@ export default { '是否打开所选中数据?':'Open the selected data?', '打开成功!':'Open Successfully!', '关闭成功!':'Closed Successfully', + '作废成功!':'Invalid successfully', '失效时间要大于生效时间':'The expiration time must be longer than the effective time', '供应商导入模版':'Supplier import template', '供应商物料':'Supplier Material', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 285b29a13..b7cf05325 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -939,6 +939,7 @@ export default { 单价:'单价', '是否发布所选中数据?':'是否发布所选中数据?', '是否关闭所选中数据?':'是否关闭所选中数据?', + '是否作废所选中数据?':'是否作废所选中数据?', '发布成功!':'发布成功!', '是否下架所选中数据?':'是否下架所选中数据?', '下架成功!':'下架成功!', @@ -947,6 +948,7 @@ export default { '是否打开所选中数据?':'是否打开所选中数据?', '打开成功!':'打开成功!', '关闭成功!':'关闭成功!', + '作废成功!':'作废成功!', '失效时间要大于生效时间':'失效时间要大于生效时间', '供应商导入模版':'供应商导入模版', '供应商物料':'供应商物料', diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index f4fabe126..238be0e93 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -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 {