|
@@ -1,9 +1,9 @@
|
|
|
|
|
|
<template>
|
|
<template>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <div class="title" v-if="information=='毛重检斤'">毛重</div>
|
|
|
|
|
|
+ <div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
|
|
<div class="title" v-else>皮重</div>
|
|
<div class="title" v-else>皮重</div>
|
|
- <div class="number" v-if="information=='毛重检斤'">{{grossWeightVal}} kg</div>
|
|
|
|
|
|
+ <div class="number" v-if="information.indexOf('毛重') > -1">{{grossWeightVal}} kg</div>
|
|
<div class="number" v-else>{{tareVal}} KG</div>
|
|
<div class="number" v-else>{{tareVal}} KG</div>
|
|
|
|
|
|
<div class="btn" @click="sendVal">确定</div>
|
|
<div class="btn" @click="sendVal">确定</div>
|
|
@@ -40,7 +40,7 @@ export default {
|
|
sendVal(){
|
|
sendVal(){
|
|
console.log(this.grossWeightVal)
|
|
console.log(this.grossWeightVal)
|
|
console.log(this.tareVal)
|
|
console.log(this.tareVal)
|
|
- if(this.information=='毛重检斤'){
|
|
|
|
|
|
+ if(this.information.indexOf('毛重') > -1){
|
|
this.$emit('balanceListen',this.grossWeightVal)
|
|
this.$emit('balanceListen',this.grossWeightVal)
|
|
}else{
|
|
}else{
|
|
this.$emit('balanceListen',this.tareVal)
|
|
this.$emit('balanceListen',this.tareVal)
|
|
@@ -121,7 +121,7 @@ export default {
|
|
result += tmp
|
|
result += tmp
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.information == '毛重检斤') {
|
|
|
|
|
|
+ if (this.information.indexOf('毛重') > -1) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
this.grossWeightVal = parseInt(result)
|
|
this.grossWeightVal = parseInt(result)
|
|
}
|
|
}
|
|
@@ -145,7 +145,7 @@ export default {
|
|
result += tmp
|
|
result += tmp
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.information == '毛重检斤') {
|
|
|
|
|
|
+ if (this.information.indexOf('毛重') > -1) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
this.grossWeightVal = parseInt(result)
|
|
this.grossWeightVal = parseInt(result)
|
|
}
|
|
}
|
|
@@ -192,7 +192,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (this.information == '毛重检斤') {
|
|
|
|
|
|
+ if (this.information.indexOf('毛重') > -1) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
if (parseInt(result) || parseInt(result) == 0) {
|
|
this.grossWeightVal = parseInt(
|
|
this.grossWeightVal = parseInt(
|
|
result + this.result1
|
|
result + this.result1
|