瀏覽代碼

立库-拣货位增加类型

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

+ 4 - 2
src/views/haikang/putaway/dispatch/index.vue

@@ -176,6 +176,7 @@ const locationType = {
   'SS': '理货站',
   'ST': '过渡库位',
   'WB': '组装工作区',
+  'TH': '退货拣货位',
 }
 // 格口数据
 const bin = ref('') //当前格口
@@ -320,8 +321,9 @@ const _getRecommendedLocation = async (lotNum, owner) => {
       scanType.value=2
       return
     }
-    //  'EA'数据
-    const eaItems = res.data.filter(item => {return item.type === 'EA' || item.type === 'GY'})
+    // 件/箱等拣货库位类型(全等匹配,忽略首尾空格)
+    const allowedLocationTypes = new Set(['EA', 'PC', 'GY', 'TH', 'CS'])
+    const eaItems = res.data.filter(item => allowedLocationTypes.has(String(item.type ?? '').trim()))
     // 获取 quantity < 300 的
     let result = eaItems.find(item => item.quantity !== null && item.quantity < 10000)
     // 获取 quantity 为 null 的