gjy 3 سال پیش
والد
کامیت
fd3919f12a

+ 44 - 33
public/static/inspection.html

@@ -4,7 +4,7 @@
     <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,
@@ -49,8 +49,8 @@
       .bottom-row2 {
         display: flex;
         margin: 10px 0;
-       
-      } 
+
+      }
       img,.left {
         width: 110px;
         height: 110px;
@@ -85,8 +85,8 @@
       }
 
       .small-content {
-        width: 400px;
-        margin: 0 auto;
+        width: 300px;
+     /*   margin: 0 auto;
         border: 1px solid #ccc;
         padding: 20px 20px 160px 20px;
         position: absolute;
@@ -95,21 +95,25 @@
         left: 0;
         right: 0;
         margin: auto;
-        height: 650px;
+        height: 650px; */
       }
 
       .small-title {
         text-align: center;
         font-size: 18px;
         display: flex;
+        flex-direction: column;
         justify-content: space-between;
         align-items: center;
       }
+      .numberNo{
+        font-size: 36px;
+      }
 
       .small-row {
         display: flex;
         justify-content: space-between;
-        margin: 10px;  
+        margin: 10px;
       }
 
       .small-img {
@@ -118,20 +122,24 @@
       .sign{
         margin-right: 100px;
       }
+      .small-code{
+        position: relative;
+        left:calc(50% - 55px)
+      }
     </style>
   </head>
   <body>
     <div id="app">
       <div class="content" v-if="bigContent">
         <div>
-      
+
         <div class="title">{{tableData.compName}}</div>
         <div class="title">粮食质检单</div>
         <div class="left">
           <img :src="tableData.codeUrl " alt="">
         </div>
         </div>
-      
+
         <div class="number">{{tableData.qualityNo}}</div>
         <table class="table">
           <tr class="row">
@@ -217,65 +225,66 @@
           <div class="numberNo">{{tableData.qualityNo.substring(tableData.qualityNo.length - 3)}}</div>
           <div>粮食质检单</div>
         </div>
+         <img :src="tableData.codeUrl " alt="" class="small-code">
         <div class="small-row">
-          <div>编号</div>
+          <div>编号</div>
           <div>{{tableData.qualityNo}}</div>
         </div>
         <div class="small-row">
-          <div>客户姓名</div>
+          <div>客户姓名</div>
           <div>{{tableData.customerName}}</div>
         </div>
         <div class="small-row">
-          <div>客户电话</div>
+          <div>客户电话</div>
           <div>{{tableData.customerPhone}}</div>
         </div>
         <div class="small-row">
-          <div>车牌号</div>
+          <div>车牌号</div>
           <div>{{tableData.carNumber}}</div>
         </div>
         <div class="small-row">
-          <div>收货单位</div>
+          <div>收货单位</div>
           <div>{{tableData.compName}}</div>
         </div>
         <div class="small-row">
-          <div>联系人</div>
+          <div>联系人</div>
           <div>{{tableData.person}}</div>
         </div>
         <div class="small-row">
-          <div>联系电话</div>
+          <div>联系电话</div>
           <div>{{tableData.personPhone}}</div>
         </div>
         <div class="small-row">
-          <div>货名</div>
+          <div>货名</div>
           <div>{{tableData.goodsName}}</div>
         </div>
         <div class="small-row">
-          <div>类型</div>
+          <div>类型</div>
           <div>{{tableData.type}}</div>
         </div>
         <div class="small-row">
-          <div>容量(克/升)</div>
+          <div>容量(克/升)</div>
           <div>{{tableData.bulkDensity}}</div>
         </div>
         <div class="small-row">
-          <div>不完善粒(%)</div>
+          <div>不完善粒(%)</div>
           <div>{{tableData.imperfectGrain}}</div>
         </div>
         <div class="small-row">
-          <div>等级</div>
+          <div>等级</div>
           <div>{{tableData.grade}}</div>
         </div>
         <div class="small-row">
-          <div>水分(%)</div>
+          <div>水分(%)</div>
           <div>{{tableData.waterContent}}</div>
         </div>
         <div class="small-row">
-          <div>热损伤(%)</div>
+          <div>热损伤(%)</div>
           <div>{{tableData.jiaorenli}}</div>
         </div>
         <div class="small-row">
-          <div v-if="tableData.confirm == '1'">单价(元/公斤)</div>
-          <div v-else>待定单价(元/公斤)</div>
+          <div v-if="tableData.confirm == '1'">单价(元/公斤)</div>
+          <div v-else>待定单价(元/公斤)</div>
           <div  v-if="tableData.type == '潮粮'">
             {{tableData.tidalGrainPrice}}
           </div>
@@ -285,33 +294,35 @@
           <!-- <div>{{tableData.tidalGrainPrice}}</div> -->
         </div>
         <div class="small-row">
-          <div>杂质(%)</div>
+          <div>杂质(%)</div>
           <div>{{tableData.impurity}}</div>
         </div>
         <div class="small-row">
-          <div>霉变粒(%)</div>
+          <div>霉变粒(%)</div>
           <div>{{tableData.mildewGrain}}</div>
         </div>
         <div v-if="tableData.paramType == '1'" class="small-row">
-          <div>扣杂</div>
+          <div>扣杂</div>
           <div>{{tableData.buckleMiscellaneous}}</div>
         </div>
         <div class="small-row">
-          <div>购粮性质</div>
+          <div>购粮性质</div>
           <div>{{tableData.natureOfGrainPurchase}}</div>
         </div>
         <div class="small-row">
-          <div>质检</div>
+          <div>质检</div>
           <div>{{tableData.qualityInspector}}</div>
         </div>
         <div class="small-row">
-          <div>时间</div>
+          <div>时间</div>
           <div>{{tableData.qualityDate}}</div>
         </div>
         <div class="small-row">
           <div>收货单位签名或盖章:</div>
-          <div class="sign">客户签名:</div>
-        </div>  
+        </div>
+        <div class="small-row">
+         <div class="sign">客户签名:</div>
+        </div>
       </div>
     </div>
   </body>

+ 7 - 127
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>
@@ -215,25 +124,21 @@
                 <div class="config">毛检:{{item.secretaryWeigher}}皮检:{{item.skinInspector}}</div>
                 <div class="autograph">日期:{{item.inOutDate}}</div>
               </div>
-              
             </div>
         </div>
       </div>
       <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>单位名称:{{item.compName}}</div>
         </div>
         <div class="header-top">
-          <div>单位:公斤元</div>
+          <div>单位:公斤/元</div>
           <div>No.</div>
         </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 +179,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 +188,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 +208,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 +223,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 +231,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 +276,6 @@
     new Vue({
       el: '#app',
       data: {
-        isShowPrintType1: false,
-        isShowPrintType2: false,
-        isShowPrintType3: false,
-        isShowPrintType4: false,
-        showType: [],
         printData: [
             {
                 identityAuthenticationInfo:{},
@@ -390,19 +285,7 @@
             }
         ],
         printData1: [],
-        customerList: {},
-        customerList1: [],
-        name: '',
-        bigContent: false,
-        smallContent: false,
         date: '',
-        imageUrl1: '',
-        imageUrl2: '',
-        imageUrl3: '',
-        imageUrl4: '',
-        identity: [],
-        bank: [],
-        selectPrint: false,
       },
       computed: {},
       methods: {
@@ -436,9 +319,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>

+ 244 - 0
src/components/balanceAlert.vue

@@ -0,0 +1,244 @@
+
+<template>
+  <div class="content">
+    <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
+    <div class="title" v-else>皮重</div>
+    <div class="number" v-if="information.indexOf('毛重') > -1">{{grossWeightVal}} kg</div>
+    <div class="number" v-else>{{tareVal}} KG</div>
+    
+    <div class="btn" @click="sendVal">确定</div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'balanceAlert',
+  props: ['deptBudgetList', 'information'],
+  data () {
+    return {
+     param: 9600,
+     grossWeightVal:'',
+     tareVal:''
+    }
+  },
+  activated(){
+   
+  },
+  mounted(){
+ console.log('11111111111111111111111111111111111')
+    console.log(this.deptBudgetList)
+    this.openPort()
+  },
+  computed: {
+    
+  },
+  created () {
+    
+  },
+  methods: {
+    sendVal(){
+      console.log(this.grossWeightVal)
+       console.log(this.tareVal)
+      if(this.information.indexOf('毛重') > -1){
+        this.$emit('balanceListen',this.grossWeightVal)
+      }else{
+        this.$emit('balanceListen',this.tareVal)
+      }
+      
+    },
+   async closePort() {
+      console.log('closePort')
+      this.reader.cancel()
+    },
+     async openPort() {
+      console.log('openPort', navigator)
+        if ('serial' in navigator) {
+          if (!this.$store.state.app.reader) {
+            // The Web Serial API is supported.
+            console.log('the Web Serial API is supported.')
+            console.log(this.param)
+            const port = await navigator.serial.requestPort()
+            await port.open({
+              baudRate: this.param,
+            }) // set baud rate
+            this.reader = port.readable.getReader()
+            console.log('beforeReader', port)
+            console.log('beforeReader', this.reader)
+            this.$store.dispatch('app/setReader', this.reader)
+          } else {
+            console.log('afterport', this.$store.state.app.reader)
+            this.reader = this.$store.state.app.reader
+          }
+        // 监听来自串行设备的数据
+        while (true) {
+          const { value, done } = await this.reader.read()
+          // console.log("value",value);
+          if (done) {
+            // 允许稍后关闭串口。
+            this.reader.releaseLock()
+            break
+          }
+          var result = ''
+          //2。获取16进制字符串
+          // var receData = HexConvert.ByteToString(value);
+          // console.log("receData",receData);
+          var flag = false
+          var flag1 = false
+          // for (var i = 0; i < value.length; i++) {
+          //   var tmp = String.fromCharCode(value[i])
+          //   if (tmp == '+') {
+          //     flag = true
+          //   }
+          //   if (flag && result.length < 6 && tmp != '+') {
+          //     result += tmp
+          //   }
+          // }
+          // if (this.information != '毛重检斤') {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.grossWeight = parseInt(result)
+          //   }
+          // } else {
+          //   if(parseInt(result)){
+          //     this.deptBudgetList.tare = parseInt(result)
+          //   }
+          // }
+          console.log('value:', value)
+          if (
+            this.deptBudgetList.warehouseName &&
+            (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
+              this.deptBudgetList.warehouseName == '克东千红库' ||
+              this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
+              this.deptBudgetList.warehouseName == '哈尔滨依兰库'||
+              this.deptBudgetList.warehouseName == '龙江金信库')
+          ) {
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+              if (tmp == '+') {
+                flag = true
+              }
+              if (flag && result.length < 6 && tmp != '+') {
+                result += tmp
+              }
+            }
+            if (this.information.indexOf('毛重') > -1) {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.grossWeightVal = parseInt(result)
+              }
+            } else {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.tareVal = parseInt(result)
+              }
+            }
+          } else if (
+            this.deptBudgetList.warehouseName &&
+            (this.deptBudgetList.warehouseName == '顺诚粮库' ||
+              this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
+          ) {
+            for (var i = value.length - 1; i >= 0; i--) {
+              var tmp = String.fromCharCode(value[i])
+              console.log(tmp)
+              if (String.fromCharCode(value[0]) == '.') {
+                flag = true
+              }
+              if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
+                result += tmp
+              }
+            }
+            if (this.information.indexOf('毛重') > -1) {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.grossWeightVal = parseInt(result)
+              }
+            } else {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.tareVal = parseInt(result)
+              }
+            }
+          } else {
+            for (var i = 0; i < value.length; i++) {
+              var tmp = String.fromCharCode(value[i])
+
+              if (value[0] != 49 && value[0] != 2) {
+                if (
+                  value[value.length - 1] == 48 &&
+                  value[value.length - 2] == 48
+                ) {
+                  flag1 = true
+                } else {
+                  break
+                }
+              }
+              if (tmp == String.fromCharCode(32)) {
+                flag = true
+              }
+              if (
+                flag &&
+                result.length < 7 &&
+                tmp != String.fromCharCode(32) &&
+                !(
+                  value[value.length - 1] == 48 && value[value.length - 2] == 48
+                )
+              ) {
+                result += tmp
+              }
+              if (flag1 && tmp != String.fromCharCode(32)) {
+                if (
+                  value[value.length - 1] == 48 &&
+                  value[value.length - 2] == 48
+                ) {
+                  if (i == 0) {
+                    this.result1 = tmp + '0'
+                  }
+                }
+              }
+            }
+            if (this.information.indexOf('毛重') > -1) {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.grossWeightVal = parseInt(
+                  result + this.result1
+                )
+              }
+            } else {
+              if (parseInt(result) || parseInt(result) == 0) {
+                this.tareVal = parseInt(result + this.result1)
+              }
+            }
+          }
+          // setTimeout(1000)
+          // value 是一个 Uint8Array
+        }
+        await port.close()
+      } else {
+        console.log('the Web Serial API is not supported.', navigator)
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  .content{
+    background: black;
+    color: #2AFF7C;
+    font-size: 32px;
+    text-align: right;
+    padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 20px 20px;
+  }
+  .title{
+    text-align: center;
+  }
+  .number{
+    // font-size: 60px;
+  }
+  .btn{
+    border: 1px solid #2aff7c;
+        width: 50%;
+    // margin: 30px auto;
+    border-radius: 10px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+</style>

+ 38 - 20
src/layout/index/top/index.vue

@@ -25,25 +25,29 @@
           @keyup.enter.native="payCode" placeholder="扫码枪内容"></el-input>
         <div v-show="isOpenCodeGun">扫码枪已连接</div>
         <div v-show="!isOpenCodeGun" @click="setCodeGun">点我扫码</div>
-        <el-dialog title="扫描二维码" :visible.sync="smAlert">
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
-            v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)">去初检
-          </el-button>
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.con`"
-            v-if="btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'"  @click="goToPage(2)">去确认质检
-          </el-button>
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.again`"
-            v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(3)">去复检
-          </el-button>
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`"
-            v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3" @click="goToPage(4)">去称毛重
-          </el-button>
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status5"
-            @click="goToPage(5)">去结算</el-button>
-          <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
-            v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'">去称皮重
-          </el-button>
-          <el-button @click="smAlert = false" class="btn">关闭</el-button>
+        <!--  -->
+        <el-dialog title="扫描二维码" :visible.sync="smAlert" width="200px374a8a02ecfe40dc9abdcd902dd564f5
+        ">
+          <div class="btn-list">
+            <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`"
+                v-if="btnStatus.status1||btnStatus.status2" @click="goToPage(1)" class="btn_css">去初检
+              </el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.con`"
+                v-if="btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'"  @click="goToPage(2)" class="btn_css">去确认质检
+              </el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionQuality.again`"
+                v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3||btnStatus.status4" v-show="toPageData.qualityInspectionManagement.confirm != '1'" @click="goToPage(3)" class="btn_css">去复检
+              </el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`"
+                v-if="btnStatus.status1||btnStatus.status2||btnStatus.status3" @click="goToPage(4)" class="btn_css">去称毛重
+              </el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionPay.add`" v-if="btnStatus.status5"
+                @click="goToPage(5)" class="btn_css">去结算</el-button>
+              <el-button v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`" 
+                v-if="btnStatus.status2||btnStatus.status3||btnStatus.status4||btnStatus.status5" @click="goToPage(6)" v-show="toPageData.qualityInspectionManagement.confirm != '1'" class="btn_css">去称皮重
+              </el-button>
+              <el-button @click="smAlert = false" class="btn" >关闭</el-button>
+          </div>
         </el-dialog>
       </div>
       <div >
@@ -372,6 +376,7 @@
           warehouseId: _userHouseId
         }
          this.barCode = ''
+         debugger
         //判断当前账号公司是否是二维码上公司
         if (this.userINfo.userCompany != _userCompId) {
           this.$message.error('当前身份不可操作');
@@ -734,11 +739,24 @@
   .input-Style {
     opacity: 1;
     margin-right: 20px;
-    // visibility: hidden;
+    // visibility: hidden;P
   }
 
   .btn {
     background: #5878e8;
     color: white;
   }
+  .btn-list{
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+  }
+  .btn_css ,.btn{
+    width: 80%;
+    margin: 20px;
+    height: auto;
+    padding: 20px!important;
+    font-size: 40px;
+  }
 </style>

+ 1 - 1
src/store/modules/permission.js

@@ -42,7 +42,7 @@ function filterAsyncRoutes(routes, roles) {
  * @param {*} parentModule
  */
 function handleRoles(roles, res, parentModule) {
-  console.log(roles, res, parentModule)
+  // console.log(roles, res, parentModule)
   roles.forEach((role) => {
     if (Array.isArray(role.children) && role.children.length > 0) {
       handleRoles(role.children, res, parentModule + role.name + '.')

+ 1 - 2
src/views/contractManagement/salesContractAdd.vue

@@ -225,8 +225,7 @@
               value-format="yyyy-MM-dd" />
           </ws-form-item>
           <!--结算重量方式-->
-          <ws-form-item label="结算重量方式" span="1" prop="settlementWeightMethod" class="readonly"
-          v-if="deptBudgetList.deliverType==1">
+          <ws-form-item label="结算重量方式" span="1" prop="settlementWeightMethod" class="readonly">
           <el-radio v-model="deptBudgetList.settlementWeightMethod" label="1">按出库重量结算</el-radio>
           <el-radio v-model="deptBudgetList.settlementWeightMethod" label="2">按收货重量结算</el-radio>
         </ws-form-item>

+ 1 - 4
src/views/houseSelfCollect/paymentManagement.vue

@@ -677,14 +677,11 @@
           }
         })
         }else{
-          console.log(22222)
           columns.forEach((column, index) => {
           if (index === 0) {
             sums[index] = '合计'
           } else if (
-            index === 10 ||
-            index === 11 || index === 15 || index === 16
-
+            index === 11 || index === 16 || index === 17
           ) {
             const values = data.map((item) => Number(item[column.property]))
             if (!values.every((value) => isNaN(value))) {

+ 22 - 142
src/views/houseSelfCollect/weightCheck.vue

@@ -2,7 +2,7 @@
   <div class="center">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left titleup">{{ information }}检斤信息</h2>
+        <h2 class="bg-left titleup">{{ information }}信息</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
@@ -12,6 +12,8 @@
     </el-row>
     <div class="substance">
       <div class="left">
+        <BalanceAlert v-if='isShowBalance' ref="weightChild" :deptBudgetList='weighingList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
         <div class="top">
           <div class="car-type">{{carWeightInfo.type}}</div>
           <div v-if="index==0" class="weight">{{weighingList.grossWeight}} <span class="kg-style">kg</span></div>
@@ -185,11 +187,13 @@
     getinspectLookGoods
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
+   import BalanceAlert from '@/components/balanceAlert'
   import html2canvas from 'html2canvas'
   import axios from 'axios'
   export default {
     components: {
       weightCheckPrint,
+      BalanceAlert
     },
     watch: {
       weighingList: { //深度监听,可监听到对象、数组的变化
@@ -208,6 +212,7 @@
     },
     data() {
       return {
+        isShowBalance: false,
         currentPage: 1,
         pageSize: 100,
         deptCircularPage: {},
@@ -266,6 +271,7 @@
       this.getList()
       this.tpyeNo = this.$route.query.tpyeNo
       this.warehouseName = this.$route.query.warehouseName
+      this.weighingList.warehouseName = this.$route.query.warehouseName
       this.weighingList.number = this.$route.query.number
       this.weighingList.binNumber = this.$route.query.binNumber
       this.weighingList.customerNumberCard = this.$route.query.customerNumberCard
@@ -299,9 +305,11 @@
       } else if (this.tpyeNo == 2) {
         this.information = '皮重'
       }
-      if(this.$route.query.automaticWeightAcquisition == '1'){
-        this.openPort()
-      }
+      this.$route.query.automaticWeightAcquisition = 0
+      // if(this.$route.query.automaticWeightAcquisition == '1'){
+        // this.openPort()
+        this.isShowBalance = true
+      // }
       console.log(this.weighingList)
     },
     deactivated() {
@@ -309,6 +317,16 @@
 
     },
     methods: {
+      setVal(data) {
+        if (this.information == '毛重') {
+          this.weighingList.grossWeight = data
+        } else {
+          this.weighingList.tare = data
+        }
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
       cutstatus(status){
         this.status=status
         if(status==1){
@@ -615,144 +633,6 @@
         this.weighingList = val;
         this.paramType = val.qualityInspectionManagement.paramType
       },
-      async closePort() {
-        console.log('closePort');
-        if (this.reader) {
-          this.reader.cancel()
-        }
-      },
-      async openPort() {
-        console.log('openPort', navigator)
-        if ('serial' in navigator) {
-          // if (!this.$store.state.app.reader) {
-            // The Web Serial API is supported.
-            console.log('the Web Serial API is supported.')
-            console.log(this.param)
-            const port = await navigator.serial.requestPort()
-            await port.open({
-              baudRate: this.param,
-            }) // set baud rate
-            this.reader = port.readable.getReader()
-            console.log('beforeReader', port)
-            console.log('beforeReader', this.reader)
-            this.$store.dispatch('app/setReader', this.reader)
-          // } else {
-          //   console.log('afterport', this.$store.state.app.reader)
-          //   this.reader = this.$store.state.app.reader
-          // }
-          // 监听来自串行设备的数据
-          while (true) {
-            const {
-              value,
-              done
-            } = await this.reader.read();
-            // console.log("value",value);
-            if (done) {
-              // 允许稍后关闭串口。
-              this.reader.releaseLock();
-              break;
-            }
-            var result = '';
-            //2。获取16进制字符串
-            // var receData = HexConvert.ByteToString(value);
-            // console.log("receData",receData);
-            var flag = false;
-            var flag1 = false;
-            if (this.warehouseName && (this.warehouseName == '山东诸城迈饶库' || this.warehouseName == '克东千红库' || this
-                .warehouseName == '鲅鱼圈祥腾库' || this.warehouseName == '哈尔滨依兰库'|| this.warehouseName == '龙江金信库')) {
-              for (var i = 0; i < value.length; i++) {
-                var tmp = String.fromCharCode(value[i])
-                if (tmp == '+') {
-                  flag = true
-                }
-                if (flag && result.length < 6 && tmp != '+') {
-                  result += tmp
-                }
-              }
-              if (this.tpyeNo != 2) {
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.grossWeight = parseInt(result)
-                }
-              } else {
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.tare = parseInt(result)
-                }
-              }
-            } else if (this.warehouseName && (this.warehouseName == '顺诚粮库' || this.warehouseName == '鲅鱼圈金信库')) {
-              for (var i = value.length - 1; i >= 0; i--) {
-                var tmp = String.fromCharCode(value[i])
-                console.log(tmp)
-                if (String.fromCharCode(value[0]) == '.') {
-                  flag = true
-                }
-                if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
-                  result += tmp
-                }
-              }
-              console.log(parseInt(result))
-              if (this.tpyeNo != 2) {
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.grossWeight = parseInt(result)
-                }
-              } else {
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.tare = parseInt(result)
-                }
-              }
-            } else {
-              // console.log(value)
-              for (var i = 0; i < value.length; i++) {
-                var tmp = String.fromCharCode(value[i])
-
-                if ((value[0] != 49 && value[0] != 2)) {
-                  if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
-                    flag1 = true
-                  } else {
-                    break
-                  }
-                }
-                if (tmp == String.fromCharCode(32)) {
-                  flag = true
-                }
-                if (flag && result.length < 7 && tmp != String.fromCharCode(32) && !(value[value.length - 1] == 48 &&
-                    value[value.length - 2] == 48)) {
-                  result += tmp
-                }
-                if (flag1 && tmp != String.fromCharCode(32)) {
-                  if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
-                    if (i == 0) {
-                      this.result1 = tmp + '0'
-                    }
-                  }
-                }
-              }
-              if (this.tpyeNo != 2) {
-                console.log(parseInt(result) + '' + parseInt(this.result1))
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.grossWeight = parseInt(result + this.result1)
-                }
-                if (parseInt(result) == 0 && parseInt(this.result1) == 0) {
-                  this.weighingList.grossWeight = 0
-                }
-
-              } else {
-                if (parseInt(result) || parseInt(result) == 0) {
-                  this.weighingList.tare = parseInt(result + this.result1)
-                }
-                if (parseInt(result) == 0 && parseInt(this.result1) == 0) {
-                  this.weighingList.tare = 0
-                }
-              }
-            }
-
-            // setTimeout(1000)
-            // value 是一个 Uint8Array
-          }
-          await port.close();
-        } else {
-          console.log('the Web Serial API is not supported.', navigator);
-        }
-      },
       cancel() {
 
         if (this.reader) {

+ 1 - 0
src/views/login/index.vue

@@ -862,6 +862,7 @@
               JSON.stringify(res.accountId)
             )
           } else {
+            this.$message.error("您输入的用户名或密码错误!")
             return false
           }
         })

+ 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">

+ 41 - 1
src/views/warehouse/warehouseManagementDelivery.vue

@@ -37,12 +37,31 @@
         <div class="flex">
           <div class="left" style='width:66.6666%'>
             <ws-info-table>
+              <!-- 任务编号 -->
+            <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+            <el-select
+              filterable
+              clearable
+              v-model="deptBudgetList.inOutTaskNo"
+              placeholder="请选择任务编号"
+              class="typeselect"
+              @change="contractNoChange"
+            >
+              <el-option
+                v-for="item in deptBudgetList1"
+                :key="item.inOutTaskNo"
+                :label="item.inOutTaskNo"
+                :value="item.inOutTaskNo"
+              />
+            </el-select>
+          </ws-form-item>
               <ws-form-item label="合同编号" span="1" prop="contractNo">
                 <ws-select
                   v-model="deptBudgetList.contractNo"
                   placeholder="请选择合同编号或移库任务编号"
                   class="typeselect"
                   @change='contractNoChange'
+                  disabled
                 >
                   <ws-option
                     v-for="item in outContractNo"
@@ -583,6 +602,7 @@ import {
   xialaNo,
   getstaff,
   goodsnameXiala,
+  getReceiptTaskNo,
 } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -689,6 +709,7 @@ export default {
         },
       },
       accessoryTFs: false,
+      deptBudgetList1:[],
     }
   },
   mounted() {
@@ -730,8 +751,18 @@ export default {
 
     },
     contractNoChange(e){
+      for (let i = 0; i < this.deptBudgetList1.length; i++) {
+        if (this.deptBudgetList1[i].inOutTaskNo == e) {
+          var data = this.deptBudgetList1[i]
+          if (this.deptBudgetList1[i].contractNo) {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+          } else {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+          }
+        }
+      }
       for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == e) {
+        if (this.outContractNo[i].contractNo == this.deptBudgetList.contractNo) {
              if (this.outContractNo[i].inOutType == '销售出库') {
               if(!this.outContractNo[i].unitContractPrice){
               this.deptBudgetList.tips =
@@ -1664,6 +1695,15 @@ export default {
             this.deliveryType = response
           })
       }
+       getReceiptTaskNo({
+      flag: 1,
+      warehouseName: this.deptBudgetList.warehouseName,
+      agentKey: localStorage.getItem('ws-pf_userId'),
+    })
+      .toPromise()
+      .then((response) => {
+        this.deptBudgetList1 = response
+      })
       //合同编号
       xialaNo({ compId: localStorage.getItem('ws-pf_compId'),flag:5  })
         .toPromise()

+ 1864 - 2377
src/views/warehouse/warehouseManagementGross.vue

@@ -6,19 +6,9 @@
         <h2 class="bg-left title">{{ information }}</h2>
       </el-col>
       <el-col :span="4" class="bg-right">
-        <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="revert()"
-        >
-          <img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
         </el-button>
       </el-col>
     </el-row>
@@ -26,182 +16,84 @@
     <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
       <div class="basicInformation">
         <h2>
-          <img
-            style="position: relative; top: 2px"
-            width="19"
-            height="19"
-            src="../../../public/img/cangku.png"
-            alt
-          />
+          <img style="position: relative; top: 2px" width="19" height="19" src="../../../public/img/cangku.png" alt />
           {{ deptBudgetList.warehouseName }}
-          <span class="position" v-show="this.$route.query.warehouseType == 1"
-            >{{ deptBudgetList.binNumber }}仓位</span
-          >
+          <span class="position" v-show="this.$route.query.warehouseType == 1">{{ deptBudgetList.binNumber }}仓位</span>
           <span v-show="this.$route.query.warehouseType == 2">(临)</span>
         </h2>
-        <div class="top">
-          <div class="car-type">毛重</div>
-          <div class="weight">
-            {{ deptBudgetList.grossWeight }} <span class="kg-style">kg</span>
+        <div class="balance-row">
+          <BalanceAlert class="left" v-if='isShowBalance' ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <div class="car-type">毛重</div>
+            <div class="weight">
+              {{ deptBudgetList.grossWeight }} <span class="kg-style">kg</span>
+            </div>
+            <!-- <div v-else class="weight">{{weighingList.tare}} <span class="kg-style">kg</span></div> -->
+            <div class="car-no">{{ deptBudgetList.carNo }}</div>
           </div>
-          <!-- <div v-else class="weight">{{weighingList.tare}} <span class="kg-style">kg</span></div> -->
-          <div class="car-no">{{ deptBudgetList.carNo }}</div>
         </div>
+
         <div class="flex">
           <div class="left" style='width:66.6666%;'>
             <ws-info-table>
               <!--任务编号-->
               <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
-                <el-select
-                  filterable
-                  clearable
-                  v-model="deptBudgetList.inOutTaskNo"
-                  placeholder="请选择任务编号"
-                  class="typeselect"
-                  @change="contractNoChange"
-                >
-                  <el-option
-                    v-for="item in deptBudgetList1"
-                    :key="item.inOutTaskNo"
-                    :label="item.inOutTaskNo"
-                    :value="item.inOutTaskNo"
-                  />
+                <el-select filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号"
+                  class="typeselect" @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList1" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
                 </el-select>
               </ws-form-item>
               <!--毛重(公斤)-->
               <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
-                <ws-input
-                  :disabled="allowEdit"
-                  @input="grossWeightchange"
-                  v-model="deptBudgetList.grossWeight"
-                  placeholder="请输入毛重"
-                  maxlength="20"
-                  type="number"
-                  @mousewheel.native.prevent
-                  size="small"
-                />
-                <el-button
-                  type="primary"
-                  v-if="information == '毛重检斤'"
-                  @click="openPort"
-                  >重新获取</el-button
-                >
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="deptBudgetList.grossWeight"
+                  placeholder="请输入毛重" maxlength="20" type="number" @mousewheel.native.prevent size="small" />
+                <el-button type="primary" v-if="information == '毛重检斤'" @click="openPort">重新获取</el-button>
               </ws-form-item>
               <!--合同编号-->
               <ws-form-item label="合同编号" span="1" prop="contractNo">
-                <el-select
-                  disabled
-                  filterable
-                  clearable
-                  v-model="deptBudgetList.contractNo"
-                  class="typeselect"
-                  @change="contractNoChange1"
-                >
-                  <el-option
-                    v-for="item in options1"
-                    :key="item.constKey"
-                    :label="item.contractNo"
-                    :value="item.contractNo"
-                  />
+                <el-select disabled filterable clearable v-model="deptBudgetList.contractNo" class="typeselect"
+                  @change="contractNoChange1">
+                  <el-option v-for="item in options1" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
                 </el-select>
               </ws-form-item>
               <!--皮重(公斤)-->
-              <ws-form-item
-                label="皮重(公斤)"
-                span="1"
-                prop="tare"
-                class="readonly"
-              >
-                <ws-input
-                  :disabled="allowEdit"
-                  @input="tarechange"
-                  v-model="deptBudgetList.tare"
-                  placeholder="请输入皮重"
-                  type="number"
-                  @mousewheel.native.prevent
-                  maxlength="100"
-                  size="small"
-                />
-                <el-button
-                  type="primary"
-                  v-if="information == '皮重检斤'"
-                  @click="openPort"
-                  >重新获取</el-button
-                >
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="deptBudgetList.tare" placeholder="请输入皮重"
+                  type="number" @mousewheel.native.prevent maxlength="100" size="small" />
+                <el-button type="primary" v-if="information == '皮重检斤'" @click="openPort">重新获取</el-button>
               </ws-form-item>
               <ws-form-item label="提示" span="1" prop="tips">
-                <ws-input
-                  onmouseover="this.title=this.value"
-                  v-model="deptBudgetList.tips"
-                  maxlength="20"
-                  size="small"
-                />
+                <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips" maxlength="20"
+                  size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="扣重(公斤)"
-                span="1"
-                prop="deductionWeight"
-                class="readonly"
-              >
-                <ws-input
-                  @input="tarechange"
-                  v-model="deptBudgetList.deductionWeight"
-                  placeholder="请输入扣重"
-                  type="number"
-                  @mousewheel.native.prevent
-                  maxlength="100"
-                  size="small"
-                />
+              <ws-form-item label="扣重(公斤)" span="1" prop="deductionWeight" class="readonly">
+                <ws-input @input="tarechange" v-model="deptBudgetList.deductionWeight" placeholder="请输入扣重" type="number"
+                  @mousewheel.native.prevent maxlength="100" size="small" />
               </ws-form-item>
               <!-- 货名 -->
               <ws-form-item label="货名" span="1">
-                <ws-select
-                  disabled
-                  v-model="deptBudgetList.goodsName"
-                  placeholder
-                  class="typeselect"
-                  @change="selectgoodsName"
-                >
-                  <ws-option
-                    v-for="item in goodnameList"
-                    :key="item.constKey"
-                    :label="item.constValue"
-                    :value="item.constValue"
-                  />
+                <ws-select disabled v-model="deptBudgetList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
                 </ws-select>
               </ws-form-item>
               <!--净重(公斤)-->
               <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
-                <ws-input
-                  disabled
-                  v-model="deptBudgetList.netWeight"
-                  placeholder="不可编辑,自动计算"
-                  maxlength="120"
-                  size="small"
-                />
+                <ws-input disabled v-model="deptBudgetList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
               </ws-form-item>
               <ws-form-item label="类型" span="1" prop="type">
-                <ws-select
-                  disabled
-                  v-model="deptBudgetList.type"
-                  @change="typeChange"
-                >
-                  <ws-option
-                    v-for="item in typeList"
-                    :key="item"
-                    :label="item"
-                    :value="item"
-                  />
+                <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
                 </ws-select>
               </ws-form-item>
               <ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
-                <ws-input
-                  @input="kkInput(deptBudgetList.deductionAmount)"
-                  v-model="deptBudgetList.deductionAmount"
-                  placeholder="请输入扣款金额"
-                  maxlength="120"
-                  size="small"
-                />
+                <ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount"
+                  placeholder="请输入扣款金额" maxlength="120" size="small" />
               </ws-form-item>
               <!-- <ws-form-item
                 v-if="deptBudgetList.type == '潮粮'"
@@ -272,66 +164,30 @@
                -->
               <!-- 品级 -->
               <ws-form-item label="品级" span="1" class="readonly">
-                <ws-select
-                  v-model="deptBudgetList.grade"
-                  placeholder
-                  class="typeselect"
-                  @change="selectpackingMethod"
-                >
-                  <ws-option
-                    v-for="item in gradeList"
-                    :key="item.constKey"
-                    :label="item.constValue"
-                    :value="item.constValue"
-                  />
+                <ws-select v-model="deptBudgetList.grade" placeholder class="typeselect" @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
                 </ws-select>
               </ws-form-item>
-              <ws-form-item
-                label="入库日期"
-                span="1"
-                prop="inOutDate"
-                class="deliverydate"
-              >
-                <el-date-picker
-                  v-model="deptBudgetList.inOutDate"
-                  placeholder="请选择入库日期"
-                  type="date"
-                  value-format="yyyy-MM-dd"
-                ></el-date-picker>
+              <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
+                <el-date-picker v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date"
+                  value-format="yyyy-MM-dd"></el-date-picker>
               </ws-form-item>
               <!--经办人-->
               <ws-form-item label="经办人" span="1" prop="agent">
-                <el-select
-                  v-model="deptBudgetList.agent"
-                  placeholder="请选择经办人"
-                  filterable
-                  clearable
-                  @change="selectstaff"
-                >
-                  <el-option
-                    v-for="item in options"
-                    :key="item.value"
-                    :label="item.staffName"
-                    :value="item.staffName"
-                  />
+                <el-select v-model="deptBudgetList.agent" placeholder="请选择经办人" filterable clearable
+                  @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
                 </el-select>
               </ws-form-item>
-              
+
               <!-- 入库类型 -->
               <ws-form-item label="入库类型" span="1">
-                <ws-select
-                  v-model="deptBudgetList.inOutType"
-                  placeholder
-                  class="typeselect"
-                  @change="selectstorageType"
-                  :disabled="isSelectType"
-                >
-                  <ws-option
-                    v-for="item in storageType"
-                    :key="item.constKey"
-                    :label="item.constValue"
-                    :value="item.constValue"
-                  />
+                <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType"
+                  :disabled="isSelectType">
+                  <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
                 </ws-select>
               </ws-form-item>
               <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
@@ -339,279 +195,106 @@
           </div>
           <div class="right" style='width:33.3333%;'>
             <ws-info-table>
-               <ws-form-item label="成本" span="1" prop="cost">
-                <ws-input
-                  :disabled="disabled1"
-                  v-model="deptBudgetList.cost"
-                  placeholder="请输入成本"
-                  size="small"
-                  type="number"
-                  @mousewheel.native.prevent
-                />
-                <img
-                  width="17"
-                  height="18"
-                  style="vertical-align: text-top; position: relative; top: -1px"
-                  src="../../../public/img/edit.png"
-                  @click="editClick(1)"
-                  alt=""
-                />
+              <ws-form-item label="成本" span="1" prop="cost">
+                <ws-input :disabled="disabled1" v-model="deptBudgetList.cost" placeholder="请输入成本" size="small"
+                  type="number" @mousewheel.native.prevent />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
               </ws-form-item>
               <ws-form-item label="运费" span="1" prop="freight">
-                <ws-input
-                  :disabled="disabled2"
-                  v-model="deptBudgetList.freight"
-                  placeholder="请输入运费"
-                  size="small"
-                  type="number"
-                  @mousewheel.native.prevent
-                />
-                <img
-                  width="17"
-                  height="18"
-                  style="vertical-align: text-top; position: relative; top: -1px"
-                  src="../../../public/img/edit.png"
-                  @click="editClick(2)"
-                  alt=""
-                />
+                <ws-input :disabled="disabled2" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small"
+                  type="number" @mousewheel.native.prevent />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
               </ws-form-item>
               <!--入库方式-->
               <ws-form-item label="运输方式" span="1" prop="outType">
-                <el-select
-                  v-model="deptBudgetList.outType"
-                  placeholder="请选择运输方式"
-                >
-                  <el-option
-                    v-for="item in multiSelector"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.name"
-                  />
+                <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
                 </el-select>
               </ws-form-item>
               <!--车牌号  -->
-              <ws-form-item
-                label="车牌号"
-                span="1"
-                prop="carNo"
-                v-if="
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
-                "
-              >
-                <ws-input
-                  v-if="options2.length==0"
-                  v-model="deptBudgetList.carNo"
-                  placeholder="请输入车牌号"
-                  maxlength="7"
-                  size="small" 
-                />
-                <el-select
-                  v-if='carstatus&&options2.length>0'
-                  filterable
-                  :filter-method="dataFilter2"
-                  v-model="deptBudgetList.carNo"
-                  placeholder="请选择车牌号"
-                  class="typeselect"
-                  @change="carChange"
-                >
-                  <el-option
-                    v-for="item in options2"
-                    :key="item.constKey"
-                    :label="item.carNo + '(' + item.tranCarNo + ')'"
-                    :value="item.carNo"
-                  />
+                ">
+                <ws-input v-if="options2.length==0" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  size="small" />
+                <el-select v-if='carstatus&&options2.length>0' filterable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
                 </el-select>
-                <el-select
-                  v-if='!carstatus&&options2.length>0'
-                  filterable
-                  :filter-method="dataFilter2"
-                  v-model="deptBudgetList.carNo"
-                  placeholder="请选择车牌号"
-                  class="typeselect"
-                  @change="carChange"
-                >
-                  <el-option
-                    v-for="item in options2"
-                    :key="item.constKey"
-                    :label="item.carNo"
-                    :value="item.carNo"
-                  />
+                <el-select v-if='!carstatus&&options2.length>0' filterable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
                 </el-select>
               </ws-form-item>
               <!--船名  -->
-              <ws-form-item
-                label="船名"
-                span="1"
-                prop="carNo"
-                v-if="deptBudgetList.outType == '散船'"
-              >
-                <ws-input
-                  v-model="deptBudgetList.carNo"
-                  placeholder="请输入船名"
-                  size="small"
-                />
+              <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="航次"
-                span="1"
-                prop="shipNumber"
-                v-if="deptBudgetList.outType == '散船'"
-              >
-                <ws-input
-                  v-model="deptBudgetList.shipNumber"
-                  placeholder="请输入航次"
-                  maxlength="20"
-                  size="small"
-                />
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
               </ws-form-item>
               <!--车号  -->
-              <ws-form-item
-                label="车号"
-                span="1"
-                prop="carNo"
-                v-if="deptBudgetList.outType == '火运'"
-              >
-                <ws-input
-                  v-model="deptBudgetList.carNo"
-                  placeholder="请输入车号"
-                  size="small"
-                />
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="箱号-1"
-                span="1"
-                prop="boxNo"
-                v-if="
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
-                "
-              >
-                <ws-input
-                  v-model="deptBudgetList.boxNo"
-                  placeholder="请输入箱号"
-                  maxlength="20"
-                  size="small"
-                />
+                ">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="箱号-2"
-                span="1"
-                prop="boxNoOther"
-                v-if="
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
-                "
-              >
-                <ws-input
-                  v-model="deptBudgetList.boxNoOther"
-                  placeholder="请输入箱号"
-                  maxlength="20"
-                  size="small"
-                />
+                ">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="封号-1"
-                span="1"
-                prop="titleNo"
-                v-if="
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
-                "
-              >
-                <ws-input
-                  v-model="deptBudgetList.titleNo"
-                  placeholder="请输入封号"
-                  maxlength="20"
-                  size="small"
-                />
+                ">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="封号-2"
-                span="1"
-                prop="titleNoOther"
-                v-if="
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
                   deptBudgetList.outType == '汽运' ||
                   deptBudgetList.outType == '集装箱船'
-                "
-              >
-                <ws-input
-                  v-model="deptBudgetList.titleNoOther"
-                  placeholder="请输入封号"
-                  maxlength="20"
-                  size="small"
-                />
+                ">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="车厢号-1"
-                span="1"
-                prop="wingNumber"
-                v-if="deptBudgetList.outType == '火运'"
-              >
-                <ws-input
-                  v-model="deptBudgetList.wingNumber"
-                  placeholder="请输入车厢号"
-                  maxlength="20"
-                  size="small"
-                />
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
               </ws-form-item>
-              <ws-form-item
-                label="车厢号-2"
-                span="1"
-                prop="wingNumberOther"
-                v-if="deptBudgetList.outType == '火运'"
-              >
-                <ws-input
-                  v-model="deptBudgetList.wingNumberOther"
-                  placeholder="请输入车厢号"
-                  maxlength="20"
-                  size="small"
-                />
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
               </ws-form-item>
-             
+
               <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
             </ws-info-table>
           </div>
         </div>
-        <div
-          v-show="
+        <div v-show="
             this.$route.query.warehouseType == 2 &&
             this.deptBudgetList.createType == 2
-          "
-        >
+          ">
           <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
-          <ws-info-table
-            v-show="checked == true && this.deptBudgetList.createType == 2"
-          >
+          <ws-info-table v-show="checked == true && this.deptBudgetList.createType == 2">
             <!-- 出库类型 -->
             <ws-form-item label="出库类型" span="1" prop="temporaryOutType">
               <!-- v-model="deptBudgetList.deliveryType" -->
-              <ws-select
-                v-model="deptBudgetList.temporaryOutType"
-                placeholder
-                class="typeselect"
-              >
-                <ws-option
-                  v-for="item in deliveryType"
-                  :key="item.constKey"
-                  :label="item.constValue"
-                  :value="item.constValue"
-                />
+              <ws-select v-model="deptBudgetList.temporaryOutType" placeholder class="typeselect">
+                <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
               </ws-select>
             </ws-form-item>
             <!-- 出库合同编号 -->
             <ws-form-item label="出库合同编号" span="1">
-              <ws-select
-                v-model="deptBudgetList.outContractNo"
-                placeholder="请选择合同编号或移库任务编号"
-                class="typeselect"
-              >
-                <ws-option
-                  v-for="item in outContractNo"
-                  :key="item.constKey"
-                  :label="item.contractNo"
-                  :value="item.contractNo"
-                />
+              <ws-select v-model="deptBudgetList.outContractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect">
+                <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                  :value="item.contractNo" />
               </ws-select>
             </ws-form-item>
           </ws-info-table>
@@ -632,11 +315,7 @@
       <el-button size="small" type="primary">点击上传</el-button>
       </el-upload> -->
       <div v-if="deptBudgetList.addressUrl != ''">
-        <img
-          style="width: 100px; height: 100px"
-          :src="deptBudgetList.addressUrl"
-          alt=""
-        />
+        <img style="width: 100px; height: 100px" :src="deptBudgetList.addressUrl" alt="" />
       </div>
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
@@ -651,19 +330,10 @@
         </ws-form-item> -->
 
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
-          <el-select
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
-            placeholder="请选择质检员"
-            filterable
-            clearable
-            @change="qualityInspectorChange"
-          >
-            <el-option
-              v-for="item in qualityInspectorList"
-              :key="item.value"
-              :label="item.staffName"
-              :value="item.staffName"
-            />
+          <el-select v-model="deptBudgetList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable
+            clearable @change="qualityInspectorChange">
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
           </el-select>
         </ws-form-item>
       </div>
@@ -672,2202 +342,2019 @@
         <ws-info-table>
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入水分占比"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.waterContent" type="number"
+              @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
           </ws-form-item>
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入杂质占比"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.impurity" type="number" @mousewheel.native.prevent
+              placeholder="请输入杂质占比" maxlength="40" size="small" />
           </ws-form-item>
           <!--容重(克/升)-->
           <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入容重"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.bulkDensity" type="number" @mousewheel.native.prevent
+              placeholder="请输入容重" maxlength="40" size="small" />
           </ws-form-item>
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入霉变粒占比"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.mildewGrain" type="number" @mousewheel.native.prevent
+              placeholder="请输入霉变粒占比" maxlength="40" size="small" />
           </ws-form-item>
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入热损伤占比"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.jiaorenli" type="number" @mousewheel.native.prevent
+              placeholder="请输入热损伤占比" maxlength="40" size="small" />
           </ws-form-item>
           <!--不完善粒(%)<=-->
           <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入不完善粒占比"
-              maxlength="40"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain" type="number"
+              @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
           </ws-form-item>
         </ws-info-table>
       </div>
       <div style="text-align: right; padding: 10px">
-        <el-button
-          v-if="information == '毛重检斤'"
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="temporaryStorage()"
-          >保存</el-button
-        >
-        <el-button
-          v-if="!allowEdit"
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="submit()"
-          >提交</el-button
-        >
+        <el-button v-if="information == '毛重检斤'" class="bg-bottom-up" type="primary" size="small"
+          @click="temporaryStorage()">保存</el-button>
+        <el-button v-if="!allowEdit" class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
       </div>
     </ws-form>
   </div>
 </template>
 <script>
-import {
-  pullDown,
-  addstorageputList,
-  xialaNo,
-  getstaff,
-  getReceiptTaskNo,
-} from '@/model/warehouse/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
-    isShow(val) {
-      this.showType = val
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
     },
-  },
-  data() {
-    return {
-      deptBudgetList1: [],
-      qualityInspectorList: [],
-      isGetCost: false,
-      isSelectType: true,
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      typeList: ['干粮', '潮粮'],
-      // 年
-      year: '',
-      carstatus: false,
-      deptBudgetTotal: 0,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      checked: true,
-      agent: [],
-      staffList: [],
-      options: [],
-      options1: [],
-      options2: [],
-      outContractNo1: [],
-      outContractNo: [],
-
-      // 提交类型
-      submitType: true,
-      storageType: [],
-      deliveryType: [],
-      readonly: true,
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      onChange: {},
-      gradeList: [],
-      rules: {},
-      size: 10,
-      disabled1: true,
-      disabled2: true,
-      tranCarInfoList: [],
-      compId: localStorage.getItem('ws-pf_compId'),
-      secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      contractList: [],
-      deptBudgetList: {
-        type: '干粮',
-        freight: 0,
-        cost: '',
-        addressUrl: '',
-        warehouseInOutDetail: {},
-        deductionAmount: 0,
-        deductionWeight: 0,
-        grossWeight: '',
-        tare: '',
-        inOutDate: '',
-      },
-      historyList: [],
-      cost: '',
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
-        },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
       },
-      accessoryTFs: false,
-      allowEdit: true,
-      param: 9600,
-      information: '',
-      result1: '00',
-      multiSelector: [
-        {
-          name: '汽运',
-          value: '0',
-        },
-        {
-          name: '火运',
-          value: '1',
+    },
+    data() {
+      return {
+        //有没有称
+        isShowBalance: false,
+        deptBudgetList1: [],
+        qualityInspectorList: [],
+        isGetCost: false,
+        isSelectType: true,
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        typeList: ['干粮', '潮粮'],
+        // 年
+        year: '',
+        carstatus: false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        checked: true,
+        agent: [],
+        staffList: [],
+        options: [],
+        options1: [],
+        options2: [],
+        outContractNo1: [],
+        outContractNo: [],
+
+        // 提交类型
+        submitType: true,
+        storageType: [],
+        deliveryType: [],
+        readonly: true,
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        onChange: {},
+        gradeList: [],
+        rules: {},
+        size: 10,
+        disabled1: true,
+        disabled2: true,
+        tranCarInfoList: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
         },
-        {
-          name: '集装箱船',
-          value: '2',
+        contractList: [],
+        deptBudgetList: {
+          type: '干粮',
+          freight: 0,
+          cost: '',
+          addressUrl: '',
+          warehouseInOutDetail: {},
+          deductionAmount: 0,
+          deductionWeight: 0,
+          grossWeight: '',
+          tare: '',
+          inOutDate: '',
         },
-        {
-          name: '散船',
-          value: '3',
+        historyList: [],
+        cost: '',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
         },
-      ],
-    }
-  },
-  mounted() {
-    let date = new Date()
-    var year = date.getFullYear()
-    var month = date.getMonth() + 1
-    var strDate = date.getDate()
-    this.deptBudgetList.inOutDate = '' + year + '-' + month + '-' + strDate
-    this.information = this.$route.query.information
-    if (this.$route.query.allowEdit == 1) {
-      this.allowEdit = false
-    } else {
-      this.allowEdit = true
-    }
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
-    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
-    this.deptBudgetList.createType = this.$route.query.createType
-    this.getList()
-    // this.deptBudgetList.grade = '一等品'
-    // this.deptBudgetList.gradeKey = '1'
-    this.deptBudgetList.inOutTypeFlag = 1
-    if (this.deptBudgetList.cost) {
-      if (this.deptBudgetList.cost > this.deptBudgetList.deductionAmount) {
-        this.deptBudgetList.cost =
-          this.cost - this.deptBudgetList.deductionAmount
-      } else {
+        accessoryTFs: false,
+        allowEdit: true,
+        param: 9600,
+        information: '',
+        result1: '00',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
       }
-    }
-    getReceiptTaskNo({
-      flag: 2,
-      warehouseName: this.deptBudgetList.warehouseName,
-      agentKey: localStorage.getItem('ws-pf_userId'),
-    })
-      .toPromise()
-      .then((response) => {
-        console.log(response)
-        this.deptBudgetList1 = response
-      })
-    // if (this.deptBudgetList.warehouseType == 1) {
-    //   // this.deptBudgetList.inOutType = '采购入库'
-    //   this.deptBudgetList.inOutTypeKey = '1'
-    // } else {
-    //   // this.deptBudgetList.inOutType = '退库'
-    //   this.deptBudgetList.inOutTypeKey = '1'
-    // }
-    if(this.$route.query.automaticWeightAcquisition == '1'){
-      this.openPort()
-    }
-  },
-  methods: {
-    async closePort() {
-      console.log('closePort')
-      this.reader.cancel()
     },
-    async openPort() {
-      console.log('openPort', navigator)
-        if ('serial' in navigator) {
-          // if (!this.$store.state.app.reader) {
-            // The Web Serial API is supported.
-            console.log('the Web Serial API is supported.')
-            console.log(this.param)
-            const port = await navigator.serial.requestPort()
-            await port.open({
-              baudRate: this.param,
-            }) // set baud rate
-            this.reader = port.readable.getReader()
-            console.log('beforeReader', port)
-            console.log('beforeReader', this.reader)
-            this.$store.dispatch('app/setReader', this.reader)
-          // } else {
-          //   console.log('afterport', this.$store.state.app.reader)
-          //   this.reader = this.$store.state.app.reader
-          // }
-        // 监听来自串行设备的数据
-        while (true) {
-          const { value, done } = await this.reader.read()
-          // console.log("value",value);
-          if (done) {
-            // 允许稍后关闭串口。
-            this.reader.releaseLock()
-            break
-          }
-          var result = ''
-          //2。获取16进制字符串
-          // var receData = HexConvert.ByteToString(value);
-          // console.log("receData",receData);
-          var flag = false
-          var flag1 = false
-          // for (var i = 0; i < value.length; i++) {
-          //   var tmp = String.fromCharCode(value[i])
-          //   if (tmp == '+') {
-          //     flag = true
-          //   }
-          //   if (flag && result.length < 6 && tmp != '+') {
-          //     result += tmp
-          //   }
-          // }
-          // if (this.information != '毛重检斤') {
-          //   if(parseInt(result)){
-          //     this.deptBudgetList.grossWeight = parseInt(result)
-          //   }
-          // } else {
-          //   if(parseInt(result)){
-          //     this.deptBudgetList.tare = parseInt(result)
-          //   }
-          // }
-          console.log('value:', value)
-          if (
-            this.deptBudgetList.warehouseName &&
-            (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
-              this.deptBudgetList.warehouseName == '克东千红库' ||
-              this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
-              this.deptBudgetList.warehouseName == '哈尔滨依兰库'||
-              this.deptBudgetList.warehouseName == '龙江金信库')
-          ) {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-              if (tmp == '+') {
-                flag = true
-              }
-              if (flag && result.length < 6 && tmp != '+') {
-                result += tmp
-              }
-            }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(result)
-              }
-            } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result)
-              }
-            }
-          } else if (
-            this.deptBudgetList.warehouseName &&
-            (this.deptBudgetList.warehouseName == '顺诚粮库' ||
-              this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
-          ) {
-            for (var i = value.length - 1; i >= 0; i--) {
-              var tmp = String.fromCharCode(value[i])
-              console.log(tmp)
-              if (String.fromCharCode(value[0]) == '.') {
-                flag = true
-              }
-              if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
-                result += tmp
-              }
-            }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(result)
-              }
-            } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result)
-              }
-            }
-          } else {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-
-              if (value[0] != 49 && value[0] != 2) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  flag1 = true
-                } else {
-                  break
-                }
-              }
-              if (tmp == String.fromCharCode(32)) {
-                flag = true
-              }
-              if (
-                flag &&
-                result.length < 7 &&
-                tmp != String.fromCharCode(32) &&
-                !(
-                  value[value.length - 1] == 48 && value[value.length - 2] == 48
-                )
-              ) {
-                result += tmp
-              }
-              if (flag1 && tmp != String.fromCharCode(32)) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  if (i == 0) {
-                    this.result1 = tmp + '0'
-                  }
-                }
-              }
-            }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(
-                  result + this.result1
-                )
-              }
-            } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result + this.result1)
-              }
-            }
-          }
-          // setTimeout(1000)
-          // value 是一个 Uint8Array
-        }
-        await port.close()
+    mounted() {
+      let date = new Date()
+      var year = date.getFullYear()
+      var month = date.getMonth() + 1
+      var strDate = date.getDate()
+      this.deptBudgetList.inOutDate = '' + year + '-' + month + '-' + strDate
+      this.information = this.$route.query.information
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
       } else {
-        console.log('the Web Serial API is not supported.', navigator)
-      }
-    },
-    qualityInspectorChange(e) {
-      console.log(e)
-    },
-    kkInput(val) {
-      console.log(val)
-      if (this.isGetCost) {
-        if (this.deptBudgetList.cost > val) {
+        this.allowEdit = true
+      }
+      this.deptBudgetList.baseId = this.$route.query.baseId
+      this.deptBudgetList.positionId = this.$route.query.positionId
+      this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList.binNumber = this.$route.query.binNumber
+      this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+      this.deptBudgetList.createType = this.$route.query.createType
+      this.getList()
+      // this.deptBudgetList.grade = '一等品'
+      // this.deptBudgetList.gradeKey = '1'
+      this.deptBudgetList.inOutTypeFlag = 1
+      if (this.deptBudgetList.cost) {
+        if (this.deptBudgetList.cost > this.deptBudgetList.deductionAmount) {
           this.deptBudgetList.cost =
             this.cost - this.deptBudgetList.deductionAmount
-        }
+        } else {}
       }
-    },
-    uploadSuccessHandle1(res) {
-      this.deptBudgetList.addressUrl = res.url
-      console.log(this.deptBudgetList.addressUrl)
-    },
-    dataFilter1(val) {
-      console.log(val)
-      this.deptBudgetList.contractNo = val
-      if (val) {
-        //val存在
-        this.options1 = this.outContractNo1.filter((item) => {
-          if (
-            !!~item.contractNo.indexOf(val) ||
-            !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
+      getReceiptTaskNo({
+          flag: 2,
+          warehouseName: this.deptBudgetList.warehouseName,
+          agentKey: localStorage.getItem('ws-pf_userId'),
         })
-      } else {
-        //val为空时,还原数组
-        this.options1 = this.outContractNo
-      }
-    },
-    dataFilter2(val) {
-      this.deptBudgetList.carNo = val
-      if (val) {
-        //val存在
-        this.options1 = this.outContractNo1.filter((item) => {
-          if (
-            !!~item.carNo.indexOf(val) ||
-            !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
+        .toPromise()
+        .then((response) => {
+          console.log(response)
+          this.deptBudgetList1 = response
         })
-      } else {
-        //val为空时,还原数组
-        this.options2 = this.tranCarInfoList
-      }
-    },
-    editClick(status) {
-      this.isGetCost = false
-      if (status == 1) {
-        this.disabled1 = !this.disabled1
-      } else {
-        this.disabled2 = !this.disabled2
+      // if (this.deptBudgetList.warehouseType == 1) {
+      //   // this.deptBudgetList.inOutType = '采购入库'
+      //   this.deptBudgetList.inOutTypeKey = '1'
+      // } else {
+      //   // this.deptBudgetList.inOutType = '退库'
+      //   this.deptBudgetList.inOutTypeKey = '1'
+      // }
+      if (this.$route.query.automaticWeightAcquisition == '1') {
+        this.isShowBalance = true
       }
     },
-    //返回按钮
-    revert() {
-      this.$router.push({
-        path: 'warehouseManagementList',
-      })
-    },
-    carChange(e) {
-      for (let i = 0; i < this.tranCarInfoList.length; i++) {
-        if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
-          this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
-          this.deptBudgetList.freight = Math.round(
-            this.tranCarInfoList[i].tranPrice
-          )
+    methods: {
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.deptBudgetList.grossWeight = data
+        } else {
+          this.deptBudgetList.tare = data
         }
-      }
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter((item) => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
+
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      qualityInspectorChange(e) {
+        console.log(e)
+      },
+      kkInput(val) {
+        console.log(val)
+        if (this.isGetCost) {
+          if (this.deptBudgetList.cost > val) {
+            this.deptBudgetList.cost =
+              this.cost - this.deptBudgetList.deductionAmount
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
         }
-      }
-    },
-    //提交按钮
-    submit() {
-      
-      if(this.reader){
-        this.reader.cancel()
-      }
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.grossWeight) {
-        this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.grossWeight < 100 ||
-        this.deptBudgetList.grossWeight > 500000 ||
-        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.grossWeight).length -
-            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '毛重输入错误(单位:公斤)',
-          type: 'warning',
-        })
-        return
-      }
-      if (!String(this.deptBudgetList.tare)) {
-        this.$message({
-          message: '皮重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.tare < 0 ||
-        this.deptBudgetList.tare > 5000000 ||
-        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tare).length -
-            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '皮重输入错误(单位:公斤)',
-          type: 'warning',
-        })
-        return
-      }
-      if (!String(this.deptBudgetList.deductionWeight)) {
-        this.$message({
-          message: '扣重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.deductionWeight < 0 ||
-        this.deptBudgetList.deductionWeight > 1000 ||
-        (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.deductionWeight).length -
-            (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '扣重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.buckleWeightRatio
-      ) {
-        this.$message({
-          message: '扣重比不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.buckleWeightRatio < 0) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.buckleWeightRatio > 3) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
-          String(this.deptBudgetList.buckleWeightRatio).length -
-            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣重比输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.tidalGrainWater
-      ) {
-        this.$message({
-          message: '潮粮水分不能为空',
-          type: 'warning',
+      },
+      uploadSuccessHandle1(res) {
+        this.deptBudgetList.addressUrl = res.url
+        console.log(this.deptBudgetList.addressUrl)
+      },
+      dataFilter1(val) {
+        console.log(val)
+        this.deptBudgetList.contractNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.contractNo.indexOf(val) ||
+              !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options1 = this.outContractNo
+        }
+      },
+      dataFilter2(val) {
+        this.deptBudgetList.carNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.carNo.indexOf(val) ||
+              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options2 = this.tranCarInfoList
+        }
+      },
+      editClick(status) {
+        this.isGetCost = false
+        if (status == 1) {
+          this.disabled1 = !this.disabled1
+        } else {
+          this.disabled2 = !this.disabled2
+        }
+      },
+      //返回按钮
+      revert() {
+        this.$router.push({
+          path: 'warehouseManagementList',
         })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.tidalGrainWater < 1) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.tidalGrainWater > 40) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tidalGrainWater).length -
-            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '潮粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.solidGrainWater
-      ) {
-        this.$message({
-          message: '干粮水分不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.solidGrainWater < 1) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.solidGrainWater > 40) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
-          String(this.deptBudgetList.solidGrainWater).length -
-            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
-            1)
-      ) {
-        this.$message({
-          message: '干粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!String(this.deptBudgetList.deductionAmount)) {
-        this.$message({
-          message: '扣款不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.deductionAmount < 0 ||
-        this.deptBudgetList.deductionAmount > 10000 ||
-        (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
-          String(this.deptBudgetList.deductionAmount).length -
-            (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣款输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.cost) {
-        this.$message({
-          message: '未获取到成本,请编辑后提交',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.cost < 0 ||
-        this.deptBudgetList.cost > 20000 ||
-        (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
-          String(this.deptBudgetList.cost).length -
-            (String(this.deptBudgetList.cost).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '成本输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!String(this.deptBudgetList.freight)) {
-        this.$message({
-          message: '运费不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.freight < 0 ||
-        this.deptBudgetList.freight > 100000 ||
-        (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.freight).length -
-            (String(this.deptBudgetList.freight).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '运费输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.agent) {
-        this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.grade) {
-        this.$message({
-          message: '品级不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.inOutDate) {
-        this.$message({
-          message: '入库日期不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.inOutType) {
-        this.$message({
-          message: '入库类型不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.carNo) {
-        this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
-        this.$message({
-          message: '箱号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.boxNoOther &&
-        this.deptBudgetList.boxNoOther.length > 20
-      ) {
-        this.$message({
-          message: '箱号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.titleNo &&
-        this.deptBudgetList.titleNo.length > 20
-      ) {
-        this.$message({
-          message: '封号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.titleNoOther &&
-        this.deptBudgetList.titleNoOther.length > 20
-      ) {
-        this.$message({
-          message: '封号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.contractNo) {
-        this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      // if (
-      //   this.deptBudgetList.contractNo.length < 6 ||
-      //   this.deptBudgetList.contractNo.length > 20
-      // ) {
-      //   this.$message({
-      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.addressUrl) {
-      //   this.$message({
-      //     message: '附件不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      //自检员
-      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
-        if (
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
-            2 ||
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
-        ) {
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.freight = Math.round(
+              this.tranCarInfoList[i].tranPrice
+            )
+          }
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      //提交按钮
+      submit() {
+
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.deptBudgetList.goodsName) {
           this.$message({
-            message: '质检员姓名长度错误!',
+            message: '货名不能为空',
             type: 'warning',
           })
           return
         }
-      }
-      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+        if (!this.deptBudgetList.grossWeight) {
           this.$message({
-            message: '水分(%)非数字!',
+            message: '毛重不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.waterContent
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.waterContent
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.grossWeight < 100 ||
+          this.deptBudgetList.grossWeight > 500000 ||
+          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
         ) {
           this.$message({
-            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '毛重输入错误(单位:公斤)',
             type: 'warning',
           })
           return
         }
-      }
-
-      //杂质
-      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+        if (!String(this.deptBudgetList.tare)) {
           this.$message({
-            message: '杂质(%)非数字!',
+            message: '皮重不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.impurity
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare > 5000000 ||
+          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
         ) {
           this.$message({
-            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '皮重输入错误(单位:公斤)',
             type: 'warning',
           })
           return
         }
-      }
-      //霉变
-      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+        if (!String(this.deptBudgetList.deductionWeight)) {
           this.$message({
-            message: '霉变粒(%)非数字!',
+            message: '扣重不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.mildewGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.deductionWeight < 0 ||
+          this.deptBudgetList.deductionWeight > 1000 ||
+          (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionWeight).length -
+            (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
+            3)
         ) {
           this.$message({
-            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '扣重输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //热损伤
-      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.buckleWeightRatio
+        ) {
           this.$message({
-            message: '热损伤(%)非数字!',
+            message: '扣重比不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.jiaorenli
-              ).indexOf('.') +
-                1) >
-              2)
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio < 0) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio > 3) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '扣重比输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //不完善粒(%)
-      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.tidalGrainWater
+        ) {
           this.$message({
-            message: '不完善粒(%)非数字!',
+            message: '潮粮水分不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '潮粮水分输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      //容重
-      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.solidGrainWater
+        ) {
           this.$message({
-            message: '容重(克/升)非数字!',
+            message: '干粮水分不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
-            String(
-              this.deptBudgetList.warehouseInOutDetail.bulkDensity
-            ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.bulkDensity
-              ).indexOf('.') +
-                1) >
-              2) ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.solidGrainWater).length -
+            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+            1)
         ) {
           this.$message({
-            message: '容重输入错误',
+            message: '干粮水分输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      console.log(this.deptBudgetList, '入库对象')
-      this.$confirm(`确定提交入库信息`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-              this.deptBudgetList.secretaryWeigher =
-                localStorage.getItem('ws-pf_staffName')
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.pcFlag = 1
-              this.deptBudgetList.statusFlag = 3
-              this.deptBudgetList.grossWeight = (
-                this.deptBudgetList.grossWeight / 1000
-              ).toFixed(2)
-              this.deptBudgetList.tare = (
-                this.deptBudgetList.tare / 1000
-              ).toFixed(2)
-              this.deptBudgetList.netWeight = (
-                this.deptBudgetList.netWeight / 1000
-              ).toFixed(2)
-              if (!this.deptBudgetList.pureWeight) {
-                this.deptBudgetList.pureWeight = 0
-              }
-              this.deptBudgetList.pureWeight = (
-                this.deptBudgetList.pureWeight / 1000
-              ).toFixed(2)
-              if (!this.deptBudgetList.deductionWeight) {
-                this.deptBudgetList.deductionWeight = 0
-              }
-              if (!this.deptBudgetList.deductionAmount) {
-                this.deptBudgetList.deductionAmount = 0
-              }
-              this.deptBudgetList.deductionWeight = (
-                this.deptBudgetList.deductionWeight / 1000
-              ).toFixed(2)
-              this.deptBudgetList.deductionAmount = Math.round(
-                this.deptBudgetList.deductionAmount * 1000
-              )
-
-              // this.deptBudgetList.grossWeight /= 1000
-              //   this.deptBudgetList.tare /= 1000
-              //   this.deptBudgetList.netWeight /= 1000
-              //   this.deptBudgetList.pureWeight /= 1000
-              //   this.deptBudgetList.deductionAmount *= 1000
-              //   this.deptBudgetList.deductionWeight /= 1000
-              addstorageputList(this.deptBudgetList)
-                .toPromise()
-                .then((response) => {
-                  // this.deptBudgetList.grossWeight = Math.round(this.dataList.grossWeight*1000)
-                  // this.deptBudgetList.tare = Math.round(this.dataList.tare*1000)
-                  // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
-                  // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
-                  // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
-                  this.$message.success('添加成功')
-                  this.$router.push({
-                    path: 'warehouseManagementList',
-                  })
-                })
-                .catch((response) => {
-                  this.deptBudgetList.grossWeight = Math.round(
-                    this.deptBudgetList.grossWeight * 1000
-                  )
-                  this.deptBudgetList.tare = Math.round(
-                    this.deptBudgetList.tare * 1000
-                  )
-                  this.deptBudgetList.netWeight = Math.round(
-                    this.deptBudgetList.netWeight * 1000
-                  )
-                  this.deptBudgetList.pureWeight = Math.round(
-                    this.deptBudgetList.pureWeight * 1000
-                  )
-                  this.deptBudgetList.deductionWeight = Math.round(
-                    this.deptBudgetList.deductionWeight * 1000
-                  )
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+        if (!String(this.deptBudgetList.deductionAmount)) {
+          this.$message({
+            message: '扣款不能为空',
+            type: 'warning',
           })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    temporaryStorage() {
-      
-        if(this.reader){
-          this.reader.cancel()
+          return
         }
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
-        this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.information == '毛重检斤' &&
-        (this.deptBudgetList.grossWeight < 0 ||
-          this.deptBudgetList.grossWeight > 2000000 ||
-          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-            String(this.deptBudgetList.grossWeight).length -
-              (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-              3))
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
-        this.$message({
-          message: '皮重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.information == '皮重检斤' &&
-        (this.deptBudgetList.tare < 0 ||
-          this.deptBudgetList.tare > 1000000 ||
-          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-            String(this.deptBudgetList.tare).length -
-              (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-              3))
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      // if (!this.deptBudgetList.deductionWeight) {
-      //   this.$message({
-      //     message: '扣重不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.deductionWeight < 0 ||
-      //   this.deptBudgetList.deductionWeight > 10 ||
-      //   (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.deductionWeight).length -
-      //       (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
-      //       3)
-      // ) {
-      //   this.$message({
-      //     message: '扣重输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.type == '潮粮' &&
-      //   !this.deptBudgetList.buckleWeightRatio
-      // ) {
-      //   this.$message({
-      //     message: '扣重比不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.buckleWeightRatio < 0) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.buckleWeightRatio > 3) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.buckleWeightRatio).length -
-      //       (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '扣重比输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.type == '潮粮' &&
-      //   !this.deptBudgetList.tidalGrainWater
-      // ) {
-      //   this.$message({
-      //     message: '潮粮水分不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.tidalGrainWater < 1) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.tidalGrainWater > 40) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.tidalGrainWater).length -
-      //       (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '潮粮水分输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.type == '潮粮' &&
-      //   !this.deptBudgetList.solidGrainWater
-      // ) {
-      //   this.$message({
-      //     message: '干粮水分不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.solidGrainWater < 1) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     this.deptBudgetList.solidGrainWater > 40) ||
-      //   (this.deptBudgetList.type == '潮粮' &&
-      //     String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.solidGrainWater).length -
-      //       (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
-      //       1)
-      // ) {
-      //   this.$message({
-      //     message: '干粮水分输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.deductionAmount) {
-      //   this.$message({
-      //     message: '扣款不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.deductionAmount < 0 ||
-      //   this.deptBudgetList.deductionAmount > 10000 ||
-      //   (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.deductionAmount).length -
-      //       (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '扣款输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.cost) {
-      //   this.$message({
-      //     message: '未获取到成本,请编辑后提交',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.cost < 0 ||
-      //   this.deptBudgetList.cost > 20000 ||
-      //   (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.cost).length -
-      //       (String(this.deptBudgetList.cost).indexOf('.') + 1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '成本输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.freight) {
-      //   this.$message({
-      //     message: '运费不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-
-      // if (
-      //   this.deptBudgetList.freight < 0 ||
-      //   this.deptBudgetList.freight > 100000 ||
-      //   (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
-      //     String(this.deptBudgetList.freight).length -
-      //       (String(this.deptBudgetList.freight).indexOf('.') + 1) >
-      //       2)
-      // ) {
-      //   this.$message({
-      //     message: '运费输入错误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.agent) {
-      //   this.$message({
-      //     message: '经办人不能为空',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (
-      //   this.deptBudgetList.agent.length < 2 ||
-      //   this.deptBudgetList.agent.length > 10
-      // ) {
-      //   this.$message({
-      //     message: '经办人输入有误',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (!this.deptBudgetList.carNo) {
-      //   this.$message({
-      //     message: '车牌号不能为空',
-      //     type: 'warning'
-      //   })
-      //   return
-      // }
-      // if (this.deptBudgetList.carNo.length > 7) {
-      //   this.$message({
-      //     message: '车牌号输入错误,请输入7个字符之内',
-      //     type: 'warning'
-      //   })
-      //   return
-      // }
-      if (!this.deptBudgetList.contractNo) {
-        this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      // if (
-      //   this.deptBudgetList.contractNo.length < 6 ||
-      //   this.deptBudgetList.contractNo.length > 20
-      // ) {
-      //   this.$message({
-      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
-      //   this.$message({
-      //     message: '入库量大于该仓库容量!',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      //自检员
-      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
         if (
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
-            2 ||
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          this.deptBudgetList.deductionAmount < 0 ||
+          this.deptBudgetList.deductionAmount > 10000 ||
+          (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionAmount).length -
+            (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '质检员姓名长度错误!',
+            message: '扣款输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+        if (!this.deptBudgetList.cost) {
           this.$message({
-            message: '水分(%)非数字!',
+            message: '未获取到成本,请编辑后提交',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.waterContent
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.waterContent
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.cost < 0 ||
+          this.deptBudgetList.cost > 20000 ||
+          (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
+            String(this.deptBudgetList.cost).length -
+            (String(this.deptBudgetList.cost).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '成本输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //杂质
-      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+        if (!String(this.deptBudgetList.freight)) {
           this.$message({
-            message: '杂质(%)非数字!',
+            message: '运费不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.impurity
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.freight < 0 ||
+          this.deptBudgetList.freight > 100000 ||
+          (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.freight).length -
+            (String(this.deptBudgetList.freight).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '运费输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      //霉变
-      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+        if (!this.deptBudgetList.agent) {
           this.$message({
-            message: '霉变粒(%)非数字!',
+            message: '经办人不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.mildewGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.agent.length < 2 ||
+          this.deptBudgetList.agent.length > 10
         ) {
           this.$message({
-            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '经办人输入有误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //热损伤
-      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+        if (!this.deptBudgetList.grade) {
           this.$message({
-            message: '热损伤(%)非数字!',
+            message: '品级不能为空!',
             type: 'warning',
           })
           return
         }
-        if (
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.jiaorenli
-              ).indexOf('.') +
-                1) >
-              2)
-        ) {
+        if (!this.deptBudgetList.inOutDate) {
           this.$message({
-            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '入库日期不能为空!',
             type: 'warning',
           })
           return
         }
-      }
-
-      //不完善粒(%)
-      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+        if (!this.deptBudgetList.inOutType) {
           this.$message({
-            message: '不完善粒(%)非数字!',
+            message: '入库类型不能为空!',
             type: 'warning',
           })
           return
         }
-        if (
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-              ).indexOf('.') +
-                1) >
-              2)
-        ) {
+        if (!this.deptBudgetList.carNo) {
           this.$message({
-            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '车牌号不能为空',
             type: 'warning',
           })
           return
         }
-      }
-      //容重
-      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+        if (this.deptBudgetList.carNo.length > 7) {
+          this.$message({
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
           this.$message({
-            message: '容重(克/升)非数字!',
+            message: '箱号-1输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
-            String(
-              this.deptBudgetList.warehouseInOutDetail.bulkDensity
-            ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.bulkDensity
-              ).indexOf('.') +
-                1) >
-              2) ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          this.deptBudgetList.boxNoOther &&
+          this.deptBudgetList.boxNoOther.length > 20
         ) {
           this.$message({
-            message: '容重输入错误',
+            message: '箱号-2输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      this.$confirm(`是否保存毛重检斤`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-              this.deptBudgetList.secretaryWeigher =
-                localStorage.getItem('ws-pf_staffName')
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.statusFlag = 1
-              let _data = JSON.parse(
-                localStorage.getItem('winseaview-userInfo')
-              )
-              this.deptBudgetList.backOffice =
-                _data.content.showCompName + '-' + _data.content.staffName
-              this.deptBudgetList.grossWeight /= 1000
-              this.deptBudgetList.tare /= 1000
-              this.deptBudgetList.netWeight /= 1000
-              this.deptBudgetList.pureWeight /= 1000
-              this.deptBudgetList.deductionAmount *= 1000
-              this.deptBudgetList.deductionWeight /= 1000
-              addstorageputList(this.deptBudgetList)
-                .toPromise()
-                .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
-                  this.$message.success('保存成功')
-                  this.$router.push({
-                    path: 'warehouseManagementList',
-                  })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
+        if (
+          this.deptBudgetList.titleNo &&
+          this.deptBudgetList.titleNo.length > 20
+        ) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
           })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    tarechange(e) {
-      if (
-        this.deptBudgetList.grossWeight &&
-        this.deptBudgetList.tare &&
-        (this.deptBudgetList.deductionWeight ||
-          this.deptBudgetList.deductionWeight == 0)
-      ) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight -
-            this.deptBudgetList.tare -
-            this.deptBudgetList.deductionWeight
-        ).toFixed(2)
-      }
-    },
-    grossWeightchange(e) {
-      if (
-        this.deptBudgetList.grossWeight &&
-        this.deptBudgetList.tare &&
-        (this.deptBudgetList.deductionWeight ||
-          this.deptBudgetList.deductionWeight == 0)
-      ) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight -
-            this.deptBudgetList.tare -
-            this.deptBudgetList.deductionWeight
-        ).toFixed(2)
-      }
-    },
-    contractNoChange(e) {
-      this.disabled1=true
-      for (let i = 0; i < this.deptBudgetList1.length; i++) {
-        console.log(this.deptBudgetList1[i])
-        if (this.deptBudgetList1[i].inOutTaskNo == e) {
-          var data = this.deptBudgetList1[i]
-          if (this.deptBudgetList1[i].contractNo) {
-            this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
-          } else {
-            this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
-          }
+          return
         }
-      }
-      for (var i = 0; i < this.outContractNo.length; i++) {
         if (
-          this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+          this.deptBudgetList.titleNoOther &&
+          this.deptBudgetList.titleNoOther.length > 20
         ) {
-          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
-          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          this.deptBudgetList.grade = this.outContractNo[i].grade
-          if (this.outContractNo[i].inOutType == '采购入库') {
-            if(!this.outContractNo[i].unitContractPrice){
-              this.deptBudgetList.tips =
-              '卖方' +
-              this.outContractNo[i].seller
-            }else{
-              this.deptBudgetList.tips =
-              '卖方' +
-              this.outContractNo[i].seller +
-              '( ' +
-              this.outContractNo[i].unitContractPrice +
-              '元/吨)'
-            }
-            this.deptBudgetList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库入库') {
-            this.deptBudgetList.goodsName = data.goodsName
-            this.deptBudgetList.goodsNameKey = data.goodsNameKey
-            this.deptBudgetList.grade = data.grade
-            if (this.outContractNo[i].unitContractPrice) {
-              this.deptBudgetList.tips =
-                '出货库' +
-                data.sendWarehouse +
-                ' (' +
-                this.outContractNo[i].unitContractPrice +
-                '元/吨)'
-            } else {
-              this.deptBudgetList.tips = '出货库' + data.sendWarehouse
-            }
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.addressUrl) {
+        //   this.$message({
+        //     message: '附件不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
 
-            this.deptBudgetList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '移库出库') {
-            this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.deptBudgetList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
-            this.deptBudgetList.inOutTypeKey = 5
-          } else if (this.outContractNo[i].inOutType == '退库') {
-            if (this.outContractNo[i].contractNo) {
-              this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
-            } else {
-              this.deptBudgetList.tips = '出货库' + data.sendWarehouse
-            }
-            this.deptBudgetList.inOutTypeKey = 6
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
-          this.cost = this.outContractNo[i].contractPrice
-          if (this.cost) {
-            this.isGetCost = true
-            this.deptBudgetList.cost =
-              this.cost - this.deptBudgetList.deductionAmount
-          } else {
-            this.isGetCost = false
-            this.deptBudgetList.cost = this.deptBudgetList.cost
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
-          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
-          if (this.outContractNo[i].inOutType == '移库入库') {
-            this.isSelectType = false
-          } else {
-            this.isSelectType = true
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          if(this.outContractNo[i].priceType=='随行就市'){
-             this.disabled1 = !this.disabled1
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].deliverType == '1') {
-            this.carstatus = true
-          } else {
-            this.carstatus = false
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            // this.carstatus = true
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
         }
-      }
-    },
-    contractNoChange1(e) {
-      for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == e) {
-          if (this.outContractNo[i].inOutType == '采购入库') {
-            this.deptBudgetList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库入库') {
-            this.deptBudgetList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.deptBudgetList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
-            this.deptBudgetList.inOutTypeKey = 5
-          } else if (this.outContractNo[i].inOutType == '退库') {
-            this.deptBudgetList.inOutTypeKey = 6
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
-          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          this.deptBudgetList.grade = this.outContractNo[i].grade
-          // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
-          this.cost = this.outContractNo[i].contractPrice
-          if (this.cost) {
-            this.isGetCost = true
-            this.deptBudgetList.cost =
-              this.cost - this.deptBudgetList.deductionAmount
-          } else {
-            this.isGetCost = false
-            this.deptBudgetList.cost = this.deptBudgetList.cost
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        console.log(this.deptBudgetList, '入库对象')
+        this.$confirm(`确定提交入库信息`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.secretaryWeigher =
+                  localStorage.getItem('ws-pf_staffName')
+                this.deptBudgetList.inOutFlag = 2
+                this.deptBudgetList.pcFlag = 1
+                this.deptBudgetList.statusFlag = 3
+                this.deptBudgetList.grossWeight = (
+                  this.deptBudgetList.grossWeight / 1000
+                ).toFixed(2)
+                this.deptBudgetList.tare = (
+                  this.deptBudgetList.tare / 1000
+                ).toFixed(2)
+                this.deptBudgetList.netWeight = (
+                  this.deptBudgetList.netWeight / 1000
+                ).toFixed(2)
+                if (!this.deptBudgetList.pureWeight) {
+                  this.deptBudgetList.pureWeight = 0
+                }
+                this.deptBudgetList.pureWeight = (
+                  this.deptBudgetList.pureWeight / 1000
+                ).toFixed(2)
+                if (!this.deptBudgetList.deductionWeight) {
+                  this.deptBudgetList.deductionWeight = 0
+                }
+                if (!this.deptBudgetList.deductionAmount) {
+                  this.deptBudgetList.deductionAmount = 0
+                }
+                this.deptBudgetList.deductionWeight = (
+                  this.deptBudgetList.deductionWeight / 1000
+                ).toFixed(2)
+                this.deptBudgetList.deductionAmount = Math.round(
+                  this.deptBudgetList.deductionAmount * 1000
+                )
+
+                // this.deptBudgetList.grossWeight /= 1000
+                //   this.deptBudgetList.tare /= 1000
+                //   this.deptBudgetList.netWeight /= 1000
+                //   this.deptBudgetList.pureWeight /= 1000
+                //   this.deptBudgetList.deductionAmount *= 1000
+                //   this.deptBudgetList.deductionWeight /= 1000
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    // this.deptBudgetList.grossWeight = Math.round(this.dataList.grossWeight*1000)
+                    // this.deptBudgetList.tare = Math.round(this.dataList.tare*1000)
+                    // this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
+                    // this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
+                    // this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('添加成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+                  .catch((response) => {
+                    this.deptBudgetList.grossWeight = Math.round(
+                      this.deptBudgetList.grossWeight * 1000
+                    )
+                    this.deptBudgetList.tare = Math.round(
+                      this.deptBudgetList.tare * 1000
+                    )
+                    this.deptBudgetList.netWeight = Math.round(
+                      this.deptBudgetList.netWeight * 1000
+                    )
+                    this.deptBudgetList.pureWeight = Math.round(
+                      this.deptBudgetList.pureWeight * 1000
+                    )
+                    this.deptBudgetList.deductionWeight = Math.round(
+                      this.deptBudgetList.deductionWeight * 1000
+                    )
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      temporaryStorage() {
+
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.information == '毛重检斤' &&
+          (this.deptBudgetList.grossWeight < 0 ||
+            this.deptBudgetList.grossWeight > 2000000 ||
+            (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+              String(this.deptBudgetList.grossWeight).length -
+              (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+              3))
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.information == '皮重检斤' &&
+          (this.deptBudgetList.tare < 0 ||
+            this.deptBudgetList.tare > 1000000 ||
+            (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+              String(this.deptBudgetList.tare).length -
+              (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+              3))
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.deptBudgetList.deductionWeight) {
+        //   this.$message({
+        //     message: '扣重不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.deductionWeight < 0 ||
+        //   this.deptBudgetList.deductionWeight > 10 ||
+        //   (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.deductionWeight).length -
+        //       (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
+        //       3)
+        // ) {
+        //   this.$message({
+        //     message: '扣重输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.type == '潮粮' &&
+        //   !this.deptBudgetList.buckleWeightRatio
+        // ) {
+        //   this.$message({
+        //     message: '扣重比不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.buckleWeightRatio < 0) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.buckleWeightRatio > 3) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.buckleWeightRatio).length -
+        //       (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+        //       2)
+        // ) {
+        //   this.$message({
+        //     message: '扣重比输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.type == '潮粮' &&
+        //   !this.deptBudgetList.tidalGrainWater
+        // ) {
+        //   this.$message({
+        //     message: '潮粮水分不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.tidalGrainWater < 1) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.tidalGrainWater > 40) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.tidalGrainWater).length -
+        //       (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+        //       2)
+        // ) {
+        //   this.$message({
+        //     message: '潮粮水分输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.type == '潮粮' &&
+        //   !this.deptBudgetList.solidGrainWater
+        // ) {
+        //   this.$message({
+        //     message: '干粮水分不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.solidGrainWater < 1) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     this.deptBudgetList.solidGrainWater > 40) ||
+        //   (this.deptBudgetList.type == '潮粮' &&
+        //     String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.solidGrainWater).length -
+        //       (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+        //       1)
+        // ) {
+        //   this.$message({
+        //     message: '干粮水分输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.deductionAmount) {
+        //   this.$message({
+        //     message: '扣款不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.deductionAmount < 0 ||
+        //   this.deptBudgetList.deductionAmount > 10000 ||
+        //   (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.deductionAmount).length -
+        //       (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
+        //       2)
+        // ) {
+        //   this.$message({
+        //     message: '扣款输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.cost) {
+        //   this.$message({
+        //     message: '未获取到成本,请编辑后提交',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.cost < 0 ||
+        //   this.deptBudgetList.cost > 20000 ||
+        //   (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.cost).length -
+        //       (String(this.deptBudgetList.cost).indexOf('.') + 1) >
+        //       2)
+        // ) {
+        //   this.$message({
+        //     message: '成本输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.freight) {
+        //   this.$message({
+        //     message: '运费不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+
+        // if (
+        //   this.deptBudgetList.freight < 0 ||
+        //   this.deptBudgetList.freight > 100000 ||
+        //   (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
+        //     String(this.deptBudgetList.freight).length -
+        //       (String(this.deptBudgetList.freight).indexOf('.') + 1) >
+        //       2)
+        // ) {
+        //   this.$message({
+        //     message: '运费输入错误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.agent) {
+        //   this.$message({
+        //     message: '经办人不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (
+        //   this.deptBudgetList.agent.length < 2 ||
+        //   this.deptBudgetList.agent.length > 10
+        // ) {
+        //   this.$message({
+        //     message: '经办人输入有误',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (!this.deptBudgetList.carNo) {
+        //   this.$message({
+        //     message: '车牌号不能为空',
+        //     type: 'warning'
+        //   })
+        //   return
+        // }
+        // if (this.deptBudgetList.carNo.length > 7) {
+        //   this.$message({
+        //     message: '车牌号输入错误,请输入7个字符之内',
+        //     type: 'warning'
+        //   })
+        //   return
+        // }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
+        //   this.$message({
+        //     message: '入库量大于该仓库容量!',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
-          if (this.outContractNo[i].inOutType == '移库入库') {
-            this.isSelectType = false
-          } else {
-            this.isSelectType = true
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].deliverType == '1') {
-            this.carstatus = true
-          } else {
-            this.carstatus = false
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            this.carstatus = true
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
         }
-      }
-    },
-    typeChange(e) {},
-    pureweight(status) {
-      console.log(this.deptBudgetList)
-      if (
-        this.deptBudgetList.netWeight &&
-        this.deptBudgetList.tidalGrainWater &&
-        this.deptBudgetList.solidGrainWater &&
-        this.deptBudgetList.buckleWeightRatio
-      ) {
-        this.deptBudgetList.pureWeight =
-          (this.deptBudgetList.netWeight *
-            (100 -
-              (this.deptBudgetList.tidalGrainWater -
-                this.deptBudgetList.solidGrainWater) *
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm(`是否保存毛重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.secretaryWeigher =
+                  localStorage.getItem('ws-pf_staffName')
+                this.deptBudgetList.inOutFlag = 2
+                this.deptBudgetList.statusFlag = 1
+                let _data = JSON.parse(
+                  localStorage.getItem('winseaview-userInfo')
+                )
+                this.deptBudgetList.backOffice =
+                  _data.content.showCompName + '-' + _data.content.staffName
+                this.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                this.deptBudgetList.netWeight /= 1000
+                this.deptBudgetList.pureWeight /= 1000
+                this.deptBudgetList.deductionAmount *= 1000
+                this.deptBudgetList.deductionWeight /= 1000
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('保存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      tarechange(e) {
+        if (
+          this.deptBudgetList.grossWeight &&
+          this.deptBudgetList.tare &&
+          (this.deptBudgetList.deductionWeight ||
+            this.deptBudgetList.deductionWeight == 0)
+        ) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight -
+            this.deptBudgetList.tare -
+            this.deptBudgetList.deductionWeight
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (
+          this.deptBudgetList.grossWeight &&
+          this.deptBudgetList.tare &&
+          (this.deptBudgetList.deductionWeight ||
+            this.deptBudgetList.deductionWeight == 0)
+        ) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight -
+            this.deptBudgetList.tare -
+            this.deptBudgetList.deductionWeight
+          ).toFixed(2)
+        }
+      },
+      contractNoChange(e) {
+        this.disabled1 = true
+        for (let i = 0; i < this.deptBudgetList1.length; i++) {
+          console.log(this.deptBudgetList1[i])
+          if (this.deptBudgetList1[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList1[i]
+            if (this.deptBudgetList1[i].contractNo) {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+            } else {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+            }
+          }
+        }
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (
+            this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+          ) {
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              if (!this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '卖方' +
+                  this.outContractNo[i].seller
+              } else {
+                this.deptBudgetList.tips =
+                  '卖方' +
+                  this.outContractNo[i].seller +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.deptBudgetList.goodsName = data.goodsName
+              this.deptBudgetList.goodsNameKey = data.goodsNameKey
+              this.deptBudgetList.grade = data.grade
+              if (this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '出货库' +
+                  data.sendWarehouse +
+                  ' (' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+              }
+
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '退库') {
+              if (this.outContractNo[i].contractNo) {
+                this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
+              } else {
+                this.deptBudgetList.tips = '出货库' + data.sendWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
+            this.cost = this.outContractNo[i].contractPrice
+            if (this.cost) {
+              this.isGetCost = true
+              this.deptBudgetList.cost =
+                this.cost - this.deptBudgetList.deductionAmount
+            } else {
+              this.isGetCost = false
+              this.deptBudgetList.cost = this.deptBudgetList.cost
+            }
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '移库入库') {
+              this.isSelectType = false
+            } else {
+              this.isSelectType = true
+            }
+            if (this.outContractNo[i].priceType == '随行就市') {
+              this.disabled1 = !this.disabled1
+            }
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
+          }
+        }
+      },
+      contractNoChange1(e) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '退库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
+            this.cost = this.outContractNo[i].contractPrice
+            if (this.cost) {
+              this.isGetCost = true
+              this.deptBudgetList.cost =
+                this.cost - this.deptBudgetList.deductionAmount
+            } else {
+              this.isGetCost = false
+              this.deptBudgetList.cost = this.deptBudgetList.cost
+            }
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '移库入库') {
+              this.isSelectType = false
+            } else {
+              this.isSelectType = true
+            }
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
+            }
+          }
+        }
+      },
+      typeChange(e) {},
+      pureweight(status) {
+        console.log(this.deptBudgetList)
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
                 this.deptBudgetList.buckleWeightRatio)) /
