Commit 0f6577a6 by Lin

feat(customerPages):根据 carSeries 数据更新 carChildsBrand 字段

- 在 detailFiles.vue 中添加逻辑,分别从 carSeriesId 和 carSeriesName 获取 carChildsBrandId 和 carChildsBrandName,提升数据一致性。
1 parent 2d017eb1
...@@ -715,6 +715,8 @@ export default { ...@@ -715,6 +715,8 @@ export default {
if (res.deliveryDate) res.deliveryDate = dayjs(res.deliveryDate).format("YYYY-MM-DD") if (res.deliveryDate) res.deliveryDate = dayjs(res.deliveryDate).format("YYYY-MM-DD")
if (res.createdDate) res.createdDate = dayjs(res.createdDate).format("YYYY-MM-DD") if (res.createdDate) res.createdDate = dayjs(res.createdDate).format("YYYY-MM-DD")
if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD") if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD")
if (res.carChildsBrandId) res.carChildsBrandId = res.carSeriesId
if (res.carChildsBrandName) res.carChildsBrandName = res.carSeriesName
// 合并而非整对象替换,保留 initForm 中已声明的响应式字段(如 contact_name) // 合并而非整对象替换,保留 initForm 中已声明的响应式字段(如 contact_name)
Object.assign(this.customerInfo, res) Object.assign(this.customerInfo, res)
if (this.customerInfo.customerSex != null && this.customerInfo.customerSex !== '') { if (this.customerInfo.customerSex != null && this.customerInfo.customerSex !== '') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!