CurrentStoreHouseQueryMg.cshtml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @using Microsoft.Ajax.Utilities
  2. @using ShwasherSys.Authorization.Permissions
  3. @using ShwasherSys.Models.Layout
  4. @using ShwasherSys.Models.Modal
  5. @{
  6. /**/
  7. ViewBag.ActiveMenu = PermissionNames.PagesFinshedStoreInfoCurrentStoreHouseQueryMg; //The menu item will be active for this page.
  8. ViewBag.Title = "库存信息查询";
  9. //List<SelectListItem> semiApplyStatus = ViewBag.SemiApplyStatus;
  10. var searchForm = new SearchFormViewModal(new List<SearchItem>()
  11. {
  12. new SearchItem("productName","产品名称"),
  13. new SearchItem("model","规格"),
  14. new SearchItem("material","材质"),
  15. new SearchItem("surfaceColor","表色"),
  16. new SearchItem("rigidity","硬度"),
  17. new SearchItem("id","成品编号").SetSearchIcon("query_Product_modal"),
  18. }, false);
  19. }
  20. @section css{
  21. <link href="~/Content/Plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
  22. <style>
  23. .tool-rc-group {
  24. border: 1px solid #ba63d3;
  25. float: left;
  26. margin: 0 5px;
  27. padding-right: 5px;
  28. border-radius: 5px;
  29. }
  30. /*[type="checkbox"] + label::before, [type="checkbox"]:not(.filled-in) + label::after {
  31. content: '';
  32. position: absolute;
  33. top: 0;
  34. left: 0;
  35. width: 18px;
  36. height: 18px;
  37. z-index: 0;
  38. border: 2px solid #008080;
  39. border-radius: 1px;
  40. margin-top: -10px;
  41. transition: .2s;
  42. margin: -10px 20px 0 0;
  43. margin-left: -5px;
  44. }*/
  45. #showZoreCheckBox + label::before,#showZoreCheckBox:not(.filled-in) + label::after {
  46. top: -10px;
  47. left: -5px;
  48. width: 18px;
  49. height: 18px;
  50. }
  51. #showZoreCheckBox:checked + label::before {
  52. top: -10px;
  53. left: -8px;
  54. width: 11px;
  55. height: 15px;
  56. border-top: 2px solid transparent;
  57. border-left: 2px solid transparent;
  58. border-right: 2px solid #26a69a;
  59. border-bottom: 2px solid #26a69a;
  60. transform: rotate(40deg);
  61. -webkit-backface-visibility: hidden;
  62. backface-visibility: hidden;
  63. -webkit-transform-origin: 100% 100%;
  64. transform-origin: 100% 100%;
  65. }
  66. </style>
  67. }
  68. <div id="exportCss">
  69. <style>
  70. .trProduct td {
  71. text-align: left !important;
  72. background: #c0c0c0;
  73. font-size: 1.5rem !important;
  74. }
  75. .trProduct td span {
  76. color: #632d32;
  77. margin-left: 15px;
  78. }
  79. </style>
  80. </div>
  81. <div class="table-box mr-4 iwb-bootstrap-table">
  82. @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
  83. <table id="table" data-url="/api/services/app/StoreStatistics/QueryCurrentStoreTotal"
  84. data-striped="true" data-id-field="id" data-unique-id="id"
  85. data-method="post"
  86. data-side-pagination="server"
  87. data-content-type="application/x-www-form-urlencoded; charset=UTF-8"
  88. data-cache="false"
  89. 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"
  90. data-query-params="QueryParams"
  91. data-response-handler="ResponseHandler"
  92. data-click-to-select="true"
  93. data-single-select="true">
  94. <thead>
  95. <tr class="row">
  96. <th data-align="center" data-field="id">产品编码</th>
  97. <th data-align="center" data-field="productName">产品名称</th>
  98. <th data-align="center" data-field="model">规格</th>
  99. <th data-align="center" data-field="surfaceColor">表色</th>
  100. <th data-align="center" data-field="rigidity">硬度</th>
  101. <th data-align="center" data-field="material">材质</th>
  102. <th data-align="center" data-field="allPreMonthQuantity">上月结算库存(千件)</th>
  103. <th data-align="center" data-field="allQuantity">当前库存数量(千件)</th>
  104. <th data-align="center" data-field="allFreezeQuantity">库存冻结数量(千件)</th>
  105. <th data-align="center" data-formatter="ActionsFormatter"></th>
  106. </tr>
  107. </thead>
  108. </table>
  109. </div>
  110. @section modal{
  111. @Html.Partial("Modals/Query/_Product", "KeyWords-6")
  112. }
  113. @section scripts
  114. {
  115. <script src="~/Content/Scripts/MyScript/ExportExcel.js"></script>
  116. <script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
  117. <script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
  118. <script type="text/javascript">
  119. var datePickerOpt = {
  120. language: 'zh-CN',
  121. format: "yyyy-mm-dd",
  122. todayBtn: true,
  123. autoclose: true,
  124. startView: 2,
  125. minView: 2,
  126. maxView: 4,
  127. //showSecond: true,
  128. //showHours: true,
  129. //minuteStep: 10
  130. };
  131. $(function () {
  132. $("#tableTool").css("min-height", "40px");
  133. LoadTable();
  134. funs["btnPrint"] = function (url) {
  135. BtnPrint(url);
  136. }
  137. $("#Tool1").append(
  138. '<div class="tool-rc-group">' +
  139. '<div class="tool-radio" style="padding:5px;" ><input name="showZoreCheckBox" type="checkbox" id="showZoreCheckBox" value=""/><label for="showZoreCheckBox" style="color:white;padding-left: 15px; font-size: 1.5rem;">显示0库存</label></div>' +
  140. '</div>');
  141. $(".tool-radio input[type='radio'],.tool-radio input[type='checkbox']").on('click', function () {
  142. document.getElementById("SearchForm").reset();
  143. GetSearchList();
  144. RefreshTable();
  145. });
  146. });
  147. function BtnPrint(url) {
  148. window.open("@Url.Action("StoreListReport")", "_blank");
  149. }
  150. function ActionsFormatter(v, r) {
  151. return '<span class="table-action" onclick="ShowEnterOutDetail(\'' +
  152. r.id +
  153. '\')"><i class="iconfont icon-right"></i>查看进出货明细信息</span>';
  154. }
  155. function ShowEnterOutDetail(id) {
  156. window.open("@Url.Action("ProductStoreDetail")?id="+id, "_blank");
  157. }
  158. function GetSearchList() {
  159. var count = $("#SearchForm").find(".KeyWords").length;
  160. window._searchList = [];
  161. //var isShowZoreCheckBox = $("#showZoreCheckBox").is(':checked') ? "1" : "0";
  162. let zoreExt = $("#showZoreCheckBox").is(':checked') ? "4" : "2";//显示0 ,数量是大于等于0
  163. // window._searchList.push({ KeyWords: 0, KeyField: "AllQuantity", FieldType: "7", ExpType: zoreExt });
  164. if (zoreExt === "2") {
  165. window._searchList.push({ KeyWords: 0, KeyField: "AllQuantity", FieldType: "7", ExpType: zoreExt });
  166. }
  167. for (var i = 1; i <= count; i++) {
  168. var keyWords = $("#KeyWords-" + i).val();
  169. if (keyWords) {
  170. var keyField = $("#KeyField-" + i).val();
  171. var fieldType = $("#FieldType-" + i).val();
  172. var expType = $("#ExpType-" + i).val();
  173. _searchList.push({
  174. KeyWords: keyWords,
  175. KeyField: keyField,
  176. FieldType: fieldType,
  177. ExpType: expType
  178. });
  179. }
  180. }
  181. }
  182. </script>
  183. }