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) {