|
@@ -652,6 +652,8 @@ export default {
|
|
addressUrl:'',
|
|
addressUrl:'',
|
|
warehouseInOutDetail: {},
|
|
warehouseInOutDetail: {},
|
|
deductionAmount:0,
|
|
deductionAmount:0,
|
|
|
|
+ grossWeight:0,
|
|
|
|
+ tare:0
|
|
},
|
|
},
|
|
historyList: [],
|
|
historyList: [],
|
|
cost:'',
|
|
cost:'',
|
|
@@ -663,7 +665,8 @@ export default {
|
|
accessoryTFs: false,
|
|
accessoryTFs: false,
|
|
allowEdit: true,
|
|
allowEdit: true,
|
|
param: 9600,
|
|
param: 9600,
|
|
- information:''
|
|
|
|
|
|
+ information:'',
|
|
|
|
+ result1 : '00'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -738,6 +741,7 @@ export default {
|
|
// var receData = HexConvert.ByteToString(value);
|
|
// var receData = HexConvert.ByteToString(value);
|
|
// console.log("receData",receData);
|
|
// console.log("receData",receData);
|
|
var flag = false;
|
|
var flag = false;
|
|
|
|
+ var flag1 = false;
|
|
// for (var i = 0; i < value.length; i++) {
|
|
// for (var i = 0; i < value.length; i++) {
|
|
// var tmp = String.fromCharCode(value[i])
|
|
// var tmp = String.fromCharCode(value[i])
|
|
// if (tmp == '+') {
|
|
// if (tmp == '+') {
|
|
@@ -757,18 +761,17 @@ export default {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
console.log('value:',value);
|
|
console.log('value:',value);
|
|
-
|
|
|
|
- if(this.warehouseName&&this.warehouseName == '山东诸城迈饶库'){
|
|
|
|
|
|
+ if(this.deptBudgetList.warehouseName&&this.deptBudgetList.warehouseName == '山东诸城迈饶库'){
|
|
for (var i = 0; i < value.length; i++) {
|
|
for (var i = 0; i < value.length; i++) {
|
|
var tmp = String.fromCharCode(value[i])
|
|
var tmp = String.fromCharCode(value[i])
|
|
if (tmp == '+') {
|
|
if (tmp == '+') {
|
|
- flag = true
|
|
|
|
|
|
+ flag = true
|
|
}
|
|
}
|
|
if (flag && result.length < 6 && tmp != '+') {
|
|
if (flag && result.length < 6 && tmp != '+') {
|
|
- result += tmp
|
|
|
|
|
|
+ result += tmp
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.information != '毛重检斤') {
|
|
|
|
|
|
+ if (this.information == '毛重检斤') {
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
this.deptBudgetList.grossWeight = parseInt(result)
|
|
this.deptBudgetList.grossWeight = parseInt(result)
|
|
}
|
|
}
|
|
@@ -781,29 +784,36 @@ export default {
|
|
else{
|
|
else{
|
|
for(var i=0;i<value.length;i++){
|
|
for(var i=0;i<value.length;i++){
|
|
var tmp = String.fromCharCode(value[i])
|
|
var tmp = String.fromCharCode(value[i])
|
|
- if(value[0] != 49 && value[0] != 2){
|
|
|
|
- break
|
|
|
|
|
|
+
|
|
|
|
+ if((value[0] != 49 && value[0] != 2)){
|
|
|
|
+ if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
|
+ flag1 = true
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ break
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (tmp == String.fromCharCode(32) ) {
|
|
if (tmp == String.fromCharCode(32) ) {
|
|
- flag = true
|
|
|
|
|
|
+ flag = true
|
|
}
|
|
}
|
|
- if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
|
|
|
|
- // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
|
|
|
|
- // continue
|
|
|
|
- // }
|
|
|
|
- // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
|
|
|
|
- // continue
|
|
|
|
- // }
|
|
|
|
- result += tmp
|
|
|
|
|
|
+ if (flag && result.length < 7 && tmp != String.fromCharCode(32)&&!(value[value.length-1] == 48&&value[value.length-2] == 48)) {
|
|
|
|
+ result += tmp
|
|
|
|
+ }
|
|
|
|
+ if (flag1 && tmp != String.fromCharCode(32)) {
|
|
|
|
+ if((value[value.length-1] == 48&&value[value.length-2] == 48)){
|
|
|
|
+ if(i == 0 ){
|
|
|
|
+ this.result1 = tmp + '0'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.information != '毛重检斤') {
|
|
|
|
|
|
+ if (this.information == '毛重检斤') {
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
- this.deptBudgetList.grossWeight = parseInt(result)*100
|
|
|
|
|
|
+ this.deptBudgetList.grossWeight = parseInt(result+this.result1)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
if(parseInt(result)|| parseInt(result) == 0){
|
|
- this.deptBudgetList.tare = parseInt(result)*100
|
|
|
|
|
|
+ this.deptBudgetList.tare = parseInt(result+this.result1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|