| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- @using ShwasherSys.Authorization.Permissions
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Models.Modal
- @{
- /**/
- ViewBag.ActiveMenu = PermissionNames.PagesFinshedStoreInfoFinshedEnterStoreMg; //The menu item will be active for this page.
- ViewBag.Title = "成品入库信息";
- List<SelectListItem> applyStatus = ViewBag.FinshedApplyStatus;
- var searchForm = new SearchFormViewModal(new List<SearchItem>()
- {
- new SearchItem("productionOrderNo","排产单号"),
- new SearchItem("productName","产品名称"),
- new SearchItem("model","规格"),
- new SearchItem("material","材质"),
- new SearchItem("rigidity","硬度"),
- new SearchItem("surfaceColor","表色"),
- new SearchItem("productNo","成品编码").SetSearchIcon("query_Product_modal"),
- new SearchItem("applyStatus","申请状态",FiledType.I,ExpType.Equal )
- .SetSearchItem(applyStatus),
-
- }, false);
- }
- <section style="display: none">
- @Html.DropDownList("hide-ApplyStatus", applyStatus)
- </section>
- <div class="table-box mr-4 iwb-bootstrap-table">
- @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
- <table id="table"
- data-url="/api/services/app/FinshedEnterStore/GetViewAll"
- 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="productionOrderNo">排产单号</th>
- <th data-align="center" data-field="productNo">成品编号</th>
- <th data-align="center" data-field="quantity">半成品数量(公斤)</th>
- <th data-align="center" data-field="packageSpecification">包装规格(千件/包)</th>
- <th data-align="center" data-field="packageCount">申请数量(包)</th>
- <th data-align="center" data-field="actualPackageCount" data-formatter="QuantityFormatte">入库数量(包)</th>
- <th data-align="center" data-field="storeHouseId" data-formatter="StoreHouseIdFormatte">仓库</th>
- <th data-align="center" data-field="applyEnterDate">申请时间</th>
- <th data-align="center" data-field="productName">产品名称</th>
- <th data-align="center" data-field="surfaceColor">表色</th>
- <th data-align="center" data-field="model">规格</th>
- <th data-align="center" data-field="rigidity">硬度</th>
- <th data-align="center" data-field="material">材质</th>
- <th data-align="center" data-field="remark">备注</th>
- @*<th data-align="center" data-field="applyStatus" data-formatter="ApplyStatusFormatter">状态</th>*@
- @*<th data-align="center" data-formatter="ActionFormatter"></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("actualQuantity", displayName:"确认入库数量(kg)",@class:"number",other:"min=0.001"),
- };
- //var specials = new List<SpecialInputModel>();
- }
- @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs))
- @Html.Partial("Modals/_ModalFooter", "0")
- </div>
- </div>
- </div>
- </section>
- @Html.Partial("Modals/Query/_Product", "KeyWords-7")
- }
- @section scripts
- {
- <script type="text/javascript">
- $(function () {
- $("#tableTool").css("min-height", "40px");
- $("#KeyWords-8").val("5").select2();//默认先未审核的
- $("#KeyWords-8").attr("disabled", "disabled");
- LoadTable();
- });
- function QuantityFormatte(v, r) {
- if (r.actualQuantity === 0) {
- return '<span class="label label-default">' + v + '</span>';
- }
- if (r.actualQuantity > r.quantity) {
- return '<span class="label label-success">' + v + '</span>';
- } else if (r.actualQuantity === r.quantity) {
- return '<span class="label label-info">' + v + '</span>';
- } else {
- return '<span class="label label-danger">' + v + '</span>';
- }
- }
- function StoreHouseIdFormatte(v, r) {
- if (v === 1) {
- return '<span class="label label-primary">成品仓库</span>';
- } else if (v === 2) {
- return '<span class="label label-info">半成品仓库</span>';
- }
- return v;
- }
- //function ApplyStatusFormatter(v,r) {
- // if (v === "1") {
- // return '<span class="label label-info">申请中</span>';
- // } else if (v === "2") {
- // return '<span class="label label-primary">已入库</span>';
- // } else if (v === "3") {
- // return '<span class="label label-primary">取消申请</span>';
- // }
- // return v;
- //}
- function ApplyStatusFormatter(v,r) {
- var name = $("#hide-ApplyStatus option[value='" + v + "']").text();
- if (r.isClose) {
- return '<span class="label label-primary">已结束</span>';
- }
- if (v === "1") {
- return '<span class="label label-info">' + name + '</span>';
- } else if (v === "2") {
- return '<span class="label label-success">' + name + '</span>';
- } else if (v === "3") {
- return '<span class="label label-warning">' + name + '</span>';
- } else if (v === "4") {
- return '<span class="label label-danger">' + name + '</span>';
- }
- return '<span class="label label-info">' + name + '</span>';
- }
- </script>
- }
|