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) {