fix(tyre): 完善装胎相关校验和UI样式优化

1. 新增自编号必填校验,为空时返回错误提示
2. 优化装胎状态的UI样式:调整边框和背景色,修改文字配色与透明度,移除多余阴影增强可读性
master
zch 1 month ago
parent 8314e1b94f
commit 10c6f7c111

@ -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 @@
</script>
</body>
</html>
</html>

@ -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");

Loading…
Cancel
Save