wanggang 1 year ago
parent
commit
379e8b893b
  1. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -419,13 +419,9 @@ export default {
} else { } else {
result = method(); result = method();
} }
if (!result.errors) { if (!result.errors && reload) {
if (!result.data?.code || result.data.code === 200) { pageModel.pageIndex = 1;
if (reload) { await load();
pageModel.pageIndex = 1;
await load();
}
}
} }
} catch (error) { } catch (error) {
if (error === "cancel") { if (error === "cancel") {
@ -552,7 +548,7 @@ export default {
{ method: config.edit.deleteMethod }, { method: config.edit.deleteMethod },
true true
); );
if (!result.data?.code || result.data.code === 200) { if (!result.errors) {
pageModel.pageIndex = 1; pageModel.pageIndex = 1;
await reload(); await reload();
} }
@ -690,7 +686,7 @@ export default {
} }
}); });
const result = await request(url, formData); const result = await request(url, formData);
if (result.data?.code === 200) { if (!result.errors) {
editFormloading.value = false; editFormloading.value = false;
dialogVisible.value = false; dialogVisible.value = false;
await load(); await load();

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/_compare.js

@ -64,10 +64,8 @@ export default function (type) {
delete data["downLineDateTime"]; delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true); const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) { if (!result.errors) {
if (!result.data?.code || result.data.code === 200) { dialogVisable.value = false;
dialogVisable.value = false; await load();
await load();
}
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);

Loading…
Cancel
Save