diff --git a/YLErpWeb/wwwroot/Scripts/app/swaptrade/tradeEndConfirmList.js b/YLErpWeb/wwwroot/Scripts/app/swaptrade/tradeEndConfirmList.js index 6f82f664..90eb900d 100644 --- a/YLErpWeb/wwwroot/Scripts/app/swaptrade/tradeEndConfirmList.js +++ b/YLErpWeb/wwwroot/Scripts/app/swaptrade/tradeEndConfirmList.js @@ -176,12 +176,22 @@ function SendEmailEitherReport() { dataType: "json", contentType:"application/json", success: function (res) { - if (res.success) { - main.message("发送成功"); + // 代理/网关异常时可能返回非标准结构——统一兜底提示,绝不让点击"无反应" + if (res && res.success) { + main.message("发送成功(共" + selIds.length + "笔),详情见bond-oms日志[结算确认书邮件]"); + SearchClick(); // 刷新列表以反映发送状态 } else { - main.message(res.message); + var msg = (res && (res.message || res.msg)) || "发送失败:服务返回异常结构"; + main.message(msg); + console.error("[批量发送确认书] 业务失败:", res); } }, + error: function (xhr, textStatus, errThrown) { + // 请求层失败:代理不通/超时/返回非JSON(如被登录页重定向)——此前无error回调导致点击"毫无反应" + var detail = "HTTP " + xhr.status + " " + (textStatus || "") + (errThrown ? " " + errThrown : ""); + main.message("发送请求失败(" + detail + "):请检查服务是否可用(含/trs_hub_api代理),详情见控制台与网络面板"); + console.error("[批量发送确认书] 请求失败:", detail, xhr); + }, beforeSend(jqXHR) { main.waitMe(true); },