zxz 2 years ago
parent
commit
3e2658a3d9
2 changed files with 56 additions and 10 deletions
  1. 1 0
      src/layout/index/top/index.vue
  2. 55 10
      src/views/houseSelfCollect/newWeighingManagement.vue

+ 1 - 0
src/layout/index/top/index.vue

@@ -666,6 +666,7 @@
            _saomadata.monitorUrl1 = this.toPageData.warehouseBaseInfo.monitorUrl1
            _saomadata.monitorUrl2 = this.toPageData.warehouseBaseInfo.monitorUrl2
            _saomadata.allowEdit = this.toPageData.warehouseBaseInfo.allowEdit
+           _saomadata.number = this.toPageData.number
             localStorage.setItem('saoma_data',JSON.stringify(_saomadata))
              this.$router.push({
             name: 'newWeighingManagement',query: {  id:this.index++ }

+ 55 - 10
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -311,7 +311,7 @@
   import BalanceAlert from '@/components/balanceAlert'
   import html2canvas from 'html2canvas'
   import axios from 'axios'
-  import configText from "../../../vue.config.js"
+  import configText from '../../../vue.config.js'
   export default {
     components: {
       weightCheckPrint,
@@ -338,6 +338,7 @@
                 this.allowEdit = _saomaData.allowEdit
                 this.id = _saomaData.id
                 this.tpyeNo = _saomaData.typeNo
+                this.number = _saomaData.number
                 if (_saomaData.managementType) {
                   this.inWarehouseType = _saomaData.managementType
                 }
@@ -559,6 +560,7 @@
         statusType: 1,
         jjSelectPrintList: [],
         printSeparately: false,
+        number:'',
       }
     },
     beforeDestroy() {
@@ -567,7 +569,7 @@
       }
     },
     mounted() {
-      localStorage.setItem("serverIp",configText.devServer.proxy["/pb"].target)
+      localStorage.setItem('serverIp',configText.devServer.proxy['/pb'].target)
       if(localStorage.getItem('compNameoptions')){
         var company=JSON.parse(localStorage.getItem('compNameoptions'))
         var extra=company.filter((item)=>{
@@ -614,6 +616,7 @@
             this.allowEdit = _saomaData.allowEdit
             this.id = _saomaData.id
             this.tpyeNo = _saomaData.typeNo
+            this.number = _saomaData.number
             if (_saomaData.managementType) {
               this.inWarehouseType = _saomaData.managementType
             }
@@ -1039,14 +1042,26 @@
           console.log(this.mList)
           this.carList = this.mList
           this.carList1 = this.mListTotal
-          if (this.mList.length != 0) {
-            this.setCurrent(this.mList[0])
-            this.weighingList = this.mList[0]
-            this.weighingList.donecount=this.mList[0].completedQuantity+'/'+this.mList[0].weight
-            this.carWeightInfo = {
-              carNumber: this.mList[0].carNumber,
-              type: this.information,
-              weight: this.weighingList.grossWeight,
+          for (let i = 0; i < this.mList.length; i++) {
+            if (this.number == this.mList[i].number) {
+              this.setCurrent(this.mList[i])
+              this.weighingList = this.mList[i]
+              this.weighingList.donecount = this.mList[i].completedQuantity + '/' + this.mList[i].weight
+              this.carWeightInfo = {
+                carNumber: this.mList[i].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight,
+              }
+            }
+            else{
+              this.setCurrent(this.mList[0])
+              this.weighingList = this.mList[0]
+              this.weighingList.donecount = this.mList[0].completedQuantity + '/' + this.mList[0].weight
+              this.carWeightInfo = {
+                carNumber: this.mList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.grossWeight,
+              }
             }
           }
         } else {
@@ -1054,6 +1069,36 @@
           console.log(this.pList)
           this.carList = this.pList
           this.carList1 = this.pListTotal
+          for (let i = 0; i < this.pList.length; i++) {
+            if (this.number == this.pList[i].number) {
+              this.setCurrent(this.pList[i])
+              this.weighingList = this.pList[i]
+              this.weighingList.donecount = this.mList[i].completedQuantity + '/' + this.mList[i].weight
+              this.weighingList.inOutType = this.pList[i].qualityInspectionManagement.inOutType
+              this.weighingList.inOutTypeKey = this.pList[i].qualityInspectionManagement.inOutTypeKey
+              this.weighingList.deductionAmount = this.pList[i].qualityInspectionManagement.deductionAmount
+              // console.log(this.weighingList)
+              this.carWeightInfo = {
+                carNumber: this.pList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
+            }
+            else {
+              this.setCurrent(this.pList[0])
+              this.weighingList = this.pList[0]
+              this.weighingList.donecount = this.mList[0].completedQuantity + '/' + this.mList[0].weight
+              this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
+              this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
+              this.weighingList.deductionAmount = this.pList[0].qualityInspectionManagement.deductionAmount
+              // console.log(this.weighingList)
+              this.carWeightInfo = {
+                carNumber: this.pList[0].carNumber,
+                type: this.information,
+                weight: this.weighingList.tare
+              }
+            }
+          }
           if (this.pList.length != 0) {
             this.setCurrent(this.pList[0])
             this.weighingList = this.pList[0]