|
|
@@ -210,25 +210,36 @@ const rejectAndReturn = () => {
|
|
|
|
|
|
const rejectAndReturnDialogConfirm = async () => {
|
|
|
rejectAndReturnDialog.value = false
|
|
|
- const res = await invoiceRecordInvalidateApi(params)
|
|
|
- if (res.code === 0 && res.data) {
|
|
|
- await showSuccessToast({
|
|
|
- message: '拒绝成功',
|
|
|
- duration: 800,
|
|
|
- forbidClick: true,
|
|
|
- })
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- router.replace({
|
|
|
- path: '/login',
|
|
|
- query: {
|
|
|
- from: 'reject',
|
|
|
- pushRecordId: userStore.pushRecordId,
|
|
|
- },
|
|
|
+
|
|
|
+ try {
|
|
|
+ const res = await invoiceRecordInvalidateApi(params)
|
|
|
+ if (res.code === 0 && res.data) {
|
|
|
+ await showSuccessToast({
|
|
|
+ message: '拒绝成功',
|
|
|
+ duration: 800,
|
|
|
+ forbidClick: true,
|
|
|
})
|
|
|
|
|
|
- userStore.LogOut()
|
|
|
- }, 1000)
|
|
|
+ setTimeout(() => {
|
|
|
+ router.replace({
|
|
|
+ path: '/login',
|
|
|
+ query: {
|
|
|
+ from: 'reject',
|
|
|
+ pushRecordId: userStore.pushRecordId,
|
|
|
+ },
|
|
|
+ })
|
|
|
+
|
|
|
+ userStore.LogOut()
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
+ showToast(res.msg || '操作失败,请重试')
|
|
|
+ }
|
|
|
+ } catch (err: any) {
|
|
|
+ const { code, message } = err
|
|
|
+ if (code === 1) {
|
|
|
+ showToast(message)
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
|