| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- @using ShwasherSys.Authorization.Permissions
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Models.Modal
- @{
- /**/
- ViewBag.ActiveMenu = PermissionNames.PagesProductInspectProductItemInspectMg; //The menu item will be active for this page.
- ViewBag.Title = "半成品入库检验";
- List<SelectListItem> semiApplyStatus = ViewBag.SemiApplyStatus;
- List<SelectListItem> storeHouses = ViewBag.StoreHouses;
- var searchForm = new SearchFormViewModal(new List<SearchItem>()
- {
- new SearchItem("productionOrderNo","排产单号"),
- new SearchItem("semiProductName","半成品名称"),
- new SearchItem("model","规格"),
- new SearchItem("material","材质"),
- new SearchItem("surfaceColor","表色"),
- new SearchItem("semiProductNo","半成品编码").SetSearchIcon("query_semiProduct_modal"),
- new SearchItem("partNo","零件号"),
-
- }, false);
- }
- <section style="display: none">
- @Html.DropDownList("hide-ApplyStatus", semiApplyStatus)
- @Html.DropDownList("hide-StoreHouses", storeHouses)
- </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/ProductInspect/GetSemiEnterStoreCheck"
- 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="semiProductName">名称</th>
- <th data-align="center" data-field="model">规格</th>
- <th data-align="center" data-field="semiProductNo">半成品编码</th>
- <th data-align="center" data-field="quantity">申请入库数量(kg)</th>
- <th data-align="center" data-field="actualQuantity" data-formatter="QuantityFormatte">入库数量(kg)</th>
- <th data-align="center" data-field="applyStatus" data-formatter="ApplyStatusFormatter">申请状态</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="surfaceColor">表色</th>
- <th data-align="center" data-field="rigidity">硬度</th>
- <th data-align="center" data-field="material">材质</th>
- <th data-align="center" data-field="kgWeight">千件重</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("createSourceType", hide:true),
- new InputViewModel("actualQuantity", displayName:"确认入库数量(kg)",@class:"number",other:"min=0.001"),
- new InputViewModel("kgWeight", displayName:"千件重)",@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/_SemiProduct", "KeyWords-6")
- @Html.Partial("Modals/Query/_UnqualifiedProduct", "")
- }
- @section scripts
- {
- <script type="text/javascript">
- $(function () {
-
- //show完毕前执行
- LoadTable();
- var funs = window.funs || { none: function () { console.log("No type"); } };
- funs["btnCheck"] = function (url) {
- var row = config.table.bootstrapTable("getSelections")[0];
- if (row) {
- abp.message.confirm("确认通过入库检验?", "通过检验", function () {
- SaveAjax({ url: url, data: { Id: row.id }, isValidate: false });
- });
- } else
- abp.message.warn(abp.localization.localize("ChooseOneToOp"));
- }
- funs["btnUnCheck"] = function (url) {
- var row = config.table.bootstrapTable("getSelections")[0];
- if (row) {
- abp.message.confirm("确认入库检验不合格?", "拒绝通过检验", function () {
- SaveAjax({ url: url, data: { Id: row.id }, isValidate: false });
- });
- } else
- abp.message.warn(abp.localization.localize("ChooseOneToOp"));
- }
- funs["btnShowUnqualified"] = function(url) {
- ShowModal("query_UnqualifiedProduct_modal");
- }
- });
- 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) {
- var name = $("#hide-StoreHouses option[value='" + v + "']").text();
- return '<span class="label label-primary">' + name + '</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 === "4") {
- return '<span class="label label-info">' + name + '</span>';
- }else if (v === "42") {
- return '<span class="label label-danger">' + name + '</span>';
- }
- return '<span class="label label-info">' + name + '</span>';
- }
-
- </script>
- }
|