feat: 客户管理添加地区级联选择

This commit is contained in:
caiyuchao
2025-05-24 10:30:12 +08:00
parent 57555772d1
commit ee36fe339d
3 changed files with 30 additions and 24 deletions

View File

@@ -46,7 +46,11 @@ const [Modal, modalApi] = useVbenModal({
}
modalApi.lock();
// 提交表单
const data = (await formApi.getValues()) as CustomerApi.Customer;
const values = await formApi.getValues();
const data = {
...values,
areaId: values?.areaIds[values?.areaIds.length - 1],
} as CustomerApi.Customer;
try {
await (formData.value?.id ? updateCustomer(data) : createCustomer(data));
// 关闭并提示