From 198de69371b87aaf5b4483ae9a6d4a913b0a897f Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Wed, 28 Jan 2026 15:57:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E5=8D=95=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/car_settlement/payment_form.css | 123 ++++++++++++++++++ js/car_settlement/child/payment_form.js | 42 +++--- .../child/payment_form.html | 23 ++-- 3 files changed, 158 insertions(+), 30 deletions(-) diff --git a/css/car_settlement/payment_form.css b/css/car_settlement/payment_form.css index a6b73bd..8e7e594 100644 --- a/css/car_settlement/payment_form.css +++ b/css/car_settlement/payment_form.css @@ -343,4 +343,127 @@ blockquote { .classTable input.form-control { overflow: hidden; text-overflow: ellipsis; +} + + + +/* ===================== 车辆表格专属优化样式 ===================== */ +/* 表格整体布局与基础样式 */ +#dispatch-car-table { + table-layout: fixed; /* 固定列宽布局,避免内容撑开列宽 */ + width: 100%; + border-collapse: collapse; /* 合并边框,避免双线条 */ + border-spacing: 0; + font-size: 12px; + color: #333; + background-color: #fff; + box-sizing: border-box; +} + +/* 表头样式:统一行高 + 禁止折行 + 背景色 */ +#dispatch-car-table th { + padding: 0 8px; + height: 40px; + line-height: 40px; /* 垂直居中,统一行高 */ + text-align: center; + white-space: nowrap; /* 禁止文字折行 */ + overflow: hidden; + text-overflow: ellipsis; /* 超长表头省略显示 */ + background-color: #F2F2F2; + border: 1px solid #DDDDDD; + vertical-align: middle; +} + +/* 内容单元格样式:统一内边距 + 边框 + 垂直居中 */ +#dispatch-car-table td { + padding: 6px 8px; + text-align: center; + vertical-align: middle; /* 关键:输入框/文字垂直居中 */ + border: 1px solid #DDDDDD; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* 列宽精细化分配(修复语法错误 + 匹配HTML行内样式) */ +#dispatch-car-table th:nth-child(1) { width: 5% !important; } /* 类型(匹配HTML 5%) */ +#dispatch-car-table th:nth-child(2) { width: 6% !important; } /* 车型(匹配HTML 6%) */ +#dispatch-car-table th:nth-child(3) { width: 6% !important; } /* 型号(匹配HTML 6%) */ +#dispatch-car-table th:nth-child(4) { width: 7% !important; } /* 车牌(匹配HTML 7%) */ +#dispatch-car-table th:nth-child(5) { width: 6% !important; } /* 吨位(匹配HTML 6%) */ +#dispatch-car-table th:nth-child(6) { width: 7% !important; } /* 货物名称(匹配HTML 7%) */ +#dispatch-car-table th:nth-child(7) { width: 7% !important; } /* 起运地(匹配HTML 7%) */ +#dispatch-car-table th:nth-child(8) { width: 7% !important; } /* 目的地(匹配HTML 7%) */ +#dispatch-car-table th:nth-child(9) { width: 5% !important; } /* 预估公里数(匹配HTML 5%) */ +#dispatch-car-table th:nth-child(10){ width: 5% !important; } /* 实际公里数(匹配HTML 5%) */ +#dispatch-car-table th:nth-child(11){ width: 6% !important; } /* 单价(匹配HTML 6%) */ +#dispatch-car-table th:nth-child(12){ width: 6% !important; } /* 预估金额(匹配HTML 6%) */ +#dispatch-car-table th:nth-child(13){ width: 10%!important; } /* 附件(匹配HTML 10%) */ +#dispatch-car-table th:nth-child(14){ width: 9% !important; } /* 需求计划编号(匹配HTML 9%) */ + +/* 核心修复:实际公里数单元格+输入框样式 */ +#dispatch-car-table td:nth-child(10) { + text-overflow: clip !important; /* 彻底禁用省略号 */ + overflow: visible !important; /* 允许内容正常显示,不截断 */ + min-width: 80px; /* 保底宽度,避免列宽过小 */ +} +#dispatch-car-table td:nth-child(10) input.form-control { + width: calc(100% - 8px) !important; /* 适配单元格内边距,不溢出 */ + min-width: unset !important; /* 去掉最小宽度限制 */ + max-width: unset !important; /* 去掉最大宽度限制 */ + text-align: center !important; /* 数字居中,视觉更协调 */ +} + +/* 输入框样式:统一尺寸 + 视觉风格 */ +#dispatch-car-table input.form-control { + width: 100%; + min-width: 70px; + max-width: 100px; + height: 28px; + padding: 0 6px; + border: 1px solid #e5e6eb; + border-radius: 2px; + background-color: #fff; + font-size: 12px; + color: #333; + box-sizing: border-box; + text-align: right; /* 数字右对齐,符合财务习惯 */ + outline: none; + margin: 0; /* 清除默认外边距,避免错位 */ + display: inline-block; +} + +/* 输入框聚焦高亮:提升交互反馈 */ +#dispatch-car-table input.form-control:focus { + border-color: #409eff; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1); + background-color: #fff; +} + +/* 金额/数字列右对齐:统一视觉规范 */ +#dispatch-car-table td:nth-child(11), /* 单价 */ +#dispatch-car-table td:nth-child(12), /* 预估金额 */ +#dispatch-car-table td:nth-child(13) { /* 出入场金额 */ + text-align: right; +} + +/* 超长文本列(起运地/目的地)特殊处理 */ +#dispatch-car-table td:nth-child(7), /* 起运地 */ +#dispatch-car-table td:nth-child(8) { /* 目的地 */ + max-width: 120px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +/* 附件链接样式:统一颜色,提升点击感 */ +#dispatch-car-table td a { + color: #409eff; + text-decoration: none; + cursor: pointer; +} + +#dispatch-car-table td a:hover { + color: #66b1ff; + text-decoration: underline; } \ No newline at end of file diff --git a/js/car_settlement/child/payment_form.js b/js/car_settlement/child/payment_form.js index 8c32aef..f2845e7 100644 --- a/js/car_settlement/child/payment_form.js +++ b/js/car_settlement/child/payment_form.js @@ -264,8 +264,8 @@ function getPayCarDetails(id) { imgNum += item.driverUserImage.filter(item => { return item.type !== '6' }).length; imgNum += item.fileList.length; - const actualGls = item.gls || 0; // 实际公里数初始=预估公里数 - const actualMoney = 0; // 实际金额初始=预估金额 + const actualGls = formatToTwoDecimals(item.gls) || 0.00; // 实际公里数初始=预估公里数 + // const actualMoney = formatToTwoDecimals(0); // 实际金额初始=预估金额 html += "