修改价格套餐样式结构

This commit is contained in:
wuweihua
2026-09-14 11:53:11 +08:00
parent 4cc20386d9
commit e2f75afb27
16 changed files with 2348 additions and 1330 deletions
@@ -0,0 +1,214 @@
/**
* 套餐模块 · 表单弹窗统一样式
*
* 为什么是全局样式而不是 scoped:
* el-dialog 使用 append-to-body 把内容传送到 body,且 .el-dialog 元素由 Element Plus
* 内部组件渲染,外层组件的 scoped 属性不会落到它身上,:deep() 也匹配不到。
* 因此统一用 .ps-dialog 命名空间做全局覆盖,两个弹窗引用同一份,避免各写一套。
*
* 用法:<el-dialog class="ps-dialog" ...>,内容区可用下面的 ps-* 工具类。
*/
/* ============ 1. 弹窗外壳 ============ */
.ps-dialog {
border-radius: 10px;
overflow: hidden;
max-width: calc(100vw - 32px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
/* 头部:淡渐变 + 分隔线,标题收敛字号 */
.el-dialog__header {
margin: 0;
padding: 15px 20px;
background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
border-bottom: 1px solid #f0f2f5;
.el-dialog__title {
font-size: 15px;
font-weight: 600;
line-height: 1.5;
color: #1f2d3d;
}
}
.el-dialog__headerbtn {
top: 13px;
right: 14px;
width: 30px;
height: 30px;
border-radius: 6px;
transition: background-color 0.2s;
.el-dialog__close {
font-size: 16px;
color: #a8abb2;
}
&:hover {
background: #f2f3f5;
.el-dialog__close {
color: #303133;
}
}
}
/* 主体:超高可滚动,滚动条收窄避免抢视觉 */
.el-dialog__body {
padding: 20px;
max-height: 66vh;
overflow-y: auto;
color: #303133;
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #dcdfe6;
border-radius: 3px;
&:hover {
background: #c0c4cc;
}
}
&::-webkit-scrollbar-track {
background: transparent;
}
}
/* 底部:浅底 + 分隔线,按钮右对齐且等宽 */
.el-dialog__footer {
padding: 12px 20px;
text-align: right;
background: #fafbfc;
border-top: 1px solid #f0f2f5;
.el-button {
min-width: 84px;
& + .el-button {
margin-left: 8px;
}
}
}
/* ============ 2. 表单排布 ============ */
.el-form-item {
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
}
/* 两列布局下的行间距由 el-row 控制,去掉末项的额外留白 */
.el-row .el-form-item {
margin-bottom: 16px;
}
}
/* ============ 3. 内容区工具类 ============ */
/* 数值字段:输入框 + 右侧单位。单位放 label 里会因 label 宽度固定而换行截断 */
.ps-field {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
&__input {
flex: 1;
min-width: 0;
}
&__unit {
flex: none;
font-size: 12px;
line-height: 1.5;
color: #909399;
white-space: nowrap;
}
}
/* 字段下方补充说明,独占一行 */
.ps-hint {
flex: 1 0 100%;
width: 100%;
margin-top: 4px;
font-size: 12px;
line-height: 1.5;
color: #909399;
/* 不挂在表单控件后面时,作为独立段落使用 */
&--block {
flex: none;
margin-top: 0;
}
}
/* 只读信息条:客户代码 chip + 名称 */
.ps-readonly {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
min-height: 30px;
padding: 3px 10px;
font-size: 13px;
line-height: 1.5;
background: #f7f8fa;
border: 1px solid #eef0f3;
border-radius: 6px;
&__code {
flex: none;
padding: 0 6px;
font-family: Consolas, Monaco, monospace;
font-size: 12px;
color: #606266;
background: #fff;
border: 1px solid #e9e9eb;
border-radius: 4px;
}
&__name {
font-weight: 500;
color: #303133;
}
&--empty {
color: #c0c4cc;
.ps-readonly__name {
font-weight: 400;
color: #c0c4cc;
}
}
}
/* 只读附属信息块(如附加费清单) */
.ps-subbox {
width: 100%;
padding: 10px 12px;
background: #fafafa;
border: 1px solid #f0f0f0;
border-radius: 6px;
&__head {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
font-size: 12px;
font-weight: 600;
color: #606266;
}
&__count {
padding: 0 6px;
font-size: 11px;
font-weight: 500;
line-height: 16px;
color: #909399;
background: #f0f0f0;
border-radius: 8px;
}
}