增加工单关闭按钮
This commit is contained in:
@@ -191,6 +191,43 @@ export default function Page() {
|
|||||||
</Button>
|
</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 [];
|
return [];
|
||||||
@@ -238,13 +275,13 @@ export default function Page() {
|
|||||||
<img
|
<img
|
||||||
alt="withdrawal"
|
alt="withdrawal"
|
||||||
className="h-10 w-10 cursor-zoom-in rounded border object-cover"
|
className="h-10 w-10 cursor-zoom-in rounded border object-cover"
|
||||||
width={40} // 这里的数值根据你的 UI 设计调整
|
height={40} // 这里的数值根据你的 UI 设计调整
|
||||||
height={40}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const win = window.open();
|
const win = window.open();
|
||||||
win?.document.write(`<img src="${content}" />`);
|
win?.document.write(`<img src="${content}" />`);
|
||||||
}}
|
}}
|
||||||
src={content}
|
src={content}
|
||||||
|
width={40}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user