优化
This commit is contained in:
@@ -252,7 +252,7 @@ const relabelInboundOptions = computed(() => {
|
||||
if (current) {
|
||||
current.hasOutbound ||= candidate.hasOutbound === true || candidate.inventoryStatus === 'OUTBOUNDED'
|
||||
current.availablePackages += inventoryQuantity(candidate.availablePackages)
|
||||
current.units += candidate.returnCartonId && candidate.stockQuantity === 0 ? 0 : 1
|
||||
current.units += candidate.returnCartonId && Number(candidate.stockQuantity) === 0 ? 0 : 1
|
||||
current.stockQuantity = current.stockQuantity == null || candidate.stockQuantity == null ? null : current.stockQuantity + inventoryQuantity(candidate.stockQuantity)
|
||||
if (candidate.returnCartonId) current.reasons.push(returnInventoryState(candidate))
|
||||
}
|
||||
@@ -261,7 +261,7 @@ const relabelInboundOptions = computed(() => {
|
||||
inboundCode: candidate.returnCartonId ? '已签收退货库存(含合箱)' : (candidate.inboundCode || '—'),
|
||||
availablePackages: inventoryQuantity(candidate.availablePackages),
|
||||
quantityUnit: candidate.returnCartonId ? '件' : '箱',
|
||||
stockQuantity: candidate.stockQuantity == null ? null : inventoryQuantity(candidate.stockQuantity), units: candidate.returnCartonId && candidate.stockQuantity === 0 ? 0 : 1, hasOutbound: candidate.hasOutbound === true || candidate.inventoryStatus === 'OUTBOUNDED', reasons: candidate.returnCartonId ? [returnInventoryState(candidate)] : [],
|
||||
stockQuantity: candidate.stockQuantity == null ? null : inventoryQuantity(candidate.stockQuantity), units: candidate.returnCartonId && Number(candidate.stockQuantity) === 0 ? 0 : 1, hasOutbound: candidate.hasOutbound === true || candidate.inventoryStatus === 'OUTBOUNDED', reasons: candidate.returnCartonId ? [returnInventoryState(candidate)] : [],
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ const relabelInboundOptions = computed(() => {
|
||||
const visibleRelabelInboundOptions = computed(() => relabelInboundOptions.value.filter(option => option.availablePackages > 0))
|
||||
function relabelOptionLabel(option: typeof relabelInboundOptions.value[number]) {
|
||||
if (option.quantityUnit === '箱') return option.inboundOrderNo + '|' + option.inboundCode + '|可选 ' + option.availablePackages + ' 箱'
|
||||
return option.inboundOrderNo + '|在仓 ' + option.units + ' 包裹/箱 · ' + (option.stockQuantity ?? '待查询') + ' 件' + (option.hasOutbound && Number(option.stockQuantity) > 0 ? '|部分出库' : '')
|
||||
return option.inboundOrderNo + '|在仓 ' + option.units + ' 包裹/箱 · ' + (option.stockQuantity ?? '待查询') + ' 件' + (option.reasons.some(reason => reason.includes('跨来源单')) ? '(关联整箱数量,含其他来源)' : '') + (option.hasOutbound && Number(option.stockQuantity) > 0 ? '|部分出库' : '')
|
||||
}
|
||||
const loading = ref(false)
|
||||
const saving = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user