|
|
@ -291,40 +291,56 @@ const buttonTableClick = async (val, row) => { |
|
|
|
const handleHandle = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmHandle')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.handleUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.handleSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批通过按钮操作 */ |
|
|
|
const handleAgree = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmAgree')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.agreeUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.agreeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 审批驳回按钮操作 */ |
|
|
|
const handleRefused = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmRefused')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.refusedUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.refusedSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 提交按钮操作 */ |
|
|
|
const handleSubmit = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmSubmit')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.submitUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.submitSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -332,20 +348,28 @@ const handleSubmit = async (id: number) => { |
|
|
|
const handleClose = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmColse')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.closeUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.closeSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 重新添加按钮操作 */ |
|
|
|
const handleReAdd = async (id: number) => { |
|
|
|
await message.confirm(t('common.confirmReAdd')) |
|
|
|
tableObject.loading = true |
|
|
|
try{ |
|
|
|
await UnplannedissueRequestMainApi.reAddUnplannedissueRequestMain(id) |
|
|
|
message.success(t('common.reAddSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
}catch{ |
|
|
|
tableObject.loading = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|