90 lines
2.0 KiB
Vue
90 lines
2.0 KiB
Vue
<template>
|
|
<div class="set-header">
|
|
<div class="hd-main">
|
|
<div class="hd-line">
|
|
<h2 class="hd-name">{{ set.priceSetName || '套餐详情' }}</h2>
|
|
<span v-if="set.priceSetCode" class="hd-code">{{ set.priceSetCode }}</span>
|
|
</div>
|
|
<div class="hd-line hd-meta">
|
|
<el-tag :type="isFixedType(set.setType) ? 'warning' : 'primary'" size="small" effect="plain">
|
|
{{ setTypeLabel(set.setType) }}
|
|
</el-tag>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="hd-actions">
|
|
<el-button @click="emit('back')">返回列表</el-button>
|
|
<el-button
|
|
v-if="set.status === 'E' && !set.expired"
|
|
type="danger"
|
|
plain
|
|
@click="emit('disable')"
|
|
v-hasPermi="['price:set:audit']"
|
|
>停用</el-button>
|
|
<el-button
|
|
v-else-if="set.status === 'S'"
|
|
type="primary"
|
|
plain
|
|
@click="emit('copy')"
|
|
v-hasPermi="['price:set:add']"
|
|
>复用新建</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup name="SetDetailHeader">
|
|
import { isFixedType, setTypeLabel } from '../../utils/priceSet'
|
|
|
|
defineProps({
|
|
set: { type: Object, required: true }
|
|
})
|
|
|
|
const emit = defineEmits(['back', 'disable', 'copy'])
|
|
</script>
|
|
|
|
<style scoped>
|
|
.set-header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
padding: 16px 20px;
|
|
margin-bottom: 16px;
|
|
background: #fff;
|
|
border: 1px solid #ebeef5;
|
|
border-left: 3px solid #1890ff;
|
|
border-radius: 8px;
|
|
}
|
|
.hd-main { min-width: 0; }
|
|
.hd-line {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.hd-name {
|
|
margin: 0;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #303133;
|
|
line-height: 1.4;
|
|
}
|
|
.hd-code {
|
|
font-family: Consolas, Monaco, monospace;
|
|
font-size: 12px;
|
|
color: #606266;
|
|
background: #f4f4f5;
|
|
border: 1px solid #e9e9eb;
|
|
border-radius: 4px;
|
|
padding: 1px 8px;
|
|
}
|
|
.hd-meta { margin-top: 10px; }
|
|
.hd-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
</style>
|