From 10c6f7c11163df81b7315c0b43b52e0f88fc288d Mon Sep 17 00:00:00 2001 From: zch Date: Mon, 11 May 2026 18:08:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(tyre):=20=E5=AE=8C=E5=96=84=E8=A3=85?= =?UTF-8?q?=E8=83=8E=E7=9B=B8=E5=85=B3=E6=A0=A1=E9=AA=8C=E5=92=8CUI?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增自编号必填校验,为空时返回错误提示 2. 优化装胎状态的UI样式:调整边框和背景色,修改文字配色与透明度,移除多余阴影增强可读性 --- .../resources/templates/tyre/order/edit.html | 20 ++++++++++--------- .../impl/RecordTyreInstallServiceImpl.java | 5 ++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/tyre/order/edit.html b/ruoyi-admin/src/main/resources/templates/tyre/order/edit.html index 4d0592de..e984ee84 100644 --- a/ruoyi-admin/src/main/resources/templates/tyre/order/edit.html +++ b/ruoyi-admin/src/main/resources/templates/tyre/order/edit.html @@ -128,20 +128,20 @@ /* 状态样式:装胎 (橙色/金色) */ .status-installed { - border: 2px solid #f8ac59 !important; /* 橙色边框 */ + border: 2px solid #f6c343 !important; /* 装胎只做高亮边框,避免整块反白影响胎号可读性 */ background-color: #2f4050; position: relative; /* 确保伪元素定位正确 */ } /* 位置标签背景色 */ .status-installed .pos-tag { - background: #f8ac59; - color: #fff; /* 确保文字清晰 */ + background: #f6c343; + color: #2f4050; /* 黄色标签配深色文字,比白字更清楚 */ } - /* 轮胎纹路:稍微调亮一点,表示是新胎或重点关注的胎 */ + /* 装胎状态靠黄框识别,胎纹保持轻量,避免压住胎号/规格文字。 */ .status-installed .tyre-pattern { - opacity: 0.8; + opacity: 0.16; } /* 中间的文字标签 */ @@ -151,14 +151,16 @@ top: 30%; left: 50%; transform: translateX(-50%); - color: #f8ac59; /* 文字颜色与边框呼应 */ + color: #ffd866; /* 深底上用亮黄文字,和外框保持同一语义色 */ font-weight: bold; font-size: 14px; z-index: 4; - background: rgba(255, 255, 255, 0.95); /* 稍微不透明一点,保证文字可读性 */ + background: transparent; + border: 1px solid #ffd866; padding: 2px 8px; border-radius: 4px; - box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 加一点阴影更有立体感 */ + box-shadow: none; + text-shadow: 0 1px 2px rgba(0,0,0,0.65); } /* 状态样式:空位 (灰色透明) */ @@ -414,4 +416,4 @@ - \ No newline at end of file + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordTyreInstallServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordTyreInstallServiceImpl.java index 9865d7bd..f61a95c9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordTyreInstallServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordTyreInstallServiceImpl.java @@ -12,6 +12,7 @@ import com.ruoyi.system.mapper.RecordTyreInstallMapper; import com.ruoyi.system.mapper.RecordTyreMileageMapper; import com.ruoyi.system.service.IRecordTyreInstallService; import com.ruoyi.system.service.IRecordTyreMileageService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -111,7 +112,9 @@ public class RecordTyreInstallServiceImpl implements IRecordTyreInstallService { @Override public AjaxResult PdaInstallTyre(RecordTyreInstall recordTyreInstall) { - + if (StringUtils.isBlank(recordTyreInstall.getSelfNo())) { + return AjaxResult.error("自编号不能为空"); + } try { //插入安装记录表 recordTyreInstall.setType("0");