Commit cf7989c0 by 李伟康

fix(components): 去除重复区域并设置默认性别

- 在 City.vue 组件中添加去重逻辑,确保区域列表不包含重复项
- 为 CreateOrder.vue 中的车主性别字段设置默认值"男"
- 自动填充收款人信息到表单对应单元格中
1 parent 6c473958
......@@ -137,9 +137,12 @@ export default {
districts.push(d)
}
})
const uniqueDistricts = districts.filter((item, index, self) =>
index === self.findIndex(obj => obj.name === item.name)
)
return {
letter: c,
list: districts
list: uniqueDistricts
}
})
list.push(i)
......
......@@ -240,6 +240,7 @@ export default {
return item
}
)
if (!owner.ownerGender) owner.ownerGender = '男'
if (owner.carSeriesId) {
orderObj.carInfo = {
carBrand: owner.carBrand,
......@@ -357,6 +358,9 @@ export default {
if (owner[key] != null) orderObj[key] = owner[key]
})
if (owner.id) orderObj.ownerId = owner.id
let payeeCell = this.formList[4].find(item => item.value === 'payee')
if (payeeCell) payeeCell.current = orderObj.payee
this.orderObj = orderObj
this.getConfig()
setTimeout(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!