From 38fdd52dedd4995f3af5439f745bdc13a501bae4 Mon Sep 17 00:00:00 2001 From: lilili Date: Mon, 19 Jun 2023 17:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B7=A5=E5=8D=95=E9=A2=86?= =?UTF-8?q?=E6=96=99=E6=8E=92=E5=BA=8F=E5=92=8C=E6=A3=80=E9=AA=8C=E5=90=88?= =?UTF-8?q?=E6=A0=BC=E5=8D=95=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/PickMaterial/ICSMOPickMerge.cshtml | 206 ++++++++++++------ .../WMSCreateItemLot/CreateItemLot.cshtml | 4 +- 2 files changed, 142 insertions(+), 68 deletions(-) diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml index 3422d7e..14e1575 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -227,73 +227,147 @@ CreateDate: $("#txt_CreateDate").val(), NeedDate: $("#txt_NeedDate").val() } - $gridList.dataGrid({ - //url: "/WMS/PickMaterial/GetGridJson?Type=" + Type + "&" + Math.random(), - //postData: { queryJson: JSON.stringify(queryJson) }, - url: "/WMS/PickMaterial/GetGridJson?" + Math.random(), - postData: { queryJson: JSON.stringify(queryJson), Type: Type }, - height: 280, - //async: false,//取消异步请求 - width: $(window).width() - 500, - colModel: _Clos, - //colModel: [ - // { label: "主键", name: "ID", hidden: true, key: true }, - // { label: '单据号', name: 'Code', width: 120, align: 'left' }, - // { label: '操作日期', name: 'MTIME', width: 150, align: 'left' }, - // { label: '维护人', name: 'MUSER', width: 80, align: 'left' }, - // { label: '维护人名称', name: 'MUSERName', width: 80, align: 'left' }, - // { label: '是否合并拣料', name: 'IsNew', width: 80, align: 'left' }, - //], - shrinkToFit: false,//宽度自适应 - autowidth: true, - gridComplete: function () { - - var strIds = $("#gridList").jqGrid("getDataIDs"); - - for (var i = 0; i < strIds.length; i++) { - var strValue = $("#gridList").jqGrid("getCell", strIds[i], "IsOccupy");//得到单元格数据 - if (strValue == "已占料") { - $("#" + strIds[i]).find("td").css("background-color", "yellow"); + if (Type == 2) + { + $gridList.dataGrid({ + //url: "/WMS/PickMaterial/GetGridJson?Type=" + Type + "&" + Math.random(), + //postData: { queryJson: JSON.stringify(queryJson) }, + url: "/WMS/PickMaterial/GetGridJson?" + Math.random(), + postData: { queryJson: JSON.stringify(queryJson), Type: Type }, + height: 280, + //async: false,//取消异步请求 + width: $(window).width() - 500, + colModel: _Clos, + //colModel: [ + // { label: "主键", name: "ID", hidden: true, key: true }, + // { label: '单据号', name: 'Code', width: 120, align: 'left' }, + // { label: '操作日期', name: 'MTIME', width: 150, align: 'left' }, + // { label: '维护人', name: 'MUSER', width: 80, align: 'left' }, + // { label: '维护人名称', name: 'MUSERName', width: 80, align: 'left' }, + // { label: '是否合并拣料', name: 'IsNew', width: 80, align: 'left' }, + //], + shrinkToFit: false,//宽度自适应 + autowidth: true, + gridComplete: function () { + + var strIds = $("#gridList").jqGrid("getDataIDs"); + + for (var i = 0; i < strIds.length; i++) { + var strValue = $("#gridList").jqGrid("getCell", strIds[i], "IsOccupy");//得到单元格数据 + if (strValue == "已占料") { + $("#" + strIds[i]).find("td").css("background-color", "yellow"); + } } - } - }, - //onLoadComplete: function(data) { - // // 设置行选中 - // var PickID = $("#PickID").val(); - // if (PickID != '') { - // var PickID = PickID.split(','); - // for (var i = 0; i < PickID.length; i++) { - // //$("#gridList").jqGrid('setSelection', PickID[i]); - // // $("#gridList").jqGrid('setSelection', PickID[i]); - // $('#gridList').jqGrid('setSelectionState', PickID[i], true); - // // $('#gridList').jqGrid('setSelectionState', '17140e8d-5c4d-4f29-9913-5efc256f6e7f', true); - - // } - // } - //}, - rowNum: 20, - autoScroll: true, - sortname: 'Code', - sortorder: "desc", - viewrecords: true, - multiselect: true, - pager: "#gridPager", - - subGrid: true, // (1)开启子表格支持 - - subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 - $("#gridList").jqGrid("setSelection", rowid, false); - bindSubGrid(subgrid_id, rowid) - }, - //loadComplete: function () { - // var ids = $gridList.getDataIDs(); - // for (var i = 0; i < ids.length; i++) { - // var rowData = $gridList.getRowData(ids[i]); - // if (rowData['Status'] == '未配料') - // $('#' + ids[i]).css("color", "red"); - // } - //} - }); + }, + //onLoadComplete: function(data) { + // // 设置行选中 + // var PickID = $("#PickID").val(); + // if (PickID != '') { + // var PickID = PickID.split(','); + // for (var i = 0; i < PickID.length; i++) { + // //$("#gridList").jqGrid('setSelection', PickID[i]); + // // $("#gridList").jqGrid('setSelection', PickID[i]); + // $('#gridList').jqGrid('setSelectionState', PickID[i], true); + // // $('#gridList').jqGrid('setSelectionState', '17140e8d-5c4d-4f29-9913-5efc256f6e7f', true); + + // } + // } + //}, + rowNum: 20, + autoScroll: true, + sortname: 'NeedDate', + sortorder: "asc", + viewrecords: true, + multiselect: true, + pager: "#gridPager", + + subGrid: true, // (1)开启子表格支持 + + subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 + $("#gridList").jqGrid("setSelection", rowid, false); + bindSubGrid(subgrid_id, rowid) + }, + //loadComplete: function () { + // var ids = $gridList.getDataIDs(); + // for (var i = 0; i < ids.length; i++) { + // var rowData = $gridList.getRowData(ids[i]); + // if (rowData['Status'] == '未配料') + // $('#' + ids[i]).css("color", "red"); + // } + //} + }); + } + else + { + $gridList.dataGrid({ + //url: "/WMS/PickMaterial/GetGridJson?Type=" + Type + "&" + Math.random(), + //postData: { queryJson: JSON.stringify(queryJson) }, + url: "/WMS/PickMaterial/GetGridJson?" + Math.random(), + postData: { queryJson: JSON.stringify(queryJson), Type: Type }, + height: 280, + //async: false,//取消异步请求 + width: $(window).width() - 500, + colModel: _Clos, + //colModel: [ + // { label: "主键", name: "ID", hidden: true, key: true }, + // { label: '单据号', name: 'Code', width: 120, align: 'left' }, + // { label: '操作日期', name: 'MTIME', width: 150, align: 'left' }, + // { label: '维护人', name: 'MUSER', width: 80, align: 'left' }, + // { label: '维护人名称', name: 'MUSERName', width: 80, align: 'left' }, + // { label: '是否合并拣料', name: 'IsNew', width: 80, align: 'left' }, + //], + shrinkToFit: false,//宽度自适应 + autowidth: true, + gridComplete: function () { + + var strIds = $("#gridList").jqGrid("getDataIDs"); + + for (var i = 0; i < strIds.length; i++) { + var strValue = $("#gridList").jqGrid("getCell", strIds[i], "IsOccupy");//得到单元格数据 + if (strValue == "已占料") { + $("#" + strIds[i]).find("td").css("background-color", "yellow"); + } + } + }, + //onLoadComplete: function(data) { + // // 设置行选中 + // var PickID = $("#PickID").val(); + // if (PickID != '') { + // var PickID = PickID.split(','); + // for (var i = 0; i < PickID.length; i++) { + // //$("#gridList").jqGrid('setSelection', PickID[i]); + // // $("#gridList").jqGrid('setSelection', PickID[i]); + // $('#gridList').jqGrid('setSelectionState', PickID[i], true); + // // $('#gridList').jqGrid('setSelectionState', '17140e8d-5c4d-4f29-9913-5efc256f6e7f', true); + + // } + // } + //}, + rowNum: 20, + autoScroll: true, + sortname: 'Code', + sortorder: "desc", + viewrecords: true, + multiselect: true, + pager: "#gridPager", + + subGrid: true, // (1)开启子表格支持 + + subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 + $("#gridList").jqGrid("setSelection", rowid, false); + bindSubGrid(subgrid_id, rowid) + }, + //loadComplete: function () { + // var ids = $gridList.getDataIDs(); + // for (var i = 0; i < ids.length; i++) { + // var rowData = $gridList.getRowData(ids[i]); + // if (rowData['Status'] == '未配料') + // $('#' + ids[i]).css("color", "red"); + // } + //} + }); + } + function bindSubGrid(subgrid_id, rowid) { diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml index 8736624..3fd6132 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml @@ -1629,8 +1629,8 @@ gridComplete: function () { }, pager: "#gridPager", - sortname: 'DNCode', - sortorder: "desc", + sortname: 'ModificationDate', + sortorder: "asc", viewrecords: true, multiselect: true, beforeSelectRow: function (rowid, e) {