From 1c19d2f7c5d03cd49f92baedda86bfd587124099 Mon Sep 17 00:00:00 2001 From: hjhan Date: Fri, 14 Aug 2026 17:49:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(EQD-7049):=20=E6=96=B0=E5=BB=BA=E7=A9=BA?= =?UTF-8?q?=E7=99=BD=E6=9C=9F=E6=9D=83=E5=AE=9A=E4=BB=B7=E9=A1=B5=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E7=A9=BA=E6=A0=87=E7=9A=84=E9=BB=98=E8=AE=A4=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=EF=BC=8C=E9=81=BF=E5=85=8D'=E6=A0=87=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BC=BA=E5=A4=B1'=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 页面初始化时 updateUnderlying 以空 UnderlyingCode/InstrumentType/VarietyId 发起 /pricing/AjaxGetUnderlying,后端三者皆空返回 JsonError('标的信息缺失') 并自动弹窗 - 前端守卫:三者皆空时仅重置空 underlying 并 return,不再发请求,与后端 AjaxGetUnderlying(PricingController.cs:398-414) 判定精确对应 - 不影响正常路径:选类型(InstrumentType)/品种(VarietyId>0)/具体标的(UnderlyingCode) 仍照常查询 - 同步修改东莞定制版 structure_dz.js --- YLErpWeb/wwwroot/Scripts/app/pricing/structure.js | 6 ++++++ YLErpWeb/wwwroot/Scripts/app/pricing/structure_dz.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/YLErpWeb/wwwroot/Scripts/app/pricing/structure.js b/YLErpWeb/wwwroot/Scripts/app/pricing/structure.js index fbd8e5df..efb5a424 100644 --- a/YLErpWeb/wwwroot/Scripts/app/pricing/structure.js +++ b/YLErpWeb/wwwroot/Scripts/app/pricing/structure.js @@ -1470,6 +1470,12 @@ const vueTrade = function () { //更新标的 updateUnderlying(reqData, fromSelect) { let self = this; + // EQD-7049:新建空白页未选标的/品种/类型时,跳过必然失败的后端默认标的查询,避免报“标的信息缺失” + var hasQueryKey = !!(reqData.UnderlyingCode || reqData.InstrumentType || reqData.VarietyId > 0); + if (!hasQueryKey) { + !fromSelect && (self.viewState.underlying = tradeHelper.getEmptyUnderlying()); + return; + } var instTypeChanged = !!reqData.InstrumentType; !fromSelect && (self.viewState.underlying = tradeHelper.getEmptyUnderlying()); main.post("/pricing/AjaxGetUnderlying", reqData).done(function (resp) { diff --git a/YLErpWeb/wwwroot/Scripts/app/pricing/structure_dz.js b/YLErpWeb/wwwroot/Scripts/app/pricing/structure_dz.js index 39b10060..e5636152 100644 --- a/YLErpWeb/wwwroot/Scripts/app/pricing/structure_dz.js +++ b/YLErpWeb/wwwroot/Scripts/app/pricing/structure_dz.js @@ -1084,6 +1084,12 @@ const vueTrade = function () { //更新标的 updateUnderlying(reqData, fromSelect) { let self = this; + // EQD-7049:新建空白页未选标的/品种/类型时,跳过必然失败的后端默认标的查询,避免报“标的信息缺失” + var hasQueryKey = !!(reqData.UnderlyingCode || reqData.InstrumentType || reqData.VarietyId > 0); + if (!hasQueryKey) { + !fromSelect && (self.viewState.underlying = tradeHelper.getEmptyUnderlying()); + return; + } var instTypeChanged = !!reqData.InstrumentType; !fromSelect && (self.viewState.underlying = tradeHelper.getEmptyUnderlying()); main.post("/pricing/AjaxGetUnderlying", reqData).done(function (resp) {