This commit is contained in:
weipengfei 2024-05-28 15:30:52 +08:00
parent 56a57ee6cb
commit a0c6a684bd
2 changed files with 9 additions and 3 deletions

View File

@ -40,8 +40,13 @@ const handleEnter = _.throttle(() => {
emit("getStoreList", obj, true);
}, 300)
const inputBlur = ()=>{
codeRef.value?.blur();
}
defineExpose({
name,
inputBlur
});
const isfocus = ref(false);

View File

@ -45,11 +45,12 @@ const getStoreList = (data = {}, reload = false) => {
if (res.data?.lists?.length < where.value.page_size) loadEnd.value = true;
storeList.value = storeList.value.concat(res.data.lists);
if (
data.bar_code &&
data.code &&
storeList.value.length == 1 &&
isAllDigits(data.bar_code)
isAllDigits(data.code)
) {
shopRef.value.bar_code = "";
shopRef.value.code = "";
shopRef.value.inputBlur();
changeItem(storeList.value[0]);
}
where.value.page_no++;