zhongtianhaoyuan 3 年之前
父节点
当前提交
c7a1377daa

+ 5 - 124
public/static/tradeServicesPrint.html

@@ -49,13 +49,6 @@
         display: flex;
         margin: 10px 0;
       }
-
-      img {
-        width: 41px;
-        height: 41px;
-        /* margin-right: 118px; */
-      }
-
       .config {
         margin-right: 240px;
       }
@@ -73,43 +66,6 @@
         text-align: right;
         margin-bottom: 10px;
       }
-
-      .small-row {
-        display: flex;
-      }
-
-      .small-content {
-        width: 400px;
-        margin: 0 auto;
-        border: 1px solid #ccc;
-        padding: 20px 20px 160px 20px;
-        position: absolute;
-        top: 0;
-        bottom: 0;
-        left: 0;
-        right: 0;
-        margin: auto;
-        height: 650px;
-      }
-
-      .small-title {
-        text-align: center;
-        font-size: 18px;
-        display: flex;
-        justify-content: space-between;
-        align-items: center;
-      }
-
-      .small-row {
-        display: flex;
-        justify-content: space-between;
-        margin: 10px;
-      }
-
-      .small-img {
-        margin-right: 0;
-      }
-
       .sign {
         margin-right: 100px;
       }
@@ -120,57 +76,10 @@
         font-size: 16px;
         margin: 10px 0;
       }
