overseamom-222 fix 越南手持自动聚焦修复

master
魏子尧 2 years ago committed by suiwei
parent d4fb66b4aa
commit 50d7e65975

@ -11,7 +11,7 @@
<u-row align="top"> <u-row align="top">
<u-col :span="12"> <u-col :span="12">
<u-form-item :label="$t('message.product_barCode')"> <u-form-item :label="$t('message.product_barCode')">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.barCode" @search="getBarcode" :focus="firstFocus" maxlength="20" :show-action="false"></u-search> <u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.barCode" @search="getBarcode" :focus="firstFocus" maxlength="20" :show-action="false" ref="BarCodeSearch" @blur="firstFocus = false"></u-search>
</u-form-item> </u-form-item>
<u-form-item :label="$t('message.recommended')"> <u-form-item :label="$t('message.recommended')">
<u-switch v-model="open" @change="change"></u-switch> <u-switch v-model="open" @change="change"></u-switch>
@ -253,6 +253,7 @@ export default class finishProductOfflineDom extends BasePage {
} }
} }
add() { add() {
// this.firstFocus = false
if (!this.form.barCode) { if (!this.form.barCode) {
this.customToast(this.$t('message.barcode') as string); this.customToast(this.$t('message.barcode') as string);
return; return;
@ -285,6 +286,9 @@ export default class finishProductOfflineDom extends BasePage {
this.customToast(this.$t('message.product_Tip7') as string); this.customToast(this.$t('message.product_Tip7') as string);
} }
} }
this.form.barCode = '';
this.firstFocus = true;
// this.$refs.BarCodeSearch.focus()
} }
async getBarcode() { async getBarcode() {
if (this.open == false) { if (this.open == false) {
@ -337,6 +341,10 @@ export default class finishProductOfflineDom extends BasePage {
} }
} }
} }
if (this.open == true) {
this.form.barCode = '';
this.firstFocus = true;
}
} }
} }
</script> </script>

@ -53,7 +53,7 @@
</view> </view>
<!-- 扫码 --> <!-- 扫码 -->
<u-form-item :labelWidth="140" :label="$t('message.product_BarCode')"> <u-form-item :labelWidth="140" :label="$t('message.product_BarCode')">
<u-search :placeholder="$t('message.po_PleaseInput')" v-model="barcode" @search="onOk" :focus="firstFocus" :show-action="false"></u-search> <u-search :placeholder="$t('message.po_PleaseInput')" v-model="barcode" @search="onOk" :focus="firstFocus" @blur="firstFocus = false" :show-action="false"></u-search>
</u-form-item> </u-form-item>
<!-- 车牌弹窗输入 --> <!-- 车牌弹窗输入 -->
@ -216,6 +216,8 @@ export default class dnReceiptDom extends BasePage {
this.model.stoNoList[this.ItemIndex].finQty += 1; this.model.stoNoList[this.ItemIndex].finQty += 1;
this.barcode = ''; this.barcode = '';
} }
this.barcode = '';
this.firstFocus = true;
} }
/** /**
* 详情 * 详情

Loading…
Cancel
Save