Merge branch 'hugo-shipping-notice' into dev

# Conflicts:
#	backend/app/services/shipping_notice/receipt_report_notification.py
This commit is contained in:
hugo committed 2026-09-23 01:09:28 +08:00
commit 876a7ade7d
212 files changed
+12056 -2889

No files matched your search

@@ -31,7 +31,7 @@ const summary = {
expires_at: '',
counts: { file_invoice_count: 2, not_matured_count: 0, prechecked_count: 2, executable_count: 2, blocked_count: 0 },
estimated_transfer_quantity: '2400',
estimated_erp_write_count: 2,
estimated_external_write_count: 2,
precheck_hash: 'sha256:abc',
};
@@ -54,7 +54,7 @@ describe('useChatTransfer', () => {
api.getTransferRun.mockResolvedValue({
run_no: 'RUN-20260806-1',
status: 'success',
result: { erp_documents: [], exceptions: [] },
result: { external_documents: [], exceptions: [] },
});
});
@@ -33,6 +33,7 @@ import type {
TransferRunResult,
TransferSourceOption,
TransferSourceProgress,
TransferType,
} from '../types/transfer.types';
export function useChatTransfer() {
@@ -59,12 +60,23 @@ export function useChatTransfer() {
const selectedCount = computed(() => selected.value.size);
const estimatedQuantity = computed(() => precheck.value?.estimated_transfer_quantity ?? '0');
/** 创建预检(缺文件时来源级阶段展示等待/失败) */
async function createPrecheck(sourceCodes: string[], businessDate?: string) {
/** 创建预检(缺文件时来源级阶段展示等待/失败);transferType 决定收料数据范围,缺省在途仓至HUB仓 */
async function createPrecheck(
sourceCodes: string[],
businessDate?: string,
dateRange?: { from?: string; to?: string },
transferType?: TransferType,
) {
busy.value = true;
error.value = '';
try {
const summary = await createTransferPrecheck({ source_codes: sourceCodes, business_date: businessDate });
const summary = await createTransferPrecheck({
source_codes: sourceCodes,
business_date: businessDate,
receipt_date_from: dateRange?.from,
receipt_date_to: dateRange?.to,
transfer_type: transferType,
});
precheckId.value = summary.precheck_id;
await refreshPrecheck();
return summary;
@@ -165,7 +177,7 @@ export function useChatTransfer() {
async function downloadErpInventory() {
if (!runNo.value) return null;
const result = await downloadTransferErpInventory(runNo.value);
saveBlob(result.blob, result.filename ?? `erp-inventory-${runNo.value}.csv`);
saveBlob(result.blob, result.filename ?? `external-inventory-${runNo.value}.csv`);
return result;
}