feat:【全局】简化 handleStatusChange 类型逻辑的写法!

This commit is contained in:
YunaiV
2025-10-26 20:25:52 +08:00
parent 94e9d9a228
commit e30c2c5412
18 changed files with 81 additions and 143 deletions

View File

@@ -89,13 +89,11 @@ async function handleTransform(): Promise<boolean | undefined> {
content: '确定将该线索转化为客户吗?',
})
.then(async () => {
const res = await transformClue(clueId.value);
if (res) {
message.success('转化客户成功');
resolve(true);
} else {
reject(new Error('转化失败'));
}
// 转化为客户
await transformClue(clueId.value);
// 提示并返回成功
message.success('转化客户成功');
resolve(true);
})
.catch(() => {
reject(new Error('取消操作'));