diff --git a/YLErpDAL/Modules/UnderlyingModule/UnderlyingmanagerBLL.cs b/YLErpDAL/Modules/UnderlyingModule/UnderlyingmanagerBLL.cs
index c59998c4..58d2eaed 100644
--- a/YLErpDAL/Modules/UnderlyingModule/UnderlyingmanagerBLL.cs
+++ b/YLErpDAL/Modules/UnderlyingModule/UnderlyingmanagerBLL.cs
@@ -257,6 +257,12 @@ namespace YLErp.BLL
predicate = predicate.And(d => typeids.Contains(d.UnderlyingTypeId)); ;
}
+ if (!string.IsNullOrEmpty(req.UnderlyingInstrumentType))
+ {
+ var instrumentTypes = req.UnderlyingInstrumentType.Split(',');
+ predicate = predicate.And(d => instrumentTypes.Contains(d.UnderlyingInstrumentType));
+ }
+
if (!string.IsNullOrEmpty(req.MarketCode))
{
predicate = predicate.And(d => d.MarketCode == req.MarketCode);
diff --git a/YLErpWeb/Views/underlying_manager/underlying_managerList.cshtml b/YLErpWeb/Views/underlying_manager/underlying_managerList.cshtml
index 5baf1f51..d7fff6ab 100644
--- a/YLErpWeb/Views/underlying_manager/underlying_managerList.cshtml
+++ b/YLErpWeb/Views/underlying_manager/underlying_managerList.cshtml
@@ -52,6 +52,7 @@
@Html.MyAceDropdownInput2("MarketCode", "市场", MarketController.GetAllmarket())
@Html.ShortInput("UnderlyingCode", "标的资产码")
+ @Html.MyAceDropdownInput("UnderlyingInstrumentType", "资产类型", ConsGlobal.InstrumentType.SelectItems())
@Html.MyAceDropdownInput("UnderlyingTypeId", "品种类型", GetRolevariety(true))
@Html.SearchDateRange("MaturityDate", "标的到期日")
@Html.MyAceDropdownInput2("LaunchState", "启用", GlobalData.QiYongTypes(),defaultvalue:"1")
diff --git a/YLErpWeb/wwwroot/Scripts/app/underlying/underlyinglist.js b/YLErpWeb/wwwroot/Scripts/app/underlying/underlyinglist.js
index 8f7affe3..a2554cd8 100644
--- a/YLErpWeb/wwwroot/Scripts/app/underlying/underlyinglist.js
+++ b/YLErpWeb/wwwroot/Scripts/app/underlying/underlyinglist.js
@@ -73,8 +73,6 @@ const colModelGrid = function () {
name: 'id', label: 'id', index: 'id', width: 1, hidden: true, optionHide: true,
}, {
name: 'UnderlyingInstrumentType', label: 'UnderlyingInstrumentType', index: 'UnderlyingInstrumentType', width: 1, hidden: true, optionHide: true,
- }, {
- name: 'UnderlyingInstrumentTypeCn', label: '资产类型', index: 'UnderlyingInstrumentTypeCn', width: 1, hidden: true, optionHide: true,
}, {
name: 'EncryptId', label: 'EncryptId', index: 'EncryptId', width: 0, hidden: true, optionHide: true,
}, {
@@ -89,6 +87,8 @@ const colModelGrid = function () {
name: 'BBGTicker', label: 'BBGTicker', index: 'BBGTicker', width: 180
}, {
name: 'Price', label: '标的价格', index: 'Price', width: 90, formatter: updatePriceCtrl.jqgridFormat
+ }, {
+ name: 'UnderlyingInstrumentTypeCn', label: '资产类型', index: 'UnderlyingInstrumentTypeCn', width: 100, sortable: false
}, {
name: 'UnderlyingType', label: '标的品种类型', index: 'UnderlyingType', width: 130, hidden: true
}, {
@@ -188,7 +188,19 @@ function showToolName(cellValue, options, rowObject) {
function gridComplete() {
var jgrid = $(this);
$('.ui-jqgrid-bdiv', '#gbox_listGrid').floatingScroll();
- main.setcolumnChooser(jgrid, configcolumn_data_bdzc);
+ $.when(main.setcolumnChooser(jgrid, configcolumn_data_bdzc)).always(function () {
+ const colModel = jgrid.jqGrid('getGridParam', 'colModel');
+ const priceIndex = colModel.findIndex(x => x.name === 'Price');
+ const instrumentTypeIndex = colModel.findIndex(x => x.name === 'UnderlyingInstrumentTypeCn');
+
+ jgrid.jqGrid('showCol', 'UnderlyingInstrumentTypeCn');
+ if (priceIndex >= 0 && instrumentTypeIndex >= 0 && instrumentTypeIndex !== priceIndex + 1) {
+ const perm = colModel.map((_, index) => index);
+ perm.splice(instrumentTypeIndex, 1);
+ perm.splice(perm.indexOf(priceIndex) + 1, 0, instrumentTypeIndex);
+ jgrid.jqGrid('remapColumns', perm, true);
+ }
+ });
}
function showcolumnChooser() {
@@ -247,6 +259,7 @@ function SearchClick(isSearchclick) {
listGrid.appendPostData({ Underlying: $("#Underlying").val() });
listGrid.appendPostData({ UnderlyingCode: $("#UnderlyingCode").val() });
+ listGrid.appendPostData({ UnderlyingInstrumentType: ($("#UnderlyingInstrumentType").val() || []).join() });
listGrid.appendPostData({ UnderlyingType: ($("#UnderlyingTypeId").val() || []).join() });
listGrid.appendPostData({ MaturityDateStart: $("#DateFromMaturityDate").val() });
listGrid.appendPostData({ MaturityDateEnd: $("#DateToMaturityDate").val() });
@@ -500,4 +513,4 @@ function UploadFile(options) {
});
}
-window.reloadData = SearchClick;
\ No newline at end of file
+window.reloadData = SearchClick;