|
@@ -1,9 +1,21 @@
|
|
|
<template>
|
|
|
<div class="content">
|
|
|
- <el-radio-group v-if="deptBudgetList.warehouseName=='榆树库'" @change="radiochange" v-model="radio">
|
|
|
- <el-radio :label="1">大秤</el-radio>
|
|
|
- <el-radio :label="2">小秤</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ <div v-if="deptBudgetList.warehouseName=='榆树库'">
|
|
|
+ <!-- <el-radio-group @change="radiochange" v-model="radio">
|
|
|
+ <el-radio :label="1">大秤</el-radio>
|
|
|
+ <el-radio :label="2">小秤</el-radio>
|
|
|
+ </el-radio-group> -->
|
|
|
+ <div class="select">
|
|
|
+ <el-select @change="radiochange" v-model="value" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="title" v-if="information.indexOf('毛重') > -1">毛重</div>
|
|
|
<div class="title" v-else>皮重</div>
|
|
|
<div class="contentInfo">
|
|
@@ -26,14 +38,25 @@ export default {
|
|
|
param: 9600,
|
|
|
grossWeightVal: '',
|
|
|
tareVal: '',
|
|
|
- radio:1
|
|
|
+ radio:1,
|
|
|
+ options: [{
|
|
|
+ value: '1',
|
|
|
+ label: '大秤'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '小秤'
|
|
|
+ }],
|
|
|
+ value: '1'
|
|
|
}
|
|
|
},
|
|
|
activated() {},
|
|
|
mounted() {
|
|
|
-
|
|
|
console.log(this.deptBudgetList)
|
|
|
+ if(localStorage.getItem('balanceStatus')){
|
|
|
+ this.value=localStorage.getItem('balanceStatus')
|
|
|
+ }
|
|
|
this.openPort()
|
|
|
+
|
|
|
},
|
|
|
computed: {},
|
|
|
created() {},
|
|
@@ -51,7 +74,7 @@ export default {
|
|
|
radiochange(e){
|
|
|
console.log(e)
|
|
|
localStorage.setItem('balanceStatus',e)
|
|
|
- this.openPort()
|
|
|
+ // this.openPort()
|
|
|
},
|
|
|
async closePort() {
|
|
|
console.log('closePort')
|
|
@@ -63,7 +86,7 @@ export default {
|
|
|
if ('serial' in navigator) {
|
|
|
if (!this.$store.state.app.reader) {
|
|
|
if(localStorage.getItem('balanceStatus')){
|
|
|
- this.radio=localStorage.getItem('balanceStatus')
|
|
|
+ this.value=localStorage.getItem('balanceStatus')
|
|
|
}
|
|
|
// The Web Serial API is supported.
|
|
|
console.log('the Web Serial API is supported.')
|
|
@@ -81,7 +104,7 @@ export default {
|
|
|
this.param = 2400
|
|
|
} else if(this.deptBudgetList.warehouseName == '大庆朝阳沟库' ){
|
|
|
this.param = 4800
|
|
|
- }else if(this.deptBudgetList.warehouseName == '榆树库' &&this.radio==2){
|
|
|
+ }else if(this.deptBudgetList.warehouseName == '榆树库' &&this.value==1){
|
|
|
this.param = 1200
|
|
|
} else {
|
|
|
this.param = 9600
|
|
@@ -149,7 +172,8 @@ export default {
|
|
|
this.deptBudgetList.warehouseName == '洮南胡力吐粮食储备库' ||
|
|
|
this.deptBudgetList.warehouseName == '鲅鱼圈祥腾库'||
|
|
|
this.deptBudgetList.warehouseName == '洮南向阳乡金昊'||
|
|
|
- this.deptBudgetList.warehouseName == '佳屹农仓储库'
|
|
|
+ this.deptBudgetList.warehouseName == '佳屹农仓储库'||
|
|
|
+ (this.deptBudgetList.warehouseName == '榆树库'&&this.value==1)
|
|
|
) {
|
|
|
console.log('value:', value)
|
|
|
var start = new Date().getTime()
|
|
@@ -334,7 +358,7 @@ export default {
|
|
|
}
|
|
|
await port.close()
|
|
|
} else {
|
|
|
- console.log('the Web Serial API is not supported.', navigator)
|
|
|
+ // console.log('the Web Serial API is not supported.', navigator)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -346,16 +370,6 @@ export default {
|
|
|
position:absolute;
|
|
|
top:29px;
|
|
|
}
|
|
|
-/deep/.el-radio{
|
|
|
- color:#fff;
|
|
|
-}
|
|
|
-/deep/.el-radio__input.is-checked+.el-radio__label{
|
|
|
- color:#2aff7c;
|
|
|
-}
|
|
|
-/deep/.el-radio__input.is-checked .el-radio__inner {
|
|
|
- background: #2aff7c !important;
|
|
|
- border-color: #2aff7c !important;
|
|
|
-}
|
|
|
.content {
|
|
|
height: 350px;
|
|
|
position: relative;
|
|
@@ -393,4 +407,8 @@ export default {
|
|
|
text-align: right;
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
+.select{
|
|
|
+ position: absolute;
|
|
|
+ left: 20px;
|
|
|
+}
|
|
|
</style>
|