refactor(mes/wms): 优化多处日期处理与表格列展示

1. 移除磨工页面字典表格的"值"列
2. 修复TimeInput组件日期格式化逻辑,补全月份日期补零处理
3. 为卷料录入页面添加日期格式化方法,替换直接赋值逻辑并新增生产时长计算
This commit is contained in:
2026-06-04 11:10:34 +08:00
parent 31f7a9c0cb
commit 5176c80344
3 changed files with 21 additions and 6 deletions

View File

@@ -48,7 +48,10 @@ export default {
}
const date = new Date(dateTimeStr);
if (!isNaN(date.getTime())) {
this.dateValue = date.toISOString().split('T')[0];
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
this.dateValue = `${year}-${month}-${day}`;
this.hourValue = date.getHours();
this.minuteValue = date.getMinutes();
}