|
@@ -31,6 +31,7 @@ export class StoreSampleBindingPage implements OnInit {
|
|
|
this.code = ''
|
|
|
}
|
|
|
|
|
|
+ // 绑定
|
|
|
async binding() {
|
|
|
let form = {
|
|
|
shelves: this.shelves,
|
|
@@ -46,6 +47,14 @@ export class StoreSampleBindingPage implements OnInit {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ enterCode(e) {
|
|
|
+ let keycode = window.event ? e.keyCode : e.which;
|
|
|
+ if (keycode == 13 && this.shelves) {
|
|
|
+ this.binding()
|
|
|
+ this.codeInput.setFocus();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
qrscan() {
|
|
|
this.barcodeScanner.scan().then(barcodeData => {
|
|
|
if(!this.shelves) {
|
|
@@ -57,4 +66,10 @@ export class StoreSampleBindingPage implements OnInit {
|
|
|
console.log('Error', err);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ clear() {
|
|
|
+ this.shelves = ''
|
|
|
+ this.code = ''
|
|
|
+ this.shelvesInput.setFocus()
|
|
|
+ }
|
|
|
}
|