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
@@ -232,6 +232,7 @@ import type { PhotoItem } from "@/types/Photo";
import { convertPackageQuantity, formatPackageAmount, getPackageQuantityText } from "@/utils/package";
import { getAttachmentReadURL } from "@/utils/attachment";
import { getErrorMessage } from "@/utils/error";
import { emitListDataChanged, listDataEventKeys } from "@/utils/listDataEvents";
import { getProductPhotoURL } from "@/utils/product";
import {
getSalesOrderStatusText,
@@ -418,6 +419,7 @@ async function saveEdit(): Promise<void> {
attachmentList: buildAttachmentList(),
remark: editRemark.value.trim() || null
});
emitListDataChanged(listDataEventKeys.salesOrderChanged, orderId);
order.value = result;
editRemark.value = result.remark || "";
photoItems.value = toPhotoItems(result.attachmentList);