add listDataEvents.ts

This commit is contained in:
Timi
2026-09-22 01:29:34 +08:00
parent c4d71078b3
commit fd4146476b
22 changed files with 377 additions and 49 deletions
@@ -145,6 +145,7 @@ import {
toPackageBaseQuantity
} from "@/utils/package";
import { getErrorMessage } from "@/utils/error";
import { emitListDataChanged, listDataEventKeys } from "@/utils/listDataEvents";
import { Message } from "@/utils/message";
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
import type { ProductStockPreviewItem } from "@/utils/productStock";
@@ -539,6 +540,8 @@ async function save(): Promise<void> {
const result = directVerify.value
? await FulfillmentAPI.createAndVerify(request)
: await FulfillmentAPI.create(request);
emitListDataChanged(listDataEventKeys.salesOrderChanged, request.salesOrderId);
emitListDataChanged(listDataEventKeys.productStockChanged);
Message.success(directVerify.value ? "履约单创建并核销成功" : "履约单已提交");
await router.replace(`/management/order-fulfillments/${result.id}`);
} catch (error) {