You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
257 lines
7.2 KiB
257 lines
7.2 KiB
2 years ago
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<title>回收台账</title>
|
||
|
<style>
|
||
|
body {
|
||
|
padding: 0;
|
||
|
margin: 0;
|
||
|
}
|
||
|
|
||
|
.max_box {
|
||
|
width: 756px;
|
||
|
/* height: 1086px; */
|
||
|
margin: auto;
|
||
|
}
|
||
|
|
||
|
.max_box>div:nth-of-type(1) {
|
||
|
text-align: center;
|
||
|
}
|
||
|
|
||
|
.telbox {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
border: 2px solid #000000;
|
||
|
margin-top: 10px;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.titl_tb {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
flex: 1;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div {
|
||
|
border-right: 2px solid #000000;
|
||
|
border-bottom: 2px solid #000000;
|
||
|
line-height: 30px;
|
||
|
padding-left: 5px;
|
||
|
text-align: center;
|
||
|
font-size: 15px;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-last-child(1) {
|
||
|
border-right: none;
|
||
|
}
|
||
|
|
||
|
.titl_tb:nth-last-child(1)>div {
|
||
|
/* border-bottom: none; */
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(1) {
|
||
|
width: 5%;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(2) {
|
||
|
width: 15%;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(3) {
|
||
|
width: 30%;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(4) {
|
||
|
width: 15%;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(5) {
|
||
|
width: 15%;
|
||
|
}
|
||
|
|
||
|
.titl_tb>div:nth-of-type(6) {
|
||
|
width: 20%;
|
||
|
}
|
||
|
|
||
|
.maxbiox {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
|
||
|
.jiaoyifang {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
box-sizing: border-box;
|
||
|
justify-content: center;
|
||
|
}
|
||
|
|
||
|
.jiaoyifang>div {
|
||
|
width: 100%;
|
||
|
line-height: 40px;
|
||
|
padding-left: 10px;
|
||
|
box-sizing: border-box;
|
||
|
border-bottom: 2px solid #000000;
|
||
|
box-sizing: border-box;
|
||
|
border-right: 2px solid #000000;
|
||
|
}
|
||
|
|
||
|
.jiaoyifang>div:nth-of-type(2) {
|
||
|
/* border-left: 2px solid #000000; */
|
||
|
/* border-right: none; */
|
||
|
border-right-color: #ffffff00;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.qianzhiqu {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
border-bottom: 2px solid #000000;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.qianzq {
|
||
|
width: 50%;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.qianzq>div:nth-of-type(1) {
|
||
|
width: 25%;
|
||
|
height: 60px;
|
||
|
line-height: 60px;
|
||
|
border-right: 2px solid #000000;
|
||
|
padding-left: 10px;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.qianzq>div:nth-of-type(2) {
|
||
|
width: 80%;
|
||
|
height: 60px;
|
||
|
border-right: 2px solid #000000;
|
||
|
display: flex;
|
||
|
align-items: flex-end;
|
||
|
justify-content: right;
|
||
|
box-sizing: border-box;
|
||
|
}
|
||
|
|
||
|
.qianzq:nth-of-type(2)>div:nth-of-type(2) {
|
||
|
border-right: none;
|
||
|
}
|
||
|
|
||
|
.beizu {
|
||
|
line-height: 40px;
|
||
|
padding-left: 10px;
|
||
|
}
|
||
|
</style>
|
||
|
<style>
|
||
|
.dayinann{
|
||
|
width: 100px;
|
||
|
height: 40px;
|
||
|
background-color: #0ea5fd;
|
||
|
color: #ffffff;
|
||
|
border-radius: 5px;
|
||
|
border: none;
|
||
|
outline: none;
|
||
|
margin-top: 50px;
|
||
|
position: relative;
|
||
|
left: 50%;
|
||
|
transform: translate(-50%);
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<!--startprint-->
|
||
|
<div class="max_box">
|
||
|
<div>废旧物资交接清单</div>
|
||
|
<div class="telbox">
|
||
|
<div class="titl_tb">
|
||
|
<div>序号</div>
|
||
|
<div>大类</div>
|
||
|
<div>产品名称、规格、型号</div>
|
||
|
<div>单位</div>
|
||
|
<div>数量</div>
|
||
|
<div>备注</div>
|
||
|
</div>
|
||
|
<div class="maxbiox">
|
||
|
</div>
|
||
|
<div class="jiaoyifang">
|
||
|
<div>
|
||
|
交接方:
|
||
|
</div>
|
||
|
<div>
|
||
|
接收方:物质装备公司
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="qianzhiqu">
|
||
|
<div class="qianzq">
|
||
|
<div>经办人:</div>
|
||
|
<div>
|
||
|
年 月 日
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="qianzq">
|
||
|
<div>经办人:</div>
|
||
|
<div>
|
||
|
年 月 日
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="qianzhiqu">
|
||
|
<div class="qianzq">
|
||
|
<div>经办人:</div>
|
||
|
<div>
|
||
|
年 月 日
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="qianzq">
|
||
|
<div>经办人:</div>
|
||
|
<div>
|
||
|
年 月 日
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="beizu">
|
||
|
备注:‘1231231231’123123
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--endprint-->
|
||
|
<button class="dayinann" onclick="preview()">打印</button>
|
||
|
</body>
|
||
|
<script>
|
||
|
let dom1 = document.getElementsByClassName('maxbiox')[0]
|
||
|
let htmls = ''
|
||
|
for (let i = 1; i < 6; i++) {
|
||
|
htmls += `<div class="titl_tb">
|
||
|
<div>${i}</div>
|
||
|
<div>${i}</div>
|
||
|
<div>电缆</div>
|
||
|
<div>8mm</div>
|
||
|
<div>${i+10}</div>
|
||
|
<div>备注</div>
|
||
|
</div>`
|
||
|
}
|
||
|
dom1.innerHTML = htmls
|
||
|
console.log(dom1);
|
||
|
|
||
|
function preview() {
|
||
|
bdhtml = window.document.body.innerHTML;
|
||
|
sprnstr = "<!--startprint-->"; //开始打印标识字符串有17个字符
|
||
|
eprnstr = "<!--endprint-->"; //结束打印标识字符串
|
||
|
prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17); //从开始打印标识之后的内容
|
||
|
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
|
||
|
window.document.body.innerHTML = prnhtml; //把需要打印的指定内容赋给body.innerHTML
|
||
|
window.print(); //调用浏览器的打印功能打印指定区域
|
||
|
window.document.body.innerHTML = bdhtml; //重新给页面内容赋值;
|
||
|
return false;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
</html>
|