|
@ -299,67 +299,85 @@ const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainClose') { |
|
|
if (val == 'mainClose') { |
|
|
// 关闭 |
|
|
// 关闭 |
|
|
await message.confirm('确认要关闭吗?') |
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.close(row.id) |
|
|
CountRequestMainApi.close(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('关闭成功')) |
|
|
message.success(t('关闭成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainReAdd') { |
|
|
} else if (val == 'mainReAdd') { |
|
|
// 重新添加 |
|
|
// 重新添加 |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
await message.confirm('确认要重新添加吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.reAdd(row.id) |
|
|
CountRequestMainApi.reAdd(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('添加成功')) |
|
|
message.success(t('添加成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainSubmit') { |
|
|
} else if (val == 'mainSubmit') { |
|
|
// 提交审批 |
|
|
// 提交审批 |
|
|
await message.confirm('确认要提交审批吗?') |
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.submit(row.id) |
|
|
CountRequestMainApi.submit(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('提交审批成功')) |
|
|
message.success(t('提交审批成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainTurnDown') { |
|
|
} else if (val == 'mainTurnDown') { |
|
|
// 驳回 |
|
|
// 驳回 |
|
|
await message.confirm('确认要驳回吗?') |
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.refused(row.id) |
|
|
CountRequestMainApi.refused(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('驳回成功')) |
|
|
message.success(t('驳回成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainApprove') { |
|
|
} else if (val == 'mainApprove') { |
|
|
// 审批通过 |
|
|
// 审批通过 |
|
|
await message.confirm('确认要审批通过吗?') |
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.agree(row.id) |
|
|
CountRequestMainApi.agree(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('审批已通过')) |
|
|
message.success(t('审批已通过')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainHandle') { |
|
|
} else if (val == 'mainHandle') { |
|
|
// 处理 |
|
|
// 处理 |
|
|
await message.confirm('确认要处理吗?') |
|
|
await message.confirm('确认要处理吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.handle(row.id) |
|
|
CountRequestMainApi.handle(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('处理成功')) |
|
|
message.success(t('处理成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'mainReCount') { |
|
|
} else if (val == 'mainReCount') { |
|
@ -399,12 +417,15 @@ const buttonTableClick = async (val, row) => { |
|
|
} else if (val == 'mainThaw') { |
|
|
} else if (val == 'mainThaw') { |
|
|
// 解冻 |
|
|
// 解冻 |
|
|
await message.confirm('确认要解冻吗?') |
|
|
await message.confirm('确认要解冻吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
CountRequestMainApi.thaw(row.id) |
|
|
CountRequestMainApi.thaw(row.id) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
message.success(t('解冻成功')) |
|
|
message.success(t('解冻成功')) |
|
|
|
|
|
tableObject.loading = false |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
.catch((err) => { |
|
|
.catch((err) => { |
|
|
|
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'edit') { |
|
|
} else if (val == 'edit') { |
|
@ -434,8 +455,10 @@ const handleDelete = async (id: number) => { |
|
|
try { |
|
|
try { |
|
|
// 删除的二次确认 |
|
|
// 删除的二次确认 |
|
|
await message.delConfirm() |
|
|
await message.delConfirm() |
|
|
|
|
|
tableObject.loading = true |
|
|
// 发起删除 |
|
|
// 发起删除 |
|
|
await CountRequestMainApi.deleteCountRequestMain(id) |
|
|
await CountRequestMainApi.deleteCountRequestMain(id) |
|
|
|
|
|
tableObject.loading = false |
|
|
message.success(t('common.delSuccess')) |
|
|
message.success(t('common.delSuccess')) |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
await getList() |
|
|
await getList() |
|
|