feat(in-transit-transfer): 异常恢复一键重建预检并支持按行批量处理
- 新增 resume_service:可恢复阻断行按(来源×收料日期)分组重建范围预检,收料文件不可用自动触发 RPA 重抓,单组失败不影响其余组 - precheck 新增 list_recent_prechecks 最近预检入口:未执行未过期可继续执行,解决预检卡关闭后无处恢复 - manual_close 支持按 item_ids 批量关闭并带审计,retry/backlog 配合按行口径调整 - 前端三区接线换新:首页待办/预检卡/待处理异常接恢复与批量动作,新增 transferDate 日期工具与 e2e 用例 - i18n chat/errors 四语言同步,technical.md 与 funclist 更新,落行归属解耦与 ERP 写路径两份实施计划
This commit is contained in:
1 parent
42b271f92b
commit
556d3fd3db
35 files changed
+2895
-121
No files matched your search
@@ -13,6 +13,7 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useMessage } from '@/shared/composables/useMessage';
|
||||
import { eligibleReceiptDateTo } from './transferDate';
|
||||
import type { TransferSourceOption, TransferType } from '../../types/transfer.types';
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -33,9 +34,18 @@ const { warning: notifyWarning } = useMessage();
|
||||
const { t } = useI18n();
|
||||
|
||||
const selected = ref<Set<string>>(new Set());
|
||||
/** 收料日期范围(预检查询范围);截止不得超出 D+1 规则(后端卡控)。 */
|
||||
const dateFrom = ref('');
|
||||
const dateTo = ref('');
|
||||
/** 收料日期范围(预检查询范围):默认 D+1 规则日期(T-1),上限同(输入期限制,
|
||||
* 不等提交报错);后端 RECEIPT_DATE_RANGE_INVALID 卡控保留为双保险。 */
|
||||
const maxReceiptDate = eligibleReceiptDateTo();
|
||||
const dateFrom = ref(maxReceiptDate);
|
||||
const dateTo = ref(maxReceiptDate);
|
||||
|
||||
/** 起始不得晚于截止(清空视为不限,提交 undefined)。 */
|
||||
const dateRangeInvalid = computed(() => {
|
||||
const from = dateFrom.value || null;
|
||||
const to = dateTo.value || null;
|
||||
return from !== null && to !== null && from > to;
|
||||
});
|
||||
/** 调拨业务类型:决定本次预检纳入哪些收料数据;一期仅类型 1 开放。 */
|
||||
const transferType = ref<TransferType>('in_transit_to_hub');
|
||||
|
||||
@@ -70,7 +80,9 @@ const batchRetryDisabled = computed(() => props.busy || selectedRetryableCount.v
|
||||
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 confirmDisabled = computed(() =>
|
||||
props.busy || selectedCount.value === 0 || !selectedHasReadyFile.value || dateRangeInvalid.value,
|
||||
);
|
||||
const downloadDisabled = computed(() => props.busy || !selectedHasReadyFile.value);
|
||||
|
||||
function toggle(sourceCode: string, checked: boolean) {
|
||||
@@ -170,6 +182,7 @@ function confirm() {
|
||||
<input
|
||||
v-model="dateFrom"
|
||||
type="date"
|
||||
:max="maxReceiptDate"
|
||||
class="rounded-lg border border-default bg-surface px-2 py-1 text-xs text-primary"
|
||||
data-testid="transfer-source-date-from"
|
||||
/>
|
||||
@@ -177,6 +190,8 @@ function confirm() {
|
||||
<input
|
||||
v-model="dateTo"
|
||||
type="date"
|
||||
:max="maxReceiptDate"
|
||||
:min="dateFrom || undefined"
|
||||
class="rounded-lg border border-default bg-surface px-2 py-1 text-xs text-primary"
|
||||
data-testid="transfer-source-date-to"
|
||||
/>
|
||||
@@ -186,6 +201,10 @@ function confirm() {
|
||||
:title="$t('chat.transfer.receiptDateHint')"
|
||||
data-testid="transfer-source-date-hint"
|
||||
>ⓘ</span>
|
||||
<!-- 输入期校验:起始晚于截止时行内提示并禁用确认(不等提交报错)。 -->
|
||||
<span v-if="dateRangeInvalid" class="text-xs font-bold text-red-600" data-testid="transfer-source-date-invalid">
|
||||
{{ $t('chat.transfer.receiptDateInvalid') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user