客户列表页功能跳转

This commit is contained in:
WindowBird 2025-11-08 15:29:40 +08:00
parent 954ef47dd7
commit dd0ad2b34d

View File

@ -266,12 +266,33 @@ const handleCall = (customer) => {
// //
const handleMore = (customer) => { const handleMore = (customer) => {
console.log('更多操作:', customer); console.log('更多操作:', customer);
// //
uni.showActionSheet({ uni.showActionSheet({
itemList: ['编辑客户', '删除客户', '查看详情'], itemList: ['编辑客户', '删除客户', '查看详情'],
success: (res) => { 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}`
});
}
} }
}); });
}; };