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:
@@ -104,6 +104,9 @@ function openCreate(type: string) {
|
||||
function openEdit(type: string, item: any) {
|
||||
dialogMode.value = 'edit'; dialogType.value = type
|
||||
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 })
|
||||
}
|
||||
dialogTimeRange.value = null
|
||||
if ((type === 'visit' || type === 'note') && item.time_range && item.time_range.includes('-')) {
|
||||
const parts = item.time_range.split('-')
|
||||
|
||||
Reference in New Issue
Block a user