更新各项内容
This commit is contained in:
@@ -128,7 +128,6 @@
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" size="small" @click="handleClaim([row])">领取</el-button>
|
||||
<el-button link type="primary" size="small" @click="openAssign([row])">分配</el-button>
|
||||
<el-button link type="warning" size="small" @click="handleRemove([row])">移出公海</el-button>
|
||||
<el-button link type="danger" size="small" @click="handleDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -233,7 +232,6 @@ import {
|
||||
getPoolList,
|
||||
claimPoolCustomer,
|
||||
assignPoolCustomer,
|
||||
removeFromPool,
|
||||
deleteCrmCustomer,
|
||||
} from "@/api/crm";
|
||||
import { getAllUsers } from "@/api/user";
|
||||
@@ -391,9 +389,11 @@ async function submitAssign() {
|
||||
}
|
||||
assignSubmitting.value = true;
|
||||
try {
|
||||
const user = userOptions.value.find((u) => u.id === assignUserId.value);
|
||||
await assignPoolCustomer({
|
||||
ids: assignTargets.value.map((item) => item.id),
|
||||
owner_user_id: assignUserId.value,
|
||||
owner_user_name: user?.name || "",
|
||||
});
|
||||
ElMessage.success("分配成功");
|
||||
assignVisible.value = false;
|
||||
@@ -406,26 +406,7 @@ async function submitAssign() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------- 移出 / 删除 ---------------------------- */
|
||||
async function handleRemove(rows) {
|
||||
if (!rows.length) return;
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定将选中的 ${rows.length} 个客户移出公海吗?`,
|
||||
"移出公海",
|
||||
{ type: "warning" }
|
||||
);
|
||||
await removeFromPool({ ids: rows.map((item) => item.id) });
|
||||
ElMessage.success("已移出公海");
|
||||
multipleSelection.value = [];
|
||||
fetchList();
|
||||
} catch (e) {
|
||||
if (e !== "cancel") {
|
||||
ElMessage.error(e.message || "操作失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------- 删除 -------------------------------- */
|
||||
async function handleDelete(row) {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
|
||||
Reference in New Issue
Block a user