diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js index edad5ec0..a22d2345 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js @@ -419,13 +419,9 @@ export default { } else { result = method(); } - if (!result.errors) { - if (!result.data?.code || result.data.code === 200) { - if (reload) { - pageModel.pageIndex = 1; - await load(); - } - } + if (!result.errors && reload) { + pageModel.pageIndex = 1; + await load(); } } catch (error) { if (error === "cancel") { @@ -552,7 +548,7 @@ export default { { method: config.edit.deleteMethod }, true ); - if (!result.data?.code || result.data.code === 200) { + if (!result.errors) { pageModel.pageIndex = 1; await reload(); } @@ -690,7 +686,7 @@ export default { } }); const result = await request(url, formData); - if (result.data?.code === 200) { + if (!result.errors) { editFormloading.value = false; dialogVisible.value = false; await load(); diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js index d1038544..117e6928 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js @@ -64,10 +64,8 @@ export default function (type) { delete data["downLineDateTime"]; const result = await request(url, data, { method: "POST" }, true); if (!result.errors) { - if (!result.data?.code || result.data.code === 200) { - dialogVisable.value = false; - await load(); - } + dialogVisable.value = false; + await load(); } } catch (error) { console.log(error);