You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

64 lines
2.1 KiB

@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
.td {
padding: 0 5px 0 5px;
}
</style>
<script>
var InvCode = decodeURI($.request("InvCode"));
var JYID = decodeURI($.request("JYID"));
$(function () {
gridList();
})
function gridList() {
var $gridList = $("#gridList");
$gridList.dataGrid({
url: "/WMS/ICSRCVIQCs/GetDeleteRulesDetail" + "?" + Math.random() + "&InvCode=" + InvCode + "&JYID=" + JYID,
height: $(window).height() - 120,
width: $(window).width() - 180,
colModel: [
{ label: "主键", name: "ID", hidden: true, key: true },
{ label: '检验ID', name: 'inspectionID', hidden: true },
{ label: '条码', name: 'lotNO', width: 240, align: 'left' },
{ label: '物料名称', name: 'Invcode', width: 150, align: 'left' },
{ label: "实际值", name: "SetValue", width: 150, align: 'left' },
],
sortname: 'SetValue',
shrinkToFit: true,//宽度自适应
pager: "#gridPager",
//sortname: 'ID',
viewrecords: true,
multiselect: true,
rowNum: 200
});
}
//提交
function submitForm() {
var DetailID = "";
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
for (var i = 0; i < objList.length; i++) {
var rowId = objList[i];
var rowData = $("#gridList").jqGrid('getRowData', rowId);
DetailID += "'" + rowData.ID + "',";
}
$.submitForm({
url: "/WMS/ICSRCVIQCs/DeleteICSInspection" + "?" + Math.random(),
param: { DetailID: JSON.stringify(DetailID)},
success: function () {
$.currentWindow().$("#gridList").trigger("reloadGrid");
}
})
}
</script>
<form id="form1">
<div class="gridPanel">
<table id="gridList"></table>
<div id="gridPager"></div>
</div>
</form>