| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- @using ShwasherSys.Authorization.Permissions
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Models.Modal
- @{
- /**/
- ViewBag.ActiveMenu = PermissionNames.PagesBasicInfoStoreHouseLocations; //The menu item will be active for this page.
- ViewBag.Title = "仓库位置管理";
- List<SelectListItem> storeHouse = ViewBag.StoreHouse;
- }
- <section style="display: none">
- @Html.DropDownList("hide-StoreHouse", storeHouse)
- </section>
- <div class="table-box mr-4 iwb-bootstrap-table">
- @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu })
- <table id="table"
- data-url="/api/services/app/StoreHouseLocations/GetAll"
- data-striped="true" data-id-field="id" data-unique-id="id"
- data-method="post"
- data-side-pagination="server"
- data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
- data-cache="false"
- 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"
- data-query-params="QueryParams"
- data-response-handler="ResponseHandler"
- data-click-to-select="true"
- data-single-select="true">
- <thead>
- <tr class="row" id="header">
- <th data-field="state" data-checkbox="true"></th>
- <th data-align="center" data-field="storeLocationNo">编号</th>
- <th data-align="center" data-field="storeHouseId" data-formatter="StoreHouseIdFormatter">仓库 </th>
- <th data-align="center" data-field="storeAreaCode">库区</th>
- <th data-align="center" data-field="shelfNumber">货架号</th>
- <th data-align="center" data-field="shelfLevel">层次</th>
- <th data-align="center" data-field="sequenceNo">序列号 </th>
- </tr>
- </thead>
- </table>
- </div>
- @section modal{
- <section>
- <!--Main Modal-->
- <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered" role="document">
- <div class="modal-content">
- @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("仓库位置"))
- @{
- var inputs = new List<InputViewModel>
- {
- new InputViewModel("id", hide:true),
- new InputViewModel("storeLocationNo", hide:true),
- new InputViewModel("storeHouseId",InputTypes.List,displayName: "仓库").SetSelectOptions(storeHouse),
- /*new InputViewModel("storeLocationNo", displayName: "库区"),*/
- new InputViewModel("storeAreaCode",displayName: "库区"),
- new InputViewModel("shelfNumber", displayName: "货架号",@class:"number").SetNotRequired(),
- new InputViewModel("shelfLevel", displayName: "层次",@class:"number").SetNotRequired(),
- new InputViewModel("sequenceNo", displayName: "序列号",@class:"number").SetNotRequired(),
- new InputViewModel("remark",InputTypes.Textarea, "说明").SetNotRequired(),
- };
- //var specials = new List<SpecialInputModel>();
- }
- @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
- @Html.Partial("Modals/_ModalFooter", "0")
- </div>
- </div>
- </div>
- </section>
- }
- @section scripts
- {
- @*<script src="~/Content/Plugins/kindeditor/kindeditor-all.js"></script>
- <script src="~/Content/Plugins/kindeditor/lang/zh-CN.js"></script>*@
- <script type="text/javascript">
- $(function () {
- //show完毕前执行
- LoadTable();
- var funs = window.funs || { none: function () { console.log("No type"); } };
- funs["btnUpdate"] = function () { BtnUpdate({ disabled: "storeHouseId,storeAreaCode,shelfNumber,shelfLevel,sequenceNo" }); };
- });
- function StoreHouseIdFormatter(v, r) {
- var name = $("#hide-StoreHouse option[value='" + v + "']").text();
- return name;
- }
- /*function BtnCreate(url) {
- console.log("Create");
- abp.ajax({
- contentType: 'application/x-www-form-urlencoded',
- url: "/api/services/app/Regions/GetRegionSelectStrs",
- success: function(res) {
- $("#regionID").empty().html(res);
- //var url = $($this).data("url") + "";
- OpenModal({
- modaltitle: window.opCreate,
- //data: { ParentNo: "0" },
- url: url,
- select2tree: "regionID"
- });
- }
- });
- }
- function BtnUpdate(url) {
- console.log("Update");
- var row = $("#table").bootstrapTable("getSelections")[0];
- if (row) {
- abp.ajax({
- contentType: 'application/x-www-form-urlencoded',
- url: "/api/services/app/Regions/GetRegionSelectStrs",
- success: function(res) {
- $("#regionID").empty().html(res);
- //var url = $($this).data("url") + "";
- OpenModal({
- modaltitle: window.opUpdate,
- data: row,
- url: url,
- readonly: "id",
- select2tree: "regionID"
- });
- }
- });
- } else {
- abp.message.warn(abp.localization.localize("ChooseOneToOp"));
- }
- }*/
- </script>
- }
|