-
-      .header1 {
-        font-size: 24px;
-        margin: 30px 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 {}
-
-      .sfcard-content {
-        display: flex;
-        align-items: center;
-        justify-content: space-evenly;
-      }
-
-      .sfcard-content img {
-        width: 45%;
-        height: 50vh;
-      }
-
-      .sfcard-title {
-        font-size: 28px;
-        text-align: center;
-        margin: 10px 0;
-      }
-
-      .avatar {
-        margin-bottom: 120px;
-      }
-
-      .avatar:nth-of-type(2) {
-        margin-bottom: 140px;
-      }
-
       .center {
        height: calc(100vh - 8px);
       }
@@ -178,7 +87,7 @@
   </head>
   <body>
     <div id="app">
-      <div v-for="(item,index) in printData" :key="index">
+      <div v-for="(item,index) in printData" >
         <div class="center">
             <div class="title">磅码单</div>
             <div class="title">{{item.code}}</div>
@@ -222,10 +131,8 @@
       <div v-for="(item,index) in printData1" :key="index">
       <div class="center">
         <div class="title">中天昊元粮食贸易有限公司结算凭证</div>
-        <!-- {{customerInfo}} -->
         <div class="header">
            <div>单位名称:{{ item.compName}}</div>
-           <!-- <div>税务登记编号:91230230MA1BNL7Q93</div> -->
         </div>
         <div class="header-top">
           <div>单位:公斤、元</div>
@@ -233,7 +140,6 @@
         </div>
         <div class="header-top">
           <div>开票日期:{{item.createDate}}</div>
-          <!-- <div>开票日期:{{new Date(yyyy,mm,dd)}}</div> -->
           <div class="number">{{item.paymentNo}}</div>
         </div>
         <table class="table">
@@ -274,7 +180,6 @@
             <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">{{ item.goodsName}}</td>
@@ -284,10 +189,10 @@
             <td class="col">{{ item.qualityInspectionManagement.impurity}}</td>
             <td class="col">{{ item.grossWeight}}</td>
             <td class="col">{{ item.tare}}</td>
-            <td class="col" v-if="item.type == '干粮'">{{printData.weighingManagement.buckleMiscellaneous}}</td>
+            <td class="col" v-if="item.type == '干粮'">{{item.weighingManagement.buckleMiscellaneous}}</td>
             <td class="col" v-if="item.type == '潮粮'">0</td>
             <td class="col" v-if="item.type == '干粮'">0</td>
-            <td class="col" v-if="item.type == '潮粮'">{{printData.netWeight}}</td>
+            <td class="col" v-if="item.type == '潮粮'">{{item.netWeight}}</td>
             <td class="col">{{item.pureWeight}}</td>
           </tr>
           <tr class="row">
@@ -304,8 +209,8 @@
             <td class="col col-bgc">卸车扣款</td>
           </tr>
           <tr class="row">
-            <td class="col " v-if="printData.type == '潮粮'">{{item.tidalGrainPrice}}</td>
-            <td class="col " v-if="printData.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
+            <td class="col " v-if="item.type == '潮粮'">{{item.tidalGrainPrice}}</td>
+            <td class="col " v-if="item.type == '干粮'">{{item.qualityInspectionManagement.dryGrainPrice}}</td>
             <td class="col ">{{ item.unitDeduction}}</td>
             <td class="col ">{{ item.grainMoney}}</td>
             <td class="col ">{{ item.weighingSubsidy}}</td>
@@ -319,7 +224,6 @@
           <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>
@@ -328,15 +232,12 @@
           <tr class="row">
             <td class="col ">{{ item.qualityDeduction}}</td>
             <td class="col ">{{ item.otherDeduction}}</td>
-            <!-- <td class="col " v-if="printData.type == '潮粮'">{{ printData.solidGrainPrice}}</td> -->
             <td class="col ">{{ item.calculationPayable}}</td>
             <td class="col ">{{ item.qualityInspectionManagement.natureOfGrainPurchase}}</td>
             <td class="col ">{{ item.carNo}}</td>
             <td class="col " colspan="5">{{ item.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="7">{{item.capitalize}}</td>
     
@@ -376,11 +277,6 @@
     new Vue({
       el: '#app',
       data: {
-        isShowPrintType1: false,
-        isShowPrintType2: false,
-        isShowPrintType3: false,
-        isShowPrintType4: false,
-        showType: [],
         printData: [
             {
                 identityAuthenticationInfo:{},
@@ -390,19 +286,7 @@
             }
         ],
         printData1: [],
-        customerList: {},
-        customerList1: [],
-        name: '',
-        bigContent: false,
-        smallContent: false,
         date: '',
-        imageUrl1: '',
-        imageUrl2: '',
-        imageUrl3: '',
-        imageUrl4: '',
-        identity: [],
-        bank: [],
-        selectPrint: false,
       },
       computed: {},
       methods: {
@@ -436,9 +320,6 @@
       },
       mounted() {
         this.date = new Date().toLocaleString()
-        // let _data = decodeURIComponent(this.getQueryVariable('dataList'))
-        // console.log("cdsjkvdjkljklkcj",JSON.parse(_data))
-        // inOutRecord_print
         this.printData = JSON.parse(sessionStorage.getItem('inOutRecord_printBD'))
         this.printData1 = JSON.parse(sessionStorage.getItem('inOutRecord_printJSD'))
         console.log("磅单",this.printData)

+ 163 - 0
public/static/warehouseBatchPrint.html

@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
+    <title></title>
+    <style>
+      table,
+      table tr th,
+      table tr td {
+        border: 2px solid #333333;
+        padding: 5px 0;
+        height: 55px;
+      }
+
+      #app {
+         /* height: 98vh;  */
+        position: relative; 
+      }
+
+      .content {
+        width: 1000px;
+        padding: 70px 20px 20px 20px;
+        font-size: 22px;
+        height: calc(100vh - 7.5vh) ;
+        top: 0;
+        bottom: 0;
+        left: 0;
+        right: 0;
+      }
+
+      table {
+        width: 100%;
+        text-align: center;
+        border-collapse: collapse;
+        border: 3px solid #333333;
+      }
+
+      .col-bgc {
+        background: #f6f7fb;
+      }
+
+      .bottom-row1 {
+        display: flex;
+        /* justify-content: space-between; */
+        margin-top: 5px 0;
+      }
+
+      .bottom-row2 {
+        display: flex;
+      }
+      .config {
+        margin-top: 10px;
+        margin-right: 240px;
+      }
+      .autograph{
+        margin-top: 10px;
+     }
+
+      .title {
+        text-align: center;
+        font-size: 36px;
+        font-weight: 500;
+        margin-bottom: 20px;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="app">
+      <div class="content"  v-for="(item,index) in tableData">
+        <div v-if="item.inOutFlag == '2'" class="title">{{item.companyName}}</div>
+        <div v-else  class="title">{{item.contractManagementInfo?item.contractManagementInfo.seller:item.companyName}}</div>
+        <div v-if="item.inOutFlag == '2'" class="title">入库检斤单</div>
+        <div v-else class="title">出库检斤单</div>
+        <table class="table">
+          <tr class="row">
+            <td class="col col-bgc">送货单位</td>
+            <td class="col" colspan="4">{{item.contractManagementInfo?item.contractManagementInfo.seller:item.warehouseName}}</td>
+            <td class="col col-bgc">车牌号</td>
+            <td class="col" colspan="1">{{item.carNo}}</td>
+            <td class="col col-bgc">货名</td>
+            <td class="col" colspan="1">{{item.goodsName}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">收货单位</td>
+            <td class="col" colspan="4">{{item.contractManagementInfo?item.contractManagementInfo.buyer:item.receiveWarehouse}}</td>
+            <td class="col col-bgc">类型</td>
+            <td class="col"colspan="1">{{item.type}}</td>
+            <td class="col col-bgc">检斤时间</td>
+            <td class="col" colspan="1">{{item.updateDate}}</td>
+          </tr>
+          <tr class="row">
+            <td class="col col-bgc">毛重(吨)</td>
+            <td class="col" colspan="2">{{item.grossWeight}}</td>
+            <td class="col col-bgc">皮重(吨)</td>
+            <td class="col" colspan="2">{{item.tare}}</td>
+            <td class="col col-bgc">净重(吨)</td>
+            <td class="col" colspan="2">{{item.netWeight}}</td>
+          </tr>
+        </table>
+        <div class="bottom">
+          <div class="bottom-row1">
+            <div>检斤员:{{item.backOffice}}</div>
+          </div>
+          <div class="bottom-row2">
+            <div class="config">收货单位签名或盖章:</div>
+            <div class="autograph">客户签名:</div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
+  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
+  <script type="text/javascript">
+    new Vue({
+      el: '#app',
+      data: {
+        tableData: {
+        },
+        name: "",
+      },
+      computed: {},
+      methods: {
+        tableRowClassName({
+          row,
+          rowIndex
+        }) {
+          if (rowIndex === 1) {
+            return 'warning-row';
+          } else if (rowIndex === 3) {
+            return 'success-row';
+          }
+          return '';
+        },
+        getQueryVariable(variable) {
+          var query = window.location.search.substring(1);
+          var vars = query.split("&");
+          for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+              return pair[1];
+            }
+          }
+          return (false);
+        },
+        printSmall() {},
+        printBig() {},
+      },
+      mounted() {
+        this.tableData = JSON.parse(localStorage.getItem("warehouseBatchPrint"))
+        console.log("打印数据", this.tableData)
+        document.title = "粮食检斤单"
+        window.print()
+        window.onafterprint = function(event) {
+          window.history.back(-1)
+        };
+      },
+      watch: {}
+    })
+  </script>
+
+</html>

+ 2 - 2
src/views/taskManagement/tranManagementLook.vue

@@ -68,7 +68,7 @@
         class="datafor"
       >
         <div class="driver">运输阶段&nbsp;&nbsp;{{ index+1 }}&nbsp;&nbsp;({{ item.processNo }})
-          <el-checkbox
+          <!-- <el-checkbox
             class="endflag"
             true-label="1"
             disabled
@@ -76,7 +76,7 @@
             v-model="item.endFlag"
             :label="1"
             >粮款结算阶段</el-checkbox
-          >
+          > -->
         </div>
           <ws-info-table class="el-table">
          <ws-form-item label="运输方式" span="1" prop="tranType">

+ 2 - 2
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -220,7 +220,7 @@
             src="../../../public/img/del.png"
             alt
           /> -->
-          <el-checkbox
+          <!-- <el-checkbox
             @change="(val) => {engflagchange(val, index)}"
             class="endflag"
             true-label="1"
@@ -229,7 +229,7 @@
             v-model="item.endFlag"
             :label="1"
             >粮款结算阶段</el-checkbox
-          >
+          > -->
         </div>
         <ws-info-table>
           <el-form-item label="运输方式" span="1" prop="waterContent">

+ 2 - 2
src/views/taskManagement/tranManagementTransportEdit.vue

@@ -219,7 +219,7 @@
             src="../../../public/img/del.png"
             alt=""
           /> -->
-          <el-checkbox
+          <!-- <el-checkbox
             @change="(val) => {engflagchange(val, index)}"
             class="endflag"
             :disabled='disabled'
@@ -228,7 +228,7 @@
             v-model="item.endFlag"
             :label="1"
             >粮款结算阶段</el-checkbox
-          >
+          > -->
         </div>
         <ws-info-table>
           <el-form-item label="运输方式" span="1" prop="waterContent">

+ 1 - 1
src/views/warehouse/warehouseManagementList.vue

@@ -123,7 +123,7 @@
             </ws-button> -->
           </template>
         </el-table-column>
-        <el-table-column prop="address" label="操作" width="200">
+        <el-table-column prop="address" label="操作">
           <template slot-scope="scope">
             <div class="record" v-hasPermission="
            `warehouseManagement.warehouse.warehouseInfo.view`

+ 0 - 3
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -1842,9 +1842,6 @@ export default {
   margin: 0 auto;
 }
 
-/deep/.el-form-item__label {
-  width: 160px;
-}
 
 //选填
 /deep/.el-form-item {

+ 37 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -74,7 +74,9 @@
             alt
           />
         </ws-button>
-				<el-table show-summary :summary-method="getSummaries" ref="tableData" :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
+		<el-button type="primary" @click="batchPrint">批量打印</el-button>
+				<el-table show-summary :summary-method="getSummaries" ref="tableData" :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
+						 <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
 					<el-table-column type="expand">
 						<template #default="props">
 							<ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -110,7 +112,9 @@
 							</ws-form>
 						</template>
 					</el-table-column>
+				
 					<el-table-column type="index" label="序号">
+						
 						<template scope="scope">
 							<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
 							<span v-else>{{ scope.$index + 1 }}</span>
@@ -387,6 +391,8 @@
 					},
 				},
 				accessoryTFs: false,
+				modification:[],
+				printList:[],//批量打印数据
 			}
 		},
 
@@ -408,6 +414,36 @@
 			})
 		},
 		methods: {
+			batchPrint(){
+				localStorage.removeItem("warehouseBatchPrint")
+				var count = 0
+				for(var i = 0 ; i < this.modification.length ; i++){
+						getPrintInfo({
+                        id: this.modification[i].id
+                      })
+                        .toPromise()
+                        .then((response) => {
+							count++
+                           this.printList.push(response)
+						     if(count == this.modification.length){
+						   localStorage.setItem("warehouseBatchPrint", JSON.stringify(this.printList))
+						  window.open( '../../../../static/warehouseBatchPrint.html')
+					  }
+                     })
+				}
+			},
+			   handleSelectionChange(val) {
+			this.modification = val
+			console.log("sfasa",this.modification)
+	     	},
+			selectInit(row){
+				 //在这里一定要记得类型匹配的上。
+				if (row.inOutType != '收购入库' && row.inOutType != '期初') {
+					return true
+				} else  {
+				return false
+				}
+			},
 			binNumberChange(e){
 				if(e=='全部仓位'){
 					this.deptBudgetList.positionId=''

+ 0 - 1
src/views/warehouse/warehouseManagementTare.vue

@@ -1398,7 +1398,6 @@ export default {
           return
         }
       }
-      console.log(this.deptBudgetList, '出库!!!!!')
       this.$confirm(`是否保存皮重检斤`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',