List.cshtml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. //字典类型
  7. ComboGridOptions cgopDictionary = new ComboGridOptions
  8. {
  9. TextField = "DictionaryName",
  10. ValueField = "DictionaryCode",
  11. ID = "DictionaryDropdown",
  12. Name = "DictionaryDropdown",
  13. OnSelect = "reload",
  14. GridOptions = new DataGridOptions
  15. {
  16. Columns = new List<DataGridColumn>()
  17. {
  18. //new BoundFieldColumn { FieldName="DictionaryCode",HeaderText="类型代码", Align=AlignStyle.Center, Width=0.2 },
  19. new BoundFieldColumn { FieldName="DictionaryName",HeaderText="类型名称", Align=AlignStyle.Center, Width=0.12 }
  20. },
  21. IsCheckOnSelect = true,
  22. DataSourceUrl = Url.Content("~/Dictionary/List"),
  23. IsPagination = true,
  24. IsShowRowNumbers = true,
  25. IsSingleSelect = false
  26. }
  27. };
  28. }
  29. @section scripts{
  30. <script src="~/Scripts/Business/System/DictionaryItem.js" type="text/javascript"></script>
  31. <script type="text/javascript">
  32. var nonSelect = "@DropdownList.SELECT_ALL";
  33. </script>
  34. }
  35. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  36. @Html.Position()
  37. <div class="p_SearchTitle">
  38. <div style="float: left; margin-left: 10px; font-size: 12px; line-height: 30px;">
  39. 查询条件</div>
  40. </div>
  41. <form id="formQuery" method="post" action="@Url.Content("~/DictionaryItem/Excel")">
  42. @Html.PositionCondition()
  43. <div class="search_keyword">
  44. <div class="search_input">
  45. <ul>
  46. <li class="sn" style="padding-left: 5px;">类型名称:</li>
  47. <li class="sv">
  48. @Html.ComboGrid(cgopDictionary, new Dictionary<string, string> { { "data-condition", "dgDictionaryItemList" } })
  49. </li>
  50. <li class="sn" style="padding-left: 5px;color: red;">可否编辑:</li>
  51. <li class="sv">
  52. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions
  53. {
  54. ID = "DictionaryIsEditable",
  55. Name = "DictionaryIsEditable",
  56. BindType = DropdownListBindType.SelectAll,
  57. OnSelect = "reload"
  58. },
  59. new Dictionary<string, string> { { "data-condition", "dgDictionaryItemList" } })
  60. </li>
  61. <li class="sn" style="padding-left: 5px;color: red;">可否显示:</li>
  62. <li class="sv">
  63. @Html.DictionaryDropDownList(EMIS.ViewModel.DictionaryItem.CF_GeneralPurpose, new DropdownListOptions
  64. {
  65. ID = "DictionaryIsVisible",
  66. Name = "DictionaryIsVisible",
  67. BindType = DropdownListBindType.SelectAll,
  68. OnSelect = "reload"
  69. },
  70. new Dictionary<string, string> { { "data-condition", "dgDictionaryItemList" } })
  71. </li>
  72. </ul>
  73. </div>
  74. </div>
  75. </form>
  76. <div class="p_title">
  77. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  78. 数据字典列表</div>
  79. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("List")</div>
  80. </div>
  81. @Html.PositionBatchModify()
  82. <div class="search_list">
  83. @Html.DataGrid(new DataGridOptions
  84. {
  85. Columns = new List<DataGridColumn>()
  86. {
  87. new CheckBoxFieldColumn{ HeaderText="", FieldName="DictionaryItemID" },
  88. new BoundFieldColumn { FieldName="OrderNo", HeaderText="序号", Align=AlignStyle.Center, Width=0.02 },
  89. new LinkButtonColumn { FieldName="Code", HeaderText="元素代码", Align=AlignStyle.Center, Handle="edit", Width=0.04, OverflowLength=18 },
  90. new BoundFieldColumn { FieldName="Name", HeaderText="元素名称", Align=AlignStyle.Center, Width=0.08 },
  91. new BoundFieldColumn { FieldName="Value", HeaderText="元素值", Align=AlignStyle.Center, Width=0.03, CustomFormatFun="SetRedColumn" },
  92. new BoundFieldColumn { FieldName="DictionaryCode", HeaderText="类型代码", Align=AlignStyle.Center, Width=0.06, OverflowLength=25 },
  93. new BoundFieldColumn { FieldName="DictionaryName", HeaderText="类型名称", Align=AlignStyle.Center, Width=0.06 },
  94. new BoundFieldColumn { FieldName="IsEditableName", HeaderText="可否编辑", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" },
  95. new BoundFieldColumn { FieldName="IsVisibleName", HeaderText="可否显示", Align=AlignStyle.Center, Width=0.04, CustomFormatFun="SetRedColumn" }
  96. },
  97. PageSize = 50,
  98. IsCheckOnSelect = true,
  99. DataSourceUrl = Url.Content("~/DictionaryItem/List"),
  100. ID = "dgDictionaryItemList",
  101. IsPagination = true,
  102. IsShowRowNumbers = true,
  103. IsSingleSelect = false
  104. })
  105. </div>
  106. </div>