Files
BMS/bms-front/src/views/price/set/components/detail/SetCustomerTable.vue
T
2026-09-16 17:14:19 +08:00

53 lines
1.5 KiB
Vue

<template>
<set-section-card
title="绑定客户"
tone="green"
:count="customers.length"
sub="一个客户只能绑定一个套餐"
>
<el-table :data="customers" border class="customer-table" empty-text="暂未绑定客户">
<el-table-column label="客户代码" prop="customerCode" min-width="140" show-overflow-tooltip>
<template #default="{ row }">
<span class="c-code">{{ row.customerCode }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称" prop="customerName" min-width="160" show-overflow-tooltip />
<el-table-column label="优先级" width="130" align="center">
<template #default="{ row }">
<el-tag v-if="row.bindPriority === 1" size="small" type="success" effect="light">最高</el-tag>
<span v-else class="priority">{{ row.bindPriority }}</span>
</template>
</el-table-column>
</el-table>
</set-section-card>
</template>
<script setup name="SetCustomerTable">
import SetSectionCard from './SetSectionCard.vue'
const props = defineProps({
set: { type: Object, required: true }
})
const customers = computed(() => props.set.customers || [])
</script>
<style scoped>
.customer-table {
border-radius: 6px;
}
.customer-table :deep(th.el-table__cell) {
background: #fafbfc;
color: #606266;
font-weight: 600;
}
.c-code {
font-family: Consolas, Monaco, monospace;
font-size: 12px;
color: #606266;
}
.priority {
color: #303133;
}
</style>