StoreHouses.cshtml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesBasicInfoStoreHouses; //The menu item will be active for this page.
  7. ViewBag.Title = "仓库信息维护";
  8. List<SelectListItem> storeHouseType = ViewBag.StoreHouseType;
  9. }
  10. <div class="table-box mr-4 iwb-bootstrap-table">
  11. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
  12. <table id="table"
  13. data-url="/api/services/app/StoreHouses/GetAll"
  14. data-striped="true" data-id-field="id" data-unique-id="id"
  15. data-method="post"
  16. data-side-pagination="server"
  17. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  18. data-cache="false"
  19. 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"
  20. data-query-params="QueryParams"
  21. data-response-handler="ResponseHandler"
  22. data-click-to-select="true"
  23. data-single-select="true">
  24. <thead>
  25. <tr class="row" id="header">
  26. <th data-field="state" data-checkbox="true"></th>
  27. <th data-align="center" data-field="storeHouseName">仓库名称</th>
  28. <th data-align="center" data-field="storeHouseTypeName">仓库类型</th>
  29. <th data-align="center" data-field="id">仓库编号</th>
  30. <th data-align="center" data-field="contactMan">联系人</th>
  31. <th data-align="center" data-field="tel">联系电话 </th>
  32. </tr>
  33. </thead>
  34. </table>
  35. </div>
  36. @section modal{
  37. <section>
  38. <!--Main Modal-->
  39. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  40. <div class="modal-dialog modal-dialog-centered" role="document">
  41. <div class="modal-content">
  42. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("仓库"))
  43. @{
  44. var inputs = new List<InputViewModel>
  45. {
  46. new InputViewModel("id", hide:true),
  47. new InputViewModel("storeHouseName", displayName: "仓库名称"),
  48. new InputViewModel("storeHouseTypeId",InputTypes.List, displayName: "仓库类型").SetSelectOptions(storeHouseType),
  49. new InputViewModel("address", displayName: "地址").SetNotRequired(),
  50. new InputViewModel("tel", displayName: "联系电话").SetNotRequired(),
  51. new InputViewModel("fax", displayName: "传真").SetNotRequired(),
  52. new InputViewModel("contactMan", displayName: "联系人").SetNotRequired(),
  53. new InputViewModel("remark",InputTypes.Textarea, "说明").SetNotRequired(),
  54. };
  55. //var specials = new List<SpecialInputModel>();
  56. }
  57. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  58. @Html.Partial("Modals/_ModalFooter", "0")
  59. </div>
  60. </div>
  61. </div>
  62. </section>
  63. }
  64. @section scripts
  65. {
  66. @*<script src="~/Content/Plugins/kindeditor/kindeditor-all.js"></script>
  67. <script src="~/Content/Plugins/kindeditor/lang/zh-CN.js"></script>*@
  68. <script type="text/javascript">
  69. $(function () {
  70. //show完毕前执行
  71. LoadTable();
  72. var funs = window.funs || { none: function () { console.log("No type"); } };
  73. funs["btnUpdate"] = function () { BtnUpdate({ readonly: "storeHouseName" }); };
  74. });
  75. /*function BtnCreate(url) {
  76. console.log("Create");
  77. abp.ajax({
  78. contentType: 'application/x-www-form-urlencoded',
  79. url: "/api/services/app/Regions/GetRegionSelectStrs",
  80. success: function(res) {
  81. $("#regionID").empty().html(res);
  82. //var url = $($this).data("url") + "";
  83. OpenModal({
  84. modaltitle: window.opCreate,
  85. //data: { ParentNo: "0" },
  86. url: url,
  87. select2tree: "regionID"
  88. });
  89. }
  90. });
  91. }
  92. function BtnUpdate(url) {
  93. console.log("Update");
  94. var row = $("#table").bootstrapTable("getSelections")[0];
  95. if (row) {
  96. abp.ajax({
  97. contentType: 'application/x-www-form-urlencoded',
  98. url: "/api/services/app/Regions/GetRegionSelectStrs",
  99. success: function(res) {
  100. $("#regionID").empty().html(res);
  101. //var url = $($this).data("url") + "";
  102. OpenModal({
  103. modaltitle: window.opUpdate,
  104. data: row,
  105. url: url,
  106. readonly: "id",
  107. select2tree: "regionID"
  108. });
  109. }
  110. });
  111. } else {
  112. abp.message.warn(abp.localization.localize("ChooseOneToOp"));
  113. }
  114. }*/
  115. </script>
  116. }