|
|
@ -5,8 +5,15 @@
|
|
|
|
<el-row type="flex">
|
|
|
|
<el-row type="flex">
|
|
|
|
<el-col :span="18">
|
|
|
|
<el-col :span="18">
|
|
|
|
<el-form-item label="UDI码:" class="query-form-item">
|
|
|
|
<el-form-item label="UDI码:" class="query-form-item">
|
|
|
|
<el-input v-model="filterQuery.udiCode" placeholder="请输入UDI码"
|
|
|
|
<el-input v-model="filterQuery.udiCode" placeholder="请扫描或输入UDI码"
|
|
|
|
clearable></el-input>
|
|
|
|
clearable="true"
|
|
|
|
|
|
|
|
id="inputer"
|
|
|
|
|
|
|
|
@focus="getInputFocus($event)"
|
|
|
|
|
|
|
|
@keypress.enter.native="enterKey($event)"
|
|
|
|
|
|
|
|
ref='inputRef'
|
|
|
|
|
|
|
|
style="ime-mode:disabled"
|
|
|
|
|
|
|
|
type="tel"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
@ -31,7 +38,6 @@
|
|
|
|
:label="item.ylqxzcrbarmc"
|
|
|
|
:label="item.ylqxzcrbarmc"
|
|
|
|
:value="item.ylqxzcrbarmc"
|
|
|
|
:value="item.ylqxzcrbarmc"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -1065,10 +1071,17 @@ export default {
|
|
|
|
this.monitorOrder = "";
|
|
|
|
this.monitorOrder = "";
|
|
|
|
this.searchIng = false;
|
|
|
|
this.searchIng = false;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enterKey() {
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
sourceSearch(this.filterQuery).then((res) => {
|
|
|
|
sourceSearch(this.filterQuery).then((res) => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
if (res.code === 20000) {
|
|
|
|
if (res.code === 20000) {
|
|
|
|
this.recordCode = res.data;
|
|
|
|
this.recordCode = res.data;
|
|
|
|
this.orderTimeOut();
|
|
|
|
this.orderTimeOut();
|
|
|
@ -1084,10 +1097,38 @@ export default {
|
|
|
|
this.total = 0;
|
|
|
|
this.total = 0;
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
getInputFocus(event) {
|
|
|
|
|
|
|
|
event.currentTarget.select();
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getCompanyName()
|
|
|
|
this.getCompanyName()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
document.body.ondrop = function (event) {
|
|
|
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
event.stopPropagation();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
var inputer = document.getElementById("inputer");
|
|
|
|
|
|
|
|
window.sc = new A.KeyScaner(inputer);//传入要监听的DOM节点
|
|
|
|
|
|
|
|
sc.onInput = function (text) {
|
|
|
|
|
|
|
|
//onInput事件在检测到回车键按下或在连续输入后超过500ms没有继续输入时触发
|
|
|
|
|
|
|
|
if (text.includes("delete")) {
|
|
|
|
|
|
|
|
that.filterQuery.udiCode = "";
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (that.sitcomScan) {
|
|
|
|
|
|
|
|
that.filterQuery.udiCode = that.filterQuery.udiCode;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
that.filterQuery.udiCode = text;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
inputer.focus();//别忘了给要监听的节点放置焦点,如果是div一类默认不具备焦点的节点需要给它加上“tabindex”属性。不建议传入document、Body等全局节点,可能会影响其它输入控件的流畅性。
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beforeDestroy() {
|
|
|
|
beforeDestroy() {
|
|
|
|
if (this.monitorOrder) {
|
|
|
|
if (this.monitorOrder) {
|
|
|
|
clearTimeout(this.monitorOrder)
|
|
|
|
clearTimeout(this.monitorOrder)
|
|
|
|