Browse Source

HL-6421 恢复功能已开发完毕

hella_online_20241121
chenfang 1 week ago
parent
commit
92f525f33c
  1. 6
      src/api/wms/supplierinvoiceInvoiced/index.ts
  2. 12
      src/utils/disposition/defaultButtons.ts
  3. 26
      src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue

6
src/api/wms/supplierinvoiceInvoiced/index.ts

@ -96,4 +96,10 @@ export const agreeSupplierinvoiceInvoiced = async (id: number) => {
// 审批拒绝待开票 // 审批拒绝待开票
export const refuseSupplierinvoiceInvoiced = async (id: number) => { export const refuseSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id }) return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id })
}
// 恢复被删除的待开票
export const receverySupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/recevery?id=` + id })
} }

12
src/utils/disposition/defaultButtons.ts

@ -463,6 +463,18 @@ export function mainListFinishBtn(option: any) {
}) })
} }
// 待开票被删除数据-恢复按钮
export function mainListReceveryBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.恢复`).replace('ts.', ''),
name: 'recevery',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListSendBtn(option: any) { export function mainListSendBtn(option: any) {
return __defaultBtnOption(option, { return __defaultBtnOption(option, {
label: t(`ts.发送邮件`).replace('ts.', ''), label: t(`ts.发送邮件`).replace('ts.', ''),

26
src/views/wms/supplierManage/supplierinvoiceInvoicedScheduleDeleted/index.vue

@ -146,7 +146,7 @@ const butttondata = (row) =>{
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:supplierinvoice-invoiced:delete'}), //
// defaultButtons.mainListEditBtn({hasPermi:'wms:supplierinvoice-invoiced:update'}), defaultButtons.mainListReceveryBtn({hasPermi:'wms:supplierinvoice-invoiced:recevery'}),//
{ {
label: t('ts.审核通过'), label: t('ts.审核通过'),
name: 'agree', name: 'agree',
@ -164,6 +164,15 @@ const butttondata = (row) =>{
color: '', color: '',
link: true, // link: true, //
hasPermi: 'wms:supplierinvoice-invoiced:refuse' 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) handleAgree(row.id)
} else if(val == 'refuse'){// } else if(val == 'refuse'){//
handleRefuse(row.id) handleRefuse(row.id)
}else if(val == 'recevery'){//
handleRecevery(row.id)
} }
} }
@ -230,6 +241,19 @@ const handleDelete = async (id: number) => {
} catch {} } catch {}
} }
/** 恢复按钮操作 */
const handleRecevery = async (id: number) => {
try {
//
await message.delConfirm()
//
await SupplierinvoiceInvoicedApi.receverySupplierinvoiceInvoiced(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 审批通过按钮操作 */ /** 审批通过按钮操作 */
const handleAgree = async (id : number) => { const handleAgree = async (id : number) => {
try { try {

Loading…
Cancel
Save