Standards - 复制.cshtml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesProductInfoStandards; //The menu item will be active for this page.
  7. ViewBag.Title = "标准管理";
  8. // List<SelectListItem> classification = ViewBag.Classification;
  9. }
  10. <div class="table-box mr-4 iwb-bootstrap-table">
  11. <input type="hidden" id="IsLock" value="N" />
  12. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
  13. <table id="table"
  14. data-url="/api/services/app/Standards/GetAll"
  15. data-striped="true" data-id-field="id" data-unique-id="id"
  16. data-method="post"
  17. data-side-pagination="server"
  18. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  19. data-cache="false"
  20. data-pagination="true" data-page-size="30" data-page-number="1" data-page-list="[30,50,100,200]" data-pagination-detail-h-align="right" data-pagination-h-align="left"
  21. data-query-params="QueryParams"
  22. data-response-handler="ResponseHandler"
  23. data-click-to-select="true"
  24. data-single-select="true">
  25. <thead>
  26. <tr class="row" id="header">
  27. <th data-field="state" data-checkbox="true"></th>
  28. <th data-align="center" data-field="standardName">标准名称</th>
  29. <th data-align="center" data-field="standardDesc">标准描述</th>
  30. </tr>
  31. </thead>
  32. </table>
  33. </div>
  34. @section modal{
  35. <section>
  36. <!--Main Modal-->
  37. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  38. <div class="modal-dialog modal-dialog-centered" role="document">
  39. <div class="modal-content">
  40. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("产品标准"))
  41. @{
  42. var inputs = new List<InputViewModel>
  43. {
  44. new InputViewModel("id", hide: true),
  45. new InputViewModel("standardName", displayName: "标准名称"),
  46. new InputViewModel("standardDesc",InputTypes.Textarea, "标准描述").SetNotRequired(),
  47. };
  48. //var specials = new List<SpecialInputModel>();
  49. }
  50. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  51. @Html.Partial("Modals/_ModalFooter", "0")
  52. </div>
  53. </div>
  54. </div>
  55. </section>
  56. }
  57. @section scripts
  58. {
  59. <script type="text/javascript">
  60. $(function () {
  61. //show完毕前执行
  62. LoadTable();
  63. var funs = window.funs || { none: function () { console.log("No type"); } };
  64. funs["btnUpdate"] = function () { BtnUpdate({ readonly: "standardName" }); };
  65. });
  66. </script>
  67. }