-          100
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
-          if (e == '玉米(潮粮)') {
-            this.deptBudgetList.type = '潮粮'
-          } else {
-            this.deptBudgetList.type = '干粮'
+            100
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+            if (e == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
+            } else {
+              this.deptBudgetList.type = '干粮'
+            }
           }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    getList() {
-      // 货名
-      pullDown({
-        constId: 'CON2',
-      })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      pullDown({
-        constId: 'CON3',
-      })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      if (this.deptBudgetList.warehouseType == '1') {
-        this.storageType = []
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 货名
         pullDown({
-          constId: 'CON5',
-        })
+            constId: 'CON2',
+          })
           .toPromise()
           .then((response) => {
-            // this.storageType = response
-            for (let i = 0; i < response.length; i++) {
-              if (
-                response[i].constValue == '移库入库' ||
-                response[i].constValue == '退库'
-              ) {
-                this.storageType.push(response[i])
-              }
-            }
+            this.goodnameList = response
           })
-      } else if (this.deptBudgetList.warehouseType == '2') {
+        // 品级
         pullDown({
-          constId: 'WARE1',
-        })
+            constId: 'CON3',
+          })
           .toPromise()
           .then((response) => {
-            this.storageType = response
+            this.gradeList = response
           })
+        // 类型
+        if (this.deptBudgetList.warehouseType == '1') {
+          this.storageType = []
+          pullDown({
+              constId: 'CON5',
+            })
+            .toPromise()
+            .then((response) => {
+              // this.storageType = response
+              for (let i = 0; i < response.length; i++) {
+                if (
+                  response[i].constValue == '移库入库' ||
+                  response[i].constValue == '退库'
+                ) {
+                  this.storageType.push(response[i])
+                }
+              }
+            })
+        } else if (this.deptBudgetList.warehouseType == '2') {
+          pullDown({
+              constId: 'WARE1',
+            })
+            .toPromise()
+            .then((response) => {
+              this.storageType = response
+            })
 
-        pullDown({
-          constId: 'WARE2',
-        })
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 7,
+          })
           .toPromise()
           .then((response) => {
-            this.deliveryType = response
+            this.options1 = response
+            this.outContractNo = response
           })
