Browse Source

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

zh 10 tháng trước cách đây
mục cha
commit
3af4268d0a

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