📖 CRM:【客户】微调客户列表界面

This commit is contained in:
YunaiV
2024-01-03 19:38:55 +08:00
parent 7448f6e08c
commit 4fbb3b88e6
5 changed files with 36 additions and 5 deletions

View File

@ -75,7 +75,7 @@ defineOptions({ name: 'CrmBusinessList' })
const props = defineProps<{
bizType: number // 业务类型
bizId: number // 业务编号
customerId: number // 关联联系人与商机时,需要传入 customerId 进行筛选
customerId?: number // 关联联系人与商机时,需要传入 customerId 进行筛选
}>()
const loading = ref(true) // 列表的加载中

View File

@ -11,11 +11,19 @@
</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 @click="transfer">转移</el-button>
<!-- TODO @puhui999转移的操作接入 -->
<el-button type="primary" @click="transfer">转移</el-button>
<!-- TODO @puhui999修改成交状态的接入 -->
<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>
@ -49,6 +57,7 @@ const { customer, loading } = defineProps<{
customer: CustomerApi.CustomerVO // 客户信息
loading: boolean // 加载中
}>()
const message = useMessage() // 消息弹窗
/** 修改操作 */
const formRef = ref()
@ -56,5 +65,20 @@ const openForm = (id?: number) => {
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 事件,用于操作成功后的回调
</script>

View File

@ -17,6 +17,7 @@
/>
</el-select>
</el-form-item>
<!-- TODO @puhui999编辑时level 没带过来 -->
<el-form-item label="权限级别" prop="level">
<el-radio-group v-model="formData.level">
<template

View File

@ -24,6 +24,7 @@
:stripe="true"
@selection-change="handleSelectionChange"
>
<!-- TODO @puhui999负责人不允许选中 -->
<el-table-column type="selection" width="55" />
<el-table-column align="center" label="姓名" prop="nickname" />
<el-table-column align="center" label="部门" prop="deptName" />