-      }
-      //合同编号
-      xialaNo({
-        compId: localStorage.getItem('ws-pf_compId'),
-        flag: 7,
-      })
-        .toPromise()
-        .then((response) => {
-          this.options1 = response
-          this.outContractNo = response
-        })
 
-      //经办人
-      getstaff({
-        compId: localStorage.getItem('ws-pf_compId'),
-        warehouseId: this.deptBudgetList.baseId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.options = response
-          this.qualityInspectorList = response
-          this.staffList = response
-          //  this.agent = response
-        })
-    },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.deptBudgetList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.qualityInspectorList = response
+            this.staffList = response
+            //  this.agent = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
         }
-      }
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    handleExamine(row) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        query: {
-          id: row.id,
-        },
-      })
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
+        })
+      },
     },
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .ws-info-table {
-    border: none;
-  }
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
 
-  .left{
-  .el-form-item {
-    width: 50%;
-    // width: 33.3333%;
-    border: none;
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
 
-    .el-form-item__label {
-      background: transparent;
-      border: none;
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
 
-    .el-form-item__content {
-      border: none;
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
   }
-}
-.right{
-  .el-form-item {
-    width: 100%;
-    // width: 33.3333%;
-    border: none;
 
-    .el-form-item__label {
-      background: transparent;
-      border: none;
-    }
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
 
-    .el-form-item__content {
-      border: none;
-    }
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
   }
-}
-}
 
-.title {
-  position: relative;
-  padding-left: 10px;
-}
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
 
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
+  .el-col {
+    background: #f6f7fc;
+  }
 
-.el-form {
-  padding: 0 10%;
-}
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
 
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
+
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 120vh;
+  }
 
