|
|
@@ -10,7 +10,7 @@
|
|
|
id="pageid"
|
|
|
>
|
|
|
<!-- 表单是否显示 -->
|
|
|
- <div style="height: 500px; width: 95%; margin: 0 auto" >
|
|
|
+ <div style="height: 500px; width: 95%; margin: 0 auto" >
|
|
|
<div ref="qrcode" id="box">
|
|
|
<vue-easy-print tableShow ref="easyPrint" :onePageRow="onePageRow">
|
|
|
<div
|
|
|
@@ -19,13 +19,13 @@
|
|
|
style="margin-bottom: 30px"
|
|
|
>
|
|
|
<div style="page-break-after: always">
|
|
|
- <div>
|
|
|
+ <div >
|
|
|
<table :border="1">
|
|
|
<thead>
|
|
|
<tr class="title">
|
|
|
<th colspan="15">
|
|
|
<div class="word-title" style="background:#fff;">
|
|
|
- <h4>采购入库单1</h4>
|
|
|
+ <h4>采购入库单</h4>
|
|
|
</div>
|
|
|
<div class="tagBox">
|
|
|
<div>
|
|
|
@@ -106,9 +106,9 @@
|
|
|
<td colspan="6" style="text-align:left">
|
|
|
<div style="margin-top:10px">仓管员:{{ item1.name2 }}</div>
|
|
|
</td>
|
|
|
- <!-- <td colspan="1" class="footer-row">
|
|
|
- <div style="margin-top:10px" ref="innerRef">{{index1}}</div>
|
|
|
- </td> -->
|
|
|
+ <td colspan="1" class="footer-row">
|
|
|
+ <div style="margin-top:10px" ref="innerRef"></div>
|
|
|
+ </td>
|
|
|
<td colspan="9" style="text-align:right">
|
|
|
<div style="margin-top:10px">审核人:{{ item1.name3 }} </div>
|
|
|
</td>
|
|
|
@@ -338,22 +338,21 @@ export default {
|
|
|
});
|
|
|
|
|
|
},
|
|
|
- // getPage(){
|
|
|
- // let bodyEle = document.getElementById("pageid");
|
|
|
- // console.log(bodyEle)
|
|
|
- // //获取页面总长度
|
|
|
- // let bodyHeight = bodyEle.clientHeight;
|
|
|
- // //获取页数 1026:单页A4纸总高度(不同得浏览器打印高度不一致,根据自己需求调整)
|
|
|
- // console.log(bodyHeight,"高度")
|
|
|
- // let count = (bodyHeight / 500) + 1;
|
|
|
- // //动态添加页码 通过绝对定位
|
|
|
- // for (let i = 0; i < count; i++) {
|
|
|
- // var topValue = Number(500 * (i + 1)) + Number(20 * i);
|
|
|
- // let foot = '<div class="pagerFooter" style="top:' + 200 + 'px;">' + '第' + (i + 1) + '页' + '<div>';
|
|
|
- // this.$refs.innerRef[i].innerHTML = i+1
|
|
|
- // }
|
|
|
+ getPage(){
|
|
|
+ let bodyEle = document.getElementById("pageid");
|
|
|
+ //获取页面总长度
|
|
|
+ // this.$refs.innerRef[0].innerHTML ='11'
|
|
|
+ let bodyHeight = bodyEle.clientHeight;
|
|
|
+ //获取页数 1026:单页A4纸总高度(不同得浏览器打印高度不一致,根据自己需求调整)
|
|
|
+
|
|
|
+ let count =parseInt((bodyHeight / 383)) +2;
|
|
|
+ console.log(bodyHeight,count,"高度")
|
|
|
+ //动态添加页码 通过绝对定位
|
|
|
+ for (let i = 0; i < count; i++) {
|
|
|
+ this.$refs.innerRef[i].innerHTML = i+1;
|
|
|
+ }
|
|
|
|
|
|
- // }
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|