diff --git a/components/CustomerManagement.vue b/components/CustomerManagement.vue index c501460..85e6ab7 100644 --- a/components/CustomerManagement.vue +++ b/components/CustomerManagement.vue @@ -266,12 +266,33 @@ const handleCall = (customer) => { // 处理更多 const handleMore = (customer) => { console.log('更多操作:', customer); - // 可以显示操作菜单 + // 显示操作菜单 uni.showActionSheet({ itemList: ['编辑客户', '删除客户', '查看详情'], success: (res) => { - console.log('选择了第' + (res.tapIndex + 1) + '个选项'); - // 根据选择执行相应操作 + if (res.tapIndex === 0) { + // 编辑客户 + uni.navigateTo({ + url: `/pages/customer/edit/index?id=${customer.id}` + }); + } else if (res.tapIndex === 1) { + // 删除客户 + uni.showModal({ + title: '确认删除', + content: `确定要删除客户"${customer.name}"吗?`, + success: (modalRes) => { + if (modalRes.confirm) { + // TODO: 实现删除客户API调用 + uni.$uv.toast('删除功能待实现'); + } + } + }); + } else if (res.tapIndex === 2) { + // 查看详情 + uni.navigateTo({ + url: `/pages/customer/detail/index?id=${customer.id}` + }); + } } }); };