-.el-col {
-  background: #f6f7fc;
-}
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
 
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
 
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-}
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
 
-//选填
-/deep/.el-form-item {
-  width: 50%;
-}
+  //仓位
 
-.container {
-  overflow: scroll;
-  height: 120vh;
-}
+  .position {
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    color: #ffffff;
+    line-height: 20px;
+    display: inline-grid;
+    padding: 2px 4px;
+  }
 
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: center;
-}
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: left;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
 
-.deliverydate {
-  display: inline-block;
-  width: 10%;
-}
+  .inspector {
+    width: 50%;
+  }
 
-.center {
-  margin-top: -60px;
-  width: 80%;
-}
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
 
-//仓位
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
 
-.position {
-  background: #afb5cb;
-  border-radius: 2px;
-  font-size: 12px;
-  color: #ffffff;
-  line-height: 20px;
-  display: inline-grid;
-  padding: 2px 4px;
-}
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+    padding: 4px 2px;
+  }
 
-//表格文字
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: left;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-}
+  .top {
+    width: 100%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 0px 20px;
 
-.inspector {
-  width: 50%;
-}
+    .car-type {
+      text-align: left;
+    }
 
-//质检员
-.inspector .el-form-item__content {
-  text-align: left;
-  margin-left: 0px;
-}
+    .kg-style {
+      font-size: 30px;
+    }
+  }
 
-.small-title {
-  position: relative;
-  padding: 10px;
-  font-weight: 600;
-}
+  .weight {
+    font-size: 68px;
+  }
 
-.small-title::before {
-  position: absolute;
-  content: '';
-  display: block;
-  background: #5473e8;
-  width: 4px;
-  height: 14px;
-  left: 0px;
-  top: 13px;
-  padding: 4px 2px;
-}
-.top {
-  background: black;
-  color: #2aff7c;
-  font-size: 32px;
-  text-align: right;
-  padding: 20px;
-  border-radius: 10px;
-  margin: 0 20px 20px 20px;
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
 
-  .car-type {
-    text-align: left;
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
   }
 
-  .kg-style {
-    font-size: 30px;
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
   }
-}
-.weight {
-  font-size: 68px;
-}
-//下面列表
-.neifor {
-  width: 80%;
-  background-color: #f6f7fc;
-}
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
-  width: 35%;
-  text-align: center;
-}
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
-  width: 60%;
-  background-color: #f6f7fc;
-}
+  .balance-row {
+    display: flex;
+    margin: 20px 0;
 
-/deep/.neifor .el-input--small .el-input__inner {
-  width: 100%;
-}
-</style>
+    .left {
+      width: 500px;
+      margin-bottom: 0;
+    }
+  }
+</style>

