Просмотр исходного кода

上架-有失效日期 则不校验是否和推荐库位一致

zhaohuanhuan 2 недель назад
Родитель
Сommit
8ee08e13d8
1 измененных файлов с 9 добавлено и 4 удалено
  1. 9 4
      src/views/inbound/putaway/task/index.vue

+ 9 - 4
src/views/inbound/putaway/task/index.vue

@@ -523,8 +523,8 @@ const _handlerScan = (code) => {
     }
   } else if (scanType.value == 3) {
     const scannedLocation = barcodeToUpperCase(code)
-    // 校验是否与推荐库位一致
-    if (locationList.value.length > 0) {
+    const { lotAtt02 } = barcodeActiveList.value[0]
+    if (locationList.value.length > 0 && !lotAtt02) {
       const recommendedLocations = locationList.value.map(item => barcodeToUpperCase(item.locationId || ''))
       if (!recommendedLocations.includes(scannedLocation)) {
         showNotify({ type: 'warning', duration: 3000, message: `扫描库位${scannedLocation}与推荐库位不一致,请确认` })
@@ -597,8 +597,13 @@ const isCheck = () => {
     showToast({ duration: 3000, message: '请先扫描库位编号' })
     return false
   }
-  // 校验库位是否与推荐库位一致
-  if (locationList.value.length > 0) {
+  if(barcodeActiveList.value.length ==0) {
+    showToast({ duration: 3000, message: '数据异常请重新扫描' })
+    scanError()
+    return
+  }
+  const { lotAtt02 } = barcodeActiveList.value[0]
+  if (locationList.value.length > 0 && !lotAtt02) {
     const recommendedLocations = locationList.value.map(item => barcodeToUpperCase(item.locationId || ''))
     if (!recommendedLocations.includes(barcodeToUpperCase(searchLocation.value))) {
       locationRef.value?.focus()