Kaynağa Gözat

入库单扫码记录bug,版本1.0.20

panxingxin 5 yıl önce
ebeveyn
işleme
b26e88919c
3 değiştirilmiş dosya ile 21 ekleme ve 4 silme
  1. 1 1
      dev.xml
  2. 1 1
      prod.xml
  3. 19 2
      src/app/enter-store/enter-store.page.ts

+ 1 - 1
dev.xml

@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget id="com.ionicframework.devSgZongLi" version="1.0.19" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="com.ionicframework.devSgZongLi" version="1.0.20" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <name>SG测试</name>
     <description>An awesome Ionic/Cordova app.</description>
     <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>

+ 1 - 1
prod.xml

@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<widget id="com.ionicframework.sgZongLi" version="1.0.19" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+<widget id="com.ionicframework.sgZongLi" version="1.0.20" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
     <name>SG综礼</name>
     <description>An awesome Ionic/Cordova app.</description>
     <author email="hi@ionicframework.com" href="http://ionicframework.com/">Ionic Framework Team</author>

+ 19 - 2
src/app/enter-store/enter-store.page.ts

@@ -43,6 +43,13 @@ export class EnterStorePage implements OnInit {
     this.initialData()
   }
 
+  // ngAfterViewInit(): void {
+  //   window.addEventListener('keyboardDidShow', function() {
+  //     console.log('show')
+  //     this.keyboard
+  //   });
+  //   }
+
   ionViewDidLeave() {
     if (this.storeList.length !== 0) {
       this.storage.set('storeList', JSON.stringify(this.storeList))
@@ -51,6 +58,14 @@ export class EnterStorePage implements OnInit {
     }
   }
 
+  // hideKeyboard() {
+  //   // setInterval(()=>{
+  //   //   console.log('hide')
+  //   //   this.scanInput.setFocus()
+  //   //   this.keyboard.hide()
+  //   // },1000)
+  // }
+
   initialData() {
     this.storeDetailList = []
     this.clicked = false
@@ -70,7 +85,7 @@ export class EnterStorePage implements OnInit {
   // 获取入库单详情
   async getStoreDetail(item?) {
     // console.log(this.scanCode)
-    this.keyboard.hide()
+    // this.keyboard.hide()
     if (item) {
       this.scanCode = item.scanCode
       this.storeDetailList = item
@@ -114,7 +129,9 @@ export class EnterStorePage implements OnInit {
       for (let i of this.storeList) {
         i.enterCount = Number(i.enterBoxs) * Number(i.scpOutrate)
         i.amount = i.enterCount
-        i.scanCode = this.scanCode
+        if(!i.scanCode) {
+          i.scanCode = this.scanCode
+        }
         // this.scpCodes.push(i.scpCode)
       }
       this.initialData()