📖 CRM:【客户】微调客户列表界面
parent
7448f6e08c
commit
4fbb3b88e6
|
@ -59,7 +59,7 @@ export const deleteCustomer = async (id: number) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出客户 Excel
|
// 导出客户 Excel
|
||||||
export const exportCustomer = async (params) => {
|
export const exportCustomer = async (params: any) => {
|
||||||
return await request.download({ url: `/crm/customer/export-excel`, params })
|
return await request.download({ url: `/crm/customer/export-excel`, params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,11 @@ export const queryAllList = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询客户操作日志
|
// 查询客户操作日志
|
||||||
export const getOperateLogPage = async (params) => {
|
export const getOperateLogPage = async (params: any) => {
|
||||||
return await request.get({ url: '/crm/customer/operate-log-page', params })
|
return await request.get({ url: '/crm/customer/operate-log-page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 锁定/解锁客户
|
||||||
|
export const lockCustomer = async (id: number, lockStatus: boolean) => {
|
||||||
|
return await request.put({ url: `/crm/customer/lock`, data: { id, lockStatus } })
|
||||||
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ defineOptions({ name: 'CrmBusinessList' })
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
bizType: number // 业务类型
|
bizType: number // 业务类型
|
||||||
bizId: number // 业务编号
|
bizId: number // 业务编号
|
||||||
customerId: number // 关联联系人与商机时,需要传入 customerId 进行筛选
|
customerId?: number // 关联联系人与商机时,需要传入 customerId 进行筛选
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
|
|
|
@ -11,11 +11,19 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<!-- 右上:按钮 -->
|
<!-- 右上:按钮 -->
|
||||||
<el-button v-hasPermi="['crm:customer:update']" @click="openForm(customer.id)">
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-hasPermi="['crm:customer:update']"
|
||||||
|
@click="openForm(customer.id)"
|
||||||
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="transfer">转移</el-button>
|
<!-- TODO @puhui999:转移的操作接入 -->
|
||||||
|
<el-button type="primary" @click="transfer">转移</el-button>
|
||||||
|
<!-- TODO @puhui999:修改成交状态的接入 -->
|
||||||
<el-button>更改成交状态</el-button>
|
<el-button>更改成交状态</el-button>
|
||||||
|
<el-button v-if="customer.lockStatus" @click="handleUnlock(customer.id!)">解锁</el-button>
|
||||||
|
<el-button v-else @click="handleLock(customer.id!)">锁定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -49,6 +57,7 @@ const { customer, loading } = defineProps<{
|
||||||
customer: CustomerApi.CustomerVO // 客户信息
|
customer: CustomerApi.CustomerVO // 客户信息
|
||||||
loading: boolean // 加载中
|
loading: boolean // 加载中
|
||||||
}>()
|
}>()
|
||||||
|
const message = useMessage() // 消息弹窗
|
||||||
|
|
||||||
/** 修改操作 */
|
/** 修改操作 */
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
@ -56,5 +65,20 @@ const openForm = (id?: number) => {
|
||||||
formRef.value.open('update', id)
|
formRef.value.open('update', id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 锁定操作 */
|
||||||
|
const handleLock = async (id: number) => {
|
||||||
|
await CustomerApi.lockCustomer(id, true)
|
||||||
|
message.success('锁定成功')
|
||||||
|
emit('refresh')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 解锁操作 */
|
||||||
|
const handleUnlock = async (id: number) => {
|
||||||
|
console.log(customer, '=======')
|
||||||
|
await CustomerApi.lockCustomer(id, false)
|
||||||
|
message.success('解锁成功')
|
||||||
|
emit('refresh')
|
||||||
|
}
|
||||||
|
|
||||||
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['refresh']) // 定义 success 事件,用于操作成功后的回调
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- TODO @puhui999:编辑时,level 没带过来 -->
|
||||||
<el-form-item label="权限级别" prop="level">
|
<el-form-item label="权限级别" prop="level">
|
||||||
<el-radio-group v-model="formData.level">
|
<el-radio-group v-model="formData.level">
|
||||||
<template
|
<template
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
|
<!-- TODO @puhui999:负责人不允许选中 -->
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column align="center" label="姓名" prop="nickname" />
|
<el-table-column align="center" label="姓名" prop="nickname" />
|
||||||
<el-table-column align="center" label="部门" prop="deptName" />
|
<el-table-column align="center" label="部门" prop="deptName" />
|
||||||
|
|
Loading…
Reference in New Issue