OutFactory.cshtml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesBasicInfoOutFactory; //The menu item will be active for this page.
  7. ViewBag.Title = "外协加工厂商维护";
  8. // List<SelectListItem> classification = ViewBag.Classification;
  9. //var regionInfo = ViewBag.RegionInfo;
  10. }
  11. <div class="table-box mr-4 iwb-bootstrap-table">
  12. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
  13. <table id="table"
  14. data-url="/api/services/app/OutFactory/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="id">编号</th>
  29. <th data-align="center" data-field="outFactoryName">厂商名称</th>
  30. <th data-align="center" data-field="linkMan">联系人</th>
  31. <th data-align="center" data-field="telephone">电话</th>
  32. <th data-align="center" data-field="address">地址</th>
  33. <th data-align="center" data-field="fax">传真</th>
  34. <th data-align="center" data-field="email">邮箱</th>
  35. </tr>
  36. </thead>
  37. </table>
  38. </div>
  39. @section modal{
  40. <section>
  41. <!--Main Modal-->
  42. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  43. <div class="modal-dialog modal-dialog-centered" role="document">
  44. <div class="modal-content">
  45. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("办公场所"))
  46. @{
  47. var inputs = new List<InputViewModel>
  48. {
  49. new InputViewModel("id", displayName: "编号"),
  50. new InputViewModel("outFactoryName", displayName: "厂商名称"),
  51. new InputViewModel("linkMan", displayName: "联系人").SetNotRequired(),
  52. new InputViewModel("telephone", displayName: "电话"),
  53. new InputViewModel("address", displayName: "详细地址"),
  54. new InputViewModel("email", displayName: "邮箱").SetNotRequired(),
  55. new InputViewModel("zip", displayName: "邮编").SetNotRequired(),
  56. new InputViewModel("fax", displayName: "传真").SetNotRequired(),
  57. new InputViewModel("webSite", displayName: "网址").SetNotRequired(),
  58. };
  59. //var specials = new List<SpecialInputModel>();
  60. }
  61. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  62. @Html.Partial("Modals/_ModalFooter", "0")
  63. </div>
  64. </div>
  65. </div>
  66. </section>
  67. }
  68. @section scripts
  69. {
  70. <script src="~/Content/Plugins/select2/js/select2tree.js"></script>
  71. @*<script src="~/Content/Plugins/kindeditor/kindeditor-all.js"></script>
  72. <script src="~/Content/Plugins/kindeditor/lang/zh-CN.js"></script>*@
  73. <script type="text/javascript">
  74. $(function () {
  75. //show完毕前执行
  76. LoadTable();
  77. var funs = window.funs || { none: function () { console.log("No type"); } };
  78. //funs["btnUpdate"] = function () { BtnUpdate({ readonly: "id" }); };
  79. });
  80. //function BtnCreate(url) {
  81. // console.log("Create");
  82. // abp.ajax({
  83. // contentType: 'application/x-www-form-urlencoded',
  84. // url: "/api/services/app/Regions/GetRegionSelectStrs",
  85. // success: function(res) {
  86. // $("#regionID").empty().html(res);
  87. // //var url = $($this).data("url") + "";
  88. // OpenModal({
  89. // modaltitle: window.opCreate,
  90. // //data: { ParentNo: "0" },
  91. // url: url,
  92. // select2tree: "regionID"
  93. // });
  94. // }
  95. // });
  96. //}
  97. //function BtnUpdate(url) {
  98. // console.log("Update");
  99. // var row = $("#table").bootstrapTable("getSelections")[0];
  100. // if (row) {
  101. // abp.ajax({
  102. // contentType: 'application/x-www-form-urlencoded',
  103. // url: "/api/services/app/Regions/GetRegionSelectStrs",
  104. // success: function(res) {
  105. // $("#regionID").empty().html(res);
  106. // //var url = $($this).data("url") + "";
  107. // OpenModal({
  108. // modaltitle: window.opUpdate,
  109. // data: row,
  110. // url: url,
  111. // readonly: "id",
  112. // select2tree: "regionID"
  113. // });
  114. // }
  115. // });
  116. // } else {
  117. // abp.message.warn(abp.localization.localize("ChooseOneToOp"));
  118. // }
  119. //}
  120. </script>
  121. }