cl
21 小时以前 91831843f3b9fa4c9f29e518e10dae5d3f9aead8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
 * 订单业务类型(sys_order_work_type):入库通知单仅展示入库侧
 * 与后端 OrderWorkType 枚举中的出库类 value 对齐
 */
// 与后端 OrderWorkType.getOrderType:ORDER_OUT 一致(不含 D004 等入库字母码)
export const OUTBOUND_ORDER_WORK_TYPE_VALUES = new Set([
  '11', '12', '13', '14', '15', '18', '19',
  'D001', 'A008', 'B003', 'C036',
]);
 
export function filterInboundOrderWorkTypeRecords(records) {
  if (!Array.isArray(records)) {
    return [];
  }
  return records.filter((row) => {
    const v = row && row.value != null ? String(row.value).trim() : '';
    if (!v) {
      return false;
    }
    return !OUTBOUND_ORDER_WORK_TYPE_VALUES.has(v);
  });
}