Browse Source

还库任务-推荐库位增加库位类型匹配

zhaohuanhuan 2 weeks ago
parent
commit
85d97a7904
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/views/inventory/returnTask/bin/index.vue

+ 2 - 1
src/views/inventory/returnTask/bin/index.vue

@@ -212,7 +212,8 @@ const _getRecommendedLocation = async (lotNum, owner) => {
     const params = {warehouse, lotNum, owner, zoneGroup: 'WH01-01'}
     const params = {warehouse, lotNum, owner, zoneGroup: 'WH01-01'}
     const res = await getRecommendedLocation(params)
     const res = await getRecommendedLocation(params)
     //  'EA'数据
     //  '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 的