Parcourir la source

海柔-兼容拣货库位类型

zhaohuanhuan il y a 2 semaines
Parent
commit
2215f18b93

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

@@ -321,9 +321,9 @@ const _getRecommendedLocation = async (lotNum, owner) => {
       scanType.value=2
       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 的
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 10000)
     // 获取 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 res = await getRecommendedLocation(params)
     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 的
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 1000)
     // 获取 quantity 为 null 的