优化单据中的商品选择框

This commit is contained in:
季圣华
2022-09-22 23:55:25 +08:00
parent f35cbe5758
commit d01bc132fd

View File

@@ -212,11 +212,19 @@
this.dataSource = res.rows this.dataSource = res.rows
this.ipagination.total = res.total this.ipagination.total = res.total
if(res.total ===1) { if(res.total ===1) {
if(this.queryParam.q === this.dataSource[0].mBarCode||
this.queryParam.q === this.dataSource[0].name||
this.queryParam.q === this.dataSource[0].standard||
this.queryParam.q === this.dataSource[0].model||
this.queryParam.q === this.dataSource[0].color) {
this.title = '选择商品【再次回车可以直接选中】' this.title = '选择商品【再次回车可以直接选中】'
this.$nextTick(() => this.$refs.material.focus()); this.$nextTick(() => this.$refs.material.focus());
} else { } else {
this.title = '选择商品' this.title = '选择商品'
} }
} else {
this.title = '选择商品'
}
} }
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false