|
@@ -360,14 +360,14 @@
|
|
|
"
|
|
|
>
|
|
|
<ws-input
|
|
|
- v-if="!carstatus"
|
|
|
+ v-if="options2.length==0"
|
|
|
v-model="deptBudgetList.carNo"
|
|
|
placeholder="请输入车牌号"
|
|
|
maxlength="7"
|
|
|
- size="small"
|
|
|
+ size="small"
|
|
|
/>
|
|
|
<el-select
|
|
|
- v-if="carstatus"
|
|
|
+ v-if='carstatus&&options2.length>0'
|
|
|
filterable
|
|
|
:filter-method="dataFilter2"
|
|
|
v-model="deptBudgetList.carNo"
|
|
@@ -382,6 +382,22 @@
|
|
|
:value="item.carNo"
|
|
|
/>
|
|
|
</el-select>
|
|
|
+ <el-select
|
|
|
+ v-if='!carstatus&&options2.length>0'
|
|
|
+ filterable
|
|
|
+ :filter-method="dataFilter2"
|
|
|
+ v-model="deptBudgetList.carNo"
|
|
|
+ placeholder="请选择车牌号"
|
|
|
+ class="typeselect"
|
|
|
+ @change="carChange"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options2"
|
|
|
+ :key="item.constKey"
|
|
|
+ :label="item.carNo"
|
|
|
+ :value="item.carNo"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</ws-form-item>
|
|
|
<!--船名 -->
|
|
|
<ws-form-item
|
|
@@ -911,7 +927,7 @@ export default {
|
|
|
async openPort() {
|
|
|
console.log('openPort', navigator)
|
|
|
if ('serial' in navigator) {
|
|
|
- if (!this.$store.state.app.reader) {
|
|
|
+ // if (!this.$store.state.app.reader) {
|
|
|
// The Web Serial API is supported.
|
|
|
console.log('the Web Serial API is supported.')
|
|
|
console.log(this.param)
|
|
@@ -923,10 +939,10 @@ export default {
|
|
|
console.log('beforeReader', port)
|
|
|
console.log('beforeReader', this.reader)
|
|
|
this.$store.dispatch('app/setReader', this.reader)
|
|
|
- } else {
|
|
|
- console.log('afterport', this.$store.state.app.reader)
|
|
|
- this.reader = this.$store.state.app.reader
|
|
|
- }
|
|
|
+ // } else {
|
|
|
+ // console.log('afterport', this.$store.state.app.reader)
|
|
|
+ // this.reader = this.$store.state.app.reader
|
|
|
+ // }
|
|
|
// 监听来自串行设备的数据
|
|
|
while (true) {
|
|
|
const { value, done } = await this.reader.read()
|
|
@@ -1172,9 +1188,9 @@ export default {
|
|
|
//提交按钮
|
|
|
submit() {
|
|
|
|
|
|
- // if(this.reader){
|
|
|
- // this.reader.cancel()
|
|
|
- // }
|
|
|
+ if(this.reader){
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.goodsName) {
|
|
|
this.$message({
|
|
|
message: '货名不能为空',
|
|
@@ -1754,9 +1770,9 @@ export default {
|
|
|
// this.deptBudgetList.netWeight = Math.round(this.dataList.netWeight*1000)
|
|
|
// this.deptBudgetList.pureWeight = Math.round(this.dataList.pureWeight*1000)
|
|
|
// this.deptBudgetList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
|
|
|
- // if (this.reader) {
|
|
|
- // this.reader.cancel()
|
|
|
- // }
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
this.$message.success('添加成功')
|
|
|
this.$router.push({
|
|
|
path: 'warehouseManagementList',
|
|
@@ -1791,9 +1807,9 @@ export default {
|
|
|
},
|
|
|
temporaryStorage() {
|
|
|
|
|
|
- // if(this.reader){
|
|
|
- // this.reader.cancel()
|
|
|
- // }
|
|
|
+ if(this.reader){
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
if (!this.deptBudgetList.goodsName) {
|
|
|
this.$message({
|
|
|
message: '货名不能为空',
|
|
@@ -2288,9 +2304,9 @@ export default {
|
|
|
addstorageputList(this.deptBudgetList)
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- // if (this.reader) {
|
|
|
- // this.reader.cancel()
|
|
|
- // }
|
|
|
+ if (this.reader) {
|
|
|
+ this.reader.cancel()
|
|
|
+ }
|
|
|
this.$message.success('保存成功')
|
|
|
this.$router.push({
|
|
|
path: 'warehouseManagementList',
|