Selaa lähdekoodia

Merge branch 'master' of http://git.zthymaoyi.com:3000/gdc/yiliangyiyun-pc

gjy 3 vuotta sitten
vanhempi
commit
1d1c9f78ec

+ 18 - 5
src/components/balanceAlert.vue

@@ -58,15 +58,22 @@ export default {
           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()
+          debugger
+            if(this.deptBudgetList.warehouseName == '白城内陆港'){
+              this.param = 1200
+            }
+            else{
+              this.param = 9600
+            }
+            console.log(this.param)
             await port.open({
               baudRate: this.param,
             }) // set baud rate
             this.reader = port.readable.getReader()
-            console.log('beforeReader', port)
-            console.log('beforeReader', this.reader)
+            console.log('port  ', port)
             this.$store.dispatch('app/setReader', this.reader)
+            console.log('reader  ', this.reader)
           } else {
             console.log('afterport', this.$store.state.app.reader)
             this.reader = this.$store.state.app.reader
@@ -105,14 +112,20 @@ export default {
           //     this.deptBudgetList.tare = parseInt(result)
           //   }
           // }
-          console.log('value:', value)
+          if(value.length > 3){
+            console.log('value:', value)
+          }
+          else if(this.deptBudgetList.warehouseName == '白城内陆港'){
+            break
+          }
           if (
             this.deptBudgetList.warehouseName &&
             (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
               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++) {

+ 6 - 1
src/views/houseSelfCollect/weightCheck.vue

@@ -309,9 +309,12 @@
       } else if (this.tpyeNo == 2) {
         this.information = '皮重'
       }
-      this.$route.query.automaticWeightAcquisition = 0
+      // this.$route.query.automaticWeightAcquisition = 0
       // if(this.$route.query.automaticWeightAcquisition == '1'){
         // this.openPort()
+        // this.isShowBalance = true
+      // }
+      //  if (this.$route.query.automaticWeightAcquisition == '1') {
         this.isShowBalance = true
       // }
       console.log(this.weighingList)
@@ -460,8 +463,10 @@
           }
 
         } else {
+          debugger
           this.index = 1
           this.carList = this.pList
+          this.carList1 = this.pList
           if (this.pList.length != 0) {
             let _item = this.pList.filter(function(val1) {
               if (val1.id == that.$route.query.id) {

+ 3 - 1
src/views/warehouse/warehouseManagementGross.vue

@@ -540,6 +540,7 @@
             value: '3',
           },
         ],
+        grossWeight:"",
       }
     },
     mounted() {
@@ -595,6 +596,7 @@
       setVal(data) {
         if (this.information == '毛重检斤') {
           this.deptBudgetList.grossWeight = data
+          this.grossWeight = data
         } else {
           this.deptBudgetList.tare = data
         }
@@ -1280,7 +1282,6 @@
                 this.deptBudgetList.deductionAmount = Math.round(
                   this.deptBudgetList.deductionAmount * 1000
                 )
-
                 // this.deptBudgetList.grossWeight /= 1000
                 //   this.deptBudgetList.tare /= 1000
                 //   this.deptBudgetList.netWeight /= 1000
@@ -1861,6 +1862,7 @@
         }
       },
       grossWeightchange(e) {
+        this.grossWeight =  this.deptBudgetList.grossWeight
         if (
           this.deptBudgetList.grossWeight &&
           this.deptBudgetList.tare &&

+ 3 - 3
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -28,7 +28,7 @@
             <div class="car-type">皮重</div>
             <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
             <div class="weight">
-              {{ dataList.tare }} <span class="kg-style">kg</span>
+              {{ tare }} <span class="kg-style">kg</span>
             </div>
             <div class="car-no">{{ dataList.carNo }}</div>
           </div>
@@ -613,7 +613,8 @@
         if (this.information == '毛重检斤') {
           this.dataList.grossWeight = data
         } else {
-          this.dataList.tare = data
+          this.tare = data
+           this.dataList.tare = data
         }
       },
       openPort() {
@@ -1361,7 +1362,6 @@
                 this.dataList.deductionAmount = Math.round(
                   this.dataList.deductionAmount * 1000
                 )
-
                 addstorageputList(this.dataList)
                   .toPromise()
                   .then((response) => {

+ 2 - 7
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -27,7 +27,7 @@
           <div class="top">
             <div class="car-type">毛重</div>
             <div class="weight">
-              {{ grossWeight }}
+              {{grossWeight }}
               <span class="kg-style">kg</span>
             </div>
             <!-- <div class="weight">{{dataList.tare}} <span class="kg-style">kg</span></div> -->
@@ -531,7 +531,6 @@
       this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
       this.dataList.outType = this.$route.query.outType//运输方式
       this.dataList.selfLoading = this.$route.query.selfLoading//
-      console.log(this.dataList)
       if (this.$route.query.automaticWeightAcquisition == '1') {
         this.isShowBalance = true
       }
@@ -552,16 +551,15 @@
       setVal(data) {
         if (this.information == '毛重检斤') {
           this.dataList.grossWeight = data
+          this.grossWeight = data
         } else {
           this.dataList.tare = data
         }
-
       },
       openPort() {
         this.$refs.weightChild.openPort()
       },
       pureweight(status) {
-        console.log(this.deptBudgetList)
         if (
           this.deptBudgetList.netWeight &&
           this.deptBudgetList.tidalGrainWater &&
@@ -585,7 +583,6 @@
         this.$router.go(-1)
       },
       dataFilter(val) {
-        // console.log(val,"名")
         this.deptBudgetList.staffList = val
         if (val) {
           //val存在
@@ -1150,7 +1147,6 @@
         if(!this.carstatus){//若自运的合同该字段置空
           this.deptBudgetList.selfLoading = ""
         }
-        console.log("查看carId",this.dataList)
         this.$confirm(`确定提交毛重检斤`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
@@ -1395,7 +1391,6 @@
         this.dialogViewSpareMoney = false
       },
       history(row) {
-        console.log(row)
         billoperatehis({
             id: row.id,
           })

+ 4 - 7
src/views/warehouse/warehouseManagementTare.vue

@@ -55,7 +55,7 @@
                 </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"
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="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>
@@ -428,7 +428,7 @@
             value: '3',
           },
         ],
-        tare:"",//显示的皮重
+        tare:"0",//显示的皮重
         carChange1:"手动填写",
         carjudge:false,
         options2:[],
@@ -460,7 +460,6 @@
         })
         .toPromise()
         .then((response) => {
-          console.log(response)
           this.deptBudgetList1 = response
         })
       if (this.$route.query.automaticWeightAcquisition == '1') {
@@ -483,9 +482,8 @@
         if (this.information == '毛重检斤') {
           this.deptBudgetList.grossWeight = data
         } else {
-          this.deptBudgetList.tare = data
+          this.tare = data
         }
-
       },
       openPort() {
         this.$refs.weightChild.openPort()
@@ -662,7 +660,6 @@
         }
       },
       pureweight(e) {
-        console.log(this.deptBudgetList)
         if (
           this.deptBudgetList.netWeight &&
           this.deptBudgetList.tidalGrainWater &&
@@ -1511,7 +1508,7 @@
         })
       },
       tarechange(e) {
-        this.tare = this.deptBudgetList.tare
+        this.deptBudgetList.tare = this.tare
         if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
           this.deptBudgetList.netWeight = Number(
             this.deptBudgetList.grossWeight - this.deptBudgetList.tare