|
@@ -100,14 +100,14 @@
|
|
<el-button v-if="tpyeNo == 2" @click="openPort">
|
|
<el-button v-if="tpyeNo == 2" @click="openPort">
|
|
重新获取</el-button>
|
|
重新获取</el-button>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="cartips == '手动输入'">
|
|
|
|
|
|
+ <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="tpyeNo == 1">
|
|
<ws-input type="number" @mousewheel.native.prevent
|
|
<ws-input type="number" @mousewheel.native.prevent
|
|
v-model="weighingList.tare" @input="calculation" placeholder="自动获取"
|
|
v-model="weighingList.tare" @input="calculation" placeholder="自动获取"
|
|
maxlength="100" size="small" :disabled="disabled" />
|
|
maxlength="100" size="small" :disabled="disabled" />
|
|
<el-button v-if="tpyeNo == 1" @click="openPort">
|
|
<el-button v-if="tpyeNo == 1" @click="openPort">
|
|
重新获取</el-button>
|
|
重新获取</el-button>
|
|
</ws-form-item>
|
|
</ws-form-item>
|
|
- <ws-form-item label="净重(KG)" span="1" prop="tare" v-if="cartips == '手动输入'">
|
|
|
|
|
|
+ <ws-form-item label="净重(KG)" span="1" prop="tare" v-if="tpyeNo == 1">
|
|
<ws-input type="number" @mousewheel.native.prevent
|
|
<ws-input type="number" @mousewheel.native.prevent
|
|
v-model="weighingList.netWeight" @input="calculation"
|
|
v-model="weighingList.netWeight" @input="calculation"
|
|
placeholder="自动计算" maxlength="100" size="small" disabled />
|
|
placeholder="自动计算" maxlength="100" size="small" disabled />
|
|
@@ -280,8 +280,6 @@ export default {
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
setVal(data) {
|
|
setVal(data) {
|
|
- debugger
|
|
|
|
- data = 1000
|
|
|
|
if (this.information == '毛重') {
|
|
if (this.information == '毛重') {
|
|
this.weighingList.grossWeight = data
|
|
this.weighingList.grossWeight = data
|
|
this.weighingList.netWeight =
|
|
this.weighingList.netWeight =
|
|
@@ -369,38 +367,6 @@ export default {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (this.cartips == '手动输入') {
|
|
|
|
- this.weighingList.statusFlag = 3
|
|
|
|
- if (!this.weighingList.tare) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '皮重不能为空',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (
|
|
|
|
- isNaN(this.weighingList.tare) ||
|
|
|
|
- (String(this.weighingList.tare).indexOf('.') != -1 &&
|
|
|
|
- String(this.weighingList.tare).length -
|
|
|
|
- (String(this.weighingList.tare).indexOf('.') + 1) >
|
|
|
|
- 1) ||
|
|
|
|
- this.weighingList.tare < 1 ||
|
|
|
|
- this.weighingList.tare > 100000
|
|
|
|
- ) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '皮重输入错误!',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (this.weighingList.netWeight < 0) {
|
|
|
|
- this.$message({
|
|
|
|
- message: '净重不能为负',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
if (this.tpyeNo == 1) { //称皮重
|
|
if (this.tpyeNo == 1) { //称皮重
|
|
this.weighingList.statusFlag = 3
|
|
this.weighingList.statusFlag = 3
|