+ 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`

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1323 - 1746
src/views/warehouse/warehouseManagementNoWeightIn.vue


+ 1255 - 1625
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -6,18 +6,8 @@
         <h2 class="bg-left title">出库毛重检斤</h2>
       </el-col>
       <el-col :span="4" class="bg-right">
-        <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="revert()"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
@@ -31,157 +21,83 @@
           </span>
           <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
         </h2>
-        <div class="top">
-          <div class="car-type">毛重</div>
-          <div class="weight">
-            {{ dataList.grossWeight }}
-            <span class="kg-style">kg</span>
+        <div class="balance-row">
+          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <div class="car-type">毛重</div>
+            <div class="weight">
+              {{ dataList.grossWeight }}
+              <span class="kg-style">kg</span>
+            </div>
+            <!-- <div class="weight">{{dataList.tare}} <span class="kg-style">kg</span></div> -->
+            <div class="car-no">{{ dataList.carNo }}</div>
           </div>
-          <!-- <div class="weight">{{dataList.tare}} <span class="kg-style">kg</span></div> -->
-          <div class="car-no">{{ dataList.carNo }}</div>
         </div>
         <div class="small-title">基本信息</div>
         <div class="flex">
           <div class="left" style='width:66.6666%;'>
             <ws-info-table>
-               <!--任务编号-->
-          <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
-            <el-select
-              filterable
-              clearable
-              v-model="dataList.inOutTaskNo"
-              placeholder="请选择任务编号"
-              class="typeselect"
-              @change="contractNoChange"
-            >
-              <el-option
-                v-for="item in deptBudgetList2"
-                :key="item.inOutTaskNo"
-                :label="item.inOutTaskNo"
-                :value="item.inOutTaskNo"
-              />
-            </el-select>
-          </ws-form-item>
-           <!--毛重(公斤)-->
-          <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
-            <ws-input
-              :disabled="allowEdit"
-              @input="grossWeightchange"
-              v-model="dataList.grossWeight"
-              placeholder="请输入毛重"
-              maxlength="20"
-              size="small"
-            />
-            <el-button type="primary" @click="openPort">重新获取</el-button>
-          </ws-form-item>
-          <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-select
-              disabled
-              v-model="dataList.contractNo"
-              placeholder="请选择合同编号或移库任务编号"
-              class="typeselect"
-              @change="contractNoChange"
-            >
-              <ws-option
-                v-for="item in outContractNo"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              />
-            </ws-select>
-          </ws-form-item>
-          <!--皮重(公斤)-->
-          <ws-form-item
-            label="皮重(公斤)"
-            span="1"
-            prop="tare"
-            class="readonly"
-          >
-            <ws-input
-              :disabled="allowEdit"
-              @input="tarechange"
-              v-model="dataList.tare"
-              placeholder="请输入皮重"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="提示" span="1" prop="tips">
-            <ws-input
-              onmouseover="this.title=this.value"
-              v-model="dataList.tips"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!--净重(公斤)-->
-          <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="dataList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!-- 货名 -->
-          <ws-form-item label="货名" span="1">
-            <ws-select
-              disabled
-              v-model="dataList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <!--出库日期-->
-          <ws-form-item
-            label="出库日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
-          >
-            <ws-date-picker
-              v-model="dataList.inOutDate"
-              type="date"
-              placeholder="请选择出库日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-          <ws-form-item label="类型" span="1" prop="type">
-            <ws-select disabled v-model="dataList.type" @change="typeChange">
-              <ws-option
-                v-for="item in typeList"
-                :key="item"
-                :label="item"
-                :value="item"
-              />
-            </ws-select>
-          </ws-form-item>
-           <!-- 出库类型 -->
-          <ws-form-item label="出库类型" span="1">
-            <ws-select
-              v-model="dataList.inOutType"
-              placeholder=""
-              class="typeselect"
-              @change="selectstorageType"
-            >
-              <ws-option
-                v-for="item in deliveryType"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <!-- <ws-form-item
+              <!--任务编号-->
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="dataList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
+                  @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList2" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <!--毛重(公斤)-->
+              <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="dataList.grossWeight"
+                  placeholder="请输入毛重" maxlength="20" size="small" />
+                <el-button type="primary" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select disabled v-model="dataList.contractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect"
+                  @change="contractNoChange">
+                  <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(公斤)-->
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="dataList.tare" placeholder="请输入皮重"
+                  maxlength="100" size="small" />
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="dataList.tips" maxlength="20" size="small" />
+              </ws-form-item>
+              <!--净重(公斤)-->
+              <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+                <ws-input readonly="readonly" v-model="dataList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--出库日期-->
+              <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+                <ws-date-picker v-model="dataList.inOutDate" type="date" placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="dataList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
+              <!-- 出库类型 -->
+              <ws-form-item label="出库类型" span="1">
+                <ws-select v-model="dataList.inOutType" placeholder="" class="typeselect" @change="selectstorageType">
+                  <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!-- <ws-form-item
             v-if="dataList.type == '潮粮'"
             label="扣重比"
             span="1"
@@ -241,220 +157,81 @@
               size="small"
             />
           </ws-form-item> -->
-          <!-- 品级 -->
-          <ws-form-item label="品级" span="1" class="readonly">
-            <ws-select
-              v-model="dataList.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectpackingMethod"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <!--经办人-->
-          <ws-form-item label="经办人" span="1" prop="agent">
-            <el-select
-              v-model="dataList.agent"
-              placeholder="请选择经办人"
-              filterable
-              clearable
-              @change="selectstaff"
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
-            </el-select>
-          </ws-form-item>
-        </ws-info-table>
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="dataList.grade" placeholder="" class="typeselect" @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--经办人-->
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable clearable @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+            </ws-info-table>
           </div>
           <div class="right" style='width:33.3333%'>
-              <ws-info-table>
-          <ws-form-item label="运输方式" span="1" prop="outType">
-            <el-select
-              v-model="dataList.outType"
-              placeholder="请选择运输方式"
-            >
-              <el-option
-                v-for="item in multiSelector"
-                :key="item.value"
-                :label="item.name"
-                :value="item.name"
-              />
-            </el-select>
-          </ws-form-item>
-          <ws-form-item
-            label="车牌号"
-            span="1"
-            prop="carNo"
-            v-if="
+            <ws-info-table>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="dataList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
               dataList.outType == '汽运' ||
               dataList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-if="!carstatus"
-              v-model="dataList.carNo"
-              placeholder="请输入车牌号"
-              maxlength="7"
-              size="small"
-            />
-            <el-select
-              v-if="carstatus"
-              filterable
-              clearable
-              :filter-method="dataFilter2"
-              v-model="dataList.carNo"
-              placeholder="请选择车牌号"
-              class="typeselect"
-              @change="carChange"
-            >
-              <el-option
-                v-for="item in options2"
-                :key="item.constKey"
-                :label="item.carNo + '(' + item.tranCarNo + ')'"
-                :value="item.carNo"
-              />
-            </el-select>
-          </ws-form-item>
+            ">
+                <ws-input v-if="!carstatus" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="7" size="small" />
+                <el-select v-if="carstatus" filterable clearable :filter-method="dataFilter2" v-model="dataList.carNo"
+                  placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+              </ws-form-item>
 
-          <ws-form-item
-            label="车号"
-            span="1"
-            prop="carNo"
-            v-if="dataList.outType == '火运'"
-          >
-            <ws-input
-              v-model="dataList.carNo"
-              placeholder="请输入车号"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="箱号-1"
-            span="1"
-            prop="boxNo"
-            v-if="
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
               dataList.outType == '汽运' ||
               dataList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="dataList.boxNo"
-              placeholder="请输入箱号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="箱号-2"
-            span="1"
-            prop="boxNoOther"
-            v-if="
+            ">
+                <ws-input v-model="dataList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
               dataList.outType == '汽运' ||
               dataList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="dataList.boxNoOther"
-              placeholder="请输入箱号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="封号-1"
-            span="1"
-            prop="titleNo"
-            v-if="
+            ">
+                <ws-input v-model="dataList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
               dataList.outType == '汽运' ||
               dataList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="dataList.titleNo"
-              placeholder="请输入封号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="封号-2"
-            span="1"
-            prop="titleNoOther"
-            v-if="
+            ">
+                <ws-input v-model="dataList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
               dataList.outType == '汽运' ||
               dataList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="dataList.titleNoOther"
-              placeholder="请输入封号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="车厢号-1"
-            span="1"
-            prop="wingNumber"
-            v-if="dataList.outType == '火运'"
-          >
-            <ws-input
-              v-model="dataList.wingNumber"
-              placeholder="请输入车厢号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="车厢号-2"
-            span="1"
-            prop="wingNumberOther"
-            v-if="dataList.outType == '火运'"
-          >
-            <ws-input
-              v-model="dataList.wingNumberOther"
-              placeholder="请输入车厢号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="船名"
-            span="1"
-            prop="shipName"
-            v-if="dataList.outType == '散船'"
-          >
-            <ws-input
-              v-model="dataList.shipName"
-              placeholder="请输入船名"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="航次"
-            span="1"
-            prop="shipNumber"
-            v-if="dataList.outType == '散船'"
-          >
-            <ws-input
-              v-model="dataList.shipNumber"
-              placeholder="请输入航次"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
+            ">
+                <ws-input v-model="dataList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="船名" span="1" prop="shipName" v-if="dataList.outType == '散船'">
+                <ws-input v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="dataList.outType == '散船'">
+                <ws-input v-model="dataList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+              </ws-form-item>
+            </ws-info-table>
           </div>
         </div>
       </div>
@@ -486,18 +263,9 @@
           />
         </ws-form-item> -->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
-          <el-select
-            v-model="dataList.warehouseInOutDetail.qualityInspector"
-            placeholder="请选择质检员"
-            filterable
-            clearable
-          >
-            <el-option
-              v-for="item in qualityInspectorList"
-              :key="item.value"
-              :label="item.staffName"
-              :value="item.staffName"
-            />
+          <el-select v-model="dataList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable clearable>
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
           </el-select>
         </ws-form-item>
       </div>
@@ -505,57 +273,33 @@
         <ws-info-table>
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
+              size="small" />
           </ws-form-item>
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.impurity"
-              placeholder="请输入杂质占比"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" maxlength="120"
+              size="small" />
           </ws-form-item>
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入容重"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" maxlength="120"
+              size="small" />
           </ws-form-item>
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.mildewGrain"
-              placeholder="请输入霉变粒占比"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
+              size="small" />
           </ws-form-item>
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.jiaorenli"
-              placeholder="请输入热损伤占比"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" maxlength="120"
+              size="small" />
           </ws-form-item>
           <!--不完善粒(%)<=-->
           <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
-            <ws-input
-              v-model="dataList.warehouseInOutDetail.imperfectGrain"
-              placeholder="请输入不完善粒占比"
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="dataList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="120"
+              size="small" />
           </ws-form-item>
         </ws-info-table>
       </div>
@@ -567,1402 +311,1288 @@
           @click="temporaryStorage()"
           >暂存</el-button
         > -->
-        <el-button
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="submit()"
-          >提交</el-button
-        >
+        <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
       </div>
     </ws-form>
   </div>
 </template>
 <script>
-import {
-  pullDown,
-  addstorageputList,
-  xialaNo,
-  getstaff,
-  getPrintInfo,
-  getReceiptTaskNo,
-} from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-import { mapActions, mapGetters, mapState } from 'vuex'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    isShow(val) {
-      this.showType = val
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getPrintInfo,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  import {
+    mapActions,
+    mapGetters,
+    mapState
+  } from 'vuex'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
     },
-    dataList: {
-      //深度监听,可监听到对象、数组的变化
-      handler(val, oldVal) {
-        if (val.grossWeight) {
-          this.dataList.netWeight = val.grossWeight - this.dataList.tare
-        }
+    watch: {
+      isShow(val) {
+        this.showType = val
       },
-      deep: true, //true 深度监听
-    },
-  },
-  computed: {
-    ...mapGetters(['deptBudgetList']),
-  },
-  data() {
-    return {
-      deptBudgetList2: [],
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      // 年
-      year: '',
-      multiSelector: [
-        {
-          name: '汽运',
-          value: '0',
-        },
-        {
-          name: '火运',
-          value: '1',
-        },
-        {
-          name: '集装箱船',
-          value: '2',
-        },
-        {
-          name: '散船',
-          value: '3',
+      dataList: {
+        //深度监听,可监听到对象、数组的变化
+        handler(val, oldVal) {
+          if (val.grossWeight) {
+            this.dataList.netWeight = val.grossWeight - this.dataList.tare
+          }
         },
-      ],
-      readonly: true,
-      typeList: ['干粮', '潮粮'],
-      qualityInspectorList: [],
-      deptBudgetTotal: 0,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      tranCarInfoList: [],
-      staffList: [],
-      options: [],
-      options1: [],
-      options2: [],
-      carstatus: false,
-      storageType: [],
-      deliveryType: [],
-      outContractNo: [],
-      // 提交类型
-      submitType: true,
-      storageType: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      onChange: {},
-      deptBudgetList1: [],
-      gradeList: [],
-      rules: {
-        netWeight: [
+        deep: true, //true 深度监听
+      },
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList']),
+    },
+    data() {
+      return {
+        isShowBalance: false,
+        deptBudgetList2: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
           {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        readonly: true,
+        typeList: ['干粮', '潮粮'],
+        qualityInspectorList: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        tranCarInfoList: [],
+        staffList: [],
+        options: [],
+        options1: [],
+        options2: [],
+        carstatus: false,
+        storageType: [],
+        deliveryType: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        storageType: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        dataList: {
+          id: '',
+          grossWeight: '',
+          contractNo: '',
+          tare: '',
+          netWeight: '',
+          grade: '',
+          agent: '',
+          carNo: '',
+          inOutDate: '',
+          inOutType: '',
+          goodsName: '',
+          warehouseInOutDetail: {
+            qualityInspector: '',
           },
-        ],
-      },
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      contractList: [],
-      dataList: {
-        id: '',
-        grossWeight: '',
-        contractNo: '',
-        tare: '',
-        netWeight: '',
-        grade: '',
-        agent: '',
-        carNo: '',
-        inOutDate: '',
-        inOutType: '',
-        goodsName: '',
-        warehouseInOutDetail: {
-          qualityInspector: '',
+          cost: '',
+          freight: 0,
+          type: '',
+          addressUrl: '',
+          buckleWeightRatio: '',
+          tidalGrainWater: '',
+          solidGrainWater: '',
+          pureWeight: '',
+          deductionAmount: '',
+          deductionWeigh: '',
         },
-        cost: '',
-        freight: 0,
-        type: '',
-        addressUrl: '',
-        buckleWeightRatio: '',
-        tidalGrainWater: '',
-        solidGrainWater: '',
-        pureWeight: '',
-        deductionAmount: '',
-        deductionWeigh: '',
-      },
-      historyList: [],
+        historyList: [],
 
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
         },
-      },
-      accessoryTFs: false,
-      param: 9600,
-      allowEdit: true,
-      result1: '00',
-    }
-  },
-  mounted() {
-	},
-  activated() {
-    if (this.$route.query.allowEdit == 1) {
-      this.allowEdit = false
-    } else {
-      this.allowEdit = true
-    }
-    this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList1.binNumber = this.$route.query.binNumber
-    this.dataList.id = this.$route.query.id
-    this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
-    this.dataList.contractNo = this.$route.query.contractNo
-    this.dataList.baseId = this.$route.query.baseId
-    this.dataList.positionId = this.$route.query.positionId
-    this.dataList.warehouseName = this.$route.query.warehouseName
-    this.dataList.binNumber = this.$route.query.binNumber
-    this.dataList.tare = Math.round(this.$route.query.tare * 1000)
-    this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
-    this.dataList.boxNo = this.$route.query.boxNo
-    this.dataList.boxNoOther = this.$route.query.boxNoOther
-    this.dataList.titleNo = this.$route.query.titleNo
-    this.dataList.titleNoOther = this.$route.query.titleNoOther
-    this.dataList.grade = this.$route.query.grade
-    this.dataList.agent = this.$route.query.agent
-    this.dataList.carNo = this.$route.query.carNo
-    this.dataList.inOutDate = this.$route.query.inOutDate
-    this.dataList.contractNo = this.$route.query.contractNo
-    this.dataList.inOutType = this.$route.query.inOutType
-    this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
-    this.dataList.compId = this.$route.query.compId
-    this.dataList.goodsName = this.$route.query.goodsName
-    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
-    this.dataList.inOutFlag = this.$route.inOutFlag
-    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
-    this.dataList.statusFlag = this.$route.statusFlag
-    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
-    console.log(this.dataList)
-    if(this.$route.query.automaticWeightAcquisition == '1'){
-      this.openPort()
-    }
-    this.getList()
-  },
-  methods: {
-    async closePort() {
-      console.log('closePort')
-      this.reader.cancel()
-    },
-    async openPort() {
-      console.log('openPort', navigator)
-    if ('serial' in navigator) {
-      // if (!this.$store.state.app.reader) {
-        // The Web Serial API is supported.
-        console.log('the Web Serial API is supported.')
-        console.log(this.param)
-        const port = await navigator.serial.requestPort()
-        await port.open({
-          baudRate: this.param,
-        }) // set baud rate
-        this.reader = port.readable.getReader()
-        console.log('beforeReader', port)
-        console.log('beforeReader', this.reader)
-        this.$store.dispatch('app/setReader', this.reader)
-      // } else {
-      //   console.log('afterport', this.$store.state.app.reader)
-      //   this.reader = this.$store.state.app.reader
-      // }
-        // 监听来自串行设备的数据
-        while (true) {
-          const { value, done } = await this.reader.read()
-          // console.log("value",value);
-          if (done) {
-            // 允许稍后关闭串口。
-            this.reader.releaseLock()
-            break
-          }
-          var result = ''
-          //2。获取16进制字符串
-          // var receData = HexConvert.ByteToString(value);
-          // console.log("receData",receData);
-          var flag = false
-          var flag1 = false
-          // for (var i = 0; i < value.length; i++) {
-          //   var tmp = String.fromCharCode(value[i])
-          //   if (tmp == '+') {
-          //     flag = true
-          //   }
-          //   if (flag && result.length < 6 && tmp != '+') {
-          //     result += tmp
-          //   }
-          // }
-          // if(parseInt(result)){
-          //     this.dataList.grossWeight = parseInt(result)
-          // }
-          if (
-            this.deptBudgetList1.warehouseName &&
-            (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
-              this.deptBudgetList1.warehouseName == '克东千红库' ||
-              this.deptBudgetList1.warehouseName == '鲅鱼圈祥腾库' ||
-              this.deptBudgetList1.warehouseName == '哈尔滨依兰库'||
-              this.deptBudgetList1.warehouseName == '龙江金信库')
-          ) {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-              if (tmp == '+') {
-                flag = true
-              }
-              if (flag && result.length < 6 && tmp != '+') {
-                result += tmp
-              }
-            }
-            if (parseInt(result) || parseInt(result) == 0) {
-              this.dataList.grossWeight = parseInt(result)
-            }
-          } else if (
-            this.deptBudgetList1.warehouseName &&
-            (this.deptBudgetList1.warehouseName == '顺诚粮库' ||
-              this.deptBudgetList1.warehouseName == '鲅鱼圈金信库')
-          ) {
-            for (var i = value.length - 1; i >= 0; i--) {
-              var tmp = String.fromCharCode(value[i])
-              console.log(tmp)
-              if (String.fromCharCode(value[0]) == '.') {
-                flag = true
-              }
-              if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
-                result += tmp
-              }
-            }
-            if (parseInt(result) || parseInt(result) == 0) {
-              this.dataList.grossWeight = parseInt(result)
-            }
-          } else {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-
-              if (value[0] != 49 && value[0] != 2) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  flag1 = true
-                } else {
-                  break
-                }
-              }
-              if (tmp == String.fromCharCode(32)) {
-                flag = true
-              }
-              if (
-                flag &&
-                result.length < 7 &&
-                tmp != String.fromCharCode(32) &&
-                !(
-                  value[value.length - 1] == 48 && value[value.length - 2] == 48
-                )
-              ) {
-                result += tmp
-              }
-              if (flag1 && tmp != String.fromCharCode(32)) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  if (i == 0) {
-                    this.result1 = tmp + '0'
-                  }
-                }
-              }
-            }
-            if (parseInt(result) || parseInt(result) == 0) {
-              this.dataList.grossWeight = parseInt(result + this.result1)
-            }
-          }
-          // setTimeout(1000)
-          // value 是一个 Uint8Array
-        }
-        await port.close()
-      } else {
-        console.log('the Web Serial API is not supported.', navigator)
-      }
-    },
-    pureweight(status) {
-      console.log(this.deptBudgetList)
-      if (
-        this.deptBudgetList.netWeight &&
-        this.deptBudgetList.tidalGrainWater &&
-        this.deptBudgetList.solidGrainWater &&
-        this.deptBudgetList.buckleWeightRatio
-      ) {
-        this.deptBudgetList.pureWeight =
-          (this.deptBudgetList.netWeight *
-            (100 -
-              (this.deptBudgetList.tidalGrainWater -
-                this.deptBudgetList.solidGrainWater) *
-                this.deptBudgetList.buckleWeightRatio)) /
-          100
+        accessoryTFs: false,
+        param: 9600,
+        allowEdit: true,
+        result1: '00',
       }
     },
-    uploadSuccessHandle1(res) {
-      this.dataList.addressUrl = res.url
-    },
-    //返回按钮
-    revert() {
-      this.$router.go(-1)
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter((item) => {
-          if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
-          ) {
-            return true
-          }
-        })
+    mounted() {},
+    activated() {
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
       } else {
-        //val为空时,还原数组
-        this.options = this.staffList
+        this.allowEdit = true
       }
+      this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList1.binNumber = this.$route.query.binNumber
+      this.dataList.id = this.$route.query.id
+      this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.baseId = this.$route.query.baseId
+      this.dataList.positionId = this.$route.query.positionId
+      this.dataList.warehouseName = this.$route.query.warehouseName
+      this.dataList.binNumber = this.$route.query.binNumber
+      this.dataList.tare = Math.round(this.$route.query.tare * 1000)
+      this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
+      this.dataList.boxNo = this.$route.query.boxNo
+      this.dataList.boxNoOther = this.$route.query.boxNoOther
+      this.dataList.titleNo = this.$route.query.titleNo
+      this.dataList.titleNoOther = this.$route.query.titleNoOther
+      this.dataList.grade = this.$route.query.grade
+      this.dataList.agent = this.$route.query.agent
+      this.dataList.carNo = this.$route.query.carNo
+      this.dataList.inOutDate = this.$route.query.inOutDate
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.inOutType = this.$route.query.inOutType
+      this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
+      this.dataList.compId = this.$route.query.compId
+      this.dataList.goodsName = this.$route.query.goodsName
+      this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+      this.dataList.inOutFlag = this.$route.inOutFlag
+      this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+      this.dataList.statusFlag = this.$route.statusFlag
+      this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+      console.log(this.dataList)
+      if (this.$route.query.automaticWeightAcquisition == '0') {
+        this.isShowBalance = true
+      }
+      this.getList()
     },
+    methods: {
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.deptBudgetList.grossWeight = data
+        } else {
+          this.deptBudgetList.tare = data
+        }
 
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      pureweight(status) {
+        console.log(this.deptBudgetList)
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
+                this.deptBudgetList.buckleWeightRatio)) /
+            100
         }
-      }
-    },
-    carChange(e) {
-      for (let i = 0; i < this.tranCarInfoList.length; i++) {
-        if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
-          this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
-          this.deptBudgetList.carId = this.tranCarInfoList[i].id
+      },
+      uploadSuccessHandle1(res) {
+        this.dataList.addressUrl = res.url
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
         }
-      }
-    },
-    //暂存按钮
-    temporaryStorage() {
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.dataList.validate((valid) => {
-            if (valid) {
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              this.dataList.inOutFlag = 1
-              this.dataList.statusFlag = 1
-              addstorageputList(this.dataList)
-                .toPromise()
-                .then((response) => {
-                  this.$message.success('暂存成功')
-                  this.$router.push({
-                    path: 'warehouseManagementList',
+      },
+
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.carId = this.tranCarInfoList[i].id
+          }
+        }
+      },
+      //暂存按钮
+      temporaryStorage() {
+        this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.inOutFlag = 1
+                this.dataList.statusFlag = 1
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('暂存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
                   })
-                })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList2.length; i++) {
+          if (this.deptBudgetList2[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList2[i]
+            if (this.deptBudgetList2[i].contractNo) {
+              this.dataList.contractNo = this.deptBudgetList2[i].contractNo
             } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
+              this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
             }
-          })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    contractNoChange(e) {
-      for (let i = 0; i < this.deptBudgetList2.length; i++) {
-        if (this.deptBudgetList2[i].inOutTaskNo == e) {
-          var data = this.deptBudgetList2[i]
-          if (this.deptBudgetList2[i].contractNo) {
-            this.dataList.contractNo = this.deptBudgetList2[i].contractNo
-          } else {
-            this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
           }
         }
-      }
 
-      for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
-          if (this.outContractNo[i].inOutType == '销售出库') {
-            this.dataList.tips =
-              '买方' +
-              this.outContractNo[i].buyer +
-              '( ' +
-              this.outContractNo[i].unitContractPrice +
-              '元/吨)'
-            this.dataList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库出库') {
-            if (this.outContractNo[i].unitContractPrice) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
               this.dataList.tips =
-                '入货库' +
-                data.receiveWarehouse +
+                '买方' +
+                this.outContractNo[i].buyer +
                 '( ' +
                 this.outContractNo[i].unitContractPrice +
                 '元/吨)'
+              this.dataList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              if (this.outContractNo[i].unitContractPrice) {
+                this.dataList.tips =
+                  '入货库' +
+                  data.receiveWarehouse +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.dataList.tips = '入货库' + data.receiveWarehouse
+              }
+              this.dataList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.dataList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.dataList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.dataList.inOutTypeKey = 6
+            }
+            this.dataList.goodsName = this.outContractNo[i].goodsName
+            this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
             } else {
-              this.dataList.tips = '入货库' + data.receiveWarehouse
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
             }
-            this.dataList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.dataList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
-            this.dataList.inOutTypeKey = 5
-          } else if (this.outContractNo[i].inOutType == '采购出库') {
-            this.dataList.inOutTypeKey = 6
-          }
-          this.dataList.goodsName = this.outContractNo[i].goodsName
-          this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          if (this.outContractNo[i].deliverType == '1') {
-            this.carstatus = true
-          } else {
-            this.carstatus = false
           }
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            // this.carstatus = true
+        }
+      },
+      contractNoChange1(e) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.dataList.goodsName = this.outContractNo[i].goodsName
+            this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
           }
         }
-      }
-    },
-    contractNoChange1(e) {
-      for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == e) {
-          if (this.outContractNo[i].inOutType == '销售出库') {
-            this.deptBudgetList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库出库') {
-            this.deptBudgetList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.deptBudgetList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
-            this.deptBudgetList.inOutTypeKey = 5
-          } else if (this.detailData.inOutType == '采购出库') {
-            this.deptBudgetList.inOutTypeKey = 6
-          }
-          this.dataList.goodsName = this.outContractNo[i].goodsName
-          this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          if (this.outContractNo[i].deliverType == '1') {
-            this.carstatus = true
-          } else {
-            this.carstatus = false
-          }
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            // this.carstatus = true
-          }
+      },
+      typeChange(e) {},
+      //提交按钮
+      submit() {
+
+        if (this.reader) {
+          this.reader.cancel()
         }
-      }
-    },
-    typeChange(e) {},
-    //提交按钮
-    submit() {
-      
-      if(this.reader){
-        this.reader.cancel()
-      }
-      if (!this.dataList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.grossWeight) {
-        this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.grossWeight <= 0 ||
-        this.dataList.grossWeight > 200000 ||
-        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
-          String(this.dataList.grossWeight).length -
+        if (!this.dataList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.grossWeight <= 0 ||
+          this.dataList.grossWeight > 200000 ||
+          (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+            String(this.dataList.grossWeight).length -
             (String(this.dataList.grossWeight).indexOf('.') + 1) >
             3)
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.tare < 0 ||
-        this.dataList.tare > 200000 ||
-        (String(this.dataList.tare).indexOf('.') != -1 &&
-          String(this.dataList.tare).length -
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.tare < 0 ||
+          this.dataList.tare > 200000 ||
+          (String(this.dataList.tare).indexOf('.') != -1 &&
+            String(this.dataList.tare).length -
             (String(this.dataList.tare).indexOf('.') + 1) >
             3)
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
-        this.$message({
-          message: '扣重比不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
-        (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
-        (this.dataList.type == '潮粮' &&
-          String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
-          String(this.dataList.buckleWeightRatio).length -
-            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣重比输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
-        this.$message({
-          message: '潮粮水分不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
-        (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
-        (this.dataList.type == '潮粮' &&
-          String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
-          String(this.dataList.tidalGrainWater).length -
-            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '潮粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
-        this.$message({
-          message: '干粮水分不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
-        (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
-        (this.dataList.type == '潮粮' &&
-          String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
-          String(this.dataList.solidGrainWater).length -
-            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
-            1)
-      ) {
-        this.$message({
-          message: '干粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.agent) {
-        this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.grade) {
-        this.$message({
-          message: '品级不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.inOutDate) {
-        this.$message({
-          message: '入库日期不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.inOutType) {
-        this.$message({
-          message: '出库类型不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.carNo) {
-        this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
-        this.$message({
-          message: '箱号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
-        this.$message({
-          message: '箱号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
-        this.$message({
-          message: '封号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.dataList.titleNoOther &&
-        this.dataList.titleNoOther.length > 20
-      ) {
-        this.$message({
-          message: '封号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.dataList.contractNo) {
-        this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      // if (
-      //   this.dataList.contractNo.length < 6 ||
-      //   this.dataList.contractNo.length > 20
-      // ) {
-      //   this.$message({
-      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-
-      if (this.dataList.netWeight > this.$route.query.capacity) {
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
-      //自检员
-      if (this.dataList.warehouseInOutDetail.qualityInspector) {
-        if (
-          this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
-          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
         ) {
           this.$message({
-            message: '质检员姓名长度错误!',
+            message: '皮重输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      if (this.dataList.warehouseInOutDetail.waterContent) {
-        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+        if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
           this.$message({
-            message: '水分(%)非数字!',
+            message: '扣重比不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.dataList.warehouseInOutDetail.waterContent < 1 ||
-          this.dataList.warehouseInOutDetail.waterContent > 40 ||
-          (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.dataList.warehouseInOutDetail.waterContent).length -
-              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
-                '.'
-              ) +
-                1) >
-              2)
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.dataList.buckleWeightRatio).length -
+            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '扣重比输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //杂质
-      if (this.dataList.warehouseInOutDetail.impurity) {
-        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+        if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
           this.$message({
-            message: '杂质(%)非数字!',
+            message: '潮粮水分不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.dataList.warehouseInOutDetail.impurity < 1 ||
-          this.dataList.warehouseInOutDetail.impurity > 40 ||
-          (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
-            -1 &&
-            String(this.dataList.warehouseInOutDetail.impurity).length -
-              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
-                '.'
-              ) +
-                1) >
-              2)
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.tidalGrainWater).length -
+            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
+            2)
         ) {
           this.$message({
-            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '潮粮水分输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      //霉变
-      if (this.dataList.warehouseInOutDetail.mildewGrain) {
-        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+        if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
           this.$message({
-            message: '霉变粒(%)非数字!',
+            message: '干粮水分不能为空',
             type: 'warning',
           })
           return
         }
         if (
-          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
-          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
-          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
-              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
-                '.'
-              ) +
-                1) >
-              2)
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.solidGrainWater).length -
+            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
+            1)
         ) {
           this.$message({
-            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '干粮水分输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //热损伤
-      if (this.dataList.warehouseInOutDetail.jiaorenli) {
-        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+        if (!this.dataList.agent) {
           this.$message({
-            message: '热损伤(%)非数字!',
+            message: '经办人不能为空',
             type: 'warning',
           })
           return
         }
-        if (
-          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
-          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
-          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
-            -1 &&
-            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
-              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
-                '.'
-              ) +
-                1) >
-              2)
-        ) {
+        if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
           this.$message({
-            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '经办人输入有误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //不完善粒(%)
-      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
-        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+        if (!this.dataList.grade) {
           this.$message({
-            message: '不完善粒(%)非数字!',
+            message: '品级不能为空!',
             type: 'warning',
           })
           return
         }
-        if (
-          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
-          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
-              (String(
-                this.dataList.warehouseInOutDetail.imperfectGrain
-              ).indexOf('.') +
-                1) >
-              2)
-        ) {
+        if (!this.dataList.inOutDate) {
           this.$message({
-            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '入库日期不能为空!',
             type: 'warning',
           })
           return
         }
-      }
-      //容重
-      if (this.dataList.warehouseInOutDetail.bulkDensity) {
-        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+        if (!this.dataList.inOutType) {
+          this.$message({
+            message: '出库类型不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.carNo) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.carNo.length > 7) {
           this.$message({
-            message: '容重(克/升)非数字!',
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          (this.dataList.warehouseInOutDetail.bulkDensity &&
-            String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
-              '.'
-            ) != -1 &&
-            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
-              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
-                '.'
-              ) +
-                1) >
-              2) ||
-          this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
-          this.dataList.warehouseInOutDetail.bulkDensity < 0
+          this.dataList.titleNoOther &&
+          this.dataList.titleNoOther.length > 20
         ) {
           this.$message({
-            message: '容重输入错误',
+            message: '封号-2输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      this.$confirm(`确定提交毛重检斤`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.dataList.validate((valid) => {
-            if (valid) {
-              this.dataList.compId = localStorage.getItem('ws-pf_compId')
-              this.dataList.secretaryWeigher =
-                localStorage.getItem('ws-pf_staffName')
-              this.dataList.inOutFlag = 1
-              this.dataList.statusFlag = 3
-              this.dataList.grossWeight /= 1000
-              this.dataList.tare /= 1000
-              this.dataList.netWeight /= 1000
-              this.dataList.pureWeight /= 1000
-              this.dataList.deductionAmount *= 1000
-              this.dataList.deductionWeight /= 1000
-              addstorageputList(this.dataList)
-                .toPromise()
-                .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
-                  this.$message.success('提交成功')
-                  this.$confirm(`是否打印磅单`, {
-                    cancelButtonText: '取消',
-                    confirmButtonText: '确定',
-                    type: 'warning',
-                  })
-                    .then(() => {
-                      getPrintInfo({
-                        id: this.dataList.id,
+        if (!this.dataList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.dataList.contractNo.length < 6 ||
+        //   this.dataList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+
+        if (this.dataList.netWeight > this.$route.query.capacity) {
+          this.$message({
+            message: '入库量大于该仓库容量!',
+            type: 'warning',
+          })
+          return
+        }
+        //自检员
+        if (this.dataList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
+            this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.dataList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.waterContent < 1 ||
+            this.dataList.warehouseInOutDetail.waterContent > 40 ||
+            (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.waterContent).length -
+              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.dataList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.impurity < 1 ||
+            this.dataList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.dataList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.dataList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                  this.dataList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.dataList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.dataList.warehouseInOutDetail.bulkDensity &&
+              String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                  '.'
+                ) +
+                1) >
+              2) ||
+            this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.dataList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm(`确定提交毛重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.secretaryWeigher =
+                  localStorage.getItem('ws-pf_staffName')
+                this.dataList.inOutFlag = 1
+                this.dataList.statusFlag = 3
+                this.dataList.grossWeight /= 1000
+                this.dataList.tare /= 1000
+                this.dataList.netWeight /= 1000
+                this.dataList.pureWeight /= 1000
+                this.dataList.deductionAmount *= 1000
+                this.dataList.deductionWeight /= 1000
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('提交成功')
+                    this.$confirm(`是否打印磅单`, {
+                        cancelButtonText: '取消',
+                        confirmButtonText: '确定',
+                        type: 'warning',
                       })
