This commit is contained in:
parent
99a83d9374
commit
a4475c3827
|
|
@ -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 === '部分发货') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue