|
|
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Index.cshtml"; } <style> .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td { overflow: inherit; word-wrap: break-word; }
.ui-jqgrid tr.jqgrow td { white-space: normal !important; height: auto; } </style> <link href="~/Content/js/select2/select2.min.css" rel="stylesheet" /> <link href="~/Content/css/bootstrap/bootstrap-select.css" rel="stylesheet" /> <script src="~/Content/js/datepicker/WdatePicker.js"></script> <script src="~/Content/js/bootstrap/bootstrap-select.js"></script> <script src="~/Content/js/select2/select2.min.js"></script> <script src="~/Content/js/layer/layer.js"></script>
<script> debugger; var Type = $.request("Type"); var _Clos = new Array();
$(function () { SetCols(Type);
//来料检验 if (Type == '1') { gridList(); } //委外来料检验 if (Type == '3') { gridList2(); } //产成品检验 if (Type == '2') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList3(); } //其他入库 if (Type == '4') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList4(); } //生产退料 if (Type == '5') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList5(); } //委外退料 if (Type == '6') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList6(); } //销售退货 if (Type == '7') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList7(); } //采购到货单检验 if (Type == '8') { $(".HideTxt").css('display', 'none'); gridList8(); } //委外采购到货单检验 if (Type == '9') { $(".HideTxt").css('display', 'none'); gridList9(); } })
function SetCols(Type) { $.ajax({ url: "/Print/SelectColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { var cols = new Array();
//来料检验 if (Type == '1') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast);
var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '送货单号', name: 'ASNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '采购订单号', name: 'POCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px" onchange=\"ChangeA('+"'" + rowObject.ID.toString() + "'"+')\" >'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px" onchange=\"ChangeB(' + "'" + rowObject.ID.toString() + "'" + ')\" >'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSInspection") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //委外来料检验 if (Type == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '委外到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '委外送货单号', name: 'OASNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSODeliveryNotice") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //产成品检验 if (Type == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '工单单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSMO") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //其他入库 if (Type == '4') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '杂收单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSOtherIn") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //生产退料 if (Type == '5') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '退料申请单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSMOApplyNeg") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //委外退料 if (Type == '6') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '委外退料申请单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSOApplyNeg") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } //销售退货 if (Type == '7') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '销售退货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSSDN") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } if (Type == '8') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast);
var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSInspection") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } if (Type == '9') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'ID', name: 'ID', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '检验ID', name: 'JYID', hidden: true }; cols.push(collast); var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; cols.push(collast); var collast = { label: '委外到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); //var collast = { label: '委外送货单号', name: 'OASNCode', width: 120, align: 'left' }; //cols.push(collast); //var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' }; //cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '箱号', name: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '总数量', name: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不合格数量', name: 'NLOTQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '不良代码值', name: 'BCCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良代码', name: 'BadDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { debugger; var html = ""; html += ' <select id="SelBC_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '不良原因值', name: 'BRCodeValue', hidden: true }; cols.push(collast); var collast = { label: '不良原因', name: 'BadReasonDesc', width: 120, align: 'left', sortable: false, formatter: function (cellvalue, options, rowObject) { var html = ""; html += ' <select id="SelBR_' + rowObject.ID.toString() + '" data-live-search ="true" Title=\"""\" class="selectpicker" data-width="85px">'; html += ' </select>'; return cellvalue = html; } }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; cols.push(collast); //var collast = { // label: '检验文件', name: 'FileName', width: 150, align: 'left', // formatter: function (cellvalue, options, rowObject) { // var html = ""; // if (cellvalue != "" && cellvalue != null) { // html = " <a href='../../../File/InspectionFile/" + cellvalue + "' download='" + cellvalue + "' style='color:blue;'>" + cellvalue + "</a>"; // } // return html; // } //}; //cols.push(collast); var collast = { label: '检验人', name: 'Surveyor', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验时间', name: 'ProvingTime', width: 150, align: 'left' }; cols.push(collast); $.ajax({ url: "/Print/SelectTableColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var TableCode = data[i].TableCode; if (TableCode == "ICSODeliveryNotice") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); } if (TableCode == "ICSInventory") { var Code = data[i].Code; var Name = data[i].Name; var obj = new Array(); obj = { label: Name, name: Code, width: 80, align: "left" } cols.push(obj); //cols1.push(obj); } } } _Closs = cols; //_Clos1 = cols1; }
}); } if (data != null && data.length > 0) { DateList = data; for (var i = 0; i < data.length; i++) { var ColName = data[i].ColName; var ColCode = data[i].ColCode; var obj = new Array(); obj = { label: ColName, name: ColCode, width: 80, align: "left" } cols.push(obj); } } _Clos = cols; } }); }
function gridList() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), TimeFrom: $("#TimeFrom").val(), TimeArrive: $("#TimeArrive").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), TimeFrom: $("#TimeFrom").val(), TimeArrive: $("#TimeArrive").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
function gridList2() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), TimeFrom: $("#TimeFrom").val(), TimeArrive: $("#TimeArrive").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection2" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
},
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); } if (cellname === 'BadReasonDesc') { $gridList.jqGrid("setCell", rowid, 'BRCodeValue', value); } if (cellname === 'BadDesc') { $gridList.jqGrid("setCell", rowid, 'BCCodeValue', value); } },
}); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), TimeFrom: $("#TimeFrom").val(), TimeArrive: $("#TimeArrive").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
function gridList3() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection3" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); } },
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); } if (cellname === 'BadReasonDesc') { $gridList.jqGrid("setCell", rowid, 'BRCodeValue', value); } if (cellname === 'BadDesc') { $gridList.jqGrid("setCell", rowid, 'BCCodeValue', value); } }, });
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function gridList4() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection4" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
function gridList5() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection5" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
function gridList6() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection6" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
function gridList7() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection7" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), ASNCode: $("#txt_ASNCode").val(), CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); } function gridList8() {
var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), //ASNCode: $("#txt_ASNCode").val(), //CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection8" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos,
cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); }
},
});
$("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), //ASNCode: $("#txt_ASNCode").val(), //CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); } function gridList9() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), //ASNCode: $("#txt_ASNCode").val(), //CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.dataGrid({ url: "/WMS/ICSRCVIQCs/GetICSInspection9" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, cellEdit: true, colModel: _Clos, cellsubmit: "clientArray", shrinkToFit: false,//宽度自适应 autoWidth: true, gridComplete: function () { debugger; //设置select var RowDatas = $("#gridList").jqGrid('getDataIDs'); for (var j = 0; j < RowDatas.length; j++) { var InvCode = $("#gridList").jqGrid("getCell", RowDatas[j], "InvCode"); var ID = $("#gridList").jqGrid("getCell", RowDatas[j], "ID"); var BCCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BCCodeValue"); var BRCodeValue = $("#gridList").jqGrid("getCell", RowDatas[j], "BRCodeValue"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); }
},
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, subGrid: false, // (1)开启子表格支持 afterSaveCell: function (rowid, cellname, value) { debugger; //总扣分数加其他扣分数 if (cellname === 'YLOTQTY') { var YLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(YLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'NLOTQTY', str); } if (cellname === 'NLOTQTY') { var NLOTQTY = value; var AllNumber = $gridList.jqGrid("getCell", rowid, 'AllNumber'); var str = Math.round((parseFloat(AllNumber) - parseFloat(NLOTQTY)) * 10) / 10; $gridList.jqGrid("setCell", rowid, 'YLOTQTY', str); } if (cellname === 'BadReasonDesc') { $gridList.jqGrid("setCell", rowid, 'BRCodeValue', value); } if (cellname === 'BadDesc') { $gridList.jqGrid("setCell", rowid, 'BCCodeValue', value); } },
}); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), //ASNCode: $("#txt_ASNCode").val(), //CaiGouCode: $("#txt_CaiGouCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), ReleaseState: $("#selShow").val(), selEnableShow: $("#selEnableShow").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); }); }
//不良组改变事件 function ChangeA(ID) { debugger; var str = ""; var BCCode = $("#SelBC_" + ID + "").val(); $.ajax({ url: "/WMS/ICSRCVIQCs/Select_ChangeA?BCCode=" + BCCode + "&" + Math.random(), dataType: "json", async: false, async: false, success: function (data) { if (data != null && data.length > 0) { $("#SelBR_" + ID + "").selectpicker('destroy'); $("#SelBR_" + ID + "").find("option").remove(); for (var i = 0; i < data.length; i++) { $("#SelBR_" + ID + "").append("<option value='" + data[i].BadReasonCode + "'>" + data[i].BadReasonDesc + "</option>"); } $("#SelBR_" + ID + "").selectpicker(); } } }); }
//不良原因改变事件 function ChangeB(ID) { var str = ""; var BRCode = $("#SelBR_" + ID + "").val(); var aaa = ''; $.ajax({ url: "/WMS/ICSRCVIQCs/Select_ChangeB?BRCode=" + BRCode + "&" + Math.random(), dataType: "json", async: false, async: false, success: function (data) { aaa = data[0].BRGCode; } }); $("#SelBC_" + ID + "").selectpicker('refresh'); $("#SelBC_" + ID + "").selectpicker('val', aaa); }
//获取不良原因 function GetSelectPerson(InvCode, ID, BRCodeValue) { var str = ""; var BCCode= $("#SelBC_" + ID + "").val(); $.ajax({ url: "/WMS/ICSRCVIQCs/Select_ICSBadReason?BCCode=" + BCCode + "&" + Math.random(), dataType: "json", async: false, async: false, success: function (data) { if (data != null && data.length > 0) { $("#SelBR_" + ID + "").find("option").remove(); for (var i = 0; i < data.length; i++) { $("#SelBR_" + ID + "").append("<option value='" + data[i].BadReasonCode + "'>" + data[i].BadReasonDesc + "</option>"); } } } });
$("#SelBR_" + ID + "").selectpicker('refresh'); $("#SelBR_" + ID + "").selectpicker('val', BRCodeValue);
}
function GetSelectICSBadCode(InvCode, ID, BCCodeValue) { var str = ""; var BRCode = $("#SelBR_" + ID + "").val(); $.ajax({ url: "/WMS/ICSRCVIQCs/GetSelectICSBadCode?BRCode=" + BRCode + "&" + Math.random(), dataType: "json", async: false, async: false, success: function (data) { if (data != null && data.length > 0) { $("#SelBC_" + ID + "").find("option").remove(); for (var i = 0; i < data.length; i++) { $("#SelBC_" + ID + "").append("<option value='" + data[i].BRGCode + "'>" + data[i].BRGDesc + "</option>"); }
} } }); $("#SelBC_" + ID + "").selectpicker('refresh'); $("#SelBC_" + ID + "").selectpicker('val', BCCodeValue);
}
function btnSave() { debugger; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00004"); return; } var IDlist = ""; var ICSInspection = []; var flag = ''; for (var i = 0; i < ids.length; i++) { var rowData = $("#gridList").jqGrid('getRowData', ids[i]); IDlist += "'" + rowData.ID + "',";
if (rowData.NLOTQTY > 0) { if ($("#SelBC_" + rowData.ID + "").val() == '' || $("#SelBR_" + rowData.ID + "").val() == '') { $.modalAlertNew("WMS00081"); return; }
} if (rowData.TestState=='已检验') { $.modalAlert("该条码已检验,请勿重复检验!"); return; } if (rowData.YLOTQTY < 0 || rowData.NLOTQTY < 0) { $.modalAlertNew("WMS00082"); return; } if (rowData.SpecialQTY > rowData.NLOTQTY) { $.modalAlertNew("WMS00083"); return; } var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 SpecialQTY: rowData.SpecialQTY,//特采数量 SampleQuantity: rowData.SampleQuantity,//特采数量 LotNo: rowData.LotNo,//条码 InvCode: rowData.InvCode,//物料编码 BCCode: $("#SelBC_" + rowData.ID + "").val(),//不良代码 BRCode: $("#SelBR_" + rowData.ID + "").val(),//不良原因 Type: Type, TestState: rowData.TestState, JYID: rowData.JYID } ICSInspection.push(obj); } $.modalConfirm("确定保存吗?", function (r) { if (r) { $.submitForm({ url: "/WMS/ICSRCVIQCs/CreateICSInspection" + "?" + Math.random(), param: { keyValue: IDlist, ICSInspections: JSON.stringify(ICSInspection) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); }
function btnLook(cellvalue, options, rowObject) { return cellvalue = "<a class=\"btn btn-info dropdown-text\" onclick=\"SeachClick('" + rowObject.InvCode + "','" + rowObject.JYID + "','" + rowObject.SampleQuantity + "','" + rowObject.Result + "')\">查看</ a><a class=\"btn btn-info dropdown-text\" onclick=\"UpLoadFiles('" + rowObject.JYID + "','" + rowObject.DNCode + "')\">上传</ a><a class=\"btn btn-info dropdown-text\" onclick=\"LookFiles('" + rowObject.JYID + "','" + rowObject.DNCode + "')\">文件查看</ a>"; } //查看 function SeachClick(InvCode, JYID, SampleQuantity, Result) { debugger; if (JYID == '') { $.modalAlertNew("WMS00104"); return; } if (Result == "") { $.modalOpen({ id: "CheckInfo", title: "查看信息", url: "/WMS/ICSRCVIQCs/ICSInspectionDetail?InvCode=" + encodeURI(encodeURI(InvCode)) + "&JYID=" + encodeURI(encodeURI(JYID)) + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&Result=" + encodeURI(encodeURI(Result)), width: "1000px", height: "400px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpenClean({ id: "CheckInfo", title: "查看信息", url: "/WMS/ICSRCVIQCs/ICSInspectionDetail?InvCode=" + encodeURI(encodeURI(InvCode)) + "&JYID=" + encodeURI(encodeURI(JYID)) + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&Result=" + encodeURI(encodeURI(Result)), width: "1000px", height: "400px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } function LookFiles(JYID) { debugger; $.modalOpenClean({ id: "CheckInfo", title: "查看信息", url: "/WMS/ICSRCVIQCs/ICSLookFiles?JYID=" + encodeURI(encodeURI(JYID)), width: "1000px", height: "400px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
//触发上传文件控件 function UpLoadFiles(JYID, DNCode) { $("#FileUpBYRZ").click(); $("#FileUpBYRZID").val(JYID); $("#FileUpBYRZDNCode").val(DNCode); } //上传文件 function UpLoadFile(fileinfo) { debugger; var fileName = ''; var files = fileinfo.files; var ID = $("#FileUpBYRZID").val(); var DNCode = $("#FileUpBYRZDNCode").val(); for (var i = 0; i < files.length; i++) { fileName += "" + files[i].name + ""; if (fileName != null && fileName != "") { var data = new FormData(); jQuery.each(jQuery('#FileUpBYRZ')[0].files, function (i, file) { data.append('file-' + i, file); }); $.ajax({ url: "/WMS/ICSRCVIQCs/UpLoadFileImport" + "?" + Math.random() + "&ID=" + ID + "&DNCode=" + DNCode, type: "post", data: data, dataType: "json", contentType: false, processData: false, success: function (data) { if (data.state == "success") { $.currentWindow().$("#gridListVENDORCERTIFICATE").trigger("reloadGrid"); $.modalMsg(data.message, data.state); } else { $.modalAlert(data.message, data.state); }
}
}); } debugger; document.getElementById("FileUpBYRZ").value = ""; } }
//退回 function btnSendBack() { debugger; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00004"); return; } var IDlist = ""; var selShow = $("#selShow").val(); if (selShow != '1') { $.modalAlertNew("WMS00084"); return; } for (var i = 0; i < ids.length; i++) { var rowData = $("#gridList").jqGrid('getRowData', ids[i]); if (rowData.AllNumber == rowData.YLOTQTY) { $.modalAlertNew("WMS00085", rowData.LotNo); return; } IDlist += "'" + rowData.LotNo + "',"; } $.modalConfirm("确定退回吗?", function (r) { if (r) { $.submitForm({ url: "/WMS/ICSRCVIQCs/CreateRejection?Type=" + Type + "&" + Math.random(), param: { keyValue: IDlist }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); }
</script>
<div class="topPanel" style="height:100px"> <div class="toolbar"> <div class="btn-group"> <a id="NF-Create" authorize="yes" class="btn btn-primary" onclick="btnSave()"><i class="fa fa-pencil-square-o"></i>保存检验结果</a> <a id="NF-update" authorize="yes" class="btn btn-primary" onclick="btnSendBack()"><i class="fa fa-pencil-square-o"></i>生成拒收单</a> @*<a id="NF-Delete" authorize="yes" class="btn btn-primary" onclick="btn_Delete()"><i class="fa fa-trash-o"></i>删除</a>*@ <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a> <input id='FileUpBYRZ' type='file' style="display: none" onchange="UpLoadFile(this)" multiple="multiple" /> <input id="FileUpBYRZID" hidden="hidden"> <input id="FileUpBYRZDNCode" hidden="hidden"> </div> </div> <div class="search"> <table> <tr> <td style="text-align:right;"><label class="lglabel" for="txt_POCode"> 单据号</label>:</td> <td> <div class="input-group"> <input id="txt_POCode" type="text" class="form-control" style="width: 105px;"> </div> </td>
<td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="txt_ASNCode"> 送货单号</label>:</td> <td> <div class="input-group HideTxt"> <input id="txt_ASNCode" type="text" class="form-control HideTxt" style="width: 105px;"> </div> </td>
<td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="txt_CaiGouCode"> 采购订单号</label>:</td> <td> <div class="input-group"> <input id="txt_CaiGouCode" type="text" class="form-control HideTxt" style="width: 105px;"> </div> </td> <td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="txt_VenCode "> 供应商代码</label>:</td> <td> <div class="input-group HideTxt"> <input id="txt_VenCode" type="text" class="form-control HideTxt" style="width: 105px;"> </div> </td>
<td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="txt_VenName"> 供应商名称</label>:</td> <td> <div class="input-group HideTxt"> <input id="txt_VenName" type="text" class="form-control HideTxt" style="width: 105px;"> </div> </td>
<td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="TimeFrom "> 到货日期(从)</label>:</td> <td> <div class="input-group HideTxt"> <input id="TimeFrom" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" placeholder="日期(从)" /> </div> </td>
<td class="HideTxt" style="text-align:right;"><label class="lglabel HideTxt" for="TimeArrive"> 到货日期(到)</label>:</td> <td> <div class="input-group HideTxt"> <input id="TimeArrive" name="Time" type="text" class="form-control required" style="width:80px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd'})" placeholder="日期(到)" /> </div> </td> </tr> <tr> <td style="text-align:right;"><label class="lglabel" for="txt_InvCode"> 料品编码</label>:</td> <td> <div class="input-group"> <input id="txt_InvCode" type="text" class="form-control" style="width: 105px;"> </div> </td>
<td style="text-align:right;"><label class="lglabel" for="txt_InvName"> 料品名称</label>:</td> <td> <div class="input-group"> <input id="txt_InvName" type="text" class="form-control" style="width: 105px;"> </div> </td>
<td style="text-align:right;"><label class="lglabel" for="txt_BatchCode"> 批次号</label>:</td> <td> <div class="input-group"> <input id="txt_BatchCode" type="text" class="form-control" style="width: 105px;"> </div> </td>
<td> <label> 单据状态:</label> </td> <td> <div class="input-group"> <select id="selShow" name="F_Target" class="form-control" style="width: 105px;"> <option value="2">显示全部</option> <option value="1">已检验</option> <option value="0" selected="selected">未检验</option> </select> </div> </td> <td> <label> 是否合格:</label> </td> <td> <div class="input-group"> <select id="selEnableShow" name="F_Enable" class="form-control" style="width: 105px;"> <option value="1" selected="selected">是</option> <option value="0" >否</option> </select> </div> </td> <td> <span class="input-group-btn"> <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button> </span> </td>
</tr>
</table> </div> </div> <div class="gridPanel" id="gridPanel"> <table id="gridList"></table> <div id="gridPager"></div> </div>
|