-                        .toPromise()
-                        .then((response) => {
-                          window.open(
-                            '../../../../static/weightCheckInOut.html?type=2&tableData=' +
+                      .then(() => {
+                        getPrintInfo({
+                            id: this.dataList.id,
+                          })
+                          .toPromise()
+                          .then((response) => {
+                            window.open(
+                              '../../../../static/weightCheckInOut.html?type=2&tableData=' +
                               JSON.stringify(response)
-                          )
+                            )
+                          })
+                        this.$router.push({
+                          path: 'warehouseManagementList',
                         })
-                      this.$router.push({
-                        path: 'warehouseManagementList',
                       })
-                    })
-                    .catch(() => {
-                      return false
-                    })
-                })
-                .catch((response) => {
-                  this.dataList.grossWeight = Math.round(
-                    this.dataList.grossWeight * 1000
-                  )
-                  this.dataList.tare = Math.round(this.dataList.tare * 1000)
-                  this.dataList.netWeight = Math.round(
-                    this.dataList.netWeight * 1000
-                  )
-                  this.dataList.pureWeight = Math.round(
-                    this.dataList.pureWeight * 1000
-                  )
-                  this.dataList.deductionAmount = Math.round(
-                    this.dataList.deductionAmount / 1000
-                  )
-                  this.dataList.deductionWeight = Math.round(
-                    this.dataList.deductionWeight * 1000
-                  )
-                })
+                      .catch(() => {
+                        return false
+                      })
+                  })
+                  .catch((response) => {
+                    this.dataList.grossWeight = Math.round(
+                      this.dataList.grossWeight * 1000
+                    )
+                    this.dataList.tare = Math.round(this.dataList.tare * 1000)
+                    this.dataList.netWeight = Math.round(
+                      this.dataList.netWeight * 1000
+                    )
+                    this.dataList.pureWeight = Math.round(
+                      this.dataList.pureWeight * 1000
+                    )
+                    this.dataList.deductionAmount = Math.round(
+                      this.dataList.deductionAmount / 1000
+                    )
+                    this.dataList.deductionWeight = Math.round(
+                      this.dataList.deductionWeight * 1000
+                    )
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+            if (e == '玉米(潮粮)') {
+              this.dataList.type = '潮粮'
             } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
+              this.dataList.type = '干粮'
             }
-          })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        ).toFixed(2)
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        ).toFixed(2)
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.dataList.goodsNameKey = this.goodnameList[i].constKey
-          if (e == '玉米(潮粮)') {
-            this.dataList.type = '潮粮'
-          } else {
-            this.dataList.type = '干粮'
           }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.deliveryType.length; i++) {
-        if (this.deliveryType[i].constValue == e) {
-          this.dataList.inOutTypeKey = this.deliveryType[i].constKey
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.deliveryType.length; i++) {
+          if (this.deliveryType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.deliveryType[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    getList() {
-      // 货名
-      pullDown({
-        constId: 'CON2',
-      })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-    getReceiptTaskNo({
-      flag: 1,
-      warehouseName: this.deptBudgetList.warehouseName,
-      agentKey: localStorage.getItem('ws-pf_userId'),
-    })
-      .toPromise()
-      .then((response) => {
-        this.deptBudgetList2 = response
-      })
-      // 品级
-      pullDown({
-        constId: 'CON3',
-      })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      if (this.$route.query.warehouseType == '1') {
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 货名
         pullDown({
-          constId: 'CON6',
-        })
+            constId: 'CON2',
+          })
           .toPromise()
           .then((response) => {
-            this.deliveryType = response
+            this.goodnameList = response
+          })
+        getReceiptTaskNo({
+            flag: 1,
+            warehouseName: this.deptBudgetList.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
           })
-      } else if (this.$route.query.warehouseType == '2') {
-        //临时仓库出库类型
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList2 = response
+          })
+        // 品级
         pullDown({
-          constId: 'WARE2',
-        })
+            constId: 'CON3',
+          })
           .toPromise()
           .then((response) => {
-            this.deliveryType = response
+            this.gradeList = response
           })
-      }
-      //合同编号
-      xialaNo({
-        compId: localStorage.getItem('ws-pf_compId'),
-        flag: 5,
-      })
-        .toPromise()
-        .then((response) => {
-          this.outContractNo = response
-          this.contractNoChange(this.dataList.inOutTaskNo)
-          for (let i = 0; i < response.length; i++) {
-            if (this.dataList.contractNo == response[i].contractNo) {
-              if (response[i].deliverType == '1') {
-                this.carstatus = true
-              } else {
-                this.carstatus = false
+        // 类型
+        if (this.$route.query.warehouseType == '1') {
+          pullDown({
+              constId: 'CON6',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        } else if (this.$route.query.warehouseType == '2') {
+          //临时仓库出库类型
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 5,
+          })
+          .toPromise()
+          .then((response) => {
+            this.outContractNo = response
+            this.contractNoChange(this.dataList.inOutTaskNo)
+            for (let i = 0; i < response.length; i++) {
+              if (this.dataList.contractNo == response[i].contractNo) {
+                if (response[i].deliverType == '1') {
+                  this.carstatus = true
+                } else {
+                  this.carstatus = false
+                }
               }
             }
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.dataList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.qualityInspectorList = response
+            this.staffList = response
+            //  this.agent = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
           }
-        })
-      //经办人
-      getstaff({
-        compId: localStorage.getItem('ws-pf_compId'),
-        warehouseId: this.dataList.baseId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.options = response
-          this.qualityInspectorList = response
-          this.staffList = response
-          //  this.agent = response
-        })
-    },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
         }
-      }
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    handleExamine(row) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        query: {
-          id: row.id,
-        },
-      })
-    },
-
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      console.log(row)
-      billoperatehis({
-        id: row.id,
-      })
-        .toPromise()
-        .then((response) => {
-          this.historyList = response
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
         })
+      },
+
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        console.log(row)
+        billoperatehis({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
     },
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .ws-info-table {
-    border: none;
-  }
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
 
-  .left{
-  .el-form-item {
-    width: 50%;
-    // width: 33.3333%;
-    border: none;
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
 
-    .el-form-item__label {
-      background: transparent;
-      border: none;
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
 
-    .el-form-item__content {
-      border: none;
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
   }
-}
-.right{
-  .el-form-item {
-    width: 100%;
-    // width: 33.3333%;
-    border: none;
 
-    .el-form-item__label {
-      background: transparent;
-      border: none;
-    }
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
 
-    .el-form-item__content {
-      border: none;
-    }
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
   }
-}
-}
 
-.title {
-  position: relative;
-  padding-left: 10px;
-}
+  .el-form {
+    padding: 0 10%;
+  }
 
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
 
-.el-form {
-  padding: 0 10%;
-}
+  .el-col {
+    background: #f6f7fc;
+  }
 
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
 
-.el-col {
-  background: #f6f7fc;
-}
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
 
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
 
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-}
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 120vh;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
 
-/deep/.el-form-item__label {
-  width: 160px;
-}
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
 
-//选填
-/deep/.el-form-item {
-  width: 50%;
-}
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
 
-.container {
-  overflow: scroll;
-  height: 120vh;
-}
+  //仓位
+  .position {
+    width: 52px;
+    height: 20px;
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    color: #ffffff;
+    line-height: 20px;
+  }
 
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: center;
-}
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: left;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
 
-.deliverydate {
-  display: inline-block;
-  width: 10%;
-}
+  .inspector {
+    width: 50%;
+  }
 
-.center {
-  margin-top: -60px;
-  width: 80%;
-}
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
 
-//仓位
-.position {
-  width: 52px;
-  height: 20px;
-  background: #afb5cb;
-  border-radius: 2px;
-  font-size: 12px;
-  font-family: PingFangSC-Medium, PingFang SC;
-  color: #ffffff;
-  line-height: 20px;
-}
+  /deep/[data-v-d228e17e] .el-form-item__label {
+    width: 60px;
+  }
 
-//表格文字
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: left;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-}
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
 
-.inspector {
-  width: 50%;
-}
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
 
-//质检员
-.inspector .el-form-item__content {
-  text-align: left;
-  margin-left: 0px;
-}
+  .top {
+    width: 100%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 0 20px;
 
-/deep/[data-v-d228e17e] .el-form-item__label {
-  width: 60px;
-}
+    .car-type {
+      text-align: left;
+    }
 
-.small-title {
-  position: relative;
-  padding: 10px;
-  font-weight: 600;
-}
+    .kg-style {
+      font-size: 30px;
+    }
+  }
 
-.small-title::before {
-  position: absolute;
-  content: '';
-  display: block;
-  background: #5473e8;
-  width: 4px;
-  height: 14px;
-  left: 0px;
-  top: 13px;
-}
-.top {
- background: black;
- color: #2aff7c;
- font-size: 32px;
- text-align: right;
- padding: 20px;
- border-radius: 10px;
- margin: 0 20px 20px 20px;
+  .weight {
+    font-size: 68px;
+  }
 
- .car-type {
-  text-align: left;
- }
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
 
- .kg-style {
- font-size: 30px;
- }
-}
-.weight {
- font-size: 68px;
-}
-//下面列表
-.neifor {
-  width: 80%;
-  background-color: #f6f7fc;
-}
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
+  }
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
-  width: 35%;
-  text-align: center;
-}
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
+  }
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
-  width: 60%;
-  background-color: #f6f7fc;
-}
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
 
-/deep/.neifor .el-input--small .el-input__inner {
-  width: 100%;
-}
+  .el-input__inner {
+    width: 150px;
+  }
+  .balance-row {
+    display: flex;
+    margin: 20px 0;
 
-.el-input__inner {
-  width: 150px;
-}
-</style>
+    .left {
+      width: 500px;
+      margin-bottom: 0;
+    }
+  }
+</style>

+ 41 - 1
src/views/warehouse/warehouseManagementPut.vue

@@ -42,6 +42,24 @@
         <div class="flex">
           <div class="left" style='width:66.6666%;'>
             <ws-info-table>
+               <!-- 任务编号 -->
+            <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+            <el-select
+              filterable
+              clearable
+              v-model="deptBudgetList.inOutTaskNo"
+              placeholder="请选择任务编号"
+              class="typeselect"
+              @change="contractNoChange"
+            >
+              <el-option
+                v-for="item in deptBudgetList1"
+                :key="item.inOutTaskNo"
+                :label="item.inOutTaskNo"
+                :value="item.inOutTaskNo"
+              />
+            </el-select>
+          </ws-form-item>
               <!--合同编号-->
               <ws-form-item label="合同编号" span="1" prop="contractNo">
                 <el-select
@@ -51,6 +69,7 @@
                   placeholder="请选择合同编号或移库任务编号"
                   class="typeselect"
                   @change="contractNoChange"
+                  disabled
                 >
                   <el-option
                     v-for="item in options1"
@@ -764,6 +783,7 @@ import {
   addstorageputList,
   xialaNo,
   getstaff,
+  getReceiptTaskNo,
 } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -886,6 +906,7 @@ export default {
         },
       },
       accessoryTFs: false,
+      deptBudgetList1:[],
     }
   },
   mounted() {
@@ -2085,8 +2106,18 @@ export default {
       }
     },
     contractNoChange(e) {
+       for (let i = 0; i < this.deptBudgetList1.length; i++) {
+        if (this.deptBudgetList1[i].inOutTaskNo == e) {
+          var data = this.deptBudgetList1[i]
+          if (this.deptBudgetList1[i].contractNo) {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+          } else {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+          }
+        }
+      }
       for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == e) {
+        if (this.outContractNo[i].contractNo ==  this.deptBudgetList.contractNo) {
           if (this.outContractNo[i].inOutType == '采购入库') {
            if(!this.outContractNo[i].unitContractPrice){
               this.deptBudgetList.tips =
@@ -2242,6 +2273,15 @@ export default {
             this.deliveryType = response
           })
       }
+      getReceiptTaskNo({
+      flag: 2,
+      warehouseName: this.deptBudgetList.warehouseName,
+      agentKey: localStorage.getItem('ws-pf_userId'),
+    })
+      .toPromise()
+      .then((response) => {
+        this.deptBudgetList1 = response
+      })
       //合同编号
       xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 6 })
         .toPromise()

+ 42 - 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="570" 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>
@@ -384,6 +388,8 @@
 					},
 				},
 				accessoryTFs: false,
+				modification:[],
+				printList:[],//批量打印数据
 			}
 		},
 
