zhangjingyuan 3 лет назад
Родитель
Сommit
b71d0ee7f9
1 измененных файлов с 35 добавлено и 101 удалено
  1. 35 101
      src/views/system/jbdScan/goods/chnangguirukudan.vue

+ 35 - 101
src/views/system/jbdScan/goods/chnangguirukudan.vue

@@ -7,7 +7,6 @@
       :modal-append-to-body="false"
       title="采购入库单"
       :visible.sync="scanVisible"
-      id="pageid"
     >
       <!-- 表单是否显示 -->
       <div style="height: 500px; width: 95%; margin: 0 auto"   >
@@ -24,53 +23,27 @@
                     <thead>
                       <tr class="title" style="background:#ffffff">
                         <th colspan="15">
-                          <h1 style="display:block">采购入库单</h1>
+                          <h2 style="display:block">采购入库单</h2>
                         </th>
                       </tr>
-                      <tr class="title" style="background:#ffffff">
+                      <!-- <tr class="title" style="background:#ffffff">
                         <th colspan="15">
                           <span style="float: left;">
                             申购部门:<span style="margin-left: 10px">{{item1.shen_gou_bu_men_|bumenfilters(bumenList)}}</span>
                           </span>
                           <span style="float:right;padding-right: 8px;width: 175px;text-align: left;">日期 :{{item1.dao_huo_ri_qi_}}</span>
                         </th>
-                      </tr>
+                      </tr> -->
                       <tr class="title" style="background:#ffffff">
                         <th colspan="15">
                           <span style="float:left;">供应商:<span style="margin-left: 10px">{{item1.gong_ying_shang_| gongyingshang(gongyingshangList)}}</span></span>
                           <span style="float:right;padding-right: 8px;">采购订单编号:{{item1.cai_gou_ding_dan_}} </span>
                         </th>
                       </tr>
-                      <!-- <tr class="title" >
-                        <th colspan="15">
-                          <div class="word-title" style="background:#fff;">
-                            <h4 style="display:block">采购入库单</h4>
-                            <div class="tagBox">
-                            <div>
-                              <div style="font-size: 10px;text-align: left;">申购部门:
-                                <span style="margin-left: 10px">{{item1.shen_gou_bu_men_|bumenfilters(bumenList)}}</span>
-                              </div>
-                              <div style="font-size: 10px">供应商:
-                                <span style="margin-left: 10px">{{item1.gong_ying_shang_| gongyingshang(gongyingshangList)}}</span>
-                              </div>
-                            </div>
-                            <div style="text-align: left;">
-                              <div style="font-size: 10px; padding-right: 10px;">采购订单编号:
-                               <span >{{item1.cai_gou_ding_dan_}}</span>
-                              </div>
-                              <div style="font-size: 10px; ">日期 :
-                                <span >{{item1.dao_huo_ri_qi_}}</span>
-                              </div>
-                            </div>
-                            </div>
-                          </div>
-
-                        </th>
-                      </tr> -->
                       <tr >
-                        <th  style="width: 40px">序号</th>
-                        <th  style="font-weight: normal">物料编码</th>
-                        <th  style="font-weight: normal">物料名称</th>
+                        <th style="width: 40px; line-height: 22px">序号</th>
+                        <th style="font-weight: normal">物料编码</th>
+                        <th style="font-weight: normal">物料名称</th>
                         <th >货号</th>
                         <th >批号</th>
                         <th >规格/特征</th>
@@ -85,25 +58,6 @@
                         <th >含税合计</th>
                       </tr>
                     </thead>
-                    <!-- <thead>
-                         <tr >
-                        <th style="width: 40px">序号</th>
-                        <th style="font-weight: normal">物料编码</th>
-                        <th style="font-weight: normal">物料名称</th>
-                        <th>货号</th>
-                        <th>批号</th>
-                        <th>规格/特征</th>
-                        <th>生产商/品牌</th>
-                        <th>数量</th>
-                        <th>单位</th>
-                        <th>单价(含税)</th>
-                        <th>税率</th>
-                        <th>单价</th>
-                        <th>税额</th>
-                        <th>金额</th>
-                        <th>含税合计</th>
-                      </tr>
-                    </thead> -->
                     <tbody>
                       <tr v-for="(item, index) in item1" :key="index">
                         <td style="width: 30px">{{ index + 1 }}</td>
