| | |
| | | |
| | | const canTrace = computed(() => |
| | | [BarcodeBizTypeEnum.BATCH, BarcodeBizTypeEnum.SN].includes( |
| | | parseResult.value?.bizType, |
| | | Number(parseResult.value?.bizType), |
| | | ), |
| | | ); |
| | | |
| | |
| | | /** 条码对应的批次/SN是否支持全链路追溯 */ |
| | | function isTraceable(row: Partial<MesWmBarcodeApi.Barcode>) { |
| | | return [BarcodeBizTypeEnum.BATCH, BarcodeBizTypeEnum.SN].includes( |
| | | row.bizType as BarcodeBizTypeEnum, |
| | | Number(row.bizType) as BarcodeBizTypeEnum, |
| | | ); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | let batch: MesWmBatchApi.Batch | null | undefined; |
| | | if (row.bizType === BarcodeBizTypeEnum.SN) { |
| | | if (Number(row.bizType) === BarcodeBizTypeEnum.SN) { |
| | | const sn = row.bizCode || row.content; |
| | | batch = sn ? await getBatchBySn(sn) : undefined; |
| | | } else { |