@@ -405,6 +411,41 @@
 			})
 		},
 		methods: {
+			batchPrint(){
+				if(this.modification.length == 0 ){
+					this.$message.error("请勾选要打印的条目!")
+				}else{
+					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=''

+ 1486 - 1929
src/views/warehouse/warehouseManagementTare.vue

@@ -6,18 +6,8 @@
         <h2 class="bg-left title">{{ information }}</h2>
       </el-col>
       <el-col :span="4" class="bg-right">
-        <el-button
-          class="bg-bottom"
-          type="primary"
-          size="small"
-          @click="revert()"
-          ><img
-            width="6"
-            height="10"
-            style="vertical-align: bottom; margin-right: 3px"
-            src="../../../public/img/lujing.png"
-            alt=""
-          />返回
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
       </el-col>
     </el-row>
@@ -25,187 +15,86 @@
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList.warehouseName }}
-          <span
-            class="position"
-            v-show="this.deptBudgetList.warehouseType == 1"
-          >
+          <span class="position" v-show="this.deptBudgetList.warehouseType == 1">
             {{ deptBudgetList.binNumber }}仓位
           </span>
           <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
         </h2>
-        <div class="top">
-          <div class="car-type">皮重</div>
-          <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
-          <div class="weight">
-            {{ deptBudgetList.tare }} <span class="kg-style">kg</span>
+        <div class="balance-row">
+          <BalanceAlert v-if='isShowBalance' class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <div class="car-type">皮重</div>
+            <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
+            <div class="weight">
+              {{ deptBudgetList.tare }} <span class="kg-style">kg</span>
+            </div>
+            <div class="car-no">{{ deptBudgetList.carNo }}</div>
           </div>
-          <div class="car-no">{{ deptBudgetList.carNo }}</div>
         </div>
         <div class="small-title">基本信息</div>
         <div class='flex'>
-        <div class='left' style='width:66.6666%;'>
-         <ws-info-table>
-           <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
-            <el-select
-              filterable
-              clearable
-              v-model="deptBudgetList.inOutTaskNo"
-              placeholder="请选择任务编号"
-              class="typeselect"
-              @change="contractNoChange"
-            >
-              <el-option
-                v-for="item in deptBudgetList1"
-                :key="item.inOutTaskNo"
-                :label="item.inOutTaskNo"
-                :value="item.inOutTaskNo"
-              />
-            </el-select>
-          </ws-form-item>
-          <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
-            <ws-input
-              :disabled="allowEdit"
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入毛重"
-              maxlength="20"
-              size="small"
-            />
-            <el-button
-              type="primary"
-              v-if="information == '毛重检斤'"
-              @click="openPort"
-              >重新获取</el-button
-            >
-          </ws-form-item>
-          <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-select
-              disabled
-              v-model="deptBudgetList.contractNo"
-              class="typeselect"
-              @change="contractNoChange1"
-            >
-              <ws-option
-                v-for="item in outContractNo"
-                :key="item.constKey"
-                :label="item.contractNo"
-                :value="item.contractNo"
-              />
-            </ws-select>
-          </ws-form-item>
-          <ws-form-item
-            label="皮重(公斤)"
-            span="1"
-            prop="tare"
-            class="readonly"
-          >
-            <ws-input
-              :disabled="allowEdit"
-              @input="tarechange"
-              v-model="deptBudgetList.tare"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入皮重"
-              maxlength="100"
-              size="small"
-            />
-            <el-button
-              type="primary"
-              v-if="information == '皮重检斤'"
-              @click="openPort"
-              >重新获取</el-button
-            >
-          </ws-form-item>
-          <ws-form-item label="提示" span="1" prop="tips">
-            <ws-input
-              onmouseover="this.title=this.value"
-              v-model="deptBudgetList.tips"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
-            <ws-input
-              disabled
-              v-model="deptBudgetList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item label="货名" span="1">
-            <ws-select
-              disabled
-              v-model="deptBudgetList.goodsName"
-              placeholder
-              class="typeselect"
-              @change="selectgoodsName"
-            >
-              <ws-option
-                v-for="item in goodnameList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
-          <ws-form-item
-            label="出库日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
-          >
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择出库日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-          <ws-form-item label="类型" span="1" prop="type">
-            <ws-select
-              disabled
-              v-model="deptBudgetList.type"
-              @change="typeChange"
-            >
-              <ws-option
-                v-for="item in typeList"
-                :key="item"
-                :label="item"
-                :value="item"
-              />
-            </ws-select>
-          </ws-form-item>
+          <div class='left' style='width:66.6666%;'>
+            <ws-info-table>
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号"
+                  class="typeselect" @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList1" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="deptBudgetList.grossWeight"
+                  type="number" @mousewheel.native.prevent placeholder="请输入毛重" maxlength="20" size="small" />
+                <el-button type="primary" v-if="information == '毛重检斤'" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select disabled v-model="deptBudgetList.contractNo" class="typeselect" @change="contractNoChange1">
+                  <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="deptBudgetList.tare" type="number"
+                  @mousewheel.native.prevent placeholder="请输入皮重" maxlength="100" size="small" />
+                <el-button type="primary" v-if="information == '皮重检斤'" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+                <ws-input disabled v-model="deptBudgetList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="deptBudgetList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+                <ws-date-picker v-model="deptBudgetList.inOutDate" type="date" placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
 
-          <ws-form-item label="出库类型" span="1">
-            <ws-input
-              v-model="deptBudgetList.inOutType"
-              class="right-bottom"
-              :disabled="isSelectType"
-              placeholder="暂无"
-            />
-           
-          </ws-form-item>
-          <ws-form-item
-            v-if="deptBudgetList.type == '潮粮'"
-            label="扣重比"
-            span="1"
-            prop="buckleWeightRatio"
-            class="readonly"
-          >
-            <ws-input
-              @input="pureweight"
-              v-model="deptBudgetList.buckleWeightRatio"
-              type="number"
-              @mousewheel.native.prevent
-              placeholder="请输入扣重比"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!-- <ws-form-item
+              <ws-form-item label="出库类型" span="1">
+                <ws-input v-model="deptBudgetList.inOutType" class="right-bottom" :disabled="isSelectType"
+                  placeholder="暂无" />
+
+              </ws-form-item>
+              <ws-form-item v-if="deptBudgetList.type == '潮粮'" label="扣重比" span="1" prop="buckleWeightRatio"
+                class="readonly">
+                <ws-input @input="pureweight" v-model="deptBudgetList.buckleWeightRatio" type="number"
+                  @mousewheel.native.prevent placeholder="请输入扣重比" maxlength="100" size="small" />
+              </ws-form-item>
+              <!-- <ws-form-item
             v-if="deptBudgetList.type == '潮粮'"
             label="干粮水分占比"
             span="1"
@@ -257,221 +146,85 @@
             />
           </ws-form-item> -->
 
-          <ws-form-item label="品级" span="1" class="readonly">
-            <ws-select
-              v-model="deptBudgetList.grade"
-              placeholder=""
-              class="typeselect"
-              @change="selectpackingMethod"
-            >
-              <ws-option
-                v-for="item in gradeList"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              />
-            </ws-select>
-          </ws-form-item>
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="deptBudgetList.grade" placeholder="" class="typeselect"
+                  @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
 
-          <ws-form-item label="经办人" span="1" prop="agent">
-            <el-select
-              v-model="deptBudgetList.agent"
-              placeholder="请选择经办人"
-              filterable
-              clearable
-              @change="selectstaff"
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
-            </el-select>
-          </ws-form-item>
-        </ws-info-table>
-        </div>
-        <div class='right' style='width:33.3333%;'>
-         <ws-info-table>
-          <ws-form-item label="运输方式" span="1" prop="outType">
-            <el-select
-              v-model="deptBudgetList.outType"
-              placeholder="请选择运输方式"
-            >
-              <el-option
-                v-for="item in multiSelector"
-                :key="item.value"
-                :label="item.name"
-                :value="item.name"
-              />
-            </el-select>
-          </ws-form-item>
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="deptBudgetList.agent" placeholder="请选择经办人" filterable clearable
+                  @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class='right' style='width:33.3333%;'>
+            <ws-info-table>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
 
-          <ws-form-item
-            label="车牌号"
-            span="1"
-            prop="carNo"
-            v-if="
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
               deptBudgetList.outType == '汽运' ||
               deptBudgetList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-if="!carstatus"
-              v-model="deptBudgetList.carNo"
-              placeholder="请输入车牌号"
-              maxlength="7"
-              size="small"
-            />
-            <el-select
-              v-if="carstatus"
-              filterable
-              clearable
-              :filter-method="dataFilter2"
-              v-model="deptBudgetList.carNo"
-              placeholder="请选择车牌号"
-              class="typeselect"
-              @change="carChange"
-            >
-              <el-option
-                v-for="item in options2"
-                :key="item.constKey"
-                :label="item.carNo + '(' + item.tranCarNo + ')'"
-                :value="item.carNo"
-              />
-            </el-select>
-          </ws-form-item>
+            ">
+                <ws-input v-if="!carstatus" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  size="small" />
+                <el-select v-if="carstatus" filterable clearable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+              </ws-form-item>
 
-          <ws-form-item
-            label="车号"
-            span="1"
-            prop="carNo"
-            v-if="deptBudgetList.outType == '火运'"
-          >
-            <ws-input
-              v-model="deptBudgetList.carNo"
-              placeholder="请输入车号"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="箱号-1"
-            span="1"
-            prop="boxNo"
-            v-if="
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
               deptBudgetList.outType == '汽运' ||
               deptBudgetList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="deptBudgetList.boxNo"
-              placeholder="请输入箱号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="箱号-2"
-            span="1"
-            prop="boxNoOther"
-            v-if="
+            ">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
               deptBudgetList.outType == '汽运' ||
               deptBudgetList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="deptBudgetList.boxNoOther"
-              placeholder="请输入箱号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="封号-1"
-            span="1"
-            prop="titleNo"
-            v-if="
+            ">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
               deptBudgetList.outType == '汽运' ||
               deptBudgetList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="deptBudgetList.titleNo"
-              placeholder="请输入封号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="封号-2"
-            span="1"
-            prop="titleNoOther"
-            v-if="
+            ">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
               deptBudgetList.outType == '汽运' ||
               deptBudgetList.outType == '集装箱船'
-            "
-          >
-            <ws-input
-              v-model="deptBudgetList.titleNoOther"
-              placeholder="请输入封号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="车厢号-1"
-            span="1"
-            prop="wingNumber"
-            v-if="deptBudgetList.outType == '火运'"
-          >
-            <ws-input
-              v-model="deptBudgetList.wingNumber"
-              placeholder="请输入车厢号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="车厢号-2"
-            span="1"
-            prop="wingNumberOther"
-            v-if="deptBudgetList.outType == '火运'"
-          >
-            <ws-input
-              v-model="deptBudgetList.wingNumberOther"
-              placeholder="请输入车厢号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="船名"
-            span="1"
-            prop="shipName"
-            v-if="deptBudgetList.outType == '散船'"
-          >
-            <ws-input
-              v-model="deptBudgetList.shipName"
-              placeholder="请输入船名"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <ws-form-item
-            label="航次"
-            span="1"
-            prop="shipNumber"
-            v-if="deptBudgetList.outType == '散船'"
-          >
-            <ws-input
-              v-model="deptBudgetList.shipNumber"
-              placeholder="请输入航次"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
-        </div>
+            ">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="船名" span="1" prop="shipName" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+              </ws-form-item>
+            </ws-info-table>
+          </div>
         </div>
       </div>
       <!-- <div class="small-title">上传磅单照片</div>
@@ -502,19 +255,10 @@
           />
         </ws-form-item> -->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
-          <el-select
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
-            placeholder="请选择质检员"
-            filterable
-            clearable
-            @change="qualityInspectorChange"
-          >
-            <el-option
-              v-for="item in qualityInspectorList"
-              :key="item.value"
-              :label="item.staffName"
-              :value="item.staffName"
-            />
+          <el-select v-model="deptBudgetList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable
+            clearable @change="qualityInspectorChange">
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
           </el-select>
         </ws-form-item>
       </div>
@@ -522,1808 +266,1621 @@
         <ws-info-table>
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-              placeholder="请输入水分占比"
-              maxlength="120"
-              type="number"
-              @mousewheel.native.prevent
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
+              type="number" @mousewheel.native.prevent size="small" />
           </ws-form-item>
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
-              placeholder="请输入杂质占比"
-              type="number"
-              @mousewheel.native.prevent
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
           </ws-form-item>
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入容重"
-              type="number"
-              @mousewheel.native.prevent
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
           </ws-form-item>
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
-              placeholder="请输入霉变粒占比"
-              maxlength="120"
-              type="number"
-              @mousewheel.native.prevent
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
+              type="number" @mousewheel.native.prevent size="small" />
           </ws-form-item>
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
-              placeholder="请输入热损伤占比"
-              type="number"
-              @mousewheel.native.prevent
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
           </ws-form-item>
           <!--不完善粒(%)<=-->
           <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-              placeholder="请输入不完善粒占比"
-              type="number"
-              @mousewheel.native.prevent
-              maxlength="120"
-              size="small"
-            />
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
           </ws-form-item>
         </ws-info-table>
       </div>
       <div style="text-align: right; padding: 10px">
-        <el-button
-          v-if="information == '皮重检斤'"
-          class="bg-bottom-up"
-          size="small"
-          @click="temporaryStorage()"
-          >保存
+        <el-button v-if="information == '皮重检斤'" class="bg-bottom-up" size="small" @click="temporaryStorage()">保存
         </el-button>
-        <el-button
-          v-if="!allowEdit"
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="submit()"
-          >提交</el-button
-        >
-        <el-button
-          v-if="!allowEdit"
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="print()"
-          >提交并打印</el-button
-        >
+        <el-button v-if="!allowEdit" class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
+        <el-button v-if="!allowEdit" class="bg-bottom-up" type="primary" size="small" @click="print()">提交并打印</el-button>
       </div>
     </ws-form>
   </div>
 </template>
 <script>
-import {
-  pullDown,
-  addstorageputList,
-  goodsname,
-  xialaNo,
-  getstaff,
-  goodsnameXiala,
-  getReceiptTaskNo,
-} from '@/model/warehouse/index'
-import Pagination from '@/components/Pagination'
-import WsUpload from '@/components/WsUpload'
-// import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
-export default {
-  name: 'viewSpareMoney',
-  components: {
-    WsUpload,
-    Pagination,
-  },
-  watch: {
-    isShow(val) {
-      this.showType = val
+  import {
+    pullDown,
+    addstorageputList,
+    goodsname,
+    xialaNo,
+    getstaff,
+    goodsnameXiala,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
     },
-  },
-  data() {
-    return {
-      deptBudgetList1: [],
-      isSelectType: true,
-      carstatus: false,
-      qualityInspectorList: [],
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-      // 是否显示
-      showType: true,
-      readonly: true,
-      // 年
-      year: '',
-      deptBudgetTotal: 0,
-      currentPage: 1,
-      pageSize: 10,
-      searchType: 1,
-      searchKeyWord: '',
-      contractType: 2,
-      startDate: null,
-      endDate: null,
-      goodnameList: {},
-      // 提交类型
-      submitType: true,
-      deliveryType: [],
-      typeList: ['干粮', '潮粮'],
-      outContractNo: [],
-      appendixIdsAdd: '',
-      uploadSuccess: {},
-      gradeList: [],
-      agent: [],
-      staffList: [],
-      options: [],
-      value: '',
-      rules: {
-        netWeight: [
-          {
+    watch: {
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        isShowBalance: false,
+        deptBudgetList1: [],
+        isSelectType: true,
+        carstatus: false,
+        qualityInspectorList: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        readonly: true,
+        // 年
+        year: '',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        // 提交类型
+        submitType: true,
+        deliveryType: [],
+        typeList: ['干粮', '潮粮'],
+        outContractNo: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        gradeList: [],
+        agent: [],
+        staffList: [],
+        options: [],
+        value: '',
+        rules: {
+          netWeight: [{
             required: true,
             type: 'number',
             message: '请输入活动名称',
             trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        skinInspector: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {
+          type: '干粮',
+          addressUrl: '',
+          warehouseInOutDetail: {},
+          grossWeight: '',
+          tare: '',
+          inOutDate: '',
+        },
+        weightbills: {},
+        historyList: [],
+
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        allowEdit: true,
+        param: 9600,
+        information: '',
+        result1: '00',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
           },
         ],
+      }
+    },
+    mounted() {
+      let date = new Date()
+      var year = date.getFullYear()
+      var month = date.getMonth() + 1
+      var strDate = date.getDate()
+      this.deptBudgetList.inOutDate = year + '-' + month + '-' + strDate
+      this.information = this.$route.query.information
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
+      } else {
+        this.allowEdit = true
+      }
+      this.deptBudgetList.baseId = this.$route.query.baseId
+      this.deptBudgetList.positionId = this.$route.query.positionId
+      this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList.binNumber = this.$route.query.binNumber
+      this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+      this.deptBudgetList.warehouseId = this.$route.query.warehouseId
+      this.getList()
+      getReceiptTaskNo({
+          flag: 1,
+          warehouseName: this.deptBudgetList.warehouseName,
+          agentKey: localStorage.getItem('ws-pf_userId'),
+        })
+        .toPromise()
+        .then((response) => {
+          console.log(response)
+          this.deptBudgetList1 = response
+        })
+      if (this.$route.query.automaticWeightAcquisition == '1') {
+        this.isShowBalance = true
+      }
+    },
+    methods: {
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.deptBudgetList.grossWeight = data
+        } else {
+          this.deptBudgetList.tare = data
+        }
+
       },
-      size: 10,
-      compId: localStorage.getItem('ws-pf_compId'),
-      skinInspector: localStorage.getItem('ws-pf_staffName'),
-      deptCircularPage: {},
-      packtypeList: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
+      openPort() {
+        this.$refs.weightChild.openPort()
       },
-      contractList: [],
-      deptBudgetList: {
-        type: '干粮',
-        addressUrl: '',
-        warehouseInOutDetail: {},
-        grossWeight: '',
-        tare: '',
-        inOutDate: '',
+      qualityInspectorChange(e) {
+        console.log(e)
       },
-      weightbills:{},
-      historyList: [],
-
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
-        },
+      uploadSuccessHandle1(res) {
+        this.deptBudgetList.addressUrl = res.url
       },
-      accessoryTFs: false,
-      allowEdit: true,
-      param: 9600,
-      information: '',
-      result1: '00',
-      multiSelector: [
-        {
-          name: '汽运',
-          value: '0',
-        },
-        {
-          name: '火运',
-          value: '1',
-        },
-        {
-          name: '集装箱船',
-          value: '2',
-        },
-        {
-          name: '散船',
-          value: '3',
-        },
-      ],
-    }
-  },
-  mounted() {
-    let date = new Date()
-    var year = date.getFullYear()
-    var month = date.getMonth() + 1
-    var strDate = date.getDate()
-    this.deptBudgetList.inOutDate = year + '-' + month + '-' + strDate
-    this.information = this.$route.query.information
-    if (this.$route.query.allowEdit == 1) {
-      this.allowEdit = false
-    } else {
-      this.allowEdit = true
-    }
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
-    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
-    this.deptBudgetList.warehouseId = this.$route.query.warehouseId
-    this.getList()
-    getReceiptTaskNo({
-      flag: 1,
-      warehouseName: this.deptBudgetList.warehouseName,
-      agentKey: localStorage.getItem('ws-pf_userId'),
-    })
-      .toPromise()
-      .then((response) => {
-        console.log(response)
-        this.deptBudgetList1 = response
-      })
-    if(this.$route.query.automaticWeightAcquisition == '1'){
-      this.openPort()
-    }
-  },
-  methods: {
-    async closePort() {
-      console.log('closePort')
-      this.reader.cancel()
-    },
-    async openPort() {
-      console.log('openPort', navigator)
-    if ('serial' in navigator) {
-      // if (!this.$store.state.app.reader) {
-        // The Web Serial API is supported.
-        console.log('the Web Serial API is supported.')
-        console.log(this.param)
-        const port = await navigator.serial.requestPort()
-        await port.open({
-          baudRate: this.param,
-        }) // set baud rate
-        this.reader = port.readable.getReader()
-        console.log('beforeReader', port)
-        console.log('beforeReader', this.reader)
-        this.$store.dispatch('app/setReader', this.reader)
-      // } else {
-      //   console.log('afterport', this.$store.state.app.reader)
-      //   this.reader = this.$store.state.app.reader
-      // }
-        // 监听来自串行设备的数据
-        while (true) {
-          const { value, done } = await this.reader.read()
-          // console.log("value",value);
-          if (done) {
-            // 允许稍后关闭串口。
-            this.reader.releaseLock()
-            break
+      //返回按钮
+      revert() {
+        this.$router.push({
+          path: 'warehouseManagementList',
+        })
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.carId = this.tranCarInfoList[i].id
           }
-          var result = ''
-          //2。获取16进制字符串
-          // var receData = HexConvert.ByteToString(value);
-          // console.log("receData",receData);
-          var flag = false
-          var flag1 = false
-          // for (var i = 0; i < value.length; i++) {
-          //   var tmp = String.fromCharCode(value[i])
-          //   if (tmp == '+') {
-          //     flag = true
-          //   }
-          //   if (flag && result.length < 6 && tmp != '+') {
-          //     result += tmp
-          //   }
-          // }
-          // if (this.information != '毛重检斤') {
-          //   if(parseInt(result)){
-          //     this.deptBudgetList.grossWeight = parseInt(result)
-          //   }
-          // } else {
-          //   if(parseInt(result)){
-          //     this.deptBudgetList.tare = parseInt(result)
-          //   }
-          // }
-          if (
-            this.deptBudgetList.warehouseName &&
-            (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
-              this.deptBudgetList.warehouseName == '克东千红库' ||
-              this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库' ||
-              this.deptBudgetList.warehouseName == '哈尔滨依兰库' ||
-              this.deptBudgetList.warehouseName == '龙江金信库')
-          ) {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-              if (tmp == '+') {
-                flag = true
-              }
-              if (flag && result.length < 6 && tmp != '+') {
-                result += tmp
-              }
-            }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(result)
-              }
+        }
+      },
+      print() {
+        this.submit(1)
+      },
+      typeChange(e) {},
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList1.length; i++) {
+          if (this.deptBudgetList1[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList1[i]
+            if (this.deptBudgetList1[i].contractNo) {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
             } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result)
-              }
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
             }
-          } else if (
-            this.deptBudgetList.warehouseName &&
-            (this.deptBudgetList.warehouseName == '顺诚粮库' ||
-              this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
+          }
+        }
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (
+            this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
           ) {
-            for (var i = value.length - 1; i >= 0; i--) {
-              var tmp = String.fromCharCode(value[i])
-              console.log(tmp)
-              if (String.fromCharCode(value[0]) == '.') {
-                flag = true
-              }
-              if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
-                result += tmp
-              }
-            }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(result)
-              }
+            this.weightbills.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            if (this.deptBudgetList.goodsName == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
             } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result)
-              }
+              this.deptBudgetList.type = '干粮'
             }
-          } else {
-            for (var i = 0; i < value.length; i++) {
-              var tmp = String.fromCharCode(value[i])
-
-              if (value[0] != 49 && value[0] != 2) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  flag1 = true
-                } else {
-                  break
-                }
-              }
-              if (tmp == String.fromCharCode(32)) {
-                flag = true
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.weightbills.buyer = this.outContractNo[i].buyer
+              this.weightbills.seller = localStorage.getItem('ws-pf_compName')
+              if (!this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '买方' +
+                  this.outContractNo[i].buyer
+              } else {
+                this.deptBudgetList.tips =
+                  '买方' +
+                  this.outContractNo[i].buyer +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
               }
-              if (
-                flag &&
-                result.length < 7 &&
-                tmp != String.fromCharCode(32) &&
-                !(
-                  value[value.length - 1] == 48 && value[value.length - 2] == 48
-                )
-              ) {
-                result += tmp
-              }
-              if (flag1 && tmp != String.fromCharCode(32)) {
-                if (
-                  value[value.length - 1] == 48 &&
-                  value[value.length - 2] == 48
-                ) {
-                  if (i == 0) {
-                    this.result1 = tmp + '0'
-                  }
-                }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+
+              this.weightbills.buyer = this.outContractNo[i].receiveWarehouse
+              this.weightbills.seller = this.outContractNo[i].sendWarehouse
+              this.deptBudgetList.goodsName = data.goodsName
+              this.deptBudgetList.goodsNameKey = data.goodsNameKey
+              this.deptBudgetList.grade = data.grade
+              if (this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '入货库' +
+                  data.receiveWarehouse +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
               }
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
             }
-            if (this.information == '毛重检斤') {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.grossWeight = parseInt(
-                  result + this.result1
-                )
-              }
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
             } else {
-              if (parseInt(result) || parseInt(result) == 0) {
-                this.deptBudgetList.tare = parseInt(result + this.result1)
-              }
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
             }
           }
-          // setTimeout(1000)
-          // value 是一个 Uint8Array
-        }
-        await port.close()
-      } else {
-        console.log('the Web Serial API is not supported.', navigator)
-      }
-    },
-    qualityInspectorChange(e) {
-      console.log(e)
-    },
-    uploadSuccessHandle1(res) {
-      this.deptBudgetList.addressUrl = res.url
-    },
-    //返回按钮
-    revert() {
-      this.$router.push({
-        path: 'warehouseManagementList',
-      })
-    },
-    carChange(e) {
-      for (let i = 0; i < this.tranCarInfoList.length; i++) {
-        if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
-          this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
-          this.deptBudgetList.carId = this.tranCarInfoList[i].id
         }
-      }
-    },
-    print(){
-			this.submit(1)
-			},
-    typeChange(e) {},
-    contractNoChange(e) {
-      for (let i = 0; i < this.deptBudgetList1.length; i++) {
-        if (this.deptBudgetList1[i].inOutTaskNo == e) {
-          var data = this.deptBudgetList1[i]
-          if (this.deptBudgetList1[i].contractNo) {
-            this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
-          } else {
-            this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+      },
+      contractNoChange1(e) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
+            }
           }
         }
