ccj 2 年之前
父节点
当前提交
e0a5c8decc
共有 2 个文件被更改,包括 61 次插入29 次删除
  1. 58 28
      src/components/balanceAlert.vue
  2. 3 1
      src/views/houseSelfCollect/paymentManagement.vue

+ 58 - 28
src/components/balanceAlert.vue

@@ -9,7 +9,6 @@
       </div>
       <div class="number" v-else>{{ tareVal }} kg</div>
     </div>
-
     <div class="btn" @click="sendVal">确定</div>
   </div>
 </template>
@@ -62,7 +61,7 @@ export default {
             this.param = 1200
           } else if (this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库') {
             this.param = 2400
-          } else {
+          }  else {
             this.param = 9600
           }
           console.log(this.param)
@@ -91,39 +90,33 @@ export default {
           // 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 (value.length > 3) {
+          
+          if (value.length > 2) {
             if (value.length <= 6) {
+              // continue
+            }
+            if (
+              (this.deptBudgetList.warehouseName == '肇东金信库' || this.deptBudgetList.warehouseName == '甘南宏旗库') &&
+              value.length < 10
+            ) {
+              var start = new Date().getTime()
+              while (new Date().getTime() - start < 100) {}
               continue
             }
             if (
-              this.deptBudgetList.warehouseName == '肇东金信库' &&
+              this.deptBudgetList.warehouseName == '克东瑞信达'&&
               value.length < 10
             ) {
               var start = new Date().getTime()
-              while (new Date().getTime() - start < 200) {}
+              while (new Date().getTime() - start < 30) {}
               continue
             }
+            var zzz = ''
+            for (var i = 0; i < value.length; i++) {
+              zzz += String.fromCharCode(value[i])
+            }
             console.log('value23:', value)
+            console.log('valuezzz:', zzz)
           } else if (
             this.deptBudgetList.warehouseName == '白城内陆港' ||
             this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'
@@ -133,6 +126,20 @@ export default {
             while (new Date().getTime() - start < 400) {}
             continue
           }
+          else if (
+              this.deptBudgetList.warehouseName == '克东瑞信达'&&
+              value.length < 10
+            ) {
+              var start = new Date().getTime()
+              while (new Date().getTime() - start < 30) {}
+              continue
+            }
+            var zzz = ''
+            for (var i = 0; i < value.length; i++) {
+              zzz += String.fromCharCode(value[i])
+            }
+            console.log('value23:', value)
+            console.log('valuezzz:', zzz)
           if (
             this.deptBudgetList.warehouseName &&
             (this.deptBudgetList.warehouseName == '山东诸城迈饶库' ||
@@ -144,7 +151,8 @@ export default {
               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])
@@ -164,7 +172,8 @@ export default {
                 this.tareVal = parseInt(result)
               }
             }
-          } else if (
+          } else 
+          if (
             this.deptBudgetList.warehouseName &&
             (this.deptBudgetList.warehouseName == '顺诚粮库' ||
               this.deptBudgetList.warehouseName == '鲅鱼圈金信库')
@@ -188,7 +197,8 @@ export default {
                 this.tareVal = parseInt(result)
               }
             }
-          } else {
+          } else{
+
             if (value.length > 10) {
               for (var i = 0; i < value.length; i++) {
                 var tmp = String.fromCharCode(value[i])
@@ -256,6 +266,26 @@ export default {
               }
             }
           }
+          // else {
+          //   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)
+          //     }
+          //   }
+          // }
           // setTimeout(1000)
           // value 是一个 Uint8Array
         }

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

@@ -98,7 +98,8 @@
     </BaseHeaderLayout>
     <el-table :data="paymentList" ref="table" style="width: 100%; margin-top: 20px" border height="calc(100% - 170px)"
       @row-click="handleRowClick" @selection-change="handleSelectionChange" :summary-method="getSummaries" show-summary>
-      <el-table-column :selectable="selectInit" type="selection" width="30"></el-table-column>
+      <!-- <el-table-column :selectable="selectInit" type="selection" width="30"></el-table-column> -->
+      <el-table-column  type="selection" width="30"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
         <template scope="scope">
           <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -948,6 +949,7 @@
               break
             case '打印结算凭证':
               this.isShowPrintType3 = !this.isShowPrintType3
+              break
             case '打印检斤单':
               this.isShowPrintType4 = !this.isShowPrintType4
               break