试验记录表修改

This commit is contained in:
hongchao 2025-07-24 15:23:24 +08:00
parent f2de320080
commit cf7bd4b1d0
1 changed files with 12 additions and 1 deletions

View File

@ -215,7 +215,7 @@
</div> </div>
<!-- 第四行对应结果 --> <!-- 第四行对应结果 -->
<div style="display: flex;height: 40px;"> <div style="display: flex;height: 40px;">
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ this.printInfo.createTime }}</div> <div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ formatDate(printInfo.createTime) }}</div>
<div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ this.printInfo.repairer }}</div> <div style="flex: 1; text-align: center; border-right: 1px solid #888;">{{ this.printInfo.repairer }}</div>
<div style="flex: 1; text-align: center;">{{ this.printInfo.userName }}</div> <div style="flex: 1; text-align: center;">{{ this.printInfo.userName }}</div>
</div> </div>
@ -430,6 +430,17 @@ export default {
} }
}, },
//
formatDate(dateStr) {
if (!dateStr) return '';
const date = new Date(dateStr);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
// //
print() { print() {
printJS({ printJS({