|
|
|
@ -11,7 +11,7 @@
|
|
|
|
|
<u-row align="top">
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<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 :label="$t('message.recommended')">
|
|
|
|
|
<u-switch v-model="open" @change="change"></u-switch>
|
|
|
|
@ -253,6 +253,7 @@ export default class finishProductOfflineDom extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
add() {
|
|
|
|
|
// this.firstFocus = false
|
|
|
|
|
if (!this.form.barCode) {
|
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
|
return;
|
|
|
|
@ -285,6 +286,9 @@ export default class finishProductOfflineDom extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.product_Tip7') as string);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.barCode = '';
|
|
|
|
|
this.firstFocus = true;
|
|
|
|
|
// this.$refs.BarCodeSearch.focus()
|
|
|
|
|
}
|
|
|
|
|
async getBarcode() {
|
|
|
|
|
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>
|
|
|
|
|