| | |
| | | <text class="label-text">暂存位</text> |
| | | </view> |
| | | <view class="form-input-wrap"> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" @focus="onSourceSiteFocus()" /> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" :focus="sourceSiteFocus" @focus="onSourceSiteFocus()" /> |
| | | <uni-icons v-if="sourceSite" type="clear" size="18" color="#c0c4cc" @click="sourceSite=''"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | { label: '102', value: '102' } |
| | | ], |
| | | selectedTargetSite: { label: '101', value: '101' }, |
| | | type : 2 |
| | | type : 2, |
| | | _previousBarcode: '' // 用于记录上一次的barcode值,判断是否是第一次输入 |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | clearBarcode() { |
| | | this.barcode = ''; |
| | | this._previousBarcode = ''; // 重置记录,下次输入时仍能识别为第一次输入 |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.barcodeFocus = true; |
| | |
| | | }, |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | // 检测是否是第一次输入(之前barcode为空,现在有值) |
| | | const isFirstInput = !this._previousBarcode && this.barcode && this.barcode.length > 0; |
| | | this._previousBarcode = this.barcode; |
| | | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | |
| | | // 第一次输入时,自动跳转到第二个输入框(暂存位) |
| | | if (isFirstInput) { |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.sourceSiteFocus = true; |
| | | }, 100); |
| | | } else { |
| | | this.focuss() |
| | | } |
| | | }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.messageText = "重置完成" |
| | | this.messageToggle('success') |
| | | }, |
| | |
| | | // this.dataList = [] |
| | | this.barcode = '' |
| | | this.sourceSite = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.barcodeFocuss() |
| | | }, |
| | | } |
| | |
| | | <text class="label-text">暂存位</text> |
| | | </view> |
| | | <view class="form-input-wrap"> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" @focus="onSourceSiteFocus()" /> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" :focus="sourceSiteFocus" @focus="onSourceSiteFocus()" /> |
| | | <uni-icons v-if="sourceSite" type="clear" size="18" color="#c0c4cc" @click="sourceSite=''"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | { label: '102', value: '102' } |
| | | ], |
| | | selectedTargetSite: { label: '101', value: '101' }, |
| | | type : 3 |
| | | type : 3, |
| | | _previousBarcode: '' // 用于记录上一次的barcode值,判断是否是第一次输入 |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | clearBarcode() { |
| | | this.barcode = ''; |
| | | this._previousBarcode = ''; // 重置记录,下次输入时仍能识别为第一次输入 |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.barcodeFocus = true; |
| | |
| | | // }, 500); |
| | | // #endif |
| | | |
| | | // 检测是否是第一次输入(之前barcode为空,现在有值) |
| | | const isFirstInput = !this._previousBarcode && this.barcode && this.barcode.length > 0; |
| | | this._previousBarcode = this.barcode; |
| | | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | |
| | | // 第一次输入时,自动跳转到第二个输入框(暂存位) |
| | | if (isFirstInput) { |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.sourceSiteFocus = true; |
| | | }, 100); |
| | | } else { |
| | | this.focuss() |
| | | } |
| | | }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.messageText = "重置完成" |
| | | this.messageToggle('success') |
| | | }, |
| | |
| | | // this.dataList = [] |
| | | this.barcode = '' |
| | | this.sourceSite = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.barcodeFocuss() |
| | | }, |
| | | } |
| | |
| | | <text class="label-text">暂存位</text> |
| | | </view> |
| | | <view class="form-input-wrap"> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" @focus="onSourceSiteFocus()" /> |
| | | <input class="form-input" type="text" placeholder="扫码 / 输入暂存位" v-model="sourceSite" :focus="sourceSiteFocus" @focus="onSourceSiteFocus()" /> |
| | | <uni-icons v-if="sourceSite" type="clear" size="18" color="#c0c4cc" @click="sourceSite=''"></uni-icons> |
| | | </view> |
| | | </view> |
| | |
| | | { label: '102', value: '102' } |
| | | ], |
| | | selectedTargetSite: { label: '101', value: '101' }, |
| | | type : 1 |
| | | type : 1, |
| | | _previousBarcode: '' // 用于记录上一次的barcode值,判断是否是第一次输入 |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | }, |
| | | clearBarcode() { |
| | | this.barcode = ''; |
| | | this._previousBarcode = ''; // 重置记录,下次输入时仍能识别为第一次输入 |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.barcodeFocus = true; |
| | |
| | | // rfidScanner.stopScan(); |
| | | // }, 500); |
| | | |
| | | // 检测是否是第一次输入(之前barcode为空,现在有值) |
| | | const isFirstInput = !this._previousBarcode && this.barcode && this.barcode.length > 0; |
| | | this._previousBarcode = this.barcode; |
| | | |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | |
| | | this.barcodeFocuss() |
| | | return; |
| | | } |
| | | this.focuss() |
| | | |
| | | // 第一次输入时,自动跳转到第二个输入框(暂存位) |
| | | if (isFirstInput) { |
| | | this.barcodeFocus = false; |
| | | setTimeout(() => { |
| | | this.sourceSiteFocus = true; |
| | | }, 100); |
| | | } else { |
| | | this.focuss() |
| | | } |
| | | }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.messageText = "重置完成" |
| | | this.messageToggle('success') |
| | | }, |
| | |
| | | // this.dataList = [] |
| | | this.barcode = '' |
| | | this.sourceSite = '' |
| | | this._previousBarcode = '' // 重置记录 |
| | | this.barcodeFocuss() |
| | | }, |
| | | } |
| | |
| | | cuIcon: '', |
| | | url: '/stock/stockQuery' |
| | | }, |
| | | { |
| | | title: 'RFID设置', |
| | | name: 'rfidSettings', |
| | | color: 'mauve', |
| | | cuIcon: 'scan', |
| | | url: '/rfid/settings' |
| | | }, |
| | | { |
| | | title: 'UHF测试', |
| | | name: 'uhftest', |
| | | color: 'red', |
| | | cuIcon: 'scan', |
| | | url: '/rfid/uhftest' |
| | | }, |
| | | // { |
| | | // title: 'RFID设置', |
| | | // name: 'rfidSettings', |
| | | // color: 'mauve', |
| | | // cuIcon: 'scan', |
| | | // url: '/rfid/settings' |
| | | // }, |
| | | // { |
| | | // title: 'UHF测试', |
| | | // name: 'uhftest', |
| | | // color: 'red', |
| | | // cuIcon: 'scan', |
| | | // url: '/rfid/uhftest' |
| | | // }, |
| | | { |
| | | title: '退出登录', |
| | | name: 'logOut', |
| | |
| | | * pwd:访问密码,默认密码为:00000000 |
| | | * 注意:Word类型,一个长度表示标签存储4位字符 |
| | | */ |
| | | uhfModel.readTagWithoutFilter(1, 2, 8, "00000000", (ret) => { |
| | | uhfModel.readTagWithoutFilter(1, 2, 8, "00000000", (ret) => { |
| | | // |
| | | modal.toast({ |
| | | message: ret, |