试验记录表修改
This commit is contained in:
parent
f2de320080
commit
cf7bd4b1d0
|
|
@ -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({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue