StoreHouseLocations.cshtml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesBasicInfoStoreHouseLocations; //The menu item will be active for this page.
  7. ViewBag.Title = "仓库位置管理";
  8. List<SelectListItem> storeHouse = ViewBag.StoreHouse;
  9. }
  10. <section style="display: none">
  11. @Html.DropDownList("hide-StoreHouse", storeHouse)
  12. </section>
  13. <div class="table-box mr-4 iwb-bootstrap-table">
  14. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
  15. <table id="table"
  16. data-url="/api/services/app/StoreHouseLocations/GetAll"
  17. data-striped="true" data-id-field="id" data-unique-id="id"
  18. data-method="post"
  19. data-side-pagination="server"
  20. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  21. data-cache="false"
  22. 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"
  23. data-query-params="QueryParams"
  24. data-response-handler="ResponseHandler"
  25. data-click-to-select="true"
  26. data-single-select="true">
  27. <thead>
  28. <tr class="row" id="header">
  29. <th data-field="state" data-checkbox="true"></th>
  30. <th data-align="center" data-field="storeLocationNo">编号</th>
  31. <th data-align="center" data-field="storeHouseId" data-formatter="StoreHouseIdFormatter">仓库 </th>
  32. <th data-align="center" data-field="storeAreaCode">库区</th>
  33. <th data-align="center" data-field="shelfNumber">货架号</th>
  34. <th data-align="center" data-field="shelfLevel">层次</th>
  35. <th data-align="center" data-field="sequenceNo">序列号 </th>
  36. </tr>
  37. </thead>
  38. </table>
  39. </div>
  40. @section modal{
  41. <section>
  42. <!--Main Modal-->
  43. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  44. <div class="modal-dialog modal-dialog-centered" role="document">
  45. <div class="modal-content">
  46. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("仓库位置"))
  47. @{
  48. var inputs = new List<InputViewModel>
  49. {
  50. new InputViewModel("id", hide:true),
  51. new InputViewModel("storeLocationNo", hide:true),
  52. new InputViewModel("storeHouseId",InputTypes.List,displayName: "仓库").SetSelectOptions(storeHouse),
  53. /*new InputViewModel("storeLocationNo", displayName: "库区"),*/
  54. new InputViewModel("storeAreaCode",displayName: "库区"),
  55. new InputViewModel("shelfNumber", displayName: "货架号",@class:"number").SetNotRequired(),
  56. new InputViewModel("shelfLevel", displayName: "层次",@class:"number").SetNotRequired(),
  57. new InputViewModel("sequenceNo", displayName: "序列号",@class:"number").SetNotRequired(),
  58. new InputViewModel("remark",InputTypes.Textarea, "说明").SetNotRequired(),
  59. };
  60. //var specials = new List<SpecialInputModel>();
  61. }
  62. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  63. @Html.Partial("Modals/_ModalFooter", "0")
  64. </div>
  65. </div>
  66. </div>
  67. </section>
  68. }
  69. @section scripts
  70. {
  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({ disabled: "storeHouseId,storeAreaCode,shelfNumber,shelfLevel,sequenceNo" }); };
  79. });
  80. function StoreHouseIdFormatter(v, r) {
  81. var name = $("#hide-StoreHouse option[value='" + v + "']").text();
  82. return name;
  83. }
  84. /*function BtnCreate(url) {
  85. console.log("Create");
  86. abp.ajax({
  87. contentType: 'application/x-www-form-urlencoded',
  88. url: "/api/services/app/Regions/GetRegionSelectStrs",
  89. success: function(res) {
  90. $("#regionID").empty().html(res);
  91. //var url = $($this).data("url") + "";
  92. OpenModal({
  93. modaltitle: window.opCreate,
  94. //data: { ParentNo: "0" },
  95. url: url,
  96. select2tree: "regionID"
  97. });
  98. }
  99. });
  100. }
  101. function BtnUpdate(url) {
  102. console.log("Update");
  103. var row = $("#table").bootstrapTable("getSelections")[0];
  104. if (row) {
  105. abp.ajax({
  106. contentType: 'application/x-www-form-urlencoded',
  107. url: "/api/services/app/Regions/GetRegionSelectStrs",
  108. success: function(res) {
  109. $("#regionID").empty().html(res);
  110. //var url = $($this).data("url") + "";
  111. OpenModal({
  112. modaltitle: window.opUpdate,
  113. data: row,
  114. url: url,
  115. readonly: "id",
  116. select2tree: "regionID"
  117. });
  118. }
  119. });
  120. } else {
  121. abp.message.warn(abp.localization.localize("ChooseOneToOp"));
  122. }
  123. }*/
  124. </script>
  125. }