| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- @using ShwasherSys.Authorization.Permissions
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Models.Modal
- @{
- /**/
- ViewBag.ActiveMenu = PermissionNames.PagesPackInfoPackageApplyInfo; //The menu item will be active for this page.
- ViewBag.Title = "包装申请信息";
- List<SelectListItem> applyStatus = ViewBag.ApplyStatus;
- List<SelectListItem> closeStatus = new List<SelectListItem>()
- {
- new SelectListItem(){Text = @"未关闭",Value = "false",Selected = true},
- new SelectListItem(){Text = @"已关闭",Value = "true"}
- };
- var searchForm = new SearchFormViewModal(new List<SearchItem>()
- {
- new SearchItem("productionOrderNo","排产单号"),
- new SearchItem("productName","产品名称"),
- new SearchItem("model","规格"),
- new SearchItem("material","材质"),
- new SearchItem("applyDate", "申请日期",FiledType.Dnull,ExpType.GreaterOrEqual),
- new SearchItem("applyDate", "到",FiledType.Dnull,ExpType.LessOrEqual),
- new SearchItem("semiProductNo","半成品编码").SetSearchIcon("query_semiProduct_modal"),
- new SearchItem("applyStatus","申请状态" )
- .SetSearchItem(applyStatus),
- new SearchItem("isClose","关闭状态" ,FiledType.B,ExpType.Equal)
- .SetSearchItem(closeStatus),
- }, false);
- }
- @section css{
- <link href="~/Content/Plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" />
- }
- <style>
- .tool-radio {
- display: inline-block;
- margin-left: 10px;
- }
- [type="radio"]:not(:checked) + label, [type="radio"]:checked + label {
- padding-left: 25px;
- font-size: 1.5rem;
- color: #dad9db;
- }
- </style>
- <section style="display: none">
- @Html.DropDownList("hide-ApplyStatus", applyStatus)
- </section>
- <div class="table-box iwb-bootstrap-table">
- @Html.Action("ToolMenu", "Layout", new { pageName = ViewBag.ActiveMenu, searchForm })
- <table id="table"
- data-url="/api/services/app/PackInfoApply/GetAll" data-id-field="id" data-unique-id="id"
- data-striped="true" data-click-to-select="true" data-single-select="true"
- 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-h-align="left" data-pagination-detail-h-align="right"
- data-query-params="QueryParams" data-response-handler="ResponseHandler">
- <thead>
- <tr class="row" id="header">
- <th data-field="state" data-checkbox="true"></th>
- <th data-align="center" data-field="processingNum" data-formatter="ProcessingNumFormatter">待处理明细</th>
- <th data-align="center" data-field="productionOrderNo">流转单编号</th>
- <th data-align="center" data-field="" data-formatter="PackageProductNoFormatter">包装前产品编码</th>
- @*<th data-align="center" data-field="semiProductNo">半成品编码</th>*@
- <th data-align="center" data-field="applyQuantity">申请包装数量</th>
- <th data-align="center" data-field="surfaceColor">表色</th>
- <th data-align="center" data-field="productName">产品名称</th>
- <th data-align="center" data-field="model">规格</th>
- <th data-align="center" data-field="rigidity">硬度</th>
- <th data-align="center" data-field="partNo">零件号</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-field="applyDate" data-formatter="DateFormatter">申请时间</th>
- </tr>
- </thead>
- </table>
- </div>
- @section modal{
- <!--Main Modal-->
- <section>
- <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("packageApplyNo",displayName:"申请流水号").SetNotRequired(),
- new InputViewModel("currentSemiStoreHouseNo",displayName:"半成品仓库库存信息编号").SetNotRequired(),
- new InputViewModel("productionOrderNo",displayName:"流转单编号"),
- new InputViewModel("semiProductNo",displayName:"半成品编码").SetNotRequired(),
- new InputViewModel("applyQuantity",displayName:"申请包装数量").SetNotRequired(),
- new InputViewModel("actualQuantity",displayName:"实际包装的千件数").SetNotRequired(),
- new InputViewModel("applyStatus",displayName:"").SetNotRequired(),
- new InputViewModel("applyDate",displayName:"发起申请时间").SetNotRequired(),
- new InputViewModel("remark",displayName:"").SetNotRequired(),
- new InputViewModel("timeCreated",displayName:"").SetNotRequired(),
- new InputViewModel("timeLastMod",displayName:"").SetNotRequired(),
- new InputViewModel("creatorUserId",displayName:"").SetNotRequired(),
- new InputViewModel("userIDLastMod",displayName:"").SetNotRequired(),
- };
- //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/_SemiProduct", "KeyWords-7")
- }
- @section scripts
- {
- <script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
- <script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
- <script type="text/javascript">
- var datePickerOpt = {
- language: 'zh-CN',
- format: "yyyy-mm-dd",
- todayBtn: true,
- autoclose: true,
- startView: 2,
- minView: 2,
- maxView: 4
- //showSecond: true,
- //showHours: true,
- //minuteStep: 10
- };
- $(function () {
- $("#tableTool").css("min-height", "40px");
- $("#KeyWords-9").val("false").select2();
- $("#Tool1").append(
- //'<div class="tool-radio"><input name="proType" type="radio" id="allProduction" checked value=""/><label for="allProduction">全部</label></div>' +
- '<div class="tool-radio"><input name="packType" type="radio" id="sProduct" checked value="1"/><label for="sProduct">半成品包装</label></div>' +
- '<div class="tool-radio"><input name="packType" type="radio" id="fProduct" value="2"/><label for="fProduct">成品包装</label></div>');
- $(".tool-radio input[type='radio']").on('click', function (e) {
- document.getElementById("SearchForm").reset();
- GetSearchList();
- RefreshTable();
- });
- LoadTable();
- $("#KeyWords-5").datetimepicker(datePickerOpt);
- $("#KeyWords-6").datetimepicker(datePickerOpt);
- });
- function GetSearchList() {
- var count = $("#SearchForm").find(".KeyWords").length;
- window._searchList = [];
- var packType = $('input[name="packType"]:checked').val();
- if (packType) {
- window._searchList.push({ KeyWords: packType, KeyField: "PackType", FieldType: "1", ExpType: "0" });
- }
- for (var i = 1; i <= count; i++) {
- var keyWords = $("#KeyWords-" + i).val();
- if (keyWords) {
- var keyField = $("#KeyField-" + i).val();
- var fieldType = $("#FieldType-" + i).val();
- var expType = $("#ExpType-" + i).val();
- _searchList.push({
- KeyWords: keyWords,
- KeyField: keyField,
- FieldType: fieldType,
- ExpType: expType
- });
- }
- }
- }
- </script>
- <script>
- function ProcessingNumFormatter(v, r) {
- if (v === 0) {
- //return '<span class="label label-info">' + v+ '</span>';
- return '';
- } else {
- return '<span class="label label-danger">待处理:' + v + '</span>';
- }
- }
- function PackageProductNoFormatter(v, r) {
- var packType = $('input[name="packType"]:checked').val();
- if (packType === "1") {
- return '<span class="label label-info">' + r.semiProductNo + '</span>';
- } else {
- return '<span class="label label-danger">' + r.productNo + '</span>';
- }
- }
- function ApplyStatusFormatter(v, r) {
- if (r.isClose) {
- return '<span class="label label-primary">已结束</span>';
- }
- var name = $("#hide-ApplyStatus option[value='" + v + "']").text();
- 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-danger">' + name + '</span>';
- }
- return '<span class="label label-info">' + name + '</span>';
- }
- </script>
- }
|