@@ -140,16 +94,22 @@
                         <td style="width: 60px">{{ item1|addhshjToFixed }}</td>
                       </tr>
                     </tbody>
-                    <tfoot class="bottom">             
+                    <tfoot class="bottom">
+                      <tr  style="background:#ffffff;margin-top:12px">
+                        <td colspan="15" margin-top:2px>
+                           <div style="float: left;">申购部门:{{item1.shen_gou_bu_men_|bumenfilters(bumenList)}}</div>
+                          <div style="float:right;padding-right: 2px;">日期 :{{item1.dao_huo_ri_qi_}}</div>
+                        </td>
+                      </tr>
                       <tr>
-                        <td colspan="6" style="text-align:left">
-                          <div style="margin-top:10px">仓管员:{{ item1.name2 }}</div>
+                        <td colspan="5" style="text-align:left">
+                          <div style="float: left;margin-top:2px">仓管员:{{ item1.name2 }}</div>
                         </td>
                         <td colspan="1" class="footer-row">
-                          <div style="margin-top:10px" ref="innerRef"></div>
+                          <div style="margin: 0 auto;margin-top:2px" ref="innerRef"></div>
                         </td>
                         <td colspan="9" style="text-align:right">
-                          <div style="margin-top:10px">审核人:{{ item1.name3 }} </div>
+                          <div style="margin-top:2px;padding-right: 2px;">审核人:{{ item1.name3 }} </div>
                         </td>
                       </tr>
                     </tfoot>
@@ -315,7 +275,6 @@ export default {
       this.obj.forEach((item) => {idStr += item + ",";});
       idStr = idStr.substring(0, idStr.length - 1);
       this.getLook(idStr);
-     
     },
     getLook(id) {
       this.list = [];
@@ -369,7 +328,6 @@ export default {
                 addhanshuiheji = 0;
                 addjine = 0;
                 addshuie = 0;
-                // this_.getPage();
               });
             });
           });
@@ -377,50 +335,20 @@ export default {
       });
    
     },
-    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>
 
 
 
-<!-- <style scoped>
-
-@page {
-  size: auto; /* auto is the initial value */
-  color: #fff;
-}
-</style> -->
 <style lang="scss" scoped>
-
-//  @page :first {
-//   color: green;
-
-// @top-left {
-//     content: "foo" !important;
-//     color: blue;
-//   }
-//   @top-right {
-//     content: "bar";
-//   }
-// }
-
-
-
+.bottom {
+  margin-top: 15px;
+  // display: flex;
+  // justify-content: space-between;
+  // align-items: center;
+  font-size: 12px;
+}
 .bottom {
   margin-top: 15px;
   border-bottom: 1px solid #fff;
@@ -432,10 +360,10 @@ export default {
   border-left: 1px solid #fff;
   border-right: 1px solid #fff;
 }
-// .word-title {
-//   display: flex;
-//   justify-content: center;
-// }
+.word-title {
+  display: flex;
+  justify-content: center;
+}
 thead {
   background: #f3f3f3;
 }
@@ -450,6 +378,12 @@ thead > tr > th {
   font-weight: normal;
   color: #01060c;
 }
+thead > tr > th > td {
+  font-size: 10px;
+  text-align: center;
+  font-weight: normal;
+  color: #01060c;
+}
 .logo {
   position: absolute;
   top: -32px;
@@ -460,7 +394,7 @@ thead > tr > th {
   width: 100%;
   // border: 1px solid #000000;
   padding: 5px;
-  // height: 30px;
+  display: flex;
   display: flex;
   justify-content: space-between;
   background-color: #fff;