Browse Source

update

master
wanggang 1 year ago
parent
commit
836802c47f
  1. 7
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js
  2. 25
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js

7
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js

@ -14,10 +14,9 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
let notify = null;
const showMessage = (data) => {
notify?.close();
notify = ElNotification({
const showMessage = async (data) => {
await ElNotification.closeAll();
ElNotification({
position: "bottom-right",
title: "提示",
message: `待同步库存数量: ${data}`,

25
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/log.js

@ -1,10 +1,11 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/vmi/log.js";
import { ref } from "vue";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import AppForm from "../../../components/form/index.js";
import AppTable from "../../components/table/index.js";
import { ElNotification } from "element-plus";
import request, { getUrl } from "../../request/index.js";
export default {
@ -79,6 +80,28 @@ export default {
addDialogVisible.value = true;
console.log(item.path, item, rows);
};
const showMessage = async (data) => {
await ElNotification.closeAll();
ElNotification({
position: "bottom-right",
title: "提示",
message: `待同步库存数量: ${data}`,
duration: 0,
});
};
const event = "VmiBalance";
onMounted(async () => {
const result = await request("settleaccount/vmi-async-message/get-message-count", null, { method: "POST" });
if (!result.errors) {
showMessage(result.data);
}
PubSub.subscribe(event, async (_, data) => {
if (route.path === "/vmi/log") {
showMessage(data);
}
});
});
onUnmounted(() => PubSub.unsubscribe(event));
return {
appListRef,
loading,

Loading…
Cancel
Save