fix: 桌面端编辑时客户名称显示UUID的问题

WorkPlans/MiniBusiness/KeyVisits/ManagerWorkspace 四个页面的
openEdit 均直接 spread item 到 form,未确保客户在 el-select
选项列表中。修复:编辑前检查并补充客户到 customers 列表。

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-12 13:45:06 +08:00
parent e6237590c0
commit dcb0b826de
4 changed files with 26 additions and 1 deletions
@@ -93,6 +93,9 @@ function openCreate() {
function openEdit(item: any) {
dialogMode.value = 'edit'
form.value = { ...item }
if (item.customer_id && item.customer_name && !customers.value.find((c: any) => c.id === item.customer_id)) {
customers.value.unshift({ id: item.customer_id, name: item.customer_name })
}
dialogVisible.value = true
}