增加工单关闭按钮
Build and Release / Build (push) Has been cancelled
Issue Close Require / issue-close-require (push) Has been cancelled
Issue Check Inactive / issue-check-inactive (push) Has been cancelled

This commit is contained in:
2026-05-10 12:58:03 +03:00
parent 750cab5cc9
commit ce6ab4f05b
+39 -2
View File
@@ -191,6 +191,43 @@ export default function Page() {
</Button>
}
/>,
<ConfirmButton
cancelText={t("cancel", "Cancel")}
confirmText={t("confirm", "Confirm")}
description="检查佣金是否扣除,如已经扣除才可进行关闭,此操作不扣除佣金仅关闭工单。"
key="cancel-payout-1"
onConfirm={async () => {
setLoadingId(row.id);
try {
await updateTicketStatus({
id: row.id,
status: 4,
});
toast.success("已关闭工单");
ref.current?.refresh();
} catch (e) {
console.error("Cancel payout failed", e);
toast.error("关闭工单失败");
}
setLoadingId(null);
}}
title="确认关闭订单?"
trigger={
<Button
className="mr-2"
disabled={loadingId === row.id}
variant="secondary"
>
{loadingId === row.id && (
<Icon
className="mr-2 animate-spin"
icon="lucide:loader-2"
/>
)}
</Button>
}
/>,
];
}
return [];
@@ -238,13 +275,13 @@ export default function Page() {
<img
alt="withdrawal"
className="h-10 w-10 cursor-zoom-in rounded border object-cover"
width={40} // 这里的数值根据你的 UI 设计调整
height={40}
height={40} // 这里的数值根据你的 UI 设计调整
onClick={() => {
const win = window.open();
win?.document.write(`<img src="${content}" />`);
}}
src={content}
width={40}
/>
);
}