删除咸鱼旧链路
This commit is contained in:
@@ -61,9 +61,6 @@ export function formatTaskEventType(eventType: string) {
|
||||
claim_redeem_code_invalid: "兑换码错误",
|
||||
claim_redeem_inventory_replaced: "已切换新兑换码",
|
||||
claim_redeem_completed: "兑换链路完成",
|
||||
agiso_auto_delivery_success: "咸鱼自动发货成功",
|
||||
agiso_auto_delivery_failed: "咸鱼自动发货失败",
|
||||
agiso_auto_delivery_skipped: "咸鱼自动发货已跳过",
|
||||
};
|
||||
|
||||
return formatStatusWithRaw(eventType, labelMap);
|
||||
@@ -96,48 +93,6 @@ export function formatRedeemResolutionStatus(value: string) {
|
||||
: value || "-";
|
||||
}
|
||||
|
||||
export function formatAutoDeliveryTrigger(value: string) {
|
||||
const normalized = String(value || "").trim();
|
||||
|
||||
switch (normalized) {
|
||||
case "claim_redeemed":
|
||||
return "用户兑换完成后触发";
|
||||
case "manual_dispatch_completed":
|
||||
return "人工履约完成后触发";
|
||||
case "task_delivered":
|
||||
return "任务交付完成后触发";
|
||||
default:
|
||||
return normalized || "-";
|
||||
}
|
||||
}
|
||||
|
||||
export function formatAutoDeliveryReason(value: string) {
|
||||
const normalized = String(value || "").trim();
|
||||
|
||||
switch (normalized) {
|
||||
case "waiting_other_tasks":
|
||||
return "订单下仍有任务未完成交付";
|
||||
case "already_sent":
|
||||
return "该订单已经执行过自动发货";
|
||||
case "auto_delivery_disabled":
|
||||
return "自动发货开关已关闭";
|
||||
case "missing_config":
|
||||
return "缺少 Agiso 自动发货配置";
|
||||
case "request_failed":
|
||||
return "Agiso 接口返回失败";
|
||||
case "request_error":
|
||||
return "请求 Agiso 接口时发生异常";
|
||||
case "delivery_not_confirmed":
|
||||
return "接口返回成功,但订单状态未确认进入已发货";
|
||||
case "task_not_delivered":
|
||||
return "当前任务尚未进入已交付状态";
|
||||
case "not_supported":
|
||||
return "当前订单不支持 Agiso 咸鱼自动发货";
|
||||
default:
|
||||
return normalized || "-";
|
||||
}
|
||||
}
|
||||
|
||||
export function formatKuaishouRoleInfoLabel(value: string) {
|
||||
const normalized = String(value || "").trim();
|
||||
|
||||
@@ -177,9 +132,7 @@ export function formatTaskEventPayload(payload: Record<string, unknown>) {
|
||||
: "",
|
||||
payload.deliveryReference ? `单号 ${payload.deliveryReference}` : "",
|
||||
payload.platformOrderId ? `平台单 ${payload.platformOrderId}` : "",
|
||||
payload.trigger
|
||||
? `触发 ${formatAutoDeliveryTrigger(String(payload.trigger || ""))}`
|
||||
: "",
|
||||
payload.trigger ? `触发 ${payload.trigger}` : "",
|
||||
payload.reason ? `原因 ${payload.reason}` : "",
|
||||
payload.purchaseTriggered === true ? "已触发购买" : "",
|
||||
payload.usedKnapsack === true ? "使用背包库存" : "",
|
||||
@@ -211,24 +164,3 @@ export function formatBindingCountSummary(summary: {
|
||||
}) {
|
||||
return `共 ${summary.totalBindingCount} 条 · 预占 ${summary.reservedBindingCount} · 已消费 ${summary.consumedBindingCount} · 已释放 ${summary.releasedBindingCount}`;
|
||||
}
|
||||
|
||||
export function resolveTaskAutoDeliveryStatus(task: {
|
||||
agisoAutoDelivery?: { status?: string } | null;
|
||||
deliveryStatus: string;
|
||||
}) {
|
||||
if (task.agisoAutoDelivery?.status) return task.agisoAutoDelivery.status;
|
||||
return task.deliveryStatus === "delivered" ? "pending" : "waiting";
|
||||
}
|
||||
|
||||
export function formatTaskAutoDeliveryReason(task: {
|
||||
agisoAutoDelivery?: { errorMessage?: string; reason?: string } | null;
|
||||
deliveryStatus: string;
|
||||
}) {
|
||||
if (task.agisoAutoDelivery?.errorMessage)
|
||||
return task.agisoAutoDelivery.errorMessage;
|
||||
if (task.agisoAutoDelivery?.reason)
|
||||
return formatAutoDeliveryReason(task.agisoAutoDelivery.reason);
|
||||
return task.deliveryStatus === "delivered"
|
||||
? "当前任务已交付,等待订单统一自动发货"
|
||||
: "当前任务尚未完成交付";
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export const adminInventoryStatusOptions = [
|
||||
|
||||
export const adminInventoryCredentialTypeOptions = [
|
||||
{ label: '全部凭据类型', value: '' },
|
||||
{ label: '腾讯兑换码(自动领取)', value: 'tencent_code' },
|
||||
{ label: '兑换码(领取链路)', value: 'tencent_code' },
|
||||
{ label: '卡号卡密', value: 'card_password' },
|
||||
{ label: '账号密码', value: 'account_password' },
|
||||
{ label: '激活链接', value: 'activation_link' },
|
||||
|
||||
Reference in New Issue
Block a user