From f718707e6839bbdb0783a970e0684f455043968f Mon Sep 17 00:00:00 2001 From: qiankanghui Date: Mon, 26 Oct 2026 17:09:09 +0800 Subject: [PATCH] =?UTF-8?q?```=20refactor(inspection):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=B4=B9=E7=94=A8=E6=8A=A5=E9=94=80=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B8=83=E5=B1=80=E5=92=8C=E6=95=B0=E6=8D=AE=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为费用明细表格添加动态高度计算功能,提升用户体验 - 调整费用报销单编辑器弹窗宽度,优化界面展示效果 - 重构合并导出费用报销单对话框样式,统一日期选择器宽度 - 修改差旅行程详情表格列宽配置,优化表格显示 - 更新费用单查询逻辑,移除按负责人过滤的限制条件 - 添加窗口大小变化监听,实现表格高度自适应调整 - 精简费用明细页面样式,提升页面加载性能 ``` --- .../modules/inspection/expenseReport.vue | 56 ++++++++++++++----- .../inspection/expenseReportEditor.vue | 21 ++++--- .../inspection/inspectionRequestList.vue | 6 +- 3 files changed, 54 insertions(+), 29 deletions(-) diff --git a/src/views/modules/inspection/expenseReport.vue b/src/views/modules/inspection/expenseReport.vue index 5a55fc6..067a681 100644 --- a/src/views/modules/inspection/expenseReport.vue +++ b/src/views/modules/inspection/expenseReport.vue @@ -50,10 +50,10 @@ -
- +
+ - + @@ -63,8 +63,7 @@ -
行程单独填报,仅作为附件,合计不计入费用总额。
- + @@ -79,22 +78,26 @@
- + :key="rowKey(current)" :fee-data="current" :table-height="detailHeight"/> +
- - - {{ exportForm.feeNos.length }} 张,同一申请人、同一年度 - - + + + {{ exportForm.feeNos.length }} 张,同一申请人、同一年度 + + + + + + -
第一页仅汇总交通费、住宿费、住宿节约补助和补助;出差事由请在导出的表格中手工填写。
+
第一页仅汇总交通费、住宿费、住宿节约补助和补助;出差事由请在导出的表格中手工填写。
导出 取消 @@ -124,6 +127,7 @@ export default { query: { feeNo: '', applyUser: '', page: 1, limit: 50 }, dates: ['', ''], tableHeight: 300, + detailHeight: 300, rows: [], total: 0, selection: [], @@ -166,8 +170,22 @@ export default { mounted () { // rqrq:沿用原费用管理上下主从表的高度分配。 this.tableHeight = Math.max(180, Math.floor((window.innerHeight - 220) / 2)) + this.$nextTick(() => this.updateDetailHeight()) + window.addEventListener('resize', this.updateDetailHeight) + }, + beforeDestroy () { + window.removeEventListener('resize', this.updateDetailHeight) }, methods: { + updateDetailHeight () { + // rqrq:详情页签按容器实际位置铺满视口剩余高度,提示行占位三个页签统一扣除,保证表格大小一致。 + const el = this.$refs.detail + if (!el) return + const tabsHeader = el.querySelector('.el-tabs__header') + const headerH = tabsHeader ? tabsHeader.getBoundingClientRect().height : 40 + const borderH = 12 // 页签上下边框加内容区留白(与样式中 padding 5px 保持一致) + this.detailHeight = Math.max(180, Math.floor(window.innerHeight - el.getBoundingClientRect().top - headerH - borderH - 8)) + }, rowKey (row) { return `${row.site}:${row.feeNo}` }, money (value) { return new Decimal(value || 0).toDecimalPlaces(2, Decimal.ROUND_HALF_UP).toFixed(2) }, feeSummary ({ columns, data }) { @@ -315,5 +333,13 @@ export default { .po-date-pair { display: inline-flex; align-items: center; } .po-date-pair /deep/ .el-date-editor { margin: 0; } .po-date-sep { flex: 0 0 12px; width: 12px; text-align: center; line-height: 1; } -/deep/ .customer-tab .el-tabs__content { padding: 5px !important; } +/* rqrq:详情页签内容区小幅留白,表格紧跟页签头不再有大块空白。 */ +.detail-tabs /deep/ .el-tabs__content { padding: 5px !important; } +/* rqrq:合并导出弹窗收紧宽度,两个日期框统一 220px 左对齐,区间框内部输入框不留额外边距。 */ +.export-form /deep/ .el-form-item { margin-bottom: 12px; } +.export-form /deep/ .el-form-item__label { padding-bottom: 0; line-height: 24px; } +.export-form /deep/ .el-date-editor.el-input, .export-form /deep/ .el-date-editor.el-input__inner { width: 220px; } +.export-form /deep/ .el-date-editor .el-range-input { margin: 0; } +.export-selected { line-height: 36px; } +.export-tip { color: #909399; font-size: 12px; line-height: 1.6; } diff --git a/src/views/modules/inspection/expenseReportEditor.vue b/src/views/modules/inspection/expenseReportEditor.vue index 34d381e..175947f 100644 --- a/src/views/modules/inspection/expenseReportEditor.vue +++ b/src/views/modules/inspection/expenseReportEditor.vue @@ -1,6 +1,6 @@