修改附加费
This commit is contained in:
@@ -5,38 +5,49 @@
|
||||
placement="top"
|
||||
:width="380"
|
||||
trigger="hover"
|
||||
:hide-after="120"
|
||||
>
|
||||
<template #default>
|
||||
<div class="sc-count__pop-title">已纳入 {{ list.length }} 项附加费</div>
|
||||
<surcharge-tags :list="list" :popover="false" empty-text="-" />
|
||||
<div class="sc-count__tags">
|
||||
<el-tag
|
||||
v-for="s in list"
|
||||
:key="s.relId || s.scId || s.scName"
|
||||
size="small"
|
||||
type="danger"
|
||||
effect="plain"
|
||||
closable
|
||||
@click.stop
|
||||
@close="onRemove(s)"
|
||||
>{{ surchargeTagLabel(s) }}</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template #reference>
|
||||
<el-link type="primary" :underline="false" @click="emit('click')">
|
||||
{{ list.length }} 项
|
||||
</el-link>
|
||||
<span class="sc-count__text">{{ list.length }} 项</span>
|
||||
</template>
|
||||
</el-popover>
|
||||
<el-link v-else type="info" :underline="false" @click="emit('click')">0</el-link>
|
||||
<span v-else class="sc-count__text is-empty">0</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="SurchargeCountCell">
|
||||
/**
|
||||
* 套餐 · 附加费数量单元格(新建第 3 步产品列表 / 价格编辑抽屉共用)
|
||||
*
|
||||
* 显示当前数量(默认 0);hover 气泡看具体是哪几项,点击进入勾选弹窗调整。
|
||||
* Hover shows included surcharges; closable tag removes one item from the row.
|
||||
*/
|
||||
import SurchargeTags from '../SurchargeTags.vue'
|
||||
import { surchargeTagLabel } from '../../utils/priceSet'
|
||||
|
||||
defineProps({
|
||||
/** 该行 / 该产品当前纳入的附加费列表 */
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['click'])
|
||||
const emit = defineEmits(['remove'])
|
||||
|
||||
function onRemove(s) {
|
||||
emit('remove', s)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -45,10 +56,23 @@ const emit = defineEmits(['click'])
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
.sc-count__text {
|
||||
color: var(--el-color-primary);
|
||||
cursor: default;
|
||||
font-size: 13px;
|
||||
}
|
||||
.sc-count__text.is-empty {
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
.sc-count__pop-title {
|
||||
margin-bottom: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
}
|
||||
.sc-count__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user