feat(shipping-notice): 新增库存确认来源接口及相关逻辑
This commit is contained in:
1 parent
a31735b689
commit
0a9bd6415d
69 files changed
+8442
-775
No files matched your search
@@ -218,7 +218,7 @@ watch(
|
||||
:ref="bindShippingPickerRef"
|
||||
type="file"
|
||||
class="hidden"
|
||||
accept=".xlsx,.xls,.csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,text/csv"
|
||||
accept=".xlsx,.csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv"
|
||||
@change="emit('shipping-inventory-selected', $event)"
|
||||
/>
|
||||
|
||||
|
||||
@@ -324,6 +324,21 @@ const resolveTaskDiagnosis = (task: ShippingTaskSummary | ShippingTaskDetail) =>
|
||||
advice: t('chat.shippingNoticeUi.diagnosisReservationRequiredAdvice'),
|
||||
};
|
||||
}
|
||||
if (reason === 'inventory_source_unresolved') {
|
||||
const resolution = (task as ShippingTaskDetail).inventory_source_resolution;
|
||||
const status = resolution && typeof resolution === 'object'
|
||||
? String((resolution as { status?: unknown }).status || '').trim()
|
||||
: '';
|
||||
const isAmbiguous = status === 'ambiguous';
|
||||
return {
|
||||
title: t(isAmbiguous
|
||||
? 'chat.shippingNoticeUi.diagnosisInventorySourceAmbiguousTitle'
|
||||
: 'chat.shippingNoticeUi.diagnosisInventorySourceTitle'),
|
||||
advice: t(isAmbiguous
|
||||
? 'chat.shippingNoticeUi.diagnosisInventorySourceAmbiguousAdvice'
|
||||
: 'chat.shippingNoticeUi.diagnosisInventorySourceAdvice'),
|
||||
};
|
||||
}
|
||||
if (reason === 'map_infer' || processStatus === 'waiting_inventory') {
|
||||
return {
|
||||
title: t('chat.shippingNoticeUi.diagnosisInventoryWaitingTitle'),
|
||||
@@ -352,6 +367,9 @@ const resolveSuggestedAction = (task: ShippingTaskSummary | ShippingTaskDetail)
|
||||
if (reason === 'low_confidence' || reviewStatus === 'parse_review') {
|
||||
return t('chat.shippingNoticeUi.suggestReviewParse');
|
||||
}
|
||||
if (reason === 'inventory_source_unresolved') {
|
||||
return t('chat.shippingNoticeUi.suggestConfirmInventorySource');
|
||||
}
|
||||
if (isFailedTask(task)) {
|
||||
return t('chat.shippingNoticeUi.suggestRetryStep');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user