feat(shipping-notice): 调拨预检解析增强与批号列交互完善
- 异动解析跳过无异动日期的在途/执行中行,兼容 datetime 日期单元格 - ERP 网关故障降级为逐票阻断并带原因,不再炸整来源 - 预检明细唯一约束升粒度:(预检,来源,单号,料号,收料日期) - Invoice 恢复单号锚定并移至料号前;批号 lot_no 全链贯通, 拨出/拨入批号按 WTP→HOW 转换展示;新增收料日期列 - 预检表格筛选/全选;单行与批量重查 ERP 库存 - 收料日期范围作为预检查询范围,截止卡控不超出 D+1 规则 - 来源多选打包下载收料文件;调拨消息与子流程容器放宽宽度 - 预检恢复明细补齐收料日期与批号字段(修复卡片三列空值)
This commit is contained in:
1 parent
a06ff79d7c
commit
1ba38e1685
44 files changed
+963
-121
No files matched your search
@@ -19,15 +19,19 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
confirm: [sourceCodes: string[]];
|
||||
confirm: [sourceCodes: string[], dateRange?: { from?: string; to?: string }];
|
||||
/** 批量重试收料 RPA:传来源编码列表 */
|
||||
retry: [sourceCodes: string[]];
|
||||
download: [sourceCodes: string[]];
|
||||
}>();
|
||||
|
||||
const { warning: notifyWarning } = useMessage();
|
||||
const { t } = useI18n();
|
||||
|
||||
const selected = ref<Set<string>>(new Set());
|
||||
/** 收料日期范围(预检查询范围);截止不得超出 D+1 规则(后端卡控)。 */
|
||||
const dateFrom = ref('');
|
||||
const dateTo = ref('');
|
||||
|
||||
const platforms = computed(() => [...new Set(props.sources.map((source) => source.platform))]);
|
||||
const selectedCount = computed(() => selected.value.size);
|
||||
@@ -50,6 +54,7 @@ const selectedHasReadyFile = computed(() =>
|
||||
[...selected.value].some((code) => props.sources.find((s) => s.source_code === code)?.has_ready_file),
|
||||
);
|
||||
const confirmDisabled = computed(() => props.busy || selectedCount.value === 0 || !selectedHasReadyFile.value);
|
||||
const downloadDisabled = computed(() => props.busy || !selectedHasReadyFile.value);
|
||||
|
||||
function toggle(sourceCode: string, checked: boolean) {
|
||||
const next = new Set(selected.value);
|
||||
@@ -96,6 +101,13 @@ function batchRetry() {
|
||||
emit('retry', codes);
|
||||
}
|
||||
|
||||
function downloadSelected(): void {
|
||||
const codes = [...selected.value].filter(
|
||||
(code) => props.sources.find((s) => s.source_code === code)?.has_ready_file,
|
||||
);
|
||||
if (codes.length) emit('download', codes);
|
||||
}
|
||||
|
||||
function confirm() {
|
||||
if (selectedCount.value === 0) {
|
||||
notifyWarning(t('chat.transfer.needSelectSource'), t('chat.transfer.sourceSelectTitle'));
|
||||
@@ -105,7 +117,7 @@ function confirm() {
|
||||
notifyWarning(t('chat.transfer.needReadyFile'), t('chat.transfer.sourceSelectTitle'));
|
||||
return;
|
||||
}
|
||||
emit('confirm', [...selected.value]);
|
||||
emit('confirm', [...selected.value], { from: dateFrom.value || undefined, to: dateTo.value || undefined });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -142,6 +154,36 @@ function confirm() {
|
||||
>
|
||||
{{ $t('chat.transfer.batchRetry') }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border border-default px-3 py-1.5 text-xs font-bold text-secondary hover-surface-soft disabled:opacity-50"
|
||||
:disabled="busy || downloadDisabled"
|
||||
data-testid="transfer-source-download"
|
||||
@click="downloadSelected"
|
||||
>
|
||||
{{ $t('chat.transfer.downloadFiles') }}
|
||||
</button>
|
||||
<div class="ml-auto flex flex-wrap items-center gap-2">
|
||||
<label class="flex items-center gap-1 text-xs text-secondary">
|
||||
<span>{{ $t('chat.transfer.receiptDateFrom') }}</span>
|
||||
<input
|
||||
v-model="dateFrom"
|
||||
type="date"
|
||||
class="rounded-lg border border-default bg-surface px-2 py-1 text-xs text-primary"
|
||||
data-testid="transfer-source-date-from"
|
||||
/>
|
||||
</label>
|
||||
<label class="flex items-center gap-1 text-xs text-secondary">
|
||||
<span>~</span>
|
||||
<input
|
||||
v-model="dateTo"
|
||||
type="date"
|
||||
class="rounded-lg border border-default bg-surface px-2 py-1 text-xs text-primary"
|
||||
data-testid="transfer-source-date-to"
|
||||
/>
|
||||
</label>
|
||||
<span class="text-xs text-muted">{{ $t('chat.transfer.receiptDateHint') }}</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border border-default px-3 py-1.5 text-xs font-bold text-secondary hover-surface-soft disabled:opacity-50"
|
||||
|
||||
Reference in new issue
Block a user