ccjgmwz 3 years ago
parent
commit
7cfb7f8a35

+ 31 - 28
src/components/balanceAlert.vue

@@ -1,4 +1,3 @@
-
 <template>
   <div class="content">
     <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
@@ -23,7 +22,7 @@ export default {
     return {
       param: 9600,
       grossWeightVal: '',
-      tareVal: '',
+      tareVal: ''
     }
   },
   activated() {},
@@ -56,16 +55,19 @@ export default {
           // The Web Serial API is supported.
           console.log('the Web Serial API is supported.')
           const port = await navigator.serial.requestPort()
-          if (this.deptBudgetList.warehouseName == '白城内陆港'||this.deptBudgetList.warehouseName == '肇东金信库') {
+          if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '肇东金信库'
+          ) {
             this.param = 1200
-          } else if(this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
+          } else if (this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
             this.param = 2400
-          }else {
+          } else {
             this.param = 9600
           }
           console.log(this.param)
           await port.open({
-            baudRate: this.param,
+            baudRate: this.param
           }) // set baud rate
           this.reader = port.readable.getReader()
           console.log('port  ', port)
@@ -77,7 +79,6 @@ export default {
         }
         // 监听来自串行设备的数据
         while (true) {
-          
           const { value, done } = await this.reader.read()
           // console.log('value',value);
           if (done) {
@@ -109,39 +110,41 @@ export default {
           //     this.deptBudgetList.tare = parseInt(result)
           //   }
           // }
-          
-          if(value.length > 3 ){
-             if(value.length <= 6){
+
+          if (value.length > 3) {
+            if (value.length <= 6) {
               continue
-             }
-            if(this.deptBudgetList.warehouseName == '肇东金信库' && value.length < 10){
-              var start = (new Date()).getTime();
-              while((new Date()).getTime() - start < 200) {
-              }
+            }
+            if (
+              this.deptBudgetList.warehouseName == '肇东金信库' &&
+              value.length < 10
+            ) {
+              var start = new Date().getTime()
+              while (new Date().getTime() - start < 200) {}
               continue
             }
             console.log('value23:', value)
-          }
-          else if(this.deptBudgetList.warehouseName == '白城内陆港' ||this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'){
+          } else if (
+            this.deptBudgetList.warehouseName == '白城内陆港' ||
+            this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'
+          ) {
             console.log('value:', value)
-            var start = (new Date()).getTime();
-            while((new Date()).getTime() - start < 400) {
-
-            }
-            continue;
+            var start = new Date().getTime()
+            while (new Date().getTime() - start < 400) {}
+            continue
           }
           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 == '龙江金信库' ||
-              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 == '+') {
@@ -259,8 +262,8 @@ export default {
       } else {
         console.log('the Web Serial API is not supported.', navigator)
       }
-    },
-  },
+    }
+  }
 }
 </script>
 

+ 5 - 3
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -251,7 +251,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -1714,7 +1714,8 @@
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' ||
                         this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         cang.value = this.weighingList.seller
@@ -1787,7 +1788,8 @@
                     this.idPrint = response
                     if (this.weighingList.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this
                         .warehouseName == '哈尔滨依兰库' || this
-                        .warehouseName == '白城内陆港')) {
+                        .warehouseName == '白城内陆港'|| this
+                        .warehouseName == '山东园丰库')) {
                       if (this.weighingList.seller && this.weighingList.buyer) {
                         let cang = {}
                         cang.value = this.weighingList.seller

+ 4 - 4
src/views/houseSelfCollect/weighingManagement.vue

@@ -136,7 +136,7 @@
         <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
           <div>收货单位:</div>
           <!-- <div>{{companyName}}</div> -->
-          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+          <el-select v-model="companyName" placeholder="请选择" style="width: 75%;" v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
             <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
           </el-select>
           <el-select v-model="companyName1" placeholder="请选择" style="width: 75%;" v-else>
@@ -144,7 +144,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -546,7 +546,7 @@
                 this.dialogDataList.push(_datas)
              }else{
               // this.dialogData.compName = this.companyName
-               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+               if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                  this.dialogData.companyName = this.companyName
                }else{
                  this.dialogData.companyName = this.companyName1
@@ -574,7 +574,7 @@
               .toPromise()
               .then((response) => {
                 index1++;
-                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'){
+                if(this.warehouseName == '白城内陆港' || this.warehouseName == '鲅鱼圈金信库'|| this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库'){
                   response.compName = this.companyName
                }else{
                  response.compName = this.companyName1

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

@@ -200,7 +200,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>

+ 3 - 3
src/views/houseSelfCollect/weightCheckRecord.vue

@@ -105,7 +105,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
+        <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'||warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
@@ -581,7 +581,7 @@
             return
           }
           for (let _num = 0; _num < this.modification.length; _num++) {
-            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+            if (this.modification[_num].serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
               if (this.modification[_num].seller && this.modification[_num].buyer) {
                 let cang = {}
                 cang.value = this.modification[_num].seller
@@ -600,7 +600,7 @@
           }
           this.isShowPrintType = true
         } else {
-          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库')) {
+          if (row.serviceManagementType == 1 && (this.warehouseName == '鲅鱼圈金信库' || this.warehouseName == '白城内陆港' || this.warehouseName == '哈尔滨依兰库'||this.warehouseName=='山东园丰库')) {
             if (row.seller && row.buyer) {
               let cang = {}
               cang.value = row.seller

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

@@ -302,7 +302,7 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'||deptBudgetList.warehouseName=='哈尔滨依兰库'">
+        <div v-if="deptBudgetList.warehouseName=='鲅鱼圈金信库'||deptBudgetList.warehouseName=='白城内陆港'||deptBudgetList.warehouseName=='哈尔滨依兰库'||this.warehouseName=='山东园丰库'">
           <div class="print-type-ew">
             <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
             <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>