|
|
@{ 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(); var mold = $.request("mold"); var FlagVersion = '1'; $(function () { //Modify on 20240126 来料检验、委外检验、其他入库检验: // 1、增加列:是否首次检验 如果料品第一次检验,显示:是 否则:否; // 2、增加列:是否加急 PDA扫了加急物料,显示:是 否则:否;是加急物料的突出颜色显示 SetCols(Type); //来料检验 if (Type == '1') { gridList(); } //委外来料检验 if (Type == '3') { gridList2(); } //产成品检验 if (Type == '2') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").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'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList5(); } //委外退料 if (Type == '6') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList6(); } //销售退货 if (Type == '7') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList7(); } //采购到货单检验 if (Type == '8') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList8(); } //委外采购到货单检验 if (Type == '9') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList9(); } //连副产品检验 if (Type == '10') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList10(); } //在库检验 if (Type == '11') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-Approve").css('display', 'block'); $("#NF-SecApprove").css('display', 'block'); var selvalue = $("#selEnableShow"); selvalue.val("0"); gridList11(); $("#selShow").append("<option value='3'>已审核</option>"); $("#selShow").append("<option value='4'>已复审</option>"); } $(".search").keydown(function (e) { var curKey = e.which; debugger; if (curKey == 13) { if (Type == '1') { gridList(); } //委外来料检验 if (Type == '3') { gridList2(); } //产成品检验 if (Type == '2') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").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'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList5(); } //委外退料 if (Type == '6') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList6(); } //销售退货 if (Type == '7') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList7(); } //采购到货单检验 if (Type == '8') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList8(); } //委外采购到货单检验 if (Type == '9') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList9(); } //连副产品检验 if (Type == '10') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList10(); } //在库检验 if (Type == '11') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList11(); } } }); }) function SetCols(Type) { $.ajax({ url: "/Print/SelectColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { var cols = new Array();
//来料检验 if (Type == '1') { if (FlagVersion == '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: 'Sequence', name: 'Sequence', 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: 'LotNo', width: 400, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 260, 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: 'Editable', name: 'Editable', width: 100, align: 'left', hidden: 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: '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: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '检验结果', name: 'Result', width: 150, align: 'left' }; 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); var collast = { label: '是否首次检验', name: 'IsFirstCK', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '是否加急', name: 'IsUrgent', width: 100, align: 'left', cellattr: TuChuShow_IsUrgent }; cols.push(collast); var collast = { label: '是否打印', name: 'IsPrint', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '箱号ID', name: 'ContainerID', hidden: true }; cols.push(collast); var collast = { label: '箱号', name: 'ContainerCode', width: 100, align: 'left' }; cols.push(collast);
var collast = { label: '供应商代码', name: 'VenCode', 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; }
}); } else if (FlagVersion == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 260, 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 }, hidden: true }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; 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: 'TestState', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 260, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: 'Editable', name: 'Editable', width: 100, align: 'left', hidden: true }; 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); $.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; }
}); } else if (FlagVersion == '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: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; 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); $.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') { if (FlagVersion == '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: '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: 'AllNumber', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '是否加急', name: 'IsUrgent', width: 100, align: 'left', cellattr: TuChuShow_IsUrgent }; cols.push(collast); var collast = { label: '合格数量', name: 'YLOTQTY', 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: '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: '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: 'LotNo', width: 120, align: 'left' }; 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: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', 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); var collast = { label: '是否首次检验', name: 'IsFirstCK', width: 100, align: 'left' }; cols.push(collast);
var collast = { label: '是否打印', name: 'IsPrint', width: 100, 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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: 'VenCode', 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '到货时间', name: 'CreateDateTime', width: 150, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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: 'VenCode', 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; }
}); } else if (FlagVersion == '4') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '工单单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '工单单号', name: 'DNCode', 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '工单单号', name: 'DNCode', width: 120, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 280, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 400, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 400, 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: 'ContainerID', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '生产时间', name: 'ProductTime', 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); var collast = { label: '是否首次检验', name: 'IsFirstCK', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '是否加急', name: 'IsUrgent', width: 100, align: 'left', cellattr: TuChuShow_IsUrgent }; cols.push(collast); var collast = { label: '是否打印', name: 'IsPrint', width: 100, 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '杂收单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 400, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 400, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '杂收单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 400, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'INVSTD', width: 400, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '杂收单号', name: 'DNCode', width: 120, align: 'left' }; 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 }, hidden: true }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; 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') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '退料申请单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '退料申请单号', name: 'DNCode', 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '退料申请单号', name: 'DNCode', width: 120, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '委外退料申请单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '委外退料申请单号', name: 'DNCode', 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '委外退料申请单号', name: 'DNCode', width: 120, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '销售退货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '销售退货单号', name: 'DNCode', 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '销售退货单号', name: 'DNCode', width: 120, 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 }, hidden: true }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: 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: '到货单号', name: 'DNCode', 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: '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 }, hidden: true }; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '到货单号', name: 'DNCode', width: 120, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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') { if (FlagVersion == '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; cols.push(collast); var collast = { label: '委外到货单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '到货ID', name: 'DHID', hidden: true }; 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: '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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; 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 == '10') { if (FlagVersion == '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: '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: 'BatchCode', width: 100, 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: '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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '工单单号', name: 'DNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '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: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '工单ID', name: 'GDID', hidden: true }; cols.push(collast); var collast = { label: '工单单号', name: 'DNCode', 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: '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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true }; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '工单单号', name: 'DNCode', width: 120, 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 }, hidden: true}; cols.push(collast); var collast = { label: '特采数量', name: 'SpecialQTY', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; cols.push(collast); var collast = { label: '抽样数量', name: 'SampleQuantity', width: 100, align: 'left', editable: true, editrules: { number: true }, hidden: true}; 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 == '11') { if (FlagVersion == '1') { var collast = { label: "主表ID", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '子表ID', name: 'DetailID', hidden: true }; cols.push(collast); //var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; //cols.push(collast); var collast = { label: '检验单号', name: 'DNCode', width: 140, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 200, align: 'left' }; cols.push(collast); var collast = { label: '检验类型', name: 'DocType', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '检验状态', name: 'TestState', width: 100, 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: 400, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', 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: '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: 'ExpirationDate', width: 150, align: 'left', editable: true, editoptions: { dataInit: function (el) { $(el).click(function () { WdatePicker({ dateFmt: "yyyy-MM-dd"//时间显示格式 }); }) } } }; 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 == "ICSInspect") { 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; }
}); } else if (FlagVersion == '2') { var collast = { label: "主表ID", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); var collast = { label: '子表ID', name: 'DetailID', hidden: true }; cols.push(collast); var collast = { label: '检验单号', name: 'DNCode', width: 140, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, 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: 400, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 100, 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 }, hidden: true}; 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 == "ICSInspect") { 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; }
}); } else if (FlagVersion == '3') { var collast = { label: "主表ID", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '子表ID', name: 'DetailID', hidden: true }; cols.push(collast); var collast = { label: 'Sequence', name: 'Sequence', hidden: true }; cols.push(collast); //var collast = { label: '操作', width: 200, align: 'left', formatter: btnLook }; //cols.push(collast); var collast = { label: '检验单号', name: 'DNCode', width: 140, 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: 400, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 100, 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 }, hidden: true }; 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 == "ICSInspect") { 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; }
}); } else if (FlagVersion == '4') { var collast = { label: '检验单号', name: 'DNCode', width: 140, align: 'left' }; 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 }, hidden: true }; 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 == "ICSInspect") { 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() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList = $("#gridList"); debugger; 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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } $gridList.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection?FlagVersion=" + FlagVersion + "&" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 250, 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"); var Editable = $("#gridList").jqGrid("getCell", RowDatas[j], "Editable"); GetSelectICSBadCode(InvCode, ID, BCCodeValue); GetSelectPerson(InvCode, ID, BRCodeValue); if (Editable == "false") { $("#gridList").jqGrid('setCell', RowDatas[j], 'SampleQuantity', '', 'not-editable-cell'); } } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
}, pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, footerrow: 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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); }
function gridList2() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList2 = $("#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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } $gridList2.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection2?FlagVersion=" + FlagVersion + "&" + 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
},
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, footerrow: 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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } //$gridList.jqGrid('setGridParam', { // postData: { queryJson: JSON.stringify(queryJson) }, //}).trigger('reloadGrid'); $gridList2.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); }
function gridList3() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList3 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList3.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection3?FlagVersion=" + FlagVersion + "&" + 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" }); },
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, footerrow: 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(), LotNO: $("#txt_LotNO").val(), } $gridList3.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); });
}
function gridList4() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList4 = $("#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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } $gridList4.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection4?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
}, 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(), LotNO: $("#txt_LotNO").val(), selIsUrgent: $("#selIsUrgent").val(), selIsPrint: $("#selIsPrint").val(), } $gridList4.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); }
function gridList5() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList5 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList5.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection5?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
}, 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(), LotNO: $("#txt_LotNO").val(), } $gridList5.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); }
function gridList6() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList6 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList6.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection6?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" }); }, 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(), LotNO: $("#txt_LotNO").val(), } $gridList6.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); }
function gridList7() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList7 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList7.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection7?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
}, 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(), LotNO: $("#txt_LotNO").val(), } $gridList7.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); } function gridList8() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList8 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList8.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection8?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" }); }, 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(), LotNO: $("#txt_LotNO").val(), } $gridList8.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); } function gridList9() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList9 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList9.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection9?FlagVersion=" + FlagVersion + "&" + 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
},
pager: "#gridPager", sortorder: "desc", sortname: 'DNCode ', viewrecords: true, multiselect: true, footerrow: 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(), LotNO: $("#txt_LotNO").val(), } $gridList9.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); } function gridList10() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList10 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList10.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection10?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
},
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(), LotNO: $("#txt_LotNO").val(), } $gridList10.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); } //在库检验 function gridList11() { document.getElementById("gridPanel").innerHTML = ' <table id="gridList"></table> <div id="gridPager"></div>';//重置grid var $gridList11 = $("#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(), LotNO: $("#txt_LotNO").val(), } $gridList11.dataGrid({ url: "/DHAY/DHICSRCVIQCs/GetICSInspection11?FlagVersion=" + FlagVersion + "&" + 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, footerrow: 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); } var Quantity_total = $(this).getCol('AllNumber', false, 'sum'); var YLOTQTY_total = $(this).getCol('YLOTQTY', false, 'sum'); var NLOTQTY_total = $(this).getCol('NLOTQTY', false, 'sum'); var SpecialQTY_total = $(this).getCol('SpecialQTY', false, 'sum'); var SampleQuantity_total = $(this).getCol('SampleQuantity', false, 'sum'); $(this).footerData('set', { "AllNumber": Quantity_total,//声明需要汇总的列并写自定义函数endMoney_total "YLOTQTY": YLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "NLOTQTY": NLOTQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SpecialQTY": SpecialQTY_total,//声明需要汇总的列并写自定义函数endMoney_total "SampleQuantity": SampleQuantity_total,//声明需要汇总的列并写自定义函数endMoney_total
}); $(this).footerData('set', { "LotNo": "合计:" });
},
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(), LotNO: $("#txt_LotNO").val(), } $gridList11.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid', [{ page: 1 }]); }); } //获取不良原因 function GetSelectPerson(InvCode, ID, BRCodeValue) { var str = ""; $.ajax({ url: "/DHAY/DHICSRCVIQCs/Select_ICSBadReason?InvCode=" + InvCode + "&" + 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 = ""; $.ajax({ url: "/DHAY/DHICSRCVIQCs/GetSelectICSBadCode?InvCode=" + InvCode + "&" + 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].BadCode + "'>" + data[i].BadDesc + "</option>"); }
} } }); $("#SelBC_" + ID + "").selectpicker('refresh'); $("#SelBC_" + ID + "").selectpicker('val', BCCodeValue);
}
function btnSave() { debugger; $("#gridList").find($("td[aria-describedby='gridList_rn']")).click(); var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00004"); return; } var Result = 1; 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 (Type=="11" && rowData.TestState != "未检验") { $.modalAlertNew("WMS00119"); return; } if (rowData.NLOTQTY > 0) { Result = 0; if ($("#SelBC_" + rowData.ID + "").val() == '' || $("#SelBR_" + rowData.ID + "").val() == '') { $.modalAlertNew("WMS00081"); return; }
} else { Result = 1; } if (rowData.YLOTQTY < 0 || rowData.NLOTQTY < 0) { $.modalAlertNew("WMS00082"); return; } if ((rowData.SpecialQTY - 0) > (rowData.NLOTQTY - 0)) { $.modalAlertNew("WMS00083"); return; } if (FlagVersion != '1' && (rowData.AllNumber != rowData.YLOTQTY && rowData.YLOTQTY!=0)) { $.modalAlertNew("WMS00082"); return; } if (Type != 11) { if (FlagVersion == '1') { 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, Result: Result, FlagVersion: FlagVersion, } } else if (FlagVersion == '2') { var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 InvCode: rowData.InvCode,//物料编码 Type: Type, FlagVersion: FlagVersion, BatchCode: rowData.BatchCode, Sequence: rowData.Sequence, DNCode: rowData.DNCode, } } else if (FlagVersion == '3') { var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 InvCode: rowData.InvCode,//物料编码 Type: Type, FlagVersion: FlagVersion, Sequence: rowData.Sequence, DNCode: rowData.DNCode } } else { var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 Type: Type, FlagVersion: FlagVersion, DNCode: rowData.DNCode } } } else { if (FlagVersion == '1') { var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 ExpirationDate: rowData.ExpirationDate,//失效日期 LotNo: rowData.LotNo,//条码 InvCode: rowData.InvCode,//物料编码 BCCode: $("#SelBC_" + rowData.ID + "").val(),//不良代码 BRCode: $("#SelBR_" + rowData.ID + "").val(),//不良原因 Type: Type, TestState: rowData.TestState, DNCode: rowData.DNCode, Result: Result, FlagVersion: FlagVersion, } } else if (FlagVersion == '2') { var obj = { AllNumber: rowData.AllNumber,//总数量 InvCode: rowData.InvCode,//物料编码 Type: Type,//类型 DNCode: rowData.DNCode, BatchCode: rowData.BatchCode, Sequence: rowData.Sequence, FlagVersion: FlagVersion, } } else if (FlagVersion == '3') { var obj = { AllNumber: rowData.AllNumber,//总数量 InvCode: rowData.InvCode,//物料编码 Type: Type, DNCode: rowData.DNCode, Sequence: rowData.Sequence, FlagVersion: FlagVersion, } } else { var obj = { AllNumber: rowData.AllNumber,//总数量 InvCode: rowData.InvCode,//物料编码 Type: Type, DNCode: rowData.DNCode, FlagVersion: FlagVersion, } } } ICSInspection.push(obj); } if (Type != 11) { $.modalConfirm("确定保存吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/DHICSRCVIQCs/CreateICSInspection" + "?" + Math.random(), param: { keyValue: IDlist, ICSInspections: JSON.stringify(ICSInspection) }, success: function () { debugger; if (data.state == "success") { $.currentWindow().$("#gridList").trigger("reloadGrid"); $.modalMsg(data.message, data.state); } else { $.modalAlert(data.message, data.state); } } }) } }); } else { $.modalConfirm("确定保存吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/DHICSRCVIQCs/ICSWHLotInspection" + "?" + Math.random(), param: { keyValue: IDlist, ICSInspections: JSON.stringify(ICSInspection) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); } }
function btnApprove() { debugger; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00004"); return; } var Result = 1; 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.TestState != "已检验") { $.modalAlertNew("WMS00118"); return; } var obj = { LotNo: rowData.LotNo,//条码 InvCode: rowData.InvCode,//物料编码 Type: Type, TestState: rowData.TestState, DNCode: rowData.DNCode, Result: Result } ICSInspection.push(obj); } $.modalConfirm("确定保存吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/DHICSRCVIQCs/ApproveWHLotInspection" + "?" + Math.random(), param: { keyValue: IDlist, ICSInspections: JSON.stringify(ICSInspection) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); }
function btnSecApprove() { debugger; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00004"); return; } var Result = 1; 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.TestState != "已审核") { $.modalAlertNew("WMS00120"); return; } var obj = { AllNumber: rowData.AllNumber,//总数量 YLOTQTY: rowData.YLOTQTY,//合格数量 NLOTQTY: rowData.NLOTQTY,//不合格数量 ExpirationDate: rowData.ExpirationDate,//失效日期 LotNo: rowData.LotNo,//条码 InvCode: rowData.InvCode,//物料编码 BCCode: $("#SelBC_" + rowData.ID + "").val(),//不良代码 BRCode: $("#SelBR_" + rowData.ID + "").val(),//不良原因 Type: Type, TestState: rowData.TestState, DNCode: rowData.DNCode, Result: Result } ICSInspection.push(obj); } $.modalConfirm("确定复审吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/DHICSRCVIQCs/SecApproveWHLotInspection" + "?" + Math.random(), param: { keyValue: IDlist, ICSInspections: JSON.stringify(ICSInspection) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); }
//是否紧急 --字段:是:高亮显示 function TuChuShow_IsUrgent(rowId, val, rawObject, cm, rdata) { if (val == "是") { return "style='color:red'"; } } function btnLook(cellvalue, options, rowObject) { debugger; //var rowData = $("#gridList").jqGrid('getRowData', rowObject.ID); var rowData = $("#gridList").jqGrid('getRowData', rowObject.ID); var BCCode = $("#SelBC_" + rowObject.ID + "").val();//不良代码 var BRCode = $("#SelBR_" + rowObject.ID + "").val();//不良原因
return cellvalue = "<a class=\"btn btn-info dropdown-text\" onclick=\"SeachClick('" + rowObject.InvCode + "','" + rowObject.JYID + "','" + rowObject.ID + "','" + rowObject.Result + "','" + rowObject.LotNo + "')\">查看</ 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, ID, Result, LotNo) { debugger; var rowData = $("#gridList").jqGrid('getRowData', ID); var AllNumber = rowData.AllNumber; var SampleQuantity = rowData.SampleQuantity; var WaiveQuantity = rowData.SpecialQTY; var YLOTQTY = rowData.YLOTQTY; var NLOTQTY = rowData.NLOTQTY; var BCCode = $("#SelBC_" + ID + "").val();//不良代码 var BRCode = $("#SelBR_" + ID + "").val();//不良原因 //if (JYID == ''||JYID == 'null') { // $.modalAlertNew("WMS00113"); // 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(); // } //}); $.modalOpen2({ id: "CheckInfo", title: "查看信息", url: "/WMS/ICSRCVIQCs/ICSInspectionDetailNew?InvCode=" + encodeURI(encodeURI(InvCode)) + "&JYID=" + encodeURI(encodeURI(JYID)) + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&AllNumber=" + encodeURI(encodeURI(AllNumber)) + "&YLOTQTY=" + encodeURI(encodeURI(YLOTQTY)) + "&NLOTQTY=" + encodeURI(encodeURI(NLOTQTY)) + "&WaiveQuantity=" + encodeURI(encodeURI(WaiveQuantity)) + "&BCCode=" + encodeURI(encodeURI(BCCode)) + "&BRCode=" + encodeURI(encodeURI(BRCode)) + "&Result=" + encodeURI(encodeURI(Result)) + "&LotNo=" + encodeURI(encodeURI(LotNo)) + "&Type=" + encodeURI(encodeURI(Type)), width: "1500px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); }, cancelCallBack: function (iframeId) { top.frames[iframeId].StagingForm(); } }); } 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(); // } //}); $.modalOpen2({ id: "CheckInfo", title: "查看信息", url: "/WMS/ICSRCVIQCs/ICSInspectionDetailNew?InvCode=" + encodeURI(encodeURI(InvCode)) + "&JYID=" + encodeURI(encodeURI(JYID)) + "&" + Math.random() + "&SampleQuantity=" + SampleQuantity + "&AllNumber=" + encodeURI(encodeURI(AllNumber)) + "&YLOTQTY=" + encodeURI(encodeURI(YLOTQTY)) + "&NLOTQTY=" + encodeURI(encodeURI(NLOTQTY)) + "&WaiveQuantity=" + encodeURI(encodeURI(WaiveQuantity)) + "&BCCode=" + encodeURI(encodeURI(BCCode)) + "&BRCode=" + encodeURI(encodeURI(BRCode)) + "&Result=" + encodeURI(encodeURI(Result)) + "&LotNo=" + encodeURI(encodeURI(LotNo)) + "&Type=" + encodeURI(encodeURI(Type)), width: "1500px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); }, cancelCallBack: function (iframeId) { top.frames[iframeId].StagingForm(); } }); } } 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 LookFiles(JYID) { debugger; $.modalOpenClean({ id: "CheckInfo", title: "查看信息", url: "/DHAY/DHICSRCVIQCs/ICSLookFiles?JYID=" + encodeURI(encodeURI(JYID)), width: "1000px", height: "400px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
//触发上传文件控件 function UpLoadFiles(JYID, DNCode) { if (JYID == "" || JYID == "null") { $.modalAlertNew("WMS000101"); return; } $("#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: "/DHAY/DHICSRCVIQCs/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();*/
for (var i = 0; i < ids.length; i++) { var rowData = $("#gridList").jqGrid('getRowData', ids[i]); var TestState = rowData.TestState; if (TestState != '已检验') { $.modalAlertNew("WMS00084"); return; } if (rowData.AllNumber == rowData.YLOTQTY) { $.modalAlertNew("WMS00085", rowData.LotNo); return; } IDlist += "'" + rowData.LotNo + "',"; } $.modalConfirm("确定退回吗?", function (r) { if (r) { $.submitForm({ url: "/DHAY/DHICSRCVIQCs/CreateRejection?Type=" + Type + "&" + Math.random(), param: { keyValue: IDlist }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }); } //打印库位 function btn_Print() { debugger; // var mold = 'FP0001'; //条码打印
var objArr = ''; var arr = []; var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); for (var i = 0; i < objList.length; i++) { var rowId = objList[i]; var rowData = $("#gridList").jqGrid('getRowData', rowId); objArr += "'" + rowData.JYID + "',"; } objArr = objArr.slice(0, objArr.length - 1); if (objArr == "") { $.modalAlertNew("WMS00003"); return; } objArr = "" + objArr + "|"; arr.push(objArr);
$.modalOpen({ id: "PrintLot", title: "打印", url: "/DHAY/DHPrint/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
function onCheckboxClick(checkbox) { debugger; // 将所有单选框的选中状态取消 var checkboxes = document.getElementsByName("checkbox"); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i] == checkbox) { // 用户选择了当前的单选框,不需要取消选中状态 continue; } checkboxes[i].checked = false; } if ($("#LotNO").is(':checked')) { FlagVersion = '1'; } else if ($("#BatchCode").is(':checked')) { FlagVersion = '2'; } else if ($("#DocSequence").is(':checked')) { FlagVersion = '3'; } else if ($("#DocCode").is(':checked')) { FlagVersion = '4'; } SetCols(Type); if (Type == '1') { gridList(); } //委外来料检验 if (Type == '3') { gridList2(); } //产成品检验 if (Type == '2') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").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'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList5(); } //委外退料 if (Type == '6') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList6(); } //销售退货 if (Type == '7') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-update").css('display', 'none'); gridList7(); } //采购到货单检验 if (Type == '8') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList8(); } //委外采购到货单检验 if (Type == '9') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList9(); } //连副产品检验 if (Type == '10') { $(".HideTxt").css('display', 'none'); $(".HideTxt2").css('display', 'none'); gridList10(); } //在库检验 if (Type == '11') { $(".HideTxt").css('display', 'none'); $("#NF-update").css('display', 'none'); $(".HideTxt2").css('display', 'none'); $("#NF-Approve").css('display', 'block'); $("#NF-SecApprove").css('display', 'block'); var selvalue = $("#selEnableShow"); selvalue.val("0"); gridList11(); $("#selShow").append("<option value='3'>已审核</option>"); $("#selShow").append("<option value='4'>已复审</option>"); } }
</script>
<div class="topPanel" style="height:200px"> <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-Approve" authorize="yes" class="btn btn-primary" onclick="btnApprove()" style="display:none"><i class="fa fa-pencil-square-o"></i>审核</a> <a id="NF-SecApprove" authorize="yes" class="btn btn-primary" onclick="btnSecApprove()" style="display:none"><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-Print" authorize="yes" class="btn btn-primary dropdown-text" onclick="btn_Print()"><i class="fa fa-print"></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>
</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="" selected="selected">全部</option> <option value="1">是</option> <option value="0">否</option> </select> </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_LotNO" type="text" class="form-control" 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>
<td class="HideTxt2" style="text-align:right;"><label class="lglabel HideTxt2" for="selIsUrgent"> 是否急件</label>:</td> <td> <div class="input-group HideTxt2"> <select id="selIsUrgent" name="F_IsUrgent" class="form-control" style="width: 105px;"> <option value="" selected="selected">全部</option> <option value="是">是</option> <option value="否">否</option> </select> </div> </td>
</tr> <tr> <td class="HideTxt2" style="text-align:right;"><label class="lglabel HideTxt2" for="selIsPrint"> 是否打印</label>:</td> <td> <div class="input-group HideTxt2"> <select id="selIsPrint" name="F_IsPringt" class="form-control" style="width: 105px;"> <option value="" selected="selected">全部</option> <option value="是">是</option> <option value="否">否</option> </select> </div> </td> <td> <input type="checkbox" name="checkbox" value="1" id="LotNO" style="width:40px" checked="checked" onclick="onCheckboxClick(this)" /><label for="cb-NoQuotedPrice" style="font-size: 16px; color: #337ab7">条码</label> </td> <td> <input type="checkbox" name="checkbox" value="2" id="BatchCode" style="width:40px" onclick="onCheckboxClick(this)" /><label for="cb-NoQuotedPrice" style="font-size: 16px; color: #337ab7">批次</label> </td> <td> <input type="checkbox" name="checkbox" value="3" id="DocSequence" style="width:40px" onclick="onCheckboxClick(this)" /><label for="cb-NoQuotedPrice" style="font-size: 16px; color: #337ab7">单据行</label> </td> <td> <input type="checkbox" name="checkbox" value="4" id="DocCode" style="width:40px" onclick="onCheckboxClick(this)" /><label for="cb-NoQuotedPrice" style="font-size: 16px; color: #337ab7">单据 </label> </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>
|