diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian-show.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian-show.js new file mode 100644 index 00000000..cd631833 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian-show.js @@ -0,0 +1,43 @@ +import html from "html"; +import { ref } from "vue"; +import request from "../../request/index.js"; +import AppList from "../../components/list/index.js"; +import useConfig from "../../models/base-data/jia-ge-dan.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const appListRef = ref(null); + const config = useConfig("price-list-app-service-bj"); + const onCommand = async (item, rows) => { + if (item.path === "enable" || item.path === "disable") { + await appListRef.value.onClick( + async () => await request(config.edit.updateUrl, { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), + `确认${item.path === "enable" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, + true + ); + } + if (item.path === "enable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list-app-service-bj/update-list", { guids: rows.map((o) => o.id), isCancel: false }, { method: "POST" }, true), + `确认${"启用"}选中的${rows.length}行数据吗?`, + true + + ); + + } + if (item.path === "disable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list-app-service-bj/update-list", { guids: rows.map((o) => o.id), isCancel: true }, { method: "POST" }, true), + `确认${"停用"}选中的${rows.length}行数据吗?`, + true + + ); + + + } + }; + return { appListRef, config, onCommand }; + }, +}; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou-show.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou-show.js new file mode 100644 index 00000000..79a3c020 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou-show.js @@ -0,0 +1,44 @@ +import html from "html"; +import { ref } from "vue"; +import request from "../../request/index.js"; +import AppList from "../../components/list/index.js"; +import useConfig from "../../models/base-data/xiao-shou.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const appListRef = ref(null); + const config = useConfig(); + const onCommand = async (item, rows) => { + const url = `${config.baseUrl}/${item.path}`; + if (item.path === "enable" || item.path === "disable") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list/update", { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), + `确认${item.path === "enable" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, + true + ); + } + if (item.path === "enable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list/update-list", { guids: rows.map((o) => o.id), isCancel: false }, { method: "POST" }, true), + `确认${"启用"}选中的${rows.length}行数据吗?`, + true + + ); + + } + if (item.path === "disable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list/update-list", { guids: rows.map((o) => o.id), isCancel: true }, { method: "POST" }, true), + `确认${"停用"}选中的${rows.length}行数据吗?`, + true + + ); + + + } + }; + return { appListRef, config, onCommand }; + }, +}; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian-show.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian-show.js new file mode 100644 index 00000000..41553613 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/yin-du-jian-show.js @@ -0,0 +1,44 @@ +import html from "html"; +import { ref } from "vue"; +import request from "../../request/index.js"; +import AppList from "../../components/list/index.js"; +import useConfig from "../../models/base-data/jia-ge-dan.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const appListRef = ref(null); + const config = useConfig("price-list-app-service-yin-du"); + const onCommand = async (item, rows) => { + if (item.path === "enable" || item.path === "disable") { + await appListRef.value.onClick( + async () => await request(config.edit.updateUrl, { id: rows[0].id, isCancel: item.path === "enable" ? false : true }, { method: "POST" }, true), + `确认${item.path === "enable" ? "启用" : "停用"}选中的${rows.length}行数据吗?`, + true + ); + } + if (item.path === "enable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list-app-service-yin-du/update-list", { guids: rows.map((o) => o.id), isCancel: false }, { method: "POST" }, true), + `确认${"启用"}选中的${rows.length}行数据吗?`, + true + + ); + + } + if (item.path === "disable-all") { + await appListRef.value.onClick( + async () => await request("settleaccount/price-list-app-service-yin-du/update-list", { guids: rows.map((o) => o.id), isCancel: true }, { method: "POST" }, true), + `确认${"停用"}选中的${rows.length}行数据吗?`, + true + + ); + + + } + + }; + return { appListRef, config, onCommand }; + }, +};