Browse Source

交接人BUG修复

seimin 3 years ago
parent
commit
4f97bad455
2 changed files with 18 additions and 12 deletions
  1. 16 11
      components/smallScreen/smallScreen.vue
  2. 2 1
      http/http.js

+ 16 - 11
components/smallScreen/smallScreen.vue

@@ -27,12 +27,12 @@
27
         },
27
         },
28
       }
28
       }
29
     },
29
     },
30
-    props:{
31
-      sData:{
32
-        type:Object
30
+    props: {
31
+      sData: {
32
+        type: Object
33
       },
33
       },
34
-      sType:{
35
-        type:Number
34
+      sType: {
35
+        type: Number
36
       }
36
       }
37
     },
37
     },
38
     methods: {
38
     methods: {
@@ -249,7 +249,11 @@
249
                   });
249
                   });
250
                 }
250
                 }
251
               } else {
251
               } else {
252
-                this.nextDeptOrder_ss(this.currentData);
252
+                if (type == 1) {
253
+                  this.nextDeptOrder_ss(this.currentData);
254
+                } else if (type == 2) {
255
+                  this.nextDeptOrder_s(this.currentData);
256
+                }
253
               }
257
               }
254
             } else if (result.state == '0000') {
258
             } else if (result.state == '0000') {
255
               uni.hideLoading();
259
               uni.hideLoading();
@@ -341,12 +345,13 @@
341
 </script>
345
 </script>
342
 
346
 
343
 <style lang="less">
347
 <style lang="less">
344
-.smallScreen{
345
-  width: 100%;
346
-  height: 100%;
347
-  .smallScreen_scan{
348
+  .smallScreen {
348
     width: 100%;
349
     width: 100%;
349
     height: 100%;
350
     height: 100%;
351
+
352
+    .smallScreen_scan {
353
+      width: 100%;
354
+      height: 100%;
355
+    }
350
   }
356
   }
351
-}
352
 </style>
357
 </style>

+ 2 - 1
http/http.js

@@ -86,7 +86,8 @@ export function SM() {
86
     uni.scanCode({
86
     uni.scanCode({
87
       onlyFromCamera: true,
87
       onlyFromCamera: true,
88
       success: function(res) {
88
       success: function(res) {
89
-        let str = res.result.replace(/[\s\/]/g, '') || 'none'
89
+        let str = res.result.replace(/[\s\/]/g, '') || 'none';
90
+        str.replace(/CODABAR,/i, '');
90
         resolve(str);
91
         resolve(str);
91
       },
92
       },
92
       fail(err) {
93
       fail(err) {