This commit is contained in:
BianLzhaoMin 2026-02-10 10:53:14 +08:00
parent 99a83d9374
commit a4475c3827
1 changed files with 24 additions and 0 deletions

View File

@ -274,6 +274,30 @@ function handleStatusBasedUI() {
if (submitBtn) {
submitBtn.style.display = 'none';
}
// 回填表单数据
if (data.outTime) {
// 格式化日期如果outTime是时间戳或其他格式需要转换
let dateValue = data.outTime;
// 如果是时间戳转换为YYYY-MM-DD格式
if (typeof dateValue === 'number' || /^\d+$/.test(dateValue)) {
const date = new Date(parseInt(dateValue));
dateValue = date.toISOString().split('T')[0];
} else if (dateValue.includes(' ')) {
// 如果是日期时间字符串,只取日期部分
dateValue = dateValue.split(' ')[0];
}
document.getElementById('fhDay').value = dateValue;
}
if (data.manager) {
document.getElementById('jbUser').value = data.manager;
}
if (data.address) {
document.getElementById('address').value = data.address;
}
if (data.remark) {
document.getElementById('remark').value = data.remark;
}
}
// 如果状态为"待发货"或"部分发货"
else if (status === '待发货' || status === '部分发货') {