瀏覽代碼

海柔-兼容拣货库位类型

zhaohuanhuan 2 周之前
父節點
當前提交
2215f18b93
共有 2 個文件被更改,包括 6 次插入5 次删除
  1. 3 3
      src/views/haikang/putaway/dispatch/index.vue
  2. 3 2
      src/views/robot/putaway/index.vue

+ 3 - 3
src/views/haikang/putaway/dispatch/index.vue

@@ -321,9 +321,9 @@ const _getRecommendedLocation = async (lotNum, owner) => {
       scanType.value=2
       scanType.value=2
       return
       return
     }
     }
-    // 件/箱等拣货库位类型(全等匹配,忽略首尾空格)
-    const allowedLocationTypes = new Set(['EA', 'PC', 'GY', 'TH', 'CS'])
-    const eaItems = res.data.filter(item => allowedLocationTypes.has(String(item.type ?? '').trim()))
+    // 件/箱等拣货库位类型
+    const allowedLocationTypes = ['EA', 'PC', 'GY', 'TH', 'CS']
+    const eaItems = res.data.filter(item => allowedLocationTypes.includes(item.type))
     // 获取 quantity < 300 的
     // 获取 quantity < 300 的
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 10000)
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 10000)
     // 获取 quantity 为 null 的
     // 获取 quantity 为 null 的

+ 3 - 2
src/views/robot/putaway/index.vue

@@ -272,8 +272,9 @@ const _getRecommendedLocation = async (lotNum, owner) => {
     const params = { warehouse, lotNum, owner,zoneGroup:'WH01-02' }
     const params = { warehouse, lotNum, owner,zoneGroup:'WH01-02' }
     const res = await getRecommendedLocation(params)
     const res = await getRecommendedLocation(params)
     locationList.value = res.data
     locationList.value = res.data
-    //  'EA'数据
-    const eaItems = res.data.filter(item => item.type === 'EA')
+    // 件/箱等拣货库位类型
+    const allowedLocationTypes = ['EA', 'PC', 'GY', 'TH', 'CS']
+    const eaItems = res.data.filter(item => allowedLocationTypes.includes(item.type))
     // 获取 quantity < 300 的
     // 获取 quantity < 300 的
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 1000)
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 1000)
     // 获取 quantity 为 null 的
     // 获取 quantity 为 null 的