diff --git a/src/components/table-header-tools/main.vue b/src/components/table-header-tools/main.vue new file mode 100644 index 0000000..8bfb63a --- /dev/null +++ b/src/components/table-header-tools/main.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/src/components/vehicle-attachment-table/main.vue b/src/components/vehicle-attachment-table/main.vue index f725c49..4ca1d88 100644 --- a/src/components/vehicle-attachment-table/main.vue +++ b/src/components/vehicle-attachment-table/main.vue @@ -9,18 +9,21 @@ - + @@ -308,16 +311,6 @@ export default { margin-bottom: 16px; } - &__file-name { - color: #409eff; - cursor: pointer; - } - - &__file-name:hover, - &__file-name:focus-visible { - text-decoration: underline; - } - &__upload { display: flex; justify-content: flex-start; diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index 7ec1472..56985dc 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -1003,7 +1003,7 @@ td.el-table-fixed-column--right { text-overflow: clip; } -// 全站统一:内容型长文本列(文件名 / 单号 / 备注等)单元格内也放了 el-link, +// 全站统一:内容型长文本列(文件名 / 单号 / 备注等)单元格内也放了 el-link / span.attachment-file-name, // 会被上面两条「含 el-link 的单元格」规则一并命中,导致: // ① 上面第 950 行的 display: flex 让链接成为 flex item,flex item 默认 min-width: auto 无法收缩, // 超长文本(如未规范命名的附件名)会直接把列撑破; @@ -1011,7 +1011,7 @@ td.el-table-fixed-column--right { // 因此对「内容列」做显式兜底:单元格自身恢复块级 + 省略号截断,链接参与收缩并显示省略号。 // 用法:在 上配置 class-name="is-ellipsis-link"(动态列可 :class-name 绑定)。 // 操作列不要加此类,否则会失去自动换行能力。 -.el-table .el-table__body .cell.is-ellipsis-link:has(.el-link) { +.el-table .el-table__body .cell.is-ellipsis-link { display: block; overflow: hidden; text-overflow: ellipsis; @@ -1034,6 +1034,33 @@ td.el-table-fixed-column--right { white-space: nowrap; } } + + .attachment-file-name { + display: inline-block; + min-width: 0; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; + } +} + +// 附件上传表格:文件名统一用 span,视觉与可点击行为对齐原 el-link primary +.attachment-file-name { + color: var(--el-color-primary, #409eff); + cursor: pointer; + + &:hover, + &:focus-visible { + text-decoration: underline; + } + + &.is-disabled { + color: var(--el-text-color-placeholder, #c0c4cc); + cursor: not-allowed; + text-decoration: none; + } } // 全站统一:Avue 内置行操作按钮(查看 / 编辑 / 删除 / 复制等)视觉对齐为 el-link 链接样式。 @@ -1294,6 +1321,6 @@ td.el-table-fixed-column--right { cursor: not-allowed; } } -.is-ellipsis-link{ +.is-ellipsis-link { overflow: hidden; } diff --git a/src/views/business/components/business-crud-page.vue b/src/views/business/components/business-crud-page.vue index 92b7702..077b574 100644 --- a/src/views/business/components/business-crud-page.vue +++ b/src/views/business/components/business-crud-page.vue @@ -2073,9 +2073,14 @@ class-name="is-ellipsis-link" > @@ -2344,14 +2349,16 @@
附件
- - {{ attachmentName(file) }} - + @keydown.enter="previewAttachment(file)" + @keydown.space.prevent="previewAttachment(file)" + >{{ attachmentName(file) }} -
@@ -2537,14 +2544,16 @@
附件
- - {{ file.originalName || file.name || '-' }} - + @keydown.enter="previewAttachment(file)" + @keydown.space.prevent="previewAttachment(file)" + >{{ file.originalName || file.name || '-' }} -
@@ -2826,11 +2835,21 @@ - + diff --git a/src/views/business/components/contract-attachment-section.vue b/src/views/business/components/contract-attachment-section.vue index f245546..bd3f02f 100644 --- a/src/views/business/components/contract-attachment-section.vue +++ b/src/views/business/components/contract-attachment-section.vue @@ -48,9 +48,14 @@ class-name="is-ellipsis-link" > diff --git a/src/views/business/components/master-order-detail.vue b/src/views/business/components/master-order-detail.vue index 5e43eb5..f881fc3 100644 --- a/src/views/business/components/master-order-detail.vue +++ b/src/views/business/components/master-order-detail.vue @@ -44,13 +44,16 @@
附件
-
@@ -330,7 +333,7 @@ export default { .transport-flow-tag { margin-left: 8px; } -.detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; margin: 0; padding: 0 24px 20px; dt { margin-bottom: 6px; color: #909399; font-size: 13px; } dd { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; color: #303133; font-size: 14px; word-break: break-all; } :deep(.el-link) { font-size: 14px; } } +.detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; margin: 0; padding: 0 24px 20px; dt { margin-bottom: 6px; color: #909399; font-size: 13px; } dd { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; color: #303133; font-size: 14px; word-break: break-all; } .attachment-file-name { font-size: 14px; max-width: 100%; } } .route-map { display: flex; align-items: flex-start; padding: 16px 24px 20px; border-top: 1px solid #eff1f7; overflow-x: auto; } .route-map__node { display: grid; flex: 0 0 150px; justify-items: center; gap: 6px; text-align: center; strong { font-size: 16px; white-space: nowrap; } small { color: #606266; white-space: nowrap; } } .route-map__progress { color: #303133 !important; } diff --git a/src/views/business/components/master-order-editor.vue b/src/views/business/components/master-order-editor.vue index ee62fc4..74ce647 100644 --- a/src/views/business/components/master-order-editor.vue +++ b/src/views/business/components/master-order-editor.vue @@ -269,9 +269,14 @@ class-name="is-ellipsis-link" >
diff --git a/src/views/business/components/shipping-template-page.vue b/src/views/business/components/shipping-template-page.vue index 9b799af..a2d2901 100644 --- a/src/views/business/components/shipping-template-page.vue +++ b/src/views/business/components/shipping-template-page.vue @@ -454,11 +454,20 @@ > - {{ attachmentName(row) }} - + diff --git a/src/views/business/components/transport-plan-page.vue b/src/views/business/components/transport-plan-page.vue index e6336a7..4d12b86 100644 --- a/src/views/business/components/transport-plan-page.vue +++ b/src/views/business/components/transport-plan-page.vue @@ -500,9 +500,14 @@ class-name="is-ellipsis-link" > @@ -679,14 +684,16 @@
附件
- - {{ attachmentName(file) }} - + @keydown.enter="previewAttachment(file)" + @keydown.space.prevent="previewAttachment(file)" + >{{ attachmentName(file) }} -
@@ -861,11 +868,21 @@ - + diff --git a/src/views/business/components/waybill-manage-page.vue b/src/views/business/components/waybill-manage-page.vue index 01834e1..5886577 100644 --- a/src/views/business/components/waybill-manage-page.vue +++ b/src/views/business/components/waybill-manage-page.vue @@ -1481,9 +1481,14 @@ class-name="is-ellipsis-link" > @@ -1864,14 +1869,16 @@
附件
- - {{ file.originalName || file.name || '-' }} - + @keydown.enter="previewAttachment(file)" + @keydown.space.prevent="previewAttachment(file)" + >{{ file.originalName || file.name || '-' }} -
diff --git a/src/views/business/contract-manage-change.vue b/src/views/business/contract-manage-change.vue index 08752b5..5507c25 100644 --- a/src/views/business/contract-manage-change.vue +++ b/src/views/business/contract-manage-change.vue @@ -106,6 +106,7 @@ placeholder="请输入" clearable @input="handleContractAmountInput" + @blur="formatContractAmountField" @clear="form.contractAmount = null" /> @@ -386,6 +387,19 @@ const normalizeOptionalAmount = value => { const number = Number(value); return Number.isFinite(number) && number >= 0 ? Number(number.toFixed(2)) : null; }; +const formatContractAmountInput = (value, emptyValue = null) => { + if ( + value === undefined || + value === null || + value === '' || + Number(value) === -1 || + String(value) === '-1' + ) { + return emptyValue; + } + const number = Number(value); + return Number.isFinite(number) && number >= 0 ? number.toFixed(2) : emptyValue; +}; const normalizeCustomPeriods = (periods = []) => @@ -541,6 +555,9 @@ export default { parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 2)}` : parts[0]; this.form.contractAmount = normalized === '' ? null : normalized; }, + formatContractAmountField() { + this.form.contractAmount = formatContractAmountInput(this.form.contractAmount); + }, loadDictionaries() { Promise.all([ getSystemDictionary({ code: 'currency_type' }), @@ -583,7 +600,7 @@ export default { copyCount: normalizeOptionalPositiveInteger(data.copyCount), invoiceCycle: normalizeOptionalPositiveInteger(data.invoiceCycle), paymentDays: normalizeOptionalPositiveInteger(data.paymentDays), - contractAmount: normalizeOptionalAmount(data.contractAmount), + contractAmount: formatContractAmountInput(data.contractAmount), templateFlag: data.templateFlag ?? 0, electronicSealFlag: data.electronicSealFlag ?? 0, archiveStatus: data.archiveStatus || '未归档', @@ -735,7 +752,14 @@ export default { .contract-basic-section > .dialog-section-title { margin-bottom: 20px; color: #303133; } .contract-basic-section__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; } .contract-basic-section__change-type { grid-column: 1 / -1; } -.contract-basic-section__remark { width: 100%; margin-bottom: 0 !important; } +.contract-basic-section__remark { + width: 100%; + margin-bottom: 24px !important; + + &:last-child { + margin-bottom: 0 !important; + } +} .contract-basic-section__date-range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 360px; max-width: 100%; } .contract-basic-section__date-range span { color: #606266; } .contract-basic-section__date-range :deep(.el-date-editor) { width: auto; min-width: 0; } diff --git a/src/views/business/contract-manage.vue b/src/views/business/contract-manage.vue index 1c81ff3..098377a 100644 --- a/src/views/business/contract-manage.vue +++ b/src/views/business/contract-manage.vue @@ -525,6 +525,7 @@ placeholder="请输入" clearable @input="handleContractAmountInput" + @blur="formatContractAmountField" @clear="form.contractAmount = null" /> @@ -1098,6 +1099,19 @@ const normalizeOptionalAmount = (value, emptyValue = null) => { const number = Number(value); return Number.isFinite(number) && number >= 0 ? Number(number.toFixed(2)) : emptyValue; }; +const formatContractAmountInput = (value, emptyValue = null) => { + if ( + value === undefined || + value === null || + value === '' || + Number(value) === -1 || + String(value) === '-1' + ) { + return emptyValue; + } + const number = Number(value); + return Number.isFinite(number) && number >= 0 ? number.toFixed(2) : emptyValue; +}; const normalizeProjectValue = value => { if (value === undefined || value === null || value === '' || String(value) === '-1') return ''; return value; @@ -1794,7 +1808,7 @@ export default { copyCount: normalizeOptionalInteger(detail.copyCount, ''), invoiceCycle: normalizeOptionalInteger(detail.invoiceCycle, ''), paymentDays: normalizeOptionalInteger(detail.paymentDays, ''), - contractAmount: normalizeOptionalAmount(detail.contractAmount, null), + contractAmount: formatContractAmountInput(detail.contractAmount, null), archiveStatus: detail.archiveStatus || '未归档', feeGenerationMode: detail.feeGenerationMode || (Number(detail.billingEnabled) === 0 ? 'manual' : 'system'), @@ -2356,6 +2370,9 @@ export default { parts.length > 1 ? `${parts[0]}.${parts.slice(1).join('').slice(0, 2)}` : parts[0]; this.form.contractAmount = normalized === '' ? null : normalized; }, + formatContractAmountField() { + this.form.contractAmount = formatContractAmountInput(this.form.contractAmount, null); + }, positiveIntegerInput(prop, value) { const normalized = String(value || '').replace(/\D/g, '').replace(/^0+/, ''); this.form[prop] = normalized; @@ -2929,13 +2946,8 @@ export default { detailValue(prop) { const value = this.detailRow[prop]; if (prop === 'contractAmount') { - return value === undefined || - value === null || - value === '' || - Number(value) === -1 || - String(value) === '-1' - ? '-' - : value; + const amountText = formatContractAmountInput(value, ''); + return amountText === '' ? '-' : amountText; } if ( prop === 'contractStage' || @@ -3248,7 +3260,11 @@ export default { &__remark { width: 100%; - margin-bottom: 0 !important; + margin-bottom: 24px !important; + + &:last-child { + margin-bottom: 0 !important; + } } &__date-range { diff --git a/src/views/business/loading-manage.vue b/src/views/business/loading-manage.vue index 9a79744..b3973e1 100644 --- a/src/views/business/loading-manage.vue +++ b/src/views/business/loading-manage.vue @@ -1,6 +1,6 @@