瀏覽代碼

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

zh 10 月之前
父節點
當前提交
3af4268d0a
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      src/views/piece/dashboard/index.vue

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

@@ -304,6 +304,7 @@ const _handlerScan = (code) => {
       showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '请先扫描快递单号!' });
       return
     }
+
     // 校验是否已扫描
     if (list.value.some(item => item.code === code)) {
       scanRepeat()
@@ -312,8 +313,12 @@ const _handlerScan = (code) => {
       return
     }
 
-    // 校验是否已存在
-    const currentTime = formatDateTime(new Date())
+    if (pushing.value) {
+      scanError()
+      showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '正在提交中,请稍后扫描!' });
+      return
+    }
+    pushing.value =  true  // 请求状态锁
 
     const exists = isDeliveryNoExists(code)
     if (!exists) {
@@ -323,19 +328,14 @@ const _handlerScan = (code) => {
       return
     }
 
-    if (pushing.value) {
-      scanError()
-      showNotify({ type: 'danger', style: 'font-size: 30px !important;height:50px', message: '正在提交中,请稍后扫描!' });
-      return
-    }
-    pushing.value =  true  // 请求状态锁
     let status = false
     showLoadingToast({
       message: '上传中...',
       forbidClick: true,
       closeToast: status
     });
-
+    // 校验是否已存在
+    const currentTime = formatDateTime(new Date())
     message.value = ''
     const dto = {
       deliveryNo: code,