88c5f58548
- 独立表单页 shipping-template 中关闭按钮从 #menu-form 移动至 #menu-form-before 插槽 - 关闭按钮置于运费合计与保存草稿按钮之间,保证“次要→主操作”顺序一致 - 关闭按钮仅在独立表单页显示,弹窗模式保持原有顺序不变 - 清理了 #menu-form 槽中残留代码,避免影响渲染 - 修改 Element Plus 相关禁用输入框文字颜色,统一为 #909399,覆盖默认主题差异
5.5 KiB
5.5 KiB
项目长期记忆(tms-erp-web-ws / Saber3 客商模块)
设计约定(已确认)
弹窗分组:统一用全局 <section-card>
- 弹窗 body 背景由
src/styles/element-ui.scss全局.el-dialog__body { background:#f5f6fa; padding:16px }统一灰底。 - 每组 = 白底卡片:4px 主色竖条 + 8px 间距 + 圆角 6px + 淡阴影。组件全局注册
<section-card title="...">,支持#title/#extraslot。 - 仅 3 项的小分组用
el-col :span="8"均分一行。
Avue 内置弹窗用 section-card:dialogCustomClass 透明化 avue-form
- option 顶层加
dialogCustomClass:'xxx-dialog',再在element-ui.scss写三条:.xxx-dialog .avue-form { background:transparent; box-shadow:none; padding:0 }.xxx-dialog .avue-form__group > .el-col > .el-form-item { margin-bottom:0 }.xxx-dialog .avue-dialog__footer, .avue-crud__dialog .xxx-dialog .avue-dialog__footer { margin-top:0 !important }
弹窗底部操作栏浮动(全局 CSS)
.el-dialog__body { max-height:calc(100vh - 200px); overflow-y:auto; overflow-x:hidden }.el-dialog__footer { margin:0; padding:12px 20px; background:#fff; border-top:1px solid #ebeef5; box-shadow:0 -2px 8px rgba(0,0,0,.04) }- Avue 内置弹窗 footer 真实 class 是
.avue-dialog__footer,须position:sticky; bottom:0; flex:none; background:#fff贴底。
上传证件区域尺寸(transportCapacity)
- 身份证/行驶证/道路运输证等固定 240×151px(1.586:1)。
- scoped 覆盖
.xxx-uploader--large { width:240px }与--large .el-upload { width:100%; height:151px }。
上传图片点击放大预览
src/components/image-upload-field/main.vue用<el-image preview-src-list fit="contain" preview-teleported :z-index="3000" @click.stop>,阻止冒泡到 el-upload。
独立表单页标题 archive-page-form__title
- 样式全局化到
src/styles/element-ui.scss:18px/600/#303133 + margin-bottom:20px + 4px 主色竖条 + 8px 间距。 - business-crud-page 系列通过
formPageTitleprop 注入;loading-manage / master-order 手写前置标题。
表格列内嵌输入控件全宽
element-ui.scss全局兜底:.el-table .el-table__body td.el-table__cell .cell > .el-input-number/.el-input/.el-select/.el-date-editor/.el-cascader { width:100% }。
业务状态标签文字化
- 全站"状态语义"的
el-tag加class="status-text",转为普通文字,不带颜色/背景/边框/圆点。 - 实现:
element-ui.scss末尾.el-tag.status-text { ... }。
弹窗 / 独立表单页底栏按钮统一规则
- 排序:从左到右按次→主排(次要居左、主操作居右),主操作永远放最后。
- 顺序模板:
[可选辅助工具(如同步/导入)][返回/取消][保存草稿][提交/确认]
- 顺序模板:
- 容器布局:
display:flex; justify-content:flex-end; gap:12px;。弹窗关闭按钮继承 Element Plus 自带.el-dialog__footer全局规则(见上条),独立页用.archive-form__footer配.archive-page-form & { position:fixed; right:0; left:230px; bottom:0; z-index:10; margin:0; padding:12px 24px; border-top:1px solid #eff1f7; background:#fff; box-shadow:0 -2px 8px rgba(0,0,0,.06); }。 - 颜色层级 3 档:
语义 type 备注 次要(返回 / 取消 / 关闭) 不写 type(默认) 灰描边 中间步骤(保存草稿 / 按匹配结果更新) type="primary" plain蓝描边 主操作(提交 / 完成对账 / 复评确认) type="primary"蓝实心 - 禁区:
- 保存草稿和主操作不允许同为
type="primary",否则两个蓝实心无视觉层级。 - 主操作禁止用
type="success"(绿)。全站统一深蓝实心。
- 保存草稿和主操作不允许同为
- 生效页面:
business/project-apply.vue(footer + 变更 footer)payment/invoice-receipt-form.vue、payment/invoice-application-form.vuevehicle/customer-archive.vue全部 5 处 footer(archive-form__footer主表单页 +contact-dialog/receipt-dialog/invoice-dialog子弹窗 +score-detail-dialog含总分合计)business/components/business-crud-page.vue的 PageAvueForm 独立表单页(#menu-form-beforeslot 新增关闭按钮,紧跟运费合计、置于保存草稿之前;shipping-template 模式验证通过)
- 已合规未动:
settlement/components/pre-settlement-editor.vue、settlement/components/transport-reconciliation-editor.vue、business/temporary-credit-limit.vue。 - Avue-form footer 结构注意:
#menu-form-beforeslot 内容在 Avue 内置按钮之左;#menu-formslot 在 Avue 内置按钮之右。要实现[次要][Avue 主操作]顺序,把次要按钮放进#menu-form-before,主操作保留 Avue 内置即可。 - 复杂 footer 例外:当 footer 需要在按钮组左侧展示「总分合计 / 数量统计」等聚合信息时,块用
flex:1推自己到最左,按钮组按上述规则排在右半边(参考score-detail-dialog)。
关键文件
src/components/section-card/main.vuesrc/styles/element-ui.scsssrc/views/vehicle/customer-archive.vuesrc/views/transportCapacity/{driver,vehicle,ship}.vuesrc/views/business/project-apply.vue
环境注意
- Vite 代理跨域:
axios.withCredentials=true,改.env/vite.config.mjs须重启 dev。
business-crud-page 复用模式
- option 由 prop
crudOption经cloneOption克隆。 - 独立表单页走
PageAvueForm,不包 el-dialog。 - 自定义详情弹窗:
config.detailButton=true+detailSections:[{title, fields}]。