涉密人员离职表打印

master
dshclm 11 months ago
parent d286226ce0
commit b2153ef83e

@ -1014,7 +1014,7 @@
<table border=0 cellpadding=0 cellspacing=0 width=706 style='border-collapse:
collapse;table-layout:fixed;width:529pt;margin: 0 auto;'>
<col width=94 style='mso-width-source:userset;width:70.5pt'>
<col width=95 style='mso-width-source:userset;width:71.25pt'>
<col width=95 style='mso-width-source:userset;width:81.25pt'>
<col width=106 style='mso-width-source:userset;width:79.5pt'>
<col width=77 style='mso-width-source:userset;width:57.75pt'>
<col width=99 style='mso-width-source:userset;width:74.25pt'>
@ -1115,12 +1115,16 @@
function printPage() {
window.print();
}
if (document.querySelector('#birthday').innerHTML !== ''){
var date = new Date(document.querySelector('#birthday').innerHTML);
var year = date.getFullYear();
var month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要加 1
var day = String(date.getDate()).padStart(2, '0'); // 日可能是个位数,需要补零
var formattedDate = year + '-' + month + '-' + day;
document.querySelector('#birthday').innerHTML = formattedDate
}else{
document.querySelector('#birthday').innerHTML = ''
}
document.querySelector('.date').innerHTML = '日期:' + new Date().toLocaleDateString().replace(/\//g, '-')
document.querySelector('#politics').innerHTML = document.querySelector('#politics').innerHTML === '1' ? '党员' : document.querySelector('#politics').innerHTML === '2' ? '团员' : '群众';
document.querySelector('#sex').innerHTML = document.querySelector('#sex').innerHTML === '0' ? '男' : '女'

Loading…
Cancel
Save