feat(客户信息): 增强地址显示功能并修复文档格式
添加地址格式化工具函数,支持标准地址和自定义地址的组合显示 修复行政区划代码文档中的多余冒号
This commit is contained in:
@@ -16,11 +16,15 @@
|
||||
<el-descriptions-item label="客户等级">
|
||||
<dict-tag :value="customer.customerLevel" :options="dict.type.customer_level"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="客户地址" v-hasPermi="['crm:customer:address']">{{ customer.address || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="客户地址" v-hasPermi="['crm:customer:address']">
|
||||
{{ formattedAddress || '-' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatAreaTextEnhanced } from '@/components/ChinaAreaSelect/index.js'
|
||||
|
||||
export default {
|
||||
name: 'CustomerDetail',
|
||||
props: {
|
||||
@@ -36,6 +40,12 @@ export default {
|
||||
required: true,
|
||||
default: () => ({ type: {} })
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
formattedAddress() {
|
||||
const address = formatAreaTextEnhanced(this.customer.address || '-')
|
||||
return address.standard + ' (' + address.custom + ')'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user