FinshedOutStoreMg.cshtml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. @using ShwasherSys.Authorization.Permissions
  2. @using ShwasherSys.Models.Layout
  3. @using ShwasherSys.Models.Modal
  4. @{
  5. /**/
  6. ViewBag.ActiveMenu = PermissionNames.PagesFinshedStoreInfoFinshedOutStoreMgQuery; //The menu item will be active for this page.
  7. ViewBag.Title = "成品出库信息";
  8. List<SelectListItem> semiApplyStatus = ViewBag.FinshedApplyStatus;
  9. var searchForm = new SearchFormViewModal(new List<SearchItem>()
  10. {
  11. new SearchItem("productionOrderNo","排产单号"),
  12. new SearchItem("productNo","成品编码").SetSearchIcon("query_Product_modal"),
  13. new SearchItem("applyStatus","申请状态",FiledType.I,ExpType.Equal).SetSearchItem(semiApplyStatus),
  14. new SearchItem("model","规格"),
  15. new SearchItem("surfaceColor","表色"),
  16. new SearchItem("material","材质"),
  17. new SearchItem("rigidity","硬度"),
  18. new SearchItem("productName","产品名称"),
  19. }, false);
  20. }
  21. <section style="display: none">
  22. @Html.DropDownList("hide-ApplyStatus", semiApplyStatus)
  23. </section>
  24. <div class="table-box mr-4 iwb-bootstrap-table">
  25. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
  26. <table id="table"
  27. data-url="/api/services/app/FinshedOutStore/GetViewAll"
  28. data-striped="true" data-id-field="id" data-unique-id="id"
  29. data-method="post"
  30. data-side-pagination="server"
  31. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  32. data-cache="false"
  33. 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"
  34. data-query-params="QueryParams"
  35. data-response-handler="ResponseHandler"
  36. data-click-to-select="true"
  37. data-single-select="true">
  38. <thead>
  39. <tr class="row" id="header">
  40. <th data-field="state" data-checkbox="true"></th>
  41. <th data-align="center" data-field="productNo">成品编号</th>
  42. <th data-align="center" data-field="productionOrderNo">排产单号</th>
  43. <th data-align="center" data-field="storeHouseId" data-formatter="StoreHouseIdFormatte">仓库</th>
  44. <th data-align="center" data-field="quantity">申请出库数量(kg)</th>
  45. <th data-align="center" data-field="actualQuantity">出库数量(kg)</th>
  46. <th data-align="center" data-field="applyOutDate">申请时间</th>
  47. <th data-align="center" data-field="productName">产品名称</th>
  48. <th data-align="center" data-field="surfaceColor">表色</th>
  49. <th data-align="center" data-field="model">规格</th>
  50. <th data-align="center" data-field="createSourceType" data-formatter="CreateSourceTypeFormatter">申请类型</th>
  51. <th data-align="center" data-field="customerName">客户名称</th>
  52. <th data-align="center" data-field="orderSendBillNo">发货单号</th>
  53. </tr>
  54. </thead>
  55. </table>
  56. </div>
  57. @section modal{
  58. <section>
  59. <!--Main Modal-->
  60. <div class="modal fade" id="modal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
  61. <div class="modal-dialog modal-dialog-centered" role="document">
  62. <div class="modal-content">
  63. @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("成品入库确认", ""))
  64. @{
  65. var inputs = new List<InputViewModel>
  66. {
  67. new InputViewModel("id", hide:true),
  68. new InputViewModel("actualQuantity", displayName:"确认入库数量(kg)",@class:"number",other:"min=0.001"),
  69. };
  70. //var specials = new List<SpecialInputModel>();
  71. }
  72. @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
  73. @Html.Partial("Modals/_ModalFooter", "0")
  74. </div>
  75. </div>
  76. </div>
  77. </section>
  78. @Html.Partial("Modals/Query/_Product", "KeyWords-2")
  79. }
  80. @section scripts
  81. {
  82. <script type="text/javascript">
  83. $(function () {
  84. $("#tableTool").css("min-height", "40px");
  85. $("#KeyWords-3").val("5").select2();//默认先未审核的
  86. $("#KeyWords-3").attr("disabled", "disabled");
  87. //show完毕前执行
  88. LoadTable();
  89. var funs = window.funs || { none: function () { console.log("No type"); } };
  90. funs["btnUpdate"] = function () {
  91. var rows = config.table.bootstrapTable("getSelections");
  92. if (rows.length === 1) {
  93. if (rows[0].applyStatus === "2" || rows[0].applyStatus === "3") {
  94. abp.message.warn("申请已审核!");
  95. return;
  96. }
  97. BtnUpdate({ readonly: "" });
  98. }
  99. };
  100. funs["btnDelete"] = function() {
  101. var rows = config.table.bootstrapTable("getSelections");
  102. if (rows.length === 1) {
  103. if (rows[0].applyStatus === "2" || rows[0].applyStatus === "3") {
  104. abp.message.warn("申请已审核通过,不可取消!");
  105. return;
  106. }
  107. var url = config.tableTool.find('.btn[data-type=btnDelete]').data('url');
  108. abp.message.confirm("取消入库申请之后将不可恢复,确认取消?",
  109. "确认取消",
  110. function() {
  111. SaveAjax({ url: url, data: { Id: rows[0].id }, isValidate: false });
  112. });
  113. } else
  114. abp.message.warn(abp.localization.localize("ChooseOneToOp"));
  115. };
  116. //LoadTableQuerySemiProduct();
  117. });
  118. function StoreHouseIdFormatte(v, r) {
  119. if (v === 1) {
  120. return '<span class="label label-primary">成品仓库</span>';
  121. } else if (v === 2) {
  122. return '<span class="label label-info">半成品仓库</span>';
  123. }
  124. return v;
  125. }
  126. function CreateSourceTypeFormatter(v, r) {
  127. if (v === 2) {
  128. return '<span class="label label-info">手动平衡库存</span>';
  129. }
  130. return "";
  131. }
  132. </script>
  133. }