style(settlement): 优化表格列居中及单据号列固定,调整审批状态展示
- payable-detail 单据号列新增固定左侧配置,保障滚动时可见 - receivable-payable-detail 组件表格动态列透传 fixed 属性 - project-apply 列表所有列单元格及表头居中显示,审批状态列改为纯文字 - 全站表格列(含操作列按钮)全局居中,样式统一覆盖 el-table 组件 - 修复 AVUE 依赖表单 label 冒号默认显示,pnpm patch 修改 es 与 lib 版本同步 - 解决 Vite optimizeDeps 缓存问题,patch 依赖后需删除 vite 缓存并重启 dev server - railway-station 弹窗表单全局 labelSuffix 设为空,去除 label 后冒号
This commit is contained in:
@@ -27,7 +27,7 @@ export const searchFields = [
|
||||
];
|
||||
|
||||
export const tableColumns = [
|
||||
{ label: '单据号', prop: 'documentNo', minWidth: 180, link: true },
|
||||
{ label: '单据号', prop: 'documentNo', minWidth: 180, link: true, fixed: 'left' },
|
||||
{ label: '项目名称', prop: 'projectName', minWidth: 120 },
|
||||
{ label: '所属组织', prop: 'deptName', minWidth: 120 },
|
||||
{ label: '费用日期', prop: 'feeDate', minWidth: 120 },
|
||||
|
||||
@@ -651,6 +651,12 @@
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
|
||||
// 全站统一:表格列内容(表头 + 单元格)居中展示
|
||||
.el-table th.el-table__cell .cell,
|
||||
.el-table td.el-table__cell .cell {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// 统一 avue-crud 偶数行背景色
|
||||
.avue-crud .el-table__body-wrapper tr.el-table__row:nth-child(even) td.el-table__cell,
|
||||
.avue-crud .el-table__body-wrapper tr.el-table__row:nth-child(even) td.el-table-fixed-column--left,
|
||||
@@ -866,9 +872,9 @@
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
justify-content: center;
|
||||
width: 100% !important;
|
||||
text-align: left;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// 全站统一:手写表格操作列中的文字链接保持间距并支持自动换行
|
||||
|
||||
@@ -205,6 +205,7 @@ export default {
|
||||
dialogCustomClass: 'railway-station-edit-dialog',
|
||||
labelPosition: 'right',
|
||||
labelWidth: '140px',
|
||||
labelSuffix: '',
|
||||
tip: false,
|
||||
searchShow: true,
|
||||
searchMenuSpan: 24,
|
||||
|
||||
@@ -55,9 +55,7 @@
|
||||
</template>
|
||||
|
||||
<template #approvalStatus="{ row }">
|
||||
<el-tag :type="statusTagType(row.approvalStatus)">
|
||||
{{ displayStatus(row, 'approvalStatus') }}
|
||||
</el-tag>
|
||||
{{ displayStatus(row, 'approvalStatus') }}
|
||||
</template>
|
||||
|
||||
<template #menu="{ row, index }">
|
||||
@@ -1074,7 +1072,12 @@ export default {
|
||||
delBtn: false,
|
||||
// 操作列收窄:本项目操作按钮较少,320px 过宽,调整为 220px(链接会自动换行兜底)
|
||||
menuWidth: 180,
|
||||
column: (option.column || []).map(column => ({ ...column, display: false })),
|
||||
column: (option.column || []).map(column => ({
|
||||
...column,
|
||||
display: false,
|
||||
align: 'center',
|
||||
headerAlign: 'center',
|
||||
})),
|
||||
};
|
||||
},
|
||||
hasPermission(code) {
|
||||
@@ -1140,25 +1143,6 @@ export default {
|
||||
const item = column && (column.dicData || []).find(dic => dic.value === row[prop]);
|
||||
return item ? item.label : row[prop] || '未知';
|
||||
},
|
||||
statusTagType(status) {
|
||||
if (
|
||||
[
|
||||
1,
|
||||
'pending',
|
||||
'waiting_dispatch',
|
||||
'processing',
|
||||
'dispatching',
|
||||
'approved',
|
||||
'change_approved',
|
||||
].includes(status)
|
||||
) {
|
||||
return 'success';
|
||||
}
|
||||
if ([2, 'cancelled', 'withdrawn', 'draft'].includes(status)) return 'info';
|
||||
if (['rejected', 'change_rejected'].includes(status)) return 'danger';
|
||||
if (status === 'completed') return 'primary';
|
||||
return 'warning';
|
||||
},
|
||||
onLoad(page, params = {}) {
|
||||
this.loading = true;
|
||||
this.api
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
:label="column.label"
|
||||
:min-width="column.minWidth"
|
||||
:align="column.align || 'center'"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
|
||||
Reference in New Issue
Block a user