|
@@ -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
|
|
|
}
|