feature:#EQD-7093 国联民生-交易确认书校验(2)针对ETF标的获取新增信息并且支持配置分类。 ETF交易确认书中填充参考标的证券全称、参考标的基金管理人,

This commit is contained in:
马冰冰
2026-08-21 14:16:05 +08:00
parent 952295a78a
commit f16634534c
11 changed files with 165 additions and 8 deletions
@@ -473,6 +473,26 @@ namespace YLErp.Web.Controllers
{
return JsonError("资产类型 必须填写");
}
model.EtfSubType = model.EtfSubType?.Trim();
if (model.UnderlyingInstrumentType == ConsGlobal.InstrumentType.Fund && string.IsNullOrEmpty(model.EtfSubType))
{
return JsonError("ETF 子类 必须填写");
}
if (model.UnderlyingInstrumentType == ConsGlobal.InstrumentType.Fund)
{
var isValidEtfSubType = DictionaryBLL.GetDictionaryItems("ETF 子类", model.EtfSubType).Any();
if (!isValidEtfSubType)
{
return JsonError("ETF 子类 无效,请从字典选项中选择");
}
}
if (model.UnderlyingInstrumentType != ConsGlobal.InstrumentType.Fund)
{
model.EtfSubType = null;
}
if (ConsGlobal.InstrumentType.IsBond(model.UnderlyingInstrumentType))
{
model.ExJson = JsonHelper.Serialize(model.Bond);
@@ -8,6 +8,8 @@
showDeltaS_S = PS.Config.Is长江
};
var bond = Model.Bond ?? new UnderlyingBond();
// ETF 子类下拉直接读取前端可维护字典;空选项用于新增页面的必填提示。
var etfSubtypeItems = YLErp.BLL.DictionaryBLL.GetList("ETF 子类", true, underlying.EtfSubType);
var blocks = new[] { underlying.Block1, underlying.Block2, underlying.Block3, underlying.Block4, underlying.Block5 };
for (var i = 1; i <= 5; i++)
{
@@ -28,13 +30,14 @@
}
}
.None, .Stock, .CommodityFutures, .Bonds {
.None, .Stock, .CommodityFutures, .Bonds, .Fund {
display: none;
}
.form-Stock .Stock,
.form-CommodityFutures .CommodityFutures,
.form-Bonds .Bonds {
.form-Bonds .Bonds,
.form-Fund .Fund {
display: block;
}
</style>
@@ -323,6 +326,31 @@
<label class='formlabel'>增值税率</label>
<input id='ValueAddedTax' class='text-box' type='number' value='@(underlying.ValueAddedTax)' name='ValueAddedTax' />
</div>
@* 仅基金及基金专户维护基金管理人 *@
<div class='form-group col-6 Fund'>
<label class='formlabel'>基金管理人</label>
<input id='InvestAdvisorName' class='text-box' type='text' value='@(underlying.InvestAdvisorName)' name='InvestAdvisorName' maxlength='100' />
</div>
@* 重点功能:ETF 子类由系统字典维护,使用 Fund 类控制显隐,并固定放在表单最后 *@
<div class='form-group col-6 Fund'>
<label class='formlabel'>ETF 子类</label>
<select id='EtfSubType' name='EtfSubType'>
@foreach (var item in etfSubtypeItems)
{
@* 编辑页面按实体中的字典名称回显当前选项 *@
if (item.Value == underlying.EtfSubType)
{
<option value='@item.Value' selected>@item.Text</option>
}
else
{
<option value='@item.Value'>@item.Text</option>
}
}
</select><span style='color:red'>*</span>
</div>
</div>
<div class="Stock" style="padding-left:130px;">
@@ -334,4 +362,4 @@
<button class="btn btn-primary" type="button" onclick="saveData()">保存</button>
<button class="btn btn-primary" type="button" onclick="layer.closeMe()">关闭</button>
</div>
</form>
</form>
@@ -49,6 +49,14 @@
@Html.MyDisplayFor(m => m.UnderlyingEnName)
@Html.MyDisplayFor(m => m.BBGTicker)
</tr>
@if (Model.UnderlyingInstrumentType == ConsGlobal.InstrumentType.Fund)
{
<tr>
@Html.MyDisplayFor(m => m.InvestAdvisorName)
@Html.MyDisplayFor(m => m.EtfSubType)
</tr>
}
<tr>
@Html.MyDisplayFor(m => m.UnderlyingType)
@if (pageObj.showDeltaS_S)
@@ -226,4 +234,4 @@
</table>
</div>
}
}
}
@@ -13,7 +13,8 @@
}());
const consSelect = ['MarketCode', 'UnderlyingInstrumentType', 'UnderlyingState', 'UnderlyingStatus', 'UpDownLimitType'];
const consSelect = ['MarketCode', 'UnderlyingInstrumentType', 'UnderlyingState', 'UnderlyingStatus', 'UpDownLimitType', 'EtfSubType'];
var autoUpDownLimit, autoVariety;
@@ -102,11 +103,15 @@ $(function () {
case "OtherBonds":
classType = "Bonds";
break;
case "Fund":
// 重点功能:资产类型为基金及基金专户时,显示所有 Fund 专属字段。
classType = "Fund";
break;
default:
classType = type;
break;
}
$('#editForm').removeClass("form-None form-Stock form-CommodityFutures form-CommoditySpot form-Bonds").addClass("form-" + classType);
$('#editForm').removeClass("form-None form-Stock form-CommodityFutures form-CommoditySpot form-Bonds form-Fund").addClass("form-" + classType);
}).trigger('change');
});
@@ -130,6 +135,11 @@ function saveData() {
return main.alert("资产品种类型 必须填写!");
}
// 重点功能:ETF 子类只对基金及基金专户显示并必填,先在前端阻止无效提交。
if (data.UnderlyingInstrumentType === "Fund" && !data.EtfSubType) {
return main.alert("ETF 子类 必须填写!");
}
if (data.UnderlyingInstrumentType === "CommodityFutures" && !data.MaturityDate) {
return main.alert("到期日 必须填写!");
}
@@ -144,4 +154,4 @@ function saveData() {
main.parentReloadData();
window.location.href = "/underlying_manager/underlying_managerView?enid=" + resp.obj.EncryptId;
});
}
}