-      }
-      for (var i = 0; i < this.outContractNo.length; i++) {
+      },
+      dataFilter2(val) {
+        this.deptBudgetList.carNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.carNo.indexOf(val) ||
+              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options2 = this.tranCarInfoList
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      pureweight(e) {
+        console.log(this.deptBudgetList)
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
+                this.deptBudgetList.buckleWeightRatio)) /
+            100
+        }
+      },
+      temporaryStorage() {
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.information == '毛重检斤' &&
+          (this.deptBudgetList.grossWeight <= 0 ||
+            this.deptBudgetList.grossWeight > 200000 ||
+            (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+              String(this.deptBudgetList.grossWeight).length -
+              (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+              3))
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空',
+            type: 'warning',
+          })
+          return
+        }
         if (
-          this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+          this.information == '皮重检斤' &&
+          (this.deptBudgetList.tare < 0 ||
+            this.deptBudgetList.tare > 200000 ||
+            (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+              String(this.deptBudgetList.tare).length -
+              (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+              3))
         ) {
-          this.weightbills.goodsName=this.outContractNo[i].goodsName
-          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
-          if(this.deptBudgetList.goodsName=='玉米(潮粮)'){
-            this.deptBudgetList.type='潮粮'
-          }else{
-            this.deptBudgetList.type='干粮'
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.carNo.length > 7) {
+          this.$message({
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
           }
-          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          this.deptBudgetList.grade = this.outContractNo[i].grade
-          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
-          if (this.outContractNo[i].inOutType == '销售出库') {
-          this.weightbills.buyer=this.outContractNo[i].buyer
-          this.weightbills.seller=localStorage.getItem('ws-pf_compName')
-            if(!this.outContractNo[i].unitContractPrice){
-              this.deptBudgetList.tips =
-              '买方' +
-              this.outContractNo[i].buyer
-            }else{
-              this.deptBudgetList.tips =
-              '买方' +
-              this.outContractNo[i].buyer +
-              '( ' +
-              this.outContractNo[i].unitContractPrice +
-              '元/吨)'
-            }
-            this.deptBudgetList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库出库') {
-            
-          this.weightbills.buyer=this.outContractNo[i].receiveWarehouse
-          this.weightbills.seller=this.outContractNo[i].sendWarehouse
-            this.deptBudgetList.goodsName = data.goodsName
-            this.deptBudgetList.goodsNameKey = data.goodsNameKey
-            this.deptBudgetList.grade = data.grade
-            if (this.outContractNo[i].unitContractPrice) {
-              this.deptBudgetList.tips =
-                '入货库' +
-                data.receiveWarehouse +
-                '( ' +
-                this.outContractNo[i].unitContractPrice +
-                '元/吨)'
-            } else {
-              this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
-            }
-            this.deptBudgetList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.deptBudgetList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
-            this.deptBudgetList.inOutTypeKey = 5
-          } else if (this.outContractNo[i].inOutType == '采购出库') {
-            this.deptBudgetList.inOutTypeKey = 6
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].deliverType == '1') {
-            this.carstatus = true
-          } else {
-            this.carstatus = false
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            this.carstatus = true
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
         }
-      }
-    },
-    contractNoChange1(e) {
-      for (var i = 0; i < this.outContractNo.length; i++) {
-        if (this.outContractNo[i].contractNo == e) {
-          if (this.outContractNo[i].inOutType == '销售出库') {
-            this.deptBudgetList.inOutTypeKey = 1
-          } else if (this.outContractNo[i].inOutType == '移库出库') {
-            this.deptBudgetList.inOutTypeKey = 3
-          } else if (this.outContractNo[i].inOutType == '暂存入库') {
-            this.deptBudgetList.inOutTypeKey = 4
-          } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
-            this.deptBudgetList.inOutTypeKey = 5
-          } else if (this.outContractNo[i].inOutType == '采购出库') {
-            this.deptBudgetList.inOutTypeKey = 6
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
-          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
-          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
-          this.deptBudgetList.grade = this.outContractNo[i].grade
-          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
-          if (this.outContractNo[i].tranCarInfoList) {
-            this.options2 = this.outContractNo[i].tranCarInfoList
-            this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
-            this.carstatus = true
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
           }
         }
-      }
-    },
-    dataFilter2(val) {
-      this.deptBudgetList.carNo = val
-      if (val) {
-        //val存在
-        this.options1 = this.outContractNo1.filter((item) => {
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
           if (
-            !!~item.carNo.indexOf(val) ||
-            !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
           ) {
-            return true
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options2 = this.tranCarInfoList
-      }
-    },
-    dataFilter(val) {
-      // console.log(val,"名")
-      this.deptBudgetList.staffList = val
-      if (val) {
-        //val存在
-        this.options = this.staffList.filter((item) => {
           if (
-            !!~item.staffName.indexOf(val) ||
-            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
           ) {
-            return true
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
           }
-        })
-      } else {
-        //val为空时,还原数组
-        this.options = this.staffList
-      }
-    },
-    selectstaff(e) {
-      for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
-          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
         }
-      }
-    },
-    pureweight(e) {
-      console.log(this.deptBudgetList)
-      if (
-        this.deptBudgetList.netWeight &&
-        this.deptBudgetList.tidalGrainWater &&
-        this.deptBudgetList.solidGrainWater &&
-        this.deptBudgetList.buckleWeightRatio
-      ) {
-        this.deptBudgetList.pureWeight =
-          (this.deptBudgetList.netWeight *
-            (100 -
-              (this.deptBudgetList.tidalGrainWater -
-                this.deptBudgetList.solidGrainWater) *
-                this.deptBudgetList.buckleWeightRatio)) /
-          100
-      }
-    },
-    temporaryStorage() {
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
-        this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.information == '毛重检斤' &&
-        (this.deptBudgetList.grossWeight <= 0 ||
-          this.deptBudgetList.grossWeight > 200000 ||
-          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-            String(this.deptBudgetList.grossWeight).length -
-              (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-              3))
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
-        this.$message({
-          message: '皮重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.information == '皮重检斤' &&
-        (this.deptBudgetList.tare < 0 ||
-          this.deptBudgetList.tare > 200000 ||
-          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-            String(this.deptBudgetList.tare).length -
-              (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-              3))
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.contractNo) {
-        this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      // if (
-      //   this.deptBudgetList.contractNo.length < 6 ||
-      //   this.deptBudgetList.contractNo.length > 20
-      // ) {
-      //   this.$message({
-      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
-      //     type: 'warning',
-      //   })
-      //   return
-      // }
-      //自检员
-      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
-        if (
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
-            2 ||
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
-        ) {
+        this.$confirm(`是否保存皮重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.skinInspector =
+                  localStorage.getItem('ws-pf_staffName')
+                this.deptBudgetList.inOutFlag = 1
+                this.deptBudgetList.pcFlag = 1
+                this.deptBudgetList.statusFlag = 1
+                this.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                if (this.deptBudgetList.netWeight) {
+                  this.deptBudgetList.netWeight = Number(
+                    this.deptBudgetList.netWeight
+                  ).toFixed(2)
+                }
+                this.deptBudgetList.pureWeight /= 1000
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('保存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //提交按钮
+      submit(status) {
+        if (!this.deptBudgetList.goodsName) {
           this.$message({
-            message: '质检员姓名长度错误!',
+            message: '货名不能为空!',
             type: 'warning',
           })
           return
         }
-      }
-      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+        if (!this.deptBudgetList.grossWeight) {
           this.$message({
-            message: '水分(%)非数字!',
+            message: '毛重不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.waterContent
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.waterContent
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.grossWeight <= 0 ||
+          this.deptBudgetList.grossWeight > 5000000 ||
+          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
         ) {
           this.$message({
-            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '毛重输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //杂质
-      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+        if (!this.deptBudgetList.tare) {
           this.$message({
-            message: '杂质(%)非数字!',
+            message: '皮重不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.impurity
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare > 500000 ||
+          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
         ) {
           this.$message({
-            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '皮重输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      //霉变
-      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+        if (!this.deptBudgetList.netWeight) {
           this.$message({
-            message: '霉变粒(%)非数字!',
+            message: '净重不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.mildewGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.netWeight <= 0 ||
+          this.deptBudgetList.netWeight >= 5000000
         ) {
           this.$message({
-            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '净重输入错误!',
             type: 'warning',
           })
           return
         }
-      }
-
-      //热损伤
-      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+        if (!this.deptBudgetList.grade) {
           this.$message({
-            message: '热损伤(%)非数字!',
+            message: '品级不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.jiaorenli
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.buckleWeightRatio
         ) {
           this.$message({
-            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '扣重比不能为空',
             type: 'warning',
           })
           return
         }
-      }
-
-      //不完善粒(%)
-      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio < 0) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio > 3) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
           this.$message({
-            message: '不完善粒(%)非数字!',
+            message: '扣重比输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.tidalGrainWater
         ) {
           this.$message({
-            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '潮粮水分不能为空',
             type: 'warning',
           })
           return
         }
-      }
-      //容重
-      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
           this.$message({
-            message: '容重(克/升)非数字!',
+            message: '潮粮水分输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
-            String(
-              this.deptBudgetList.warehouseInOutDetail.bulkDensity
-            ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.bulkDensity
-              ).indexOf('.') +
-                1) >
-              2) ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.solidGrainWater
         ) {
           this.$message({
-            message: '容重输入错误',
+            message: '干粮水分不能为空',
             type: 'warning',
           })
           return
         }
-      }
-      console.log(this.deptBudgetList, '出库!!!!!')
-      this.$confirm(`是否保存皮重检斤`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-              this.deptBudgetList.skinInspector =
-                localStorage.getItem('ws-pf_staffName')
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.pcFlag = 1
-              this.deptBudgetList.statusFlag = 1
-              this.deptBudgetList.grossWeight /= 1000
-              this.deptBudgetList.tare /= 1000
-              if(this.deptBudgetList.netWeight){
-                this.deptBudgetList.netWeight = Number(
-                  this.deptBudgetList.netWeight
-                ).toFixed(2)
-              }
-              this.deptBudgetList.pureWeight /= 1000
-              addstorageputList(this.deptBudgetList)
-                .toPromise()
-                .then((response) => {
-                  if (this.reader) {
-                    this.reader.cancel()
-                  }
-                  this.$message.success('保存成功')
-                  this.$router.push({
-                    path: 'warehouseManagementList',
-                  })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
-          })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    //提交按钮
-    submit(status) {
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.grossWeight) {
-        this.$message({
-          message: '毛重不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.grossWeight <= 0 ||
-        this.deptBudgetList.grossWeight > 5000000 ||
-        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.grossWeight).length -
-            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.tare) {
-        this.$message({
-          message: '皮重不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.tare < 0 ||
-        this.deptBudgetList.tare > 500000 ||
-        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tare).length -
-            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.netWeight) {
-        this.$message({
-          message: '净重不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.netWeight <= 0 ||
-        this.deptBudgetList.netWeight >= 5000000
-      ) {
-        this.$message({
-          message: '净重输入错误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.grade) {
-        this.$message({
-          message: '品级不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.buckleWeightRatio
-      ) {
-        this.$message({
-          message: '扣重比不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.buckleWeightRatio < 0) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.buckleWeightRatio > 3) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
-          String(this.deptBudgetList.buckleWeightRatio).length -
-            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '扣重比输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.tidalGrainWater
-      ) {
-        this.$message({
-          message: '潮粮水分不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.tidalGrainWater < 1) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.tidalGrainWater > 40) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tidalGrainWater).length -
-            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
-            2)
-      ) {
-        this.$message({
-          message: '潮粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.type == '潮粮' &&
-        !this.deptBudgetList.solidGrainWater
-      ) {
-        this.$message({
-          message: '干粮水分不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.solidGrainWater < 1) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          this.deptBudgetList.solidGrainWater > 40) ||
-        (this.deptBudgetList.type == '潮粮' &&
-          String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
-          String(this.deptBudgetList.solidGrainWater).length -
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.solidGrainWater).length -
             (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
             1)
-      ) {
-        this.$message({
-          message: '干粮水分输入错误',
-          type: 'warning',
-        })
-        return
-      }
-
-      if (!this.deptBudgetList.agent) {
-        this.$message({
-          message: '经办人不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人姓名输入有误!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.inOutDate) {
-        this.$message({
-          message: '出库日期不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.inOutType) {
-        this.$message({
-          message: '出库类型不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
-        this.$message({
-          message: '箱号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.boxNoOther &&
-        this.deptBudgetList.boxNoOther.length > 20
-      ) {
-        this.$message({
-          message: '箱号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.titleNo &&
-        this.deptBudgetList.titleNo.length > 20
-      ) {
-        this.$message({
-          message: '封号-1输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.titleNoOther &&
-        this.deptBudgetList.titleNoOther.length > 20
-      ) {
-        this.$message({
-          message: '封号-2输入错误',
-          type: 'warning',
-        })
-        return
-      }
-      if (!this.deptBudgetList.contractNo) {
-        this.$message({
-          message: '合同编号不能为空!',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 50
-      ) {
-        this.$message({
-          message: '合同编号输入有误!',
-          type: 'warning',
-        })
-        return
-      }
-      //自检员
-      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
-        if (
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
-            2 ||
-          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
         ) {
           this.$message({
-            message: '质检员姓名长度错误!',
+            message: '干粮水分输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+
+        if (!this.deptBudgetList.agent) {
           this.$message({
-            message: '水分(%)非数字!',
+            message: '经办人不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.waterContent
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.waterContent
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.agent.length < 2 ||
+          this.deptBudgetList.agent.length > 10
         ) {
           this.$message({
-            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '经办人姓名输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutDate) {
+          this.$message({
+            message: '出库日期不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutType) {
+          this.$message({
+            message: '出库类型不能为空!',
             type: 'warning',
           })
           return
         }
-      }
-
-      //杂质
-      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+        if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
           this.$message({
-            message: '杂质(%)非数字!',
+            message: '箱号-1输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.impurity
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.boxNoOther &&
+          this.deptBudgetList.boxNoOther.length > 20
         ) {
           this.$message({
-            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '箱号-2输入错误',
             type: 'warning',
           })
           return
         }
-      }
-      //霉变
-      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+        if (
+          this.deptBudgetList.titleNo &&
+          this.deptBudgetList.titleNo.length > 20
+        ) {
           this.$message({
-            message: '霉变粒(%)非数字!',
+            message: '封号-1输入错误',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
-              .length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.mildewGrain
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.titleNoOther &&
+          this.deptBudgetList.titleNoOther.length > 20
         ) {
           this.$message({
-            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '封号-2输入错误',
             type: 'warning',
           })
           return
         }
-      }
-
-      //热损伤
-      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+        if (!this.deptBudgetList.contractNo) {
           this.$message({
-            message: '热损伤(%)非数字!',
+            message: '合同编号不能为空!',
             type: 'warning',
           })
           return
         }
         if (
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
-          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
-            '.'
-          ) != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
-              (String(
-                this.deptBudgetList.warehouseInOutDetail.jiaorenli
-              ).indexOf('.') +
-                1) >
-              2)
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 50
         ) {
           this.$message({
-            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            message: '合同编号输入有误!',
             type: 'warning',
           })
           return
         }
-      }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
 
-      //不完善粒(%)
-      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
-          this.$message({
-            message: '不完善粒(%)非数字!',
-            type: 'warning',
-          })
-          return
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
         }
-        if (
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
-          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
-          (String(
-            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-          ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
               .length -
               (String(
-                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
-              ).indexOf('.') +
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
                 1) >
               2)
-        ) {
-          this.$message({
-            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
-            type: 'warning',
-          })
-          return
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
         }
-      }
-      //容重
-      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
-        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
-          this.$message({
-            message: '容重(克/升)非数字!',
-            type: 'warning',
-          })
-          return
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
         }
-        if (
-          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
-            String(
-              this.deptBudgetList.warehouseInOutDetail.bulkDensity
-            ).indexOf('.') != -1 &&
-            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
               .length -
               (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
                 this.deptBudgetList.warehouseInOutDetail.bulkDensity
-              ).indexOf('.') +
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
                 1) >
               2) ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
-          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
-        ) {
-          this.$message({
-            message: '容重输入错误',
-            type: 'warning',
-          })
-          return
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
         }
-      }
-      this.$confirm(`确定提交出库信息`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      }).then(() => {
-        this.$refs.deptBudgetList.validate((valid) => {
-          if (valid) {
-            this.deptBudgetList.grossWeight /= 1000
-            this.deptBudgetList.tare /= 1000
-            this.deptBudgetList.netWeight /= 1000
-            this.deptBudgetList.pureWeight /= 1000
-            this.deptBudgetList.deductionAmount *= 1000
-            this.deptBudgetList.deductionWeight /= 1000
-            this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-            this.deptBudgetList.skinInspector =
-              localStorage.getItem('ws-pf_staffName')
-            this.deptBudgetList.inOutFlag = 1
-            this.deptBudgetList.statusFlag = 3
-            addstorageputList(this.deptBudgetList)
-              .toPromise()
-              .then((response) => {
-                if (this.reader) {
-                  this.reader.cancel()
-                }
-                this.$message.success('添加成功')
-                if(status){
-                    this.weightbills.carNo=this.deptBudgetList.carNo
-                    this.weightbills.boxNo=this.deptBudgetList.boxNo
-                    this.weightbills.boxNoOther=this.deptBudgetList.boxNoOther
-                    this.weightbills.wingNumber=this.deptBudgetList.wingNumber
-                    this.weightbills.wingNumberOther=this.deptBudgetList.wingNumberOther
-                    this.weightbills.shipName=this.deptBudgetList.shipName
-                    this.weightbills.shipNumber=this.deptBudgetList.shipNumber
-                    this.weightbills.type=this.deptBudgetList.type
-                    this.weightbills.grossWeight=this.deptBudgetList.grossWeight
-                    this.weightbills.tare=this.deptBudgetList.tare
-                    this.weightbills.netWeight=this.deptBudgetList.netWeight
-                    this.weightbills.outType=this.deptBudgetList.outType
-                    this.weightbills.backOffice=this.deptBudgetList.outType
+        this.$confirm(`确定提交出库信息`, {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          type: 'warning',
+        }).then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.grossWeight /= 1000
+              this.deptBudgetList.tare /= 1000
+              this.deptBudgetList.netWeight /= 1000
+              this.deptBudgetList.pureWeight /= 1000
+              this.deptBudgetList.deductionAmount *= 1000
+              this.deptBudgetList.deductionWeight /= 1000
+              this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.skinInspector =
+                localStorage.getItem('ws-pf_staffName')
+              this.deptBudgetList.inOutFlag = 1
+              this.deptBudgetList.statusFlag = 3
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
+                  this.$message.success('添加成功')
+                  if (status) {
+                    this.weightbills.carNo = this.deptBudgetList.carNo
+                    this.weightbills.boxNo = this.deptBudgetList.boxNo
+                    this.weightbills.boxNoOther = this.deptBudgetList.boxNoOther
+                    this.weightbills.wingNumber = this.deptBudgetList.wingNumber
+                    this.weightbills.wingNumberOther = this.deptBudgetList.wingNumberOther
+                    this.weightbills.shipName = this.deptBudgetList.shipName
+                    this.weightbills.shipNumber = this.deptBudgetList.shipNumber
+                    this.weightbills.type = this.deptBudgetList.type
+                    this.weightbills.grossWeight = this.deptBudgetList.grossWeight
+                    this.weightbills.tare = this.deptBudgetList.tare
+                    this.weightbills.netWeight = this.deptBudgetList.netWeight
+                    this.weightbills.outType = this.deptBudgetList.outType
+                    this.weightbills.backOffice = this.deptBudgetList.outType
 
-                    var date=new Date()
-                    this.weightbills.updateDate=date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds()
-                    window.open( '../../../../static/weightCheckOut.html?type=2&tableData=' +encodeURIComponent(JSON.stringify(this.weightbills)))
-                }
-                this.$router.push({
-                  path: 'warehouseManagementList',
+                    var date = new Date()
+                    this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
+                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date
+                      .getSeconds()
+                    window.open('../../../../static/weightCheckOut.html?type=2&tableData=' +
+                      encodeURIComponent(JSON.stringify(this.weightbills)))
+                  }
+                  this.$router.push({
+                    path: 'warehouseManagementList',
+                  })
                 })
-              })
-              .catch((response) => {
-                this.deptBudgetList.grossWeight = Math.round(
-                  this.deptBudgetList.grossWeight * 1000
-                )
-                this.deptBudgetList.tare = Math.round(
-                  this.deptBudgetList.tare * 1000
-                )
-                this.deptBudgetList.netWeight = Math.round(
-                  this.deptBudgetList.netWeight * 1000
-                )
-                this.deptBudgetList.pureWeight = Math.round(
-                  this.deptBudgetList.pureWeight * 1000
-                )
-                this.deptBudgetList.deductionAmount = Math.round(
-                  this.deptBudgetList.deductionAmount / 1000
-                )
-                this.deptBudgetList.deductionWeight = Math.round(
-                  this.deptBudgetList.deductionWeight * 1000
-                )
-              })
-          } else {
-            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            return false
-          }
+                .catch((response) => {
+                  this.deptBudgetList.grossWeight = Math.round(
+                    this.deptBudgetList.grossWeight * 1000
+                  )
+                  this.deptBudgetList.tare = Math.round(
+                    this.deptBudgetList.tare * 1000
+                  )
+                  this.deptBudgetList.netWeight = Math.round(
+                    this.deptBudgetList.netWeight * 1000
+                  )
+                  this.deptBudgetList.pureWeight = Math.round(
+                    this.deptBudgetList.pureWeight * 1000
+                  )
+                  this.deptBudgetList.deductionAmount = Math.round(
+                    this.deptBudgetList.deductionAmount / 1000
+                  )
+                  this.deptBudgetList.deductionWeight = Math.round(
+                    this.deptBudgetList.deductionWeight * 1000
+                  )
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
         })
-      })
-    },
-    tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        ).toFixed(2)
-      }
-    },
-    grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        ).toFixed(2)
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].goodsName == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
-          if (e == '玉米(潮粮)') {
-            this.deptBudgetList.type = '潮粮'
-          } else {
-            this.deptBudgetList.type = '干粮'
+      },
+      tarechange(e) {
+        if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+          ).toFixed(2)
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].goodsName == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
+            if (e == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
+            } else {
+              this.deptBudgetList.type = '干粮'
+            }
           }
         }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          }
         }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.deliveryType.length; i++) {
-        if (this.deliveryType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.deliveryType[i].constKey
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.deliveryType.length; i++) {
+          if (this.deliveryType[i].constValue == e) {
+            this.deptBudgetList.inOutTypeKey = this.deliveryType[i].constKey
+          }
         }
-      }
-    },
-    handleClose() {
-      this.accessoryTFs = false
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    getList() {
-      // 品级
-      pullDown({
-        constId: 'CON3',
-      })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-
-      // 类型
-      if (this.deptBudgetList.warehouseType == 1) {
-        // 货名
-        goodsname({
-          positionId: this.$route.query.positionId,
-        })
-          .toPromise()
-          .then((response) => {
-            this.goodnameList = response
-          })
-        //类型
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 品级
         pullDown({
-          constId: 'CON6',
-        })
+            constId: 'CON3',
+          })
           .toPromise()
           .then((response) => {
-            this.deliveryType = response
+            this.gradeList = response
+          })
+
+        // 类型
+        if (this.deptBudgetList.warehouseType == 1) {
+          // 货名
+          goodsname({
+              positionId: this.$route.query.positionId,
+            })
+            .toPromise()
+            .then((response) => {
+              this.goodnameList = response
+            })
+          //类型
+          pullDown({
+              constId: 'CON6',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        } else if (this.deptBudgetList.warehouseType == 2) {
+          goodsnameXiala({
+              baseId: this.deptBudgetList.warehouseId,
+            })
+            .toPromise()
+            .then((response) => {
+              this.goodnameList = response
+            })
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 5,
           })
-      } else if (this.deptBudgetList.warehouseType == 2) {
-        goodsnameXiala({
-          baseId: this.deptBudgetList.warehouseId,
-        })
           .toPromise()
           .then((response) => {
-            this.goodnameList = response
+            this.outContractNo = response
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.deptBudgetList.baseId,
           })
-        pullDown({
-          constId: 'WARE2',
-        })
           .toPromise()
           .then((response) => {
-            this.deliveryType = response
+            // this.agent = response
+            this.qualityInspectorList = response
+            this.options = response
+            this.staffList = response
           })
-      }
-      //合同编号
-      xialaNo({
-        compId: localStorage.getItem('ws-pf_compId'),
-        flag: 5,
-      })
-        .toPromise()
-        .then((response) => {
-          this.outContractNo = response
-        })
-      //经办人
-      getstaff({
-        compId: localStorage.getItem('ws-pf_compId'),
-        warehouseId: this.deptBudgetList.baseId,
-      })
-        .toPromise()
-        .then((response) => {
-          // this.agent = response
-          this.qualityInspectorList = response
-          this.options = response
-          this.staffList = response
-        })
-    },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
         }
-      }
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    handleExamine(row) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        query: {
-          id: row.id,
-        },
-      })
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
     },
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
-  },
-}
+  }
 </script>
 <style lang="scss" scoped>
-/deep/.basicInformation {
-  .ws-info-table {
-    border: none;
-  }
-.left{
-  .el-form-item {
-    width: 50%;
-    // width: 33.3333%;
-    border: none;
-
-    .el-form-item__label {
-      background: transparent;
+  /deep/.basicInformation {
+    .ws-info-table {
       border: none;
     }
 
-    .el-form-item__content {
-      border: none;
-    }
-  }
-}
-.right{
-  .el-form-item {
-    width: 100%;
-    // width: 33.3333%;
-    border: none;
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
 
-    .el-form-item__label {
-      background: transparent;
-      border: none;
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
 
-    .el-form-item__content {
-      border: none;
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
     }
+
+  }
+
+  .el-button--default {
+    color: #5473e8;
+    border-color: #5473e8;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
   }
-}
-  
-}
 
-.el-button--default {
-  color: #5473e8;
-  border-color: #5473e8;
-}
+  .el-col {
+    background: #f6f7fc;
+  }
 
-.title {
-  position: relative;
-  padding-left: 10px;
-}
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
 
-.title::before {
-  content: '';
-  display: inline-block;
-  width: 5px;
-  height: 30px;
-  background: #5473e8;
-  position: absolute;
-  left: 0;
-}
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
 
-.el-form {
-  padding: 0 10%;
-}
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
 
-.el-button--primary {
-  background-color: #5878e8;
-  border-color: #5878e8;
-}
+  .container {
+    overflow: scroll;
+    height: 120vh;
+  }
 
-.el-col {
-  background: #f6f7fc;
-}
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
 
-.bg-right {
-  text-align: right;
-  padding: 16px 20px;
-}
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
 
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-}
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
 
-//选填
-/deep/.el-form-item {
-  width: 50%;
-}
+  //仓位
+  .position {
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    color: #ffffff;
+    line-height: 20px;
+    padding: 2px 4px;
+    position: relative;
+    top: -2px;
+  }
 
-.container {
-  overflow: scroll;
-  height: 120vh;
-}
+  .neifor /deep/.ws-info-table .el-form-item .el-form-item__label {
+    background: #f6f7fc;
+  }
 
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: center;
-}
+  .neifor .ws-info-table {
+    border-left: 1px solid #cdd2dc;
+    border-top: 1px solid #cdd2dc;
+  }
 
-.deliverydate {
-  display: inline-block;
-  width: 10%;
-}
+  .neifor .ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
 
-.center {
-  margin-top: -60px;
-  width: 80%;
-}
+  .inspector /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 59px;
+  }
 
-//仓位
-.position {
-  background: #afb5cb;
-  border-radius: 2px;
-  font-size: 12px;
-  color: #ffffff;
-  line-height: 20px;
-  padding: 2px 4px;
-  position: relative;
-  top: -2px;
-}
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
 
-.neifor /deep/.ws-info-table .el-form-item .el-form-item__label {
-  background: #f6f7fc;
-}
+  .inspector {
+    width: 50%;
+  }
 
-.neifor .ws-info-table {
-  border-left: 1px solid #cdd2dc;
-  border-top: 1px solid #cdd2dc;
-}
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
 
-.neifor .ws-info-table .el-form-item {
-  border-right: 1px solid #cdd2dc;
-  border-bottom: 1px solid #cdd2dc;
-}
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
 
-.inspector /deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 59px;
-}
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
 
-//表格文字
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: center;
-  font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #8890b1;
-  line-height: 16px;
-}
+  .top {
+    width: 100%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 20px 20px;
 
-.inspector {
-  width: 50%;
-}
+    .car-type {
+      text-align: left;
+    }
 
-//质检员
-.inspector .el-form-item__content {
-  text-align: left;
-  margin-left: 0px;
-}
+    .kg-style {
+      font-size: 30px;
+    }
+  }
 
-.small-title {
-  position: relative;
-  padding: 10px;
-  font-weight: 600;
-}
+  .weight {
+    font-size: 68px;
+  }
 
-.small-title::before {
-  position: absolute;
-  content: '';
-  display: block;
-  background: #5473e8;
-  width: 4px;
-  height: 14px;
-  left: 0px;
-  top: 13px;
-}
-.top {
-  background: black;
-  color: #2aff7c;
-  font-size: 32px;
-  text-align: right;
-  padding: 20px;
-  border-radius: 10px;
-  margin: 0 20px 20px 20px;
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
 
-  .car-type {
-    text-align: left;
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
   }
 
-  .kg-style {
-    font-size: 30px;
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
   }
-}
-.weight {
-  font-size: 68px;
-}
-//下面列表
-.neifor {
-  width: 80%;
-  background-color: #f6f7fc;
-}
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
-  width: 35%;
-  text-align: center;
-}
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
 
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
-  width: 60%;
-  background-color: #f6f7fc;
-}
+  .balance-row {
+    display: flex;
+    margin: 20px 0;
 
-/deep/.neifor .el-input--small .el-input__inner {
-  width: 100%;
-}
+    .left {
+      width: 500px;
+      margin-bottom: 0;
+    }
+  }
 </style>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است