Selaa lähdekoodia

修改多条件打印

mxx 3 vuotta sitten
vanhempi
commit
188747e352

+ 305 - 198
public/static/payprint.html

@@ -1,8 +1,11 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <meta charset="utf-8">
-    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <meta charset="utf-8" />
+    <link
+      rel="stylesheet"
+      href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
+    />
     <title></title>
     <style>
       table,
@@ -21,11 +24,11 @@
         width: 1000px;
         /* height: 583px; */
         margin: auto;
-        position: absolute;
-        top: -5vh;
-        bottom: 0;
+        /* position: absolute; */
+        /* top: -5vh; */
+        /* bottom: 0;
         left: 0;
-        right: 0;
+        right: 0; */
       }
 
       table {
@@ -53,7 +56,7 @@
       img {
         width: 41px;
         height: 41px;
-        margin-right: 118px;
+        /* margin-right: 118px; */
       }
 
       .config {
@@ -113,188 +116,258 @@
       .sign {
         margin-right: 100px;
       }
-    .header{
-    display: flex;
-    justify-content: space-between;
-    font-size: 16px;
-    margin: 10px 0;
-  }
-  .header1{
-    font-size: 24px;
-    margin: 60px 60px 10px 60px;
-    display: flex;
-    justify-content: center;
-  }
-  .line{
-    height: 2px;
-    width: 410px;
-    margin: 3px auto;
-    background: black;
-  }
-  .line:nth-of-type(3){
-    margin-bottom: 30px;
-  }
-  .header-top{
-    display: flex;
-    justify-content: space-between;
-  }
+      .header {
+        display: flex;
+        justify-content: space-between;
+        font-size: 16px;
+        margin: 10px 0;
+      }
+      .header1 {
+        font-size: 24px;
+        margin: 60px 60px 10px 60px;
+        display: flex;
+        justify-content: center;
+      }
+      .line {
+        height: 2px;
+        width: 410px;
+        margin: 3px auto;
+        background: black;
+      }
+      .line:nth-of-type(3) {
+        margin-bottom: 30px;
+      }
+      .header-top {
+        display: flex;
+        justify-content: space-between;
+      }
+      .sfcard {
+        /* background: red; */
+      }
+      .sfcard-content {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+      }
+      .sfcard-content img {
+        /* height: 50vh; */
+        width: 45%;
+        height: 50vh;
+      }
+      .sfcard-title {
+        font-size: 28px;
+        text-align: center;
+        margin: 50px 0;
+      }
+      .avatar {
+        margin-bottom: 120px;
+      }
+      .avatar:nth-of-type(2) {
+        margin-bottom: 140px;
+      }
     </style>
   </head>
   <body>
     <div id="app">
       <div class="content" v-if="bigContent">
-        <div class="center">
-        <div class="header1">{{ printData.compName}}结算凭证</div>
-        <div class="line"></div>
-        <div class="line"></div>
-         <div class="header">
+        <div class="sfcard" v-if="isShowPrintType1">
+          <div class="sfcard-title">身份证</div>
+          <div class="sfcard-content">
+            <img :src="imageUrl1" class="avatar" />
+            <img :src="imageUrl2" class="avatar" />
+          </div>
+        </div>
+        <div class="bankcard" v-if="isShowPrintType2">
+          <div class="sfcard-title">银行卡</div>
+          <div class="sfcard-content">
+            <img :src="imageUrl3" class="avatar" />
+            <img :src="imageUrl4" class="avatar" />
+          </div>
+        </div>
+
+        <div class="center" v-if="isShowPrintType3">
+          <div class="header1">{{ printData.compName}}结算凭证</div>
+          <div class="line"></div>
+          <div class="line"></div>
+          <div class="header">
             <div>单位名称:{{ printData.compName}}</div>
             <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
-         </div>
-         <div class="header-top">
-           <div>单位:公斤、元</div>
-           <div>No.</div>
-         </div>
-         <div class="header-top">
-           <div>开票日期:{{printData.currentTime}}</div>
-           <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
-           <div class="number">{{dealNo(printData.paymentNo)}}</div>
-         </div>
-         <table class="table">
-           <tr class="row">
-             <td rowspan="4" class="col col-bgc">买方</td>
-             <td class="col col-bgc">单位名称</td>
-             <td class="col" colspan="3">{{ printData.compName}}</td>
-             <td rowspan="4" class="col col-bgc">卖方</td>
-             <td class="col col-bgc">姓名</td>
-             <td class="col" colspan="4">{{ printData.customerName}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">税务登记号</td>
-             <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td>
-             <td class="col col-bgc">身份证号</td>
-             <td class="col" colspan="4">{{ printData.identityAuthenticationInfo.customerNumberCard}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">业务编号</td>
-             <td class="col" colspan="3">{{ printData.paymentNo}}</td>
-             <td class="col col-bgc">卡号</td>
-             <td class="col" colspan="4">{{printData.identityAuthenticationInfo.bankDeposit}}{{printData.identityAuthenticationInfo.bankCard}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">收货仓库</td>
-             <td class="col" colspan="3">{{printData.warehouseName}}</td>
-             <td class="col col-bgc">地址</td>
-             <td class="col" colspan="4">{{printData.identityAuthenticationInfo.compAddress}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">货名</td>
-             <td class="col col-bgc">类型</td>
-             <td class="col col-bgc">等级</td>
-             <td class="col col-bgc">水分%</td>
-             <td class="col col-bgc">杂质%</td>
-             <td class="col col-bgc">毛重</td>
-             <td class="col col-bgc">皮重</td>
-             <td class="col col-bgc">扣杂重</td>
-             <td class="col col-bgc">净重</td>
-             <td class="col col-bgc">纯重</td>
-           </tr>
-           <tr class="row">
-             <td class="col">{{ printData.goodsName}}</td>
-             <td class="col">{{ printData.type}}</td>
-             <td class="col">{{ printData.qualityInspectionManagement.grade}}</td>
-             <td class="col">{{ printData.qualityInspectionManagement.waterContent}}</td>
-             <td class="col">{{ printData.qualityInspectionManagement.impurity}}</td>
-             <td class="col">{{ printData.grossWeight}}</td>
-             <td class="col">{{ printData.tare}}</td>
-             <td class="col">{{ printData.weighingManagement.buckleMiscellaneous}}</td>
-             <td class="col">{{ printData.netWeight}}</td>
-             <td class="col">{{ printData.pureWeight}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc"  v-if="printData.type == '潮粮'">净重单价</td>
-             <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
-             <td class="col col-bgc">扣单价</td>
-             <td class="col col-bgc">粮款</td>
-             <td class="col col-bgc">称重补助</td>
-             <td class="col col-bgc">运费补助</td>
-             <td class="col col-bgc">卸车补助</td>
-             <td class="col col-bgc">其他补助</td>
-             <td class="col col-bgc">称重扣款</td>
-             <td class="col col-bgc">运费扣款</td>
-             <td class="col col-bgc">卸车扣款</td>
-           </tr>
-           <tr class="row">
-             <td class="col " v-if="printData.type == '潮粮'">{{printData.tidalGrainPrice}}</td>
-             <td class="col " v-if="printData.type == '干粮'">{{printData.qualityInspectionManagement.dryGrainPrice}}</td>
-             <td class="col ">{{ printData.unitDeduction}}</td>
-             <td class="col ">{{ printData.grainMoney}}</td>
-             <td class="col ">{{ printData.weighingSubsidy}}</td>
-             <td class="col ">{{ printData.freightSubsidy}}</td>
-             <td class="col ">{{ printData.unloadSubsidy}}</td>
-             <td class="col ">{{ printData.otherSubsidy}}</td>
-             <td class="col ">{{ printData.weighingDeduction}}</td>
-             <td class="col ">{{ printData.freightDeduction}}</td>
-             <td class="col ">{{ printData.unloadDeduction}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">质量扣款</td>
-             <td class="col col-bgc">其他扣款</td>
-             <td class="col col-bgc" v-if="printData.type == '潮粮'">纯重单价</td>
-             <td class="col col-bgc">合计应付</td>
-             <td class="col col-bgc">购粮性质</td>
-             <td class="col col-bgc">车牌号</td>
-             <td class="col col-bgc" colspan="5">记事</td>
-           </tr>
-           <tr class="row">
-             <td class="col ">{{ printData.qualityDeduction}}</td>
-             <td class="col ">{{ printData.otherDeduction}}</td>
-             <td class="col " v-if="printData.type == '潮粮'">{{ printData.solidGrainPrice}}</td>
-             <td class="col ">{{ printData.calculationPayable}}</td>
-             <td class="col ">{{ printData.qualityInspectionManagement.natureOfGrainPurchase}}</td>
-             <td class="col ">{{ printData.carNo}}</td>
-             <td class="col " colspan="5">{{ printData.remarks}}</td>
-           </tr>
-           <tr class="row">
-             <td class="col col-bgc">实付金额</td>
-             <td class="col " colspan="2">{{printData.actualPayment}}</td>
-             <td class="col col-bgc" colspan="3">人民币(大写)</td>
-             <td class="col " colspan="4">{{printData.capitalize}}</td>
-     
-           </tr>
-         </table>
-     
-         <div class="bottom">
-           <div class="bottom-row1">
-             <div>质检:{{ printData.qualityInspectionManagement.qualityInspector}}</div>
-             <div>毛检:{{ printData.weighingManagement.secretaryWeigher}}</div>
-             <div>皮检:{{ printData.weighingManagement.skinInspector}}</div>
-             <div>结算:{{ printData.settlementClerk}}</div>
-             <div>付款:{{ printData.cashier}}</div>
-             <div>复点:{{ }}</div>
-             <div></div>
-           </div>
-           <div class="bottom-row2">
-             <!-- <div class="left">
+          </div>
+          <div class="header-top">
+            <div>单位:公斤、元</div>
+            <div>No.</div>
+          </div>
+          <div class="header-top">
+            <div>开票日期:{{printData.currentTime}}</div>
+            <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
+            <div class="number">{{dealNo(printData.paymentNo)}}</div>
+          </div>
+          <table class="table">
+            <tr class="row">
+              <td rowspan="4" class="col col-bgc">买方</td>
+              <td class="col col-bgc">单位名称</td>
+              <td class="col" colspan="3">{{ printData.compName}}</td>
+              <td rowspan="4" class="col col-bgc">卖方</td>
+              <td class="col col-bgc">姓名</td>
+              <td class="col" colspan="4">{{ printData.customerName}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">税务登记号</td>
+              <td class="col" colspan="3">{{ printData.taxRegistrationNo}}</td>
+              <td class="col col-bgc">身份证号</td>
+              <td class="col" colspan="4">
+                {{ printData.identityAuthenticationInfo.customerNumberCard}}
+              </td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">业务编号</td>
+              <td class="col" colspan="3">{{ printData.paymentNo}}</td>
+              <td class="col col-bgc">卡号</td>
+              <td class="col" colspan="4">
+                {{printData.identityAuthenticationInfo.bankDeposit}}{{printData.identityAuthenticationInfo.bankCard}}
+              </td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">收货仓库</td>
+              <td class="col" colspan="3">{{printData.warehouseName}}</td>
+              <td class="col col-bgc">地址</td>
+              <td class="col" colspan="4">
+                {{printData.identityAuthenticationInfo.compAddress}}
+              </td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">货名</td>
+              <td class="col col-bgc">类型</td>
+              <td class="col col-bgc">等级</td>
+              <td class="col col-bgc">水分%</td>
+              <td class="col col-bgc">杂质%</td>
+              <td class="col col-bgc">毛重</td>
+              <td class="col col-bgc">皮重</td>
+              <td class="col col-bgc">扣杂重</td>
+              <td class="col col-bgc">净重</td>
+              <td class="col col-bgc">纯重</td>
+            </tr>
+            <tr class="row">
+              <td class="col">{{ printData.goodsName}}</td>
+              <td class="col">{{ printData.type}}</td>
+              <td class="col">
+                {{ printData.qualityInspectionManagement.grade}}
+              </td>
+              <td class="col">
+                {{ printData.qualityInspectionManagement.waterContent}}
+              </td>
+              <td class="col">
+                {{ printData.qualityInspectionManagement.impurity}}
+              </td>
+              <td class="col">{{ printData.grossWeight}}</td>
+              <td class="col">{{ printData.tare}}</td>
+              <td class="col">
+                {{ printData.weighingManagement.buckleMiscellaneous}}
+              </td>
+              <td class="col">{{ printData.netWeight}}</td>
+              <td class="col">{{ printData.pureWeight}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc" v-if="printData.type == '潮粮'">
+                净重单价
+              </td>
+              <td class="col col-bgc" v-if="printData.type == '干粮'">单价</td>
+              <td class="col col-bgc">扣单价</td>
+              <td class="col col-bgc">粮款</td>
+              <td class="col col-bgc">称重补助</td>
+              <td class="col col-bgc">运费补助</td>
+              <td class="col col-bgc">卸车补助</td>
+              <td class="col col-bgc">其他补助</td>
+              <td class="col col-bgc">称重扣款</td>
+              <td class="col col-bgc">运费扣款</td>
+              <td class="col col-bgc">卸车扣款</td>
+            </tr>
+            <tr class="row">
+              <td class="col " v-if="printData.type == '潮粮'">
+                {{printData.tidalGrainPrice}}
+              </td>
+              <td class="col " v-if="printData.type == '干粮'">
+                {{printData.qualityInspectionManagement.dryGrainPrice}}
+              </td>
+              <td class="col ">{{ printData.unitDeduction}}</td>
+              <td class="col ">{{ printData.grainMoney}}</td>
+              <td class="col ">{{ printData.weighingSubsidy}}</td>
+              <td class="col ">{{ printData.freightSubsidy}}</td>
+              <td class="col ">{{ printData.unloadSubsidy}}</td>
+              <td class="col ">{{ printData.otherSubsidy}}</td>
+              <td class="col ">{{ printData.weighingDeduction}}</td>
+              <td class="col ">{{ printData.freightDeduction}}</td>
+              <td class="col ">{{ printData.unloadDeduction}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">质量扣款</td>
+              <td class="col col-bgc">其他扣款</td>
+              <td class="col col-bgc" v-if="printData.type == '潮粮'">
+                纯重单价
+              </td>
+              <td class="col col-bgc">合计应付</td>
+              <td class="col col-bgc">购粮性质</td>
+              <td class="col col-bgc">车牌号</td>
+              <td class="col col-bgc" colspan="5">记事</td>
+            </tr>
+            <tr class="row">
+              <td class="col ">{{ printData.qualityDeduction}}</td>
+              <td class="col ">{{ printData.otherDeduction}}</td>
+              <td class="col " v-if="printData.type == '潮粮'">
+                {{ printData.solidGrainPrice}}
+              </td>
+              <td class="col ">{{ printData.calculationPayable}}</td>
+              <td class="col ">
+                {{ printData.qualityInspectionManagement.natureOfGrainPurchase}}
+              </td>
+              <td class="col ">{{ printData.carNo}}</td>
+              <td class="col " colspan="5">{{ printData.remarks}}</td>
+            </tr>
+            <tr class="row">
+              <td class="col col-bgc">实付金额</td>
+              <td class="col " colspan="2">{{printData.actualPayment}}</td>
+              <td class="col col-bgc" colspan="3">人民币(大写)</td>
+              <td class="col " colspan="4">{{printData.capitalize}}</td>
+            </tr>
+          </table>
+
+          <div class="bottom">
+            <div class="bottom-row1">
+              <div>
+                质检:{{
+                printData.qualityInspectionManagement.qualityInspector}}
+              </div>
+              <div>
+                毛检:{{ printData.weighingManagement.secretaryWeigher}}
+              </div>
+              <div>皮检:{{ printData.weighingManagement.skinInspector}}</div>
+              <div>结算:{{ printData.settlementClerk}}</div>
+              <div>付款:{{ printData.cashier}}</div>
+              <div>复点:{{ }}</div>
+              <div></div>
+            </div>
+            <div class="bottom-row2">
+              <!-- <div class="left">
                <img src="../../../../public/img/add.png" alt="" />
              </div> -->
-             <div class="config">收货单位签名或盖章</div>
-             <div class="">客户签名</div>
-           </div>
-           <!-- <div class="bottom-row3">扫一扫</div> -->
-           <!-- <div class="bottom-row4">
+              <div class="config">收货单位签名或盖章</div>
+              <div class="">客户签名</div>
+            </div>
+            <!-- <div class="bottom-row3">扫一扫</div> -->
+            <!-- <div class="bottom-row4">
              <el-button type="primary">关闭</el-button> 
               <el-button type="primary" @click="printSmall">打印小票</el-button> 
               <el-button type="primary" @click="printBig">打印单据</el-button>
            </div> -->
-         </div>
+          </div>
         </div>
       </div>
       <div class="small-content" v-if="smallContent">
         <div class="small-title">
           <div>
-            {{printData.compName}}结算凭证</div>
-          <img class="small-img" src="../img/add.png" alt="">
+            {{printData.compName}}结算凭证
+          </div>
+          <img class="small-img" src="../img/add.png" alt="" />
         </div>
         <div class="small-row">
           <div>开票日期</div>
@@ -473,47 +546,84 @@
     new Vue({
       el: '#app',
       data: {
-        printData: [],
-        name: "",
+        isShowPrintType1: false,
+        isShowPrintType2: false,
+        isShowPrintType3: false,
+        isShowPrintType4: false,
+        showType: [],
+        printData: {},
+        customerList: {},
+        name: '',
         bigContent: false,
         smallContent: false,
-        date: ""
+        date: '',
+        imageUrl1: '',
+        imageUrl2: '',
+        imageUrl3: '',
+        imageUrl4: '',
+        identity: [],
+        bank: []
       },
       computed: {},
       methods: {
-        dealNo(str){
-         return str.slice(4)
+        dealNo(str) {
+          return str.slice(4)
         },
-        tableRowClassName({
-          row,
-          rowIndex
-        }) {
+        tableRowClassName({ row, rowIndex }) {
           if (rowIndex === 1) {
-            return 'warning-row';
+            return 'warning-row'
           } else if (rowIndex === 3) {
-            return 'success-row';
+            return 'success-row'
           }
-          return '';
+          return ''
         },
         getQueryVariable(variable) {
-          var query = window.location.search.substring(1);
-          var vars = query.split("&");
+          var query = window.location.search.substring(1)
+          var vars = query.split('&')
           for (var i = 0; i < vars.length; i++) {
-            var pair = vars[i].split("=");
+            var pair = vars[i].split('=')
             if (pair[0] == variable) {
-              return pair[1];
+              return pair[1]
             }
           }
-          return (false);
+          return false
         },
         printSmall() {},
-        printBig() {},
+        printBig() {}
       },
       mounted() {
-
         this.date = new Date().toLocaleString()
-        let _data = decodeURIComponent(this.getQueryVariable("dataList"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        let _data = decodeURIComponent(this.getQueryVariable('dataList'))
+        this.printData = JSON.parse(_data)
+        let _type = decodeURIComponent(this.getQueryVariable('type'))
+        if (sessionStorage.getItem('ws-pf_roleName') == '财务') {
+          this.showType = decodeURIComponent(this.getQueryVariable('printTypeList'))
+          this.customerList = JSON.parse(decodeURIComponent(this.getQueryVariable('customerList')))
+          this.identity = this.customerList.cardAddressUrl.split(',')
+          this.bank = this.customerList.payeeAddressUrl.split(',')
+          this.imageUrl1 = this.identity[0]
+          this.imageUrl2 = this.identity[1]
+          this.imageUrl3 = this.bank[0]
+          this.imageUrl4 = this.bank[1]
+          let _lsit = this.showType.split(',')
+          for (let i = 0; i < _lsit.length; i++) {
+            switch (_lsit[i]) {
+              case '打印身份证(正反面)':
+                this.isShowPrintType1 = !this.isShowPrintType1
+                break
+              case '打印银行卡(正反面)':
+                this.isShowPrintType2 = !this.isShowPrintType2
+                break
+              case '打印结算凭证':
+                this.isShowPrintType3 = !this.isShowPrintType3
+              case '打印发票':
+                this.isShowPrintType4 = !this.isShowPrintType4
+                break
+            }
+          }
+        }else{
+          this.isShowPrintType3 = true
+        }
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -521,17 +631,14 @@
           this.smallContent = true
           this.bigContent = false
         }
-        // console.log(_data)
-        this.printData = JSON.parse(_data)
-        // console.log(this.tableData)
-        document.title=printData.compName+"结算凭证"
+
+        document.title = this.printData.compName + '结算凭证'
         window.print()
         window.onafterprint = function(event) {
           window.history.back(-1)
-        };
+        }
       },
       watch: {}
     })
   </script>
-
 </html>

+ 0 - 2
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -228,7 +228,6 @@ export default {
           // if(this.userJurisdiction){
           //   this.warehouseList.unshift({warehouseName:response[0].flag})
           // }
-          debugger
           let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
           if (_wareHouse) {
             _wareHouse = JSON.parse(_wareHouse)
@@ -315,7 +314,6 @@ export default {
         })
     },
     print(index, row) {
-      debugger
       // 打印价格对照表
       purchasePriceLook({
         id: row.id

+ 7 - 1
src/views/houseSelfCollect/component/paymentPrint.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="center">
+    <!-- {{customerInfo}} -->
     <div class="header">
        <div>单位名称:{{ printData.compName}}</div>
        <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
@@ -116,7 +117,6 @@
 
       </tr>
     </table>
-
     <div class="bottom">
       <div class="bottom-row1">
         <div>质检:{{ printData.qualityInspectionManagement.qualityInspector}}</div>
@@ -149,6 +149,12 @@
     props: {
       printData: {
         type: Object
+      },
+        customerInfo: {
+        type: Object
+      },
+      showType:{
+        type: Array
       },
       billingDate:'',
     },

+ 214 - 65
src/views/houseSelfCollect/paymentManagement.vue

@@ -1,30 +1,45 @@
 <!--付款管理-->
 <template>
   <div>
+    <div class="mask" v-show="isShowPrintType"></div>
+      <div class="print-type" v-show="isShowPrintType">
+        <div class="print-type-content">
+          <div class="print-type-title"> 打印凭证</div>
+          <div class="print-type-checkbox">
+          <el-checkbox-group v-model="ruleForm.type">
+            <el-checkbox label="打印身份证(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox label="打印银行卡(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox
+              label="打印结算凭证"
+              name="type"
+              class="label-width"
+              @change="selectType($event)"
+            ></el-checkbox>
+            <el-checkbox label="打印发票" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
+          </el-checkbox-group>
+          </div>
+        </div>
+        <div class="bottom-btn">
+          <el-button @click="typePrintClick">确定</el-button>
+          <el-button @click="typePrintCannelClick">取消</el-button>
+        </div>
+      </div>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
         <!-- <ws-button type="primary" @click="screen(2)">待结算</ws-button>
         <ws-button type="primary" @click="screen(0)">待审核</ws-button>
-        <ws-button type="primary"  @click="screen()">全部</ws-button> -->
-        <ws-button
-            :type="searchType == 0 ? 'primary' : ''"
-            @click="screen(0)"
-            >待审核</ws-button
-          >
-          <ws-button
-            :type="searchType == 2 ? 'primary' : ''"
-            @click="screen(2)"
-            >待结算</ws-button
-          >
-          <ws-button
-            :type="searchType == -1 ? 'primary' : ''"
-            @click="screen(-1)"
-            >全部</ws-button
-          >
+        <ws-button type="primary"  @click="screen()">全部</ws-button>-->
+        <ws-button :type="searchType == 0 ? 'primary' : ''" @click="screen(0)">待审核</ws-button>
+        <ws-button :type="searchType == 2 ? 'primary' : ''" @click="screen(2)">待结算</ws-button>
+        <ws-button :type="searchType == -1 ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
         <ws-button type="primary" @click="reject" v-if="isShowAdopt">驳回</ws-button>
         <ws-button type="primary" @click="adopt" v-if="isShowAdopt">通过</ws-button>
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
-        <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款</ws-button>
+        <ws-button
+          type="primary"
+          @click="payment"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.pay`"
+        >付款</ws-button>
       </template>
       <template slot="right">
         <el-select
@@ -95,7 +110,7 @@
           <div @click="showPayImg(scope.row)">{{scope.row.amountEdPayable}}</div>
         </template>
       </el-table-column>
-      <el-table-column class="table_td" prop="updateDate" label="更新时间" width="140" ></el-table-column>
+      <el-table-column class="table_td" prop="updateDate" label="更新时间" width="140"></el-table-column>
       <el-table-column class="table_td" prop="status" label="状态">
         <template scope="scope">
           <span v-if="scope.row.approveStatus">
@@ -108,7 +123,6 @@
       </el-table-column>
       <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="350">
         <template scope="scope">
-          
           <el-button
             v-show="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
             @click="settlement(1, scope.row)"
@@ -140,7 +154,9 @@
           <ws-info-table>
             <ws-form-item label="未付金额(元)" prop="amountNotPayable">{{ payments.amountNotPayable }}</ws-form-item>
             <ws-form-item label="本次付款金额(元)" prop="money">
-              <ws-input type="number" @mousewheel.native.prevent
+              <ws-input
+                type="number"
+                @mousewheel.native.prevent
                 v-model="payments.money"
                 placeholder="请输入本次付款金额(元)"
                 maxlength="100"
@@ -171,14 +187,14 @@
       </div>
     </el-dialog>
     <!-- 付款截图 -->
-     <el-dialog width="50%" :visible.sync="showPayImgs" :append-to-body="true" title="付款截图">
-       <div v-for="(item,index) in payImg" :key="index" class="pay_img">
-         <img :src="item" alt="" class="img">
-       </div>
-       <div style="text-align:center;margin:10px auto;">
-       <el-button @click="showPayImgs = false" type="primary">关闭</el-button>
-       </div>
-     </el-dialog>
+    <el-dialog width="50%" :visible.sync="showPayImgs" :append-to-body="true" title="付款截图">
+      <div v-for="(item,index) in payImg" :key="index" class="pay_img">
+        <img :src="item" alt class="img" />
+      </div>
+      <div style="text-align:center;margin:10px auto;">
+        <el-button @click="showPayImgs = false" type="primary">关闭</el-button>
+      </div>
+    </el-dialog>
     <div style="text-align: center">
       <el-pagination
         @size-change="handleSizeChange"
@@ -195,7 +211,7 @@
         :visible.sync="isShowPrint"
         :title="printData.compName+'结算凭证'"
       >
-        <paymentPrint :printData="printData"></paymentPrint>
+        <paymentPrint :printData="printData" :customerInfo="customerList" :showType="ruleForm.type"></paymentPrint>
         <div style="text-align: center">
           <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
           <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
@@ -212,6 +228,7 @@ import {
   delpayment,
   auditpayment,
   getpaymentexamine,
+  getCustomerLook,
   paymentCommit
 } from '@/model/houseSelfCollect/index'
 import { posthandle } from '@/model/purchasingManagement/index'
@@ -222,6 +239,31 @@ export default {
   watch: {},
   data() {
     return {
+      isShowPrintType1: true,
+      isShowPrintType2: true,
+      isShowPrintType3: true,
+      isShowPrintType4: true,
+      ruleForm: {
+        type: [
+          '打印身份证(正反面)',
+          '打印银行卡(正反面)',
+          '打印结算凭证',
+          '打印发票'
+        ]
+      },
+      row: {},
+      isShowPrintType: false,
+      imageUrl1: '',
+      imageUrl2: '',
+      imageUrl3: '',
+      imageUrl4: '',
+      customerList: {
+        customerName: '',
+        customerNumberCard: '',
+        bankCard: '',
+        bankDeposit: ''
+      },
+      identity: [],
       //分页
       currentPage: 1,
       pageSize: 10,
@@ -245,11 +287,11 @@ export default {
         amountNotPayable: 0,
         paymentDate: ''
       },
-      showPayImgs:false,
-      isShowAdopt:false,
+      showPayImgs: false,
+      isShowAdopt: false,
       //上传截图路径
       imageUrl: '',
-      payImg:[],
+      payImg: []
     }
   },
   activated() {
@@ -258,6 +300,62 @@ export default {
     // this.getList()
   },
   methods: {
+    selectType(val) {
+      console.log(val)
+      console.log(this.ruleForm.type)
+      for (let i = 0; i < this.ruleForm.type.length; i++) {
+        switch (this.ruleForm.type[i]) {
+          case '打印身份证(正反面)':
+            this.isShowPrintType1 = !this.isShowPrintType1
+            break
+          case '打印银行卡(正反面)':
+            this.isShowPrintType2 = !this.isShowPrintType2
+            break
+          case '打印结算凭证':
+            this.isShowPrintType3 = !this.isShowPrintType3
+          case '打印发票':
+            this.isShowPrintType4 = !this.isShowPrintType4
+            break
+        }
+      }
+    },
+    typePrintCannelClick() {
+      this.isShowPrintType = false
+    },
+    typePrintClick() {
+      //  this.isShowPrint = true
+      getCustomerLook({
+        id: this.row.identityAuthenticationInfo.id,
+        authenticationStatusKey: 7
+      })
+        .toPromise()
+        .then(response => {
+          this.customerList = response
+          this.identity = this.customerList.cardAddressUrl.split(',')
+          this.bank = this.customerList.payeeAddressUrl.split(',')
+          this.imageUrl1 = this.identity[0]
+          this.imageUrl2 = this.identity[1]
+          this.imageUrl3 = this.bank[0]
+          this.imageUrl4 = this.bank[1]
+          getpaymentexamine({ id: this.row.id })
+            .toPromise()
+            .then(response => {
+              this.printData = response
+              this.isShowPrint = true
+              // if(this.printData.solidGrainPrice){
+              //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+              // }
+              let date = new Date()
+              this.printData.currentTime =
+                date.getFullYear() +
+                '年' +
+                Number(date.getMonth() + 1) +
+                '月' +
+                date.getDate() +
+                '日'
+            })
+        })
+    },
     handlepass() {
       var that = this
       if (this.modification.length == 0) {
@@ -266,22 +364,21 @@ export default {
         this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
-          type: 'warning',
+          type: 'warning'
         }).then(() => {
           that.audit(this.modification[0], 0, true, 2)
         })
       }
-      
     },
     //查看付款截图
-    showPayImg(row){
-      if(!row.paymentScreenshot){
-         this.$message({
+    showPayImg(row) {
+      if (!row.paymentScreenshot) {
+        this.$message({
           message: '暂无付款截图!',
           type: 'warning'
         })
         return
-      }else{
+      } else {
         this.showPayImgs = true
         this.payImg = row.paymentScreenshot.split('$')
       }
@@ -299,7 +396,7 @@ export default {
             this.warehouseNameKey = this.WAREHOUSE[3].payname
           } else {
             this.WAREHOUSE[3].payname = this.warehouseList[0].id
-            this.warehouseName =  this.warehouseList[0].warehouseName
+            this.warehouseName = this.warehouseList[0].warehouseName
           }
           this.getList()
         })
@@ -317,7 +414,11 @@ export default {
     printBig() {
       window.open(
         '../../../../../static/payprint.html?type=2&dataList=' +
-          JSON.stringify(this.printData),
+          JSON.stringify(this.printData) +
+          '&customerList=' +
+          JSON.stringify(this.customerList) +
+          '&printTypeList=' +
+          this.ruleForm.type,
         '结算凭证'
       )
     },
@@ -327,7 +428,7 @@ export default {
         paymentDate: ''
       }
       var searchParam = ''
-      if(this.searchType != -1){
+      if (this.searchType != -1) {
         searchParam = this.searchType
       }
       getpayment({
@@ -343,17 +444,17 @@ export default {
           this.paymentList = response
           this.deptBudgetTotal = response.total
         })
-        this.isShowAdopt = true
-     getpayment({
-         currentPage: 1,
+      this.isShowAdopt = true
+      getpayment({
+        currentPage: 1,
         pageSize: 99999,
         warehouseName: this.warehouseName,
-        managementType : 1 
+        managementType: 1
       })
         .toPromise()
-        .then((response) => {
-          for(let i = 0 ; i < response.length ; i++){
-            if(response[i].taskId){
+        .then(response => {
+          for (let i = 0; i < response.length; i++) {
+            if (response[i].taskId) {
               this.isShowAdopt = true
               return
             }
@@ -548,17 +649,29 @@ export default {
       }
     },
     print(row) {
-      getpaymentexamine({ id: row.id })
-        .toPromise()
-        .then(response => {
-          this.isShowPrint = true
-          this.printData = response
-          // if(this.printData.solidGrainPrice){
-          //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
-          // }
-          let date = new Date()
-          this.printData.currentTime = date.getFullYear() + '年' + Number(date.getMonth() + 1) + '月' + date.getDate() + '日'
-        })
+      console.log('打印数据', row)
+      if (sessionStorage.getItem('ws-pf_roleName') == '财务') {
+        this.isShowPrintType = true
+        this.row = row
+      } else {
+        getpaymentexamine({ id: row.id })
+          .toPromise()
+          .then(response => {
+            this.printData = response
+            this.isShowPrint = true
+            // if(this.printData.solidGrainPrice){
+            //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+            // }
+            let date = new Date()
+            this.printData.currentTime =
+              date.getFullYear() +
+              '年' +
+              Number(date.getMonth() + 1) +
+              '月' +
+              date.getDate() +
+              '日'
+          })
+      }
     },
     examine() {
       if (this.modification.length == 0) {
@@ -726,13 +839,49 @@ table {
   border-radius: 5px;
   display: block;
 }
-.pay_img{
-width:50%;
-// display: flex;
-display: inline-block;
-.img{
-  height: 350px;
+.pay_img {
+  width: 50%;
+  // display: flex;
+  display: inline-block;
+  .img {
+    height: 350px;
+    width: 100%;
+  }
+}
+.print-type {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  margin: auto;
+  width: 200px;
+  height: 215px;
+  background: white;
+  border-radius: 10px;
+  z-index: 999;
+}
+.label-width {
   width: 100%;
 }
+.mask {
+  background: black;
+  width: 100vw;
+  height: 100vh;
+  position: fixed;
+  top: 0;
+  z-index: 99;
+  opacity: 0.3;
+}
+.print-type-title{
+    text-align: center;
+    font-size: 18px;
+    margin: 20px;
+}
+.bottom-btn{
+  margin: 20px;
+}
+.print-type-checkbox{
+ padding-left: 20px;
 }
 </style>