Jelajahi Sumber

计件宝记录上一个上传成功数据

zh 10 bulan lalu
induk
melakukan
5a59659c09
1 mengubah file dengan 9 tambahan dan 7 penghapusan
  1. 9 7
      src/views/piece/dashboard/index.vue

+ 9 - 7
src/views/piece/dashboard/index.vue

@@ -305,24 +305,26 @@ const _handlerScan = (code) => {
       return
       return
     }
     }
 
 
+    if (pushing.value) {
+      scanError()
+      showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '正在提交中,请稍后扫描!' });
+      return
+    }
+    pushing.value =  true  // 请求状态锁
+
     // 校验是否已扫描
     // 校验是否已扫描
     if (list.value.some(item => item.code === code)) {
     if (list.value.some(item => item.code === code)) {
       scanRepeat()
       scanRepeat()
+      pushing.value = false
       message.value = '该快递单已扫描!'
       message.value = '该快递单已扫描!'
       showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '该快递单已扫描!' });
       showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '该快递单已扫描!' });
       return
       return
     }
     }
 
 
-    if (pushing.value) {
-      scanError()
-      showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '正在提交中,请稍后扫描!' });
-      return
-    }
-    pushing.value =  true  // 请求状态锁
-
     const exists = isDeliveryNoExists(code)
     const exists = isDeliveryNoExists(code)
     if (!exists) {
     if (!exists) {
       scanRepeat()
       scanRepeat()
+      pushing.value = false
       message.value = '该快递单已扫描!'
       message.value = '该快递单已扫描!'
       showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '该快递单已扫描!' });
       showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '该快递单已扫描!' });
       return
       return