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
@@ -101,6 +101,7 @@ import type { SalesOrder } from "@/types/SalesOrder";
import type { PhotoItem } from "@/types/Photo";
import { createPackageRequestNo, formatPackageAmount, formatPackageAmountInput, parsePackageAmount } 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 { uploadPhotoList } from "@/utils/photo";
@@ -201,6 +202,7 @@ async function save(): Promise<void> {
const record = directVerify.value
? await SalesOrderAPI.receivePaymentAndVerify(request)
: await SalesOrderAPI.receivePayment(request);
emitListDataChanged(listDataEventKeys.salesOrderChanged, order.value.id);
Message.success(directVerify.value ? "收款登记并核销成功" : "收款登记已提交");
await router.replace(record.id && userStore.hasPermissions(permissionCodes.fundReceive.create)
? `/management/fund-records/${record.id}`