|
|
@{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Index.cshtml";}<script src="~/Content/js/datepicker/WdatePicker.js"></script><script> debugger; var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'; var _Clos = new Array(); var Type = $.request("Type"); var mold = $.request("mold"); var Name = "单据号"; var ColModelMain = []; var ColModelSub = []; $(function () { SetCols(); if (Type != '1') { $("#NF - Prints").css('display', 'none'); $("#NF-btnInWareHouse").css('display', 'none'); } if (Type != '13' && Type != '9') { $(".HideItems2").css('display', 'none'); } if (Type != '1' && Type != '12' && Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && Type != '5' && Type != '203') { $(".HideItemsTime").css('display', 'none'); } if (Type != '22' && Type != '23' && Type != '2' && Type != '3' && Type != '24' && Type != '5' && Type != '203') { $(".HideWH").css('display', 'none'); } if (Type != '3' && Type != '7' && Type != '8') { $(".selStatus").css('display', 'none'); } if (Type != '3') { $(".HideClassGroup").css('display', 'none'); } if (Type != '3' && Type != '4' && Type != '5' && Type != '7' && Type != '8' && Type != '22') { $(".HideItems3").css('display', 'none'); } if (Type == '17') { Name = "条码号"; $("#POCodeShowLable").text(Name);
} else { $("#POCodeShowLable").text(Name); } if (Type!='3') { $("#GDLX").css('display', 'none'); $("#GDLX2").css('display', 'none'); $("#NF-Rebind").css('display', 'none');
} if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') { $(".HideItems").css('display', 'none'); $(".HideItemsVednCode").css('display', 'none'); } if (Type != "22") { $(".HideItemsSourceCode").css('display', 'none'); } if (Type == '1') { gridList(); } if (Type == '2') { gridList2(); } if (Type == '3') { $(".GDLX").css('display', 'block'); Select_SelGDLX(); gridList3();
} if (Type == '4') { gridList4(); } if (Type == '5') { gridList5(); } if (Type == '6') { gridList6(); } //审核到货单生成条码 if (Type == '7') { gridList7(); } //审核委外到货单生成条码 if (Type == '8') { gridList8(); } //开立成品入库单生成条码 if (Type == '9') { gridList9(); } //审核拒收单生成条码 if (Type == '10') { gridList10(); } //审核委外拒收单生成条码 if (Type == '11') { gridList11(); } //领料申请退料生成条码 if (Type == '12') { gridList12(); } //材料出库退料生成条码 if (Type == '13') { gridList13(); } //委外领料申请退料生成条码 if (Type == '14') { gridList14(); } //委外材料出库退料生成条码 if (Type == '15') { gridList15(); } //返工工单 if (Type == '16') { gridList16(); } //不合格条码入库 if (Type == '17') { gridList17();
} //副产品 if (Type == '18') { gridList18(); } //锐腾两步调入生成条码 if (Type == '20') { gridList20(); } //采购入库生成条码 if (Type == '22') { $(".HideItemsVednCode").css('display', 'none'); gridList22(); } //委外采购入库生成条码 if (Type == '23') { gridList23(); } //红字销售出库单 if (Type == '24') { gridList24(); } //线边仓调拨申请单生成条码(派纳) if (Type == '201') { gridList201(); } //调拨申请单生成条码 if (Type == '202') { gridList202(); } })
function SetCols() { $.ajax({ url: "/Print/SelectColumnName?" + Math.random(), dataType: "json", async: false, success: function (data) { var cols = new Array(); var cols1 = new Array(); if (Type == '1') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '工单子件', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '工单号', name: 'MOCode', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建日期', name: 'MTIME', width: 60, 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 == "ICSMOPick") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } if (Type == '2') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '供应商', name: 'VenName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSOApplyNegDetail") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } if (Type == '3') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '工单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: 'ERP工单行ID', name: 'MODetailID', hidden: true }; cols.push(collast); var collast = { label: '已入库数量', name: 'RCVQuantity', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '仓库编码', name: 'WHCode', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '仓库名称', name: 'WHName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '工单部门', name: 'DepName', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '工单创建日期', name: 'CreateDateTime', width: 60, align: 'left', }; cols.push(collast); var collast = { label: "状态", name: "MOStatus", width: 60, align: "left", formatter: function (cellvalue) { if (cellvalue == "1") { return "初始"; } else if (cellvalue == "2") { return "下发"; } else if (cellvalue == "3") { return "关单"; } else { return ""; } } }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '已入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' }; cols.push(collast);
var collast = { label: '工单备注', name: 'MOMemo', 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 == "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); } } } _Clos = cols;
//_Clos1 = cols1; }
}); } if (Type == '4') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'SDNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '客户代码', name: 'CusCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '客户名称', name: 'CusName', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: "状态", name: "Status", width: 60, align: "left", formatter: function (cellvalue) { if (cellvalue == "1") { return "开立"; } else if (cellvalue == "2") { return "审核"; } else if (cellvalue == "3") { return "关闭"; } else { return ""; } } }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } if (Type == '5') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'InCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '收益部门', name: 'EATTRIBUTE4', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '项目名称', name: 'EATTRIBUTE8', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } if (Type == '6') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSReturn") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
});
} //审核到货单生成条码 if (Type == '7') { 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: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', 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 == "ICSDeliveryNotice") { debugger; 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); } } } _Clos = cols; //_Clos1 = cols1; }
});
} //审核委外到货单生成条码 if (Type == '8') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'ODNCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '委外订单表体ID', name: 'OODetailID', hidden: true }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '未入库数量', name: 'NRCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //开立成品入库单生成条码 if (Type == '9') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'RCVCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '源头单据号', name: 'MOCode', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '仓库号', name: 'WHCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast);
var collast = { label: '创建时间', name: 'CreateDateTime', 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 == "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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //审核拒收单生成条码 if (Type == '10') { 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: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', 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 == "ICSDeliveryNotice") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //审核委外拒收单生成条码 if (Type == '11') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //领料申请退料生成条码 if (Type == '12') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '来源单据号', name: 'SourceCodea', width: 120, align: 'left' }; cols.push(collast); var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, 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 == "ICSMOApplyNegDetail") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //材料出库退料生成条码 if (Type == '13') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '源头单据号', name: 'SCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); } //委外领料申请退料生成条码 if (Type == '14') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSOApplyNegDetail") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //委外材料出库退料生成条码 if (Type == '15') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSOApplyNegDetail") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //返工工单生成条码 if (Type == '16') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '备料表ID', name: 'PickID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSMOPick") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //不合格条码生成条码 if (Type == '17') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '条码', name: 'LotNo', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '不合格数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //副产品生成条码 if (Type == '18') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '工单号', name: 'MOCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '工单子件行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '备料表ID', name: 'PickID', hidden: true, }; cols.push(collast); var collast = { label: '料品编码(子)', name: 'ZInvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码(母)', name: 'MInvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已发数量', name: 'IssueQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSMOPick") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //锐腾两步调入生成条码 if (Type == '20') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '调拨单号', name: 'TransferNO', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '调拨单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已调入数量', name: 'TransferQuantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 120, align: 'left', }; cols.push(collast); var collast = { label: '单位', name: 'InvUnit', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSMOPick") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //采购入库生成条码 if (Type == '22') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '入库单号', name: 'RCVCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '入库单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '采购订单号', name: 'POCode', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '规格型号', name: 'InvStd', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '厂商料号', name: 'ManufacturerInvCode', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '供应商', name: 'EATTRIBUTE3', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '供应商批号', name: 'SupplierBatch', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '采购员', name: 'F_RealName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '最小包装量', name: 'MPQ', width: 100, align: 'left', editable: true, editrules: { number: true } }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSPurchaseReceive") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //采购入库生成条码 if (Type == '23') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '委外入库单号', name: 'RCVCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '委外入库单行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '最小包装量', name: 'minPackQty', width: 100, align: 'left', editable: true, editrules: { number: true } }; //cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已入数量', name: 'RCVQuantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSOutsourcingReceive") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //红字销售单出库生成条码 if (Type == '24') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'SSDCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '客户编码', name: 'CusCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '客户名称', name: 'CusName', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '退货日期', name: 'CreateDateTime', width: 150, align: 'left' }; cols.push(collast);
var collast = { label: '是否批号管理', name: 'BatchEnable', width: 50, align: 'Center' }; cols.push(collast); var collast = { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品型号', name: 'InvStd', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '入库数量', name: 'SSDQuantity', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '币种', name: 'Currency', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品失效天数', name: 'EffectiveDays', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '料品是否开启失效', name: 'EffectiveEnable', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '创建时间', name: 'CreateDateTime', 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 == "ICSSSD") { debugger; 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); } } } _Clos = cols; //_Clos1 = cols1; }
});
} //派纳线边仓调拨申请单生成条码 if (Type == '201') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 60, align: 'left', }; cols.push(collast); var collast = { label: '调出仓库', name: 'FromWHName', width: 100, align: 'left', }; cols.push(collast); var collast = { label: '调入仓库', name: 'ToWHName', width: 100, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSTransferApplication") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //调拨申请单生成条码 if (Type == '202') { var collast = { label: "主键", name: "ID", hidden: true, key: true }; cols.push(collast); var collast = { label: '单据号', name: 'TransferNO', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '单据行号', name: 'Sequence', width: 50, align: 'left' }; cols.push(collast); var collast = { label: '料品编码', name: 'InvCode', width: 120, align: 'left' }; cols.push(collast); var collast = { label: '料品名称', name: 'InvName', width: 150, align: 'left', }; cols.push(collast); var collast = { label: '数量', name: 'Quantity', width: 100, align: 'left' }; cols.push(collast); var collast = { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }; cols.push(collast); var collast = { label: '已调数量', name: 'TransferQuantity', width: 100, align: 'left' }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' }; //cols.push(collast); var collast = { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }; cols.push(collast); //var collast = { label: '批次', name: 'BatchCode', 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 == "ICSTransferApplication") { 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); } } } _Clos = cols; //_Clos1 = cols1; }
}); } //子表 if (Type=='17') { var cols1 = new Array(); var collast1 = { label: "主键", name: "ID", hidden: true, key: true }; cols1.push(collast1); var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' }; cols1.push(collast1); var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' }; cols1.push(collast1); var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' }; cols1.push(collast1); var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' }; cols1.push(collast1);
} else { var cols1 = new Array(); var collast1 = { label: "主键", name: "ID", hidden: true, key: true }; cols1.push(collast1); var collast1 = { label: "来源单据号", name: "TransCode", width: 150, align: 'left' }; cols1.push(collast1); var collast1 = { label: '来源单据行', name: 'TransSequence', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' }; cols1.push(collast1); var collast1 = { label: '条码数量', name: 'Quantity', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '是否打印', name: 'isPrint', width: 150, align: 'left' }; cols1.push(collast1); var collast1 = { label: '辅计量数量', name: 'Amount', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '生产日期', name: 'ProductDate', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '失效日期', name: 'ExpirationDate', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '有效期天数', name: 'EffectiveDays', width: 80, align: 'left' }; cols1.push(collast1); var collast1 = { label: '备注', name: 'EATTRIBUTE5', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '是否入库', name: 'isStorage', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '是否检验', name: 'isInspection', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '免检', name: 'isExemption', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '操作人', name: 'MUSERName', width: 100, align: 'left' }; cols1.push(collast1); var collast1 = { label: '操作时间', name: 'MTIME', width: 150, align: 'left' }; cols1.push(collast1);
}
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); cols1.push(obj); } } _Clos = cols; _Clos1 = cols1; } }); }
//生产退料 function gridList() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJson" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '工单子件', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品编码', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", sortname: " MTIME desc ,ApplyNegCode asc,REPLICATE('0',10-len(Sequence))+Sequence ", // sortname: 'ApplyNegCode ', //let str = `He said, "It's a 'beautiful' day."`, //sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //委外退料 function gridList2() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWeiWai" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'OApplyNegCode,cast(Sequence as int)', sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid2(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid2(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //成品 function gridList3() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), SelGDLX: $("#SelGDLX option:checked").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), ClassGroup: $("#selClassGroup").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonChengPing" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '工单号', name: 'MOCode', width: 120, align: 'left' }, // { label: '工单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '已入库数量', name: 'RCVQuantity', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { // label: "状态", name: "MOStatus", width: 60, align: "left", // formatter: function (cellvalue) { // if (cellvalue == "1") { // return "初始"; // } else if (cellvalue == "2") { // return "下发"; // } // else if (cellvalue == "3") { // return "关单"; // } // else { return ""; } // } // },
// { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '可入库数量', name: 'ERPNum', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, cellEdit: true, cellsubmit: "clientArray", //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'MOCode,cast(Sequence as int)', sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid3(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), SelGDLX: $("#SelGDLX option:checked").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), ClassGroup: $("#selClassGroup").val(),
} $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid3(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //销售退货 function gridList4() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonXiaoShou" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'SDNCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '销售订单号', name: 'SOCode', width: 120, align: 'left' }, // { label: '销售订单行号', name: 'SOSequence', width: 50, align: 'left' }, // { label: '客户代码', name: 'CusCode', width: 120, align: 'left' }, // { label: '客户名称', name: 'CusName', width: 50, align: 'left' }, // { label: '发货日期', name: 'ArriveDate', width: 150, align: 'left' }, // { label: '已发数量', name: 'SDNQuantity', width: 50, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { // label: "状态", name: "Status", width: 60, align: "left", // formatter: function (cellvalue) { // if (cellvalue == "1") { // return "开立"; // } else if (cellvalue == "2") { // return "审核"; // } // else if (cellvalue == "3") { // return "关闭"; // } // else { return ""; } // } // }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'SDNCode,cast(Sequence as int)', sortname: "SDNCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid4(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid4(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var SDNCode = $("#gridList").jqGrid('getRowData', rowid).SDNCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//其它入库生成条码 function gridList5() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), InvStd: $("#txt_InvStd").val(),
} $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonQiTa" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'InCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已入数量', name: 'InQuantity', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", sortname: 'InCode', sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid5(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), InvStd: $("#txt_InvStd").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid5(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var InCode = $("#gridList").jqGrid('getRowData', rowid).InCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//归还单生成条码 function gridList6() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonGuiHuan" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'ReturnCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '仓库编码', name: 'WHCode', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已归还数量', name: 'ReturnQuantity', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", /// sortname: 'ReturnCode,cast(Sequence as int)', sortname: "ReturnCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid6(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid6(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ReturnCode = $("#gridList").jqGrid('getRowData', rowid).ReturnCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//*审核到货单生成条码 function gridList7() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonSHDH" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'DNCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '采购订单号', name: 'POCode', width: 50, align: 'left' }, // { label: '采购订单行号', name: 'POSequence', width: 50, align: 'left' }, // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }, // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }, // { label: '币种', name: 'Currency', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'DNCode,cast(Sequence as int)', sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid7(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid7(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//审核委外到货单生成条码 function gridList8() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWSHDH" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'ODNCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '委外采购订单号', name: 'OOCode', width: 120, align: 'left' }, // { label: '委外采购订单行号', name: 'OOSequence', width: 50, align: 'left' }, // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }, // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }, // { label: '币种', name: 'Currency', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'ODNCode,cast(Sequence as int)', sortname: "ODNCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid8(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(), InvStd: $("#txt_InvStd").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid8(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ODNCode = $("#gridList").jqGrid('getRowData', rowid).ODNCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//开立得成品入库单 生成条码 function gridList9() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), SCode: $("#txt_SCode").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonKLCPRK" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '单据号', name: 'RCVCode', width: 120, align: 'left' }, // { label: '行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '仓库号', name: 'WHCode', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'RCVCode,cast(Sequence as int)', sortname: "RCVCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid9(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val(), SCode: $("#txt_SCode").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid9(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//采购拒收单 function gridList10() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonJSD" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '拒收单号', name: 'DNCode', width: 120, align: 'left' }, // { label: '拒收单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }, // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvUnit', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }, // { label: '币种', name: 'Currency', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'DNCode,cast(Sequence as int)', sortname: "DNCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid10(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid10(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var DNCode = $("#gridList").jqGrid('getRowData', rowid).DNCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + DNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//委外拒收单生成条码 function gridList11() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWJSD" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '委外拒收单号', name: 'OOCode', width: 120, align: 'left' }, // { label: '委外拒收单行号', name: 'OOSequence', width: 50, align: 'left' }, // { label: '供应商代码', name: 'VenCode', width: 120, align: 'left' }, // { label: '供应商名称', name: 'VenName', width: 120, align: 'left' }, // { label: '料品编码', name: 'InvCode', width: 50, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 120, align: 'left' }, // { label: '料品描述', name: 'InvDesc', width: 50, align: 'left' }, // { label: '料品型号', name: 'InvStd', width: 150, align: 'left' }, // { label: '料品单位', name: 'InvStd', width: 50, align: 'left' }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '入库数量', name: 'RCVQuantity', width: 60, align: 'left', }, // { label: '币种', name: 'Currency', width: 60, align: 'left', }, // { label: '创建人', name: 'CreatePerson', width: 60, align: 'left', }, // { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'OOCode,cast(Sequence as int)', sortname: "OOCode,REPLICATE('0',10-len(OOSequence))+OOSequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid11(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid11(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ODNCode = $("#gridList").jqGrid('getRowData', rowid).OOCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).OOSequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//领料申请退料生成条码 function gridList12() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonLLSQTL" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品编码', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'ApplyNegCode,cast(Sequence as int)', sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid12(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid12(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//材料出库退料 function gridList13() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val(), SCode: $("#txt_SCode").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonCLCK" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'ApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: 'ERP子ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品编码', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, //], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'ApplyNegCode,cast(Sequence as int)', sortname: "ApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid13(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val(), SCode: $("#txt_SCode").val(), } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid13(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var ApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).ApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//委外领料申请退料 function gridList14() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWLLTL" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'OApplyNegCode,cast(Sequence as int)', sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid14(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid14(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //委外材料出库 function gridList15() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWWCLCK" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'OApplyNegCode,cast(Sequence as int)', sortname: "OApplyNegCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid15(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid15(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var OApplyNegCode = $("#gridList").jqGrid('getRowData', rowid).OApplyNegCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 //multiselect: true, prmNames: { search: "search" }, multiselect: true, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
function gridList16() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonFGGD" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid16(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid16(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//检验不合格 function gridList17() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonBHGTM" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", sortname: 'LotNo', sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid17(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid17(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var LotNo = $("#gridList").jqGrid('getRowData', rowid).LotNo; // var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJsonBHGTM?LotNo=" + LotNo + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
function gridList18() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonFCP" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: '退料单号', name: 'OApplyNegCode', width: 120, align: 'left' }, // { label: '退料单行号', name: 'Sequence', width: 50, align: 'left' }, // { label: '来源单据ID', name: 'SourceDetailID', hidden: true, }, // { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, // { label: '料品名称', name: 'InvName', width: 60, align: 'left', }, // { label: '数量', name: 'Quantity', width: 100, align: 'left' }, // { label: '辅计量数量', name: 'Amount', width: 150, align: 'left' }, // { label: '已退数量', name: 'IssueNegQuantity', width: 100, align: 'left' }, // { label: '规格型号', name: 'InvStd', width: 60, align: 'left', }, // { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' }, // { label: '已生成数量', name: 'LOTQTY', width: 60, align: 'left', }, // { label: '批次', name: 'BatchCode', width: 100, align: 'left' },
//], //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "MOCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid18(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid18(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var MOCode = $("#gridList").jqGrid('getRowData', rowid).MOCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + MOCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
function gridList20() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransfer" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "TransferNO,Cast(Sequence as int) ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid20(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid20(subgrid_id, rowid) { debugger; $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //采购入库 ICSPurchaseReceive function gridList22() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), SourceCode: $("#txt_SourceCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(), } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonPurchaseReceive" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, width: "100%", cellEdit: true, cellsubmit: "clientArray", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "RCVCode ", sortorder: "desc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid22(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), SourceCode: $("#txt_SourceCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val(),
} $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid22(subgrid_id, rowid) { debugger; $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; var isPrint = $("#selPrint").val(); // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&isPrint=" + isPrint + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
//委外采购入库 ICSOutPurchaseReceive function gridList23() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonOutPurchaseReceive" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "RCVCode ", sortorder: "desc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid23(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
}
function bindSubGrid23(subgrid_id, rowid) { debugger; $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var RCVCode = $("#gridList").jqGrid('getRowData', rowid).RCVCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + RCVCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //线边仓调拨申请单生成条码(派纳) function gridList201() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransferApplicationPN" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "TransferNO,Cast(Sequence as int) ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid201(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} //调拨申请单生成条码 function gridList202() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), POStatus: $("#selShow").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonTransferApplication" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", // sortname: 'MOCode,cast(Sequence as int)', sortname: "TransferNO,Cast(Sequence as int) ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid202(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#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(), POStatus: $("#selShow").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid201(subgrid_id, rowid) { debugger; $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } function bindSubGrid202(subgrid_id, rowid) { debugger; $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var TransferNO = $("#gridList").jqGrid('getRowData', rowid).TransferNO; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + TransferNO + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数
colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); } //红字销售出库单 function gridList24() { var $gridList = $("#gridList"); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val() } $gridList.dataGrid({ url: "/PNWMS/WMSCreateItemLot/GetGridJsonWMSSSD" + "?" + Math.random(), postData: { queryJson: JSON.stringify(queryJson) }, height: $(window).height() - 200, width: $(window).width() - 300, colModel: _Clos, //colModel: ColModelMain, width: "100%", autowidth: true, //shrinkToFit: true, gridComplete: function () { }, pager: "#gridPager", //sortname: 'ODNCode,cast(Sequence as int)', sortname: "SSDCode,REPLICATE('0',10-len(Sequence))+Sequence ", sortorder: "asc", viewrecords: true, multiselect: true, //beforeSelectRow: function (rowid, e) { // $("#gridList").jqGrid('resetSelection'); // return (true); //}, subGrid: true, // (1)开启子表格支持 subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid24(subgrid_id, rowid) } });
$("#warehouse a.btn-default").click(function () { $("#warehouse a.btn-default").removeClass("active"); $(this).addClass("active"); $('#btn_search').trigger("click"); }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); var queryJson = { POCode: $("#txt_POCode").val(), VenCode: $("#txt_VenCode").val(), VenName: $("#txt_VenName").val(), InvCode: $("#txt_InvCode").val(), InvName: $("#txt_InvName").val(), BatchCode: $("#txt_BatchCode").val(), FromTime: $("#FromTime").val(), ToTime: $("#ToTime").val(), WHCode: $("#txt_WHCode").val(), POStatus: $("#selShow").val(), WHStatus: $("#selStatus").val() } $gridList.jqGrid('setGridParam', { postData: { queryJson: JSON.stringify(queryJson) }, }).trigger('reloadGrid'); });
} function bindSubGrid24(subgrid_id, rowid) { $("#gridList").jqGrid("setSelection", rowid, false); var subgrid_table_id; subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id
var subgrid_pager_id; subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id
// (5)动态添加子报表的table和pager $("#" + subgrid_id).html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + subgrid_pager_id + "' class='scroll'></div>"); var SSDCode = $("#gridList").jqGrid('getRowData', rowid).SSDCode; var Sequence = $("#gridList").jqGrid('getRowData', rowid).Sequence; // (6)创建jqGrid对象 $("#" + subgrid_table_id).dataGrid({ cellEdit: true, url: "/PNWMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SSDCode + "&Sequence=" + Sequence + "&Type=" + Type + "&" + Math.random(), // (7)子表格数据对应的url,注意传入的contact.id参数 //colModel: [ // { label: "主键", name: "ID", hidden: true, key: true }, // { label: "来源单据号", name: "TransCode", width: 200, align: 'left' }, // { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' }, // { label: '条码', name: 'LotNo', width: 200, align: 'left' }, // { label: '条码数量', name: 'Quantity', width: 200, align: 'left' }, // { label: '操作人', name: 'MUSERName', width: 200, align: 'left' }, // { label: '操作时间', name: 'MTIME', width: 200, align: 'left' }, //], colModel: _Clos1, //colModel: ColModelSub, shrinkToFit: true,//宽度自适应 multiselect: true, prmNames: { search: "search" }, viewrecords: true, height: "100%", rowNum: 20, pager: subgrid_pager_id,
}); }
function btnDelete() { var objArr = ''; var obj = $("#gridList").jqGrid("getRowData"); for (var i = 0; i < obj.length; i++) { var $SubGird = $("#gridList_" + obj[i].ID + "_t"); var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow'); if (rowData != "undefined" && rowData != null) { for (var j = 0; j < rowData.length; j++) { objArr += "'" + rowData[j] + "',"; } } } if (objArr == "") { $.modalAlertNew("WMS00099"); return; } $.deleteForm({ url: "/PNWMS/WMSCreateItemLot/DeleteItemLot", param: { keyValue: JSON.stringify(objArr) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) }
function dateChange(num, date) { if (!date) { date = new Date();//没有传入值时,默认是当前日期 date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); } date += " 00:00:00";//设置为当天凌晨12点 date = Date.parse(new Date(date)) / 1000;//转换为时间戳 date += (86400) * num;//修改后的时间戳 var newDate = new Date(parseInt(date) * 1000);//转换为时间 return newDate.getFullYear() + '-' + (newDate.getMonth() + 1) + '-' + newDate.getDate(); }
function btnCreate() { debugger; var PoStatus; var jsonData = ''; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length != 1) { $.modalAlertNew("WMS00100"); return; } var POCode = ""; var PORow = ""; if (Type == '1') { for (var i in ids) { ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "生产退料条码生成", url: "/PNWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '2') { for (var i in ids) { OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "委外退料条码生成", url: "/PNWMS/WMSCreateItemLot/FromNew?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "委外退料条码生成", url: "/PNWMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } else if (Type == '3') { for (var i in ids) { MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID; MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "成品条码产生", url: "/PNWMS/WMSCreateItemLot/FromNew?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "成品条码产生", url: "/PNWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } else if (Type == '4') { for (var i in ids) { SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
} $.modalOpen({ id: "FormAddItemLot", title: "销售退货条码产生", url: "/PNWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '5') { for (var i in ids) { InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') {
$.modalOpen({ id: "FormAddItemLot", title: "其他入库条码产生", url: "/PNWMS/WMSCreateItemLot/FromNew?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "其他入库条码产生", url: "/PNWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '6') { for (var i in ids) { ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "归还单条码产生", url: "/PNWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '7') { for (var i in ids) { DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核到货单生成条码", url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '8') { for (var i in ids) { ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核委外到货单生成条码", url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '9') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "开立成品入库单生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '10') { for (var i in ids) { DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核拒收单生成条码", url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '11') { for (var i in ids) { ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核委外拒收单生成条码", url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '12') { for (var i in ids) { LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "审核领料申请退料生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); }
}); } else { $.modalOpen({ id: "FormAddItemLot", title: "审核领料申请退料生成条码", url: "/PNWMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); }
}); } } else if (Type == '13') { for (var i in ids) { CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "材料出库退料生成条码", url: "/PNWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '14') { for (var i in ids) { WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外领料退料条码生成", url: "/PNWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '15') { for (var i in ids) { WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外材料出库退料生成条码", url: "/PNWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '16') { for (var i in ids) { FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "返工工单生成条码", url: "/PNWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '18') { for (var i in ids) { FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "副产品生成条码", url: "/PNWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '20') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "两步调入生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '22') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; ProductDate = $("#gridList").jqGrid('getRowData', ids[i]).SupplierBatch; }
console.log($(event.target).attr('id')); if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&ProductDate=" + ProductDate+"&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&ProductDate=" + ProductDate + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '23') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "委外采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "委外采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } else if (Type == '24') { for (var i in ids) { SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "红字销售出库单生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "红字销售出库单生成条码", url: "/PNWMS/WMSCreateItemLot/FromPN?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } else if (Type == '201') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '202') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } }
function btnCreatePN() { debugger; var PoStatus; var jsonData = ''; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length != 1) { $.modalAlertNew("WMS00100"); return; } var POCode = ""; var PORow = ""; if (Type == '1') { for (var i in ids) { ApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "生产退料条码生成", url: "/PNWMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '2') { for (var i in ids) { OApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外退料条码生成", url: "/PNWMS/WMSCreateItemLot/FromPN?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '3') { for (var i in ids) { MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID; MOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; } $.modalOpen({ id: "FormAddItemLot", title: "成品条码产生", url: "/PNWMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&Quantity=" + Quantity + "&ID=" + ID + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '4') { for (var i in ids) { SDNCode = $("#gridList").jqGrid('getRowData', ids[i]).SDNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity;
} if ($(event.target).attr('id') == 'NF-CreateNew') {
$.modalOpen({ id: "FormAddItemLot", title: "销售退货条码产生", url: "/PNWMS/WMSCreateItemLot/FromNew?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} else { $.modalOpen({ id: "FormAddItemLot", title: "销售退货条码产生", url: "/PNWMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '5') { for (var i in ids) { InCode = $("#gridList").jqGrid('getRowData', ids[i]).InCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "其他入库条码产生", url: "/PNWMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '6') { for (var i in ids) { ReturnCode = $("#gridList").jqGrid('getRowData', ids[i]).ReturnCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "归还单条码产生", url: "/PNWMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '7') { for (var i in ids) { DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核到货单生成条码", url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '8') { for (var i in ids) { ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; OODetailID = $("#gridList").jqGrid('getRowData', ids[i]).OODetailID; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核委外到货单生成条码", url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&ID=" + ID + "&OODetailID=" + OODetailID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '9') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "开立成品入库单生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '10') { for (var i in ids) { DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核拒收单生成条码", url: "/PNWMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '11') { for (var i in ids) { ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).OOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).OOSequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核委外拒收单生成条码", url: "/PNWMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '12') { for (var i in ids) { LLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "审核领料申请退料生成条码", url: "/PNWMS/WMSCreateItemLot/FromPN?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '13') { for (var i in ids) { CLApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "材料出库退料生成条码", url: "/PNWMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '14') { for (var i in ids) { WWLLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外领料退料条码生成", url: "/PNWMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '15') { for (var i in ids) { WWCLOApplyNegCode = $("#gridList").jqGrid('getRowData', ids[i]).OApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外材料出库退料生成条码", url: "/PNWMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '16') { for (var i in ids) { FGGDMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "返工工单生成条码", url: "/PNWMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '18') { for (var i in ids) { FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "副产品生成条码", url: "/PNWMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '20') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "两步调入生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 20 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '22') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; }
if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 22 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '23') { for (var i in ids) { RCVCode = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } $.modalOpen({ id: "FormAddItemLot", title: "委外采购入库生成条码", url: "/PNWMS/WMSCreateItemLot/From?RCVCode=" + encodeURI(encodeURI(RCVCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 23 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else if (Type == '24') { for (var i in ids) { SSDCode = $("#gridList").jqGrid('getRowData', ids[i]).SSDCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "红字销售出库单生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else {
$.modalOpen({ id: "FormAddItemLot", title: "红字销售出库单生成条码", url: "/PNWMS/WMSCreateItemLot/From?SSDCode=" + encodeURI(encodeURI(SSDCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 24 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } else if (Type == '201') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 201 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } } else if (Type == '202') { for (var i in ids) { TransferNO = $("#gridList").jqGrid('getRowData', ids[i]).TransferNO; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity; } if ($(event.target).attr('id') == 'NF-CreateNew') { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/FromNew?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } else { $.modalOpen({ id: "FormAddItemLot", title: "调拨申请单生成条码", url: "/PNWMS/WMSCreateItemLot/From?TransferNO=" + encodeURI(encodeURI(TransferNO)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 202 + "&ID=" + ID + "&Quantity=" + Quantity + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
} } }
function fullscreen() { var docElm = document.documentElement; if (docElm.requestFullscreen) { docElm.requestFullscreen(); } else if (docElm.mozRequestFullScreen) { docElm.mozRequestFullScreen(); } else if (docElm.webkitRequestFullScreen) { docElm.webkitRequestFullScreen(); } else if (docElm.msRequestFullscreen) { docElm.msRequestFullscreen(); } $(window).bind('resize', function () { $("#gridList").setGridWidth($(window).width()); }).trigger('resize'); $(window).bind('resize', function () { $("#gridList").setGridHeight($(window).height()); }).trigger('resize'); }
function btnPrint() { debugger; if (mold == '') { if (Type == '1') { mold = '00001'; }//生产退料生成条码 if (Type == '2') { mold = '00002'; }//委外退料生成条码 if (Type == '3') { mold = '00003'; }//工单成品生成条码 if (Type == '4') { mold = '00004'; }//销售退货生成条码 if (Type == '5') { mold = '00005'; }//其他入库生成条码 if (Type == '6') { mold = '00006'; }//归还单生成条码 if (Type == '7') { mold = '00007'; }//普通到货单生成条码 if (Type == '8') { mold = '00008'; }//委外到货单生成条码 if (Type == '9') { mold = '00009'; }//成品入库单生成条码 if (Type == '10') { mold = '00010'; }//拒收单生成条码 if (Type == '11') { mold = '00011'; }//委外拒收单生成条码 if (Type == '12') { mold = '00012'; }//领料申请退料 if (Type == '13') { mold = '00013'; }//材料出库退料 if (Type == '14') { mold = '00014'; }//委外领料申请退料 if (Type == '15') { mold = '00015'; }//委外材料出库退料 if (Type == '16') { mold = '00016'; }//返工工单 if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库 if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码 if (Type == '22') { mold = '00018'; }//采购入库生成条码 if (Type == '23') { mold = '00019'; }//委外采购入库生成条码 if (Type == '201') { mold = '00020'; }//委外采购入库生成条码 if (Type == '202') { mold = '00020'; }//委外采购入库生成条码 if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码 }
var objArr = ''; var arr = []; var obj = $("#gridList").jqGrid("getRowData"); for (var i = 0; i < obj.length; i++) { var $SubGird = $("#gridList_" + obj[i].ID + "_t"); var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow'); if (rowData != "undefined" && rowData != null && rowData.length != 0) { for (var j = 0; j < rowData.length; j++) { objArr += "'" + rowData[j] + "',"; }
} } objArr = objArr.slice(0, objArr.length - 1); if (objArr == "") { $.modalAlertNew("WMS00101"); return; } objArr = "" + objArr + "|"; arr.push(objArr);
$.modalOpen({ id: "PrintLot", title: "打印", url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
function btnBatchPrint() { debugger; if (mold == '') { if (Type == '7') { mold = '00056'; }//普通到货单生成条码 if (Type == '8') { mold = '00057'; }//委外到货单生成条码 }
var objArr = ''; var arr = []; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (ids.length == 0) { $.modalAlertNew("WMS00100"); return; } var ID = ''; for (var i in ids) { ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; objArr += "'" + ID + "',"; } objArr = objArr.slice(0, objArr.length - 1); objArr = "" + objArr + "|"; arr.push(objArr); var xxx = ""; $.modalOpen({ id: "PrintLot", title: "打印", url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
function btn_ExportAll() { debugger; var objArr = ''; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); for (var i in ids) { objArr += "'" + $("#gridList").jqGrid('getRowData', ids[i]).ID + "',"; } if (objArr=="") { $.modalAlert("请选择单据后导出!"); return; } var postData = "&Type=" + Type + ""; //postData += "&ID=" + ID
postData += "&ID=" + objArr; $.download("/PNWMS/WMSCreateItemLot/StatementExportAll" + "?" + Math.random(), postData, 'post'); } function Select_SelGDLX() { $("#SelGDLX").find("option").remove(); var DeptName = $("#SelGDLX option:checked").text(); $("#SelGDLX").append("<option value=''>--请选择--</option>"); $.ajax({ url: "/PNWMS/WMSCreateItemLot/SelGDLX" + "?" + Math.random(), dataType: "json", async: false, success: function (data) { if (data != null && data.length > 0) { for (var i = 0; i < data.length; i++) { $("#SelGDLX").append("<option value='" + data[i].Code + "'>" + data[i].Name + "</option>"); } } } }); $("#SelGDLX option:checked").val(''); } function btnCreateLook() { var MODetailID = ''; var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); for (var i = 0; i < objList.length; i++) { var rowId = objList[i]; var rowData = $("#gridList").jqGrid('getRowData', rowId); MODetailID = rowData.MODetailID; } $.modalOpenClean({ id: "FormMoPick", title: "工单子件信息", url: "/PNWMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID, width: "90%", height: "90%", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); }
function btn_Import() {
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 if (objList.length != 1) { $.modalAlertNew("WMS00100"); return; } var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); for (var i = 0; i < objList.length; i++) { var rowId = objList[i]; var rowData = $("#gridList").jqGrid('getRowData', rowId); var Code = rowData.MOCode; var Sequence = rowData.Sequence; $.modalOpen({ id: "Upload", title: "导入", url: "/PNWMS/WMSCreateItemLot/ImportLot?Code=" + Code + "&Sequence=" + Sequence + "&" + Math.random(), width: "400px", height: "200px", btn: null, }); }
}
function btnPrints() { debugger; // var mold = ''; if (mold == '') { if (Type == '1') { mold = '00001'; }//生产退料生成条码 if (Type == '2') { mold = '00002'; }//委外退料生成条码 if (Type == '3') { mold = '00003'; }//工单成品生成条码 if (Type == '4') { mold = '00004'; }//销售退货生成条码 if (Type == '5') { mold = '00005'; }//其他入库生成条码 if (Type == '6') { mold = '00006'; }//归还单生成条码 if (Type == '7') { mold = '00007'; }//普通到货单生成条码 if (Type == '8') { mold = '00008'; }//委外到货单生成条码 if (Type == '9') { mold = '00009'; }//成品入库单生成条码 if (Type == '10') { mold = '00010'; }//拒收单生成条码 if (Type == '11') { mold = '00011'; }//委外拒收单生成条码 if (Type == '12') { mold = '00012'; }//领料申请退料 if (Type == '13') { mold = '00013'; }//材料出库退料 if (Type == '14') { mold = '00014'; }//委外领料申请退料 if (Type == '15') { mold = '00015'; }//委外材料出库退料 if (Type == '16') { mold = '00016'; }//返工工单 if (Type == '17') { mold = 'BHG00001'; }//不合格条码入库 if (Type == '18') { mold = 'FCP00001'; }//副产品生成条码 if (Type == '22') { mold = '00018'; }//采购入库生成条码 if (Type == '23') { mold = '00019'; }//委外采购入库生成条码 if (Type == '203') { mold = 'DZ0001'; }//派纳特殊一步调入生成条码 } 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.ID + "',"; } objArr = objArr.slice(0, objArr.length - 1); if (objArr == "") { $.modalAlertNew("WMS00110"); return; } objArr = "" + objArr + "|"; arr.push(objArr);
$.modalOpen({ id: "PrintLot", title: "打印", url: "/WMS/Print/PrintViewByLot?Arguments=" + encodeURI(encodeURI(arr)) + "&mold=" + mold + "&" + Math.random(), width: "550px", height: "1000px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } }); } function btnInWareHouse() { debugger; 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.ID + "',"; } objArr = objArr.slice(0, objArr.length - 1); if (objArr == "") { $.modalAlertNew("WMS00110"); return; } arr.push(objArr);
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/PostInWareHouse" , param: { IDs: JSON.stringify(objArr) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } })
}
function btn_Rebind() { var objArr = ''; var obj = $("#gridList").jqGrid("getRowData"); for (var i = 0; i < obj.length; i++) { var $SubGird = $("#gridList_" + obj[i].ID + "_t"); var rowData = $SubGird.jqGrid('getGridParam', 'selarrrow'); if (rowData != "undefined" && rowData != null && rowData.length != 0) { for (var j = 0; j < rowData.length; j++) { var rowDataZ = $SubGird.jqGrid('getRowData', rowData[j]); objArr += "'" + rowDataZ.LotNo + "',"; } objArr = objArr.slice(0, objArr.length - 1); } } if (objArr == "") { $.modalAlert("请选择条码信息后,进行重新绑定!"); return; } $.modalOpen({ id: "ICSLotRebind", title: "条码重新绑定", url: "/PNWMS/WMSCreateItemLot/ICSLotRebind?LotNo=" + encodeURI(encodeURI(objArr)) + "&" + Math.random(), width: "500px", height: "350px", callBack: function (iframeId) { top.frames[iframeId].submitForm(); } });
}
function btnAllCreatePN() { $("#gridList").find($("td[aria-describedby='gridList_rn']")).click(); var PoStatus; var jsonData = ''; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 var POCode = ""; var PORow = ""; var VenCode = ""; var WorkPoint = ""; var VendorLot = ""; if (Type == '3') { debugger; var ARR = []; for (var i in ids) { var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; var Code = $("#gridList").jqGrid('getRowData', ids[i]).MOCode; var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays; var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ; var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode; if (minPackQty == '' || minPackQty == 0) { $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!"); return; } var Complete = ''; $.ajax({ url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode, dataType: "json", async: false, success: function (data) {
if (data != null && data.length > 0) { Complete = data[0].BatchEnable; } } });
if (Complete == true) { if (BatchCode == "") { $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning"); return; } }
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(6); minPackQty = Number(minPackQty).toFixed(6); if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) { createPageCount = Math.floor(thisCreateQty / minPackQty) + 1; } else { createPageCount = parseInt(thisCreateQty / minPackQty); } createPageCount = createPageCount.toFixed(0); var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); if (Quantity == CreatedQty) { return false; } var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期 if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 }
var obj = { ID: ID, Code: Code, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项 ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '', BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '', Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '', Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '', cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '', cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '', cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '', cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '', cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '', cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '', cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '', cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '', cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '', cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', }
ARR.push(obj); }
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormGDCPALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(ARR) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } })
} if (Type == '22') { debugger; var ARR = []; for (var i in ids) { var ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; var Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; var Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; var EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; var EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays; var minPackQty = $("#gridList").jqGrid('getRowData', ids[i]).MPQ; var InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode; var BatchCode = $("#gridList").jqGrid('getRowData', ids[i]).BatchCode; if (minPackQty == '' || minPackQty == 0) { $.modalAlert("单据:" + Code + ",行号:" + Sequence + "请输入最小包装量!"); return; }
var Complete = ''; $.ajax({ url: "/PNWMS/WMSCreateItemLot/GetInvBatchEnable?InvCode=" + InvCode, dataType: "json", async: false, success: function (data) {
if (data != null && data.length > 0) { Complete = data[0].BatchEnable; } } });
if (Complete == true) { if (BatchCode == "") { $.modalAlert("单号:" + Code + " 行号:" + Sequence + " 物料:" + InvCode + ",料品已开启批次,请输入批次!", "warning"); return; } }
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(6); minPackQty = Number(minPackQty).toFixed(6); if (parseInt(Math.ceil(thisCreateQty * 10000)) % parseInt(Math.ceil(minPackQty * 10000)) != 0) { createPageCount = Math.floor(thisCreateQty / minPackQty) + 1; } else { createPageCount = parseInt(thisCreateQty / minPackQty); } createPageCount = createPageCount.toFixed(0); var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); if (Quantity == CreatedQty) { return false; } var PRODUCTDATE = $("#gridList").jqGrid('getRowData', ids[i]).SupplierBatch;//条码生产日期 if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 }
var obj = { ID: ID, Code: Code, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项 ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '', BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '', Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '', Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '', cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '', cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '', cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '', cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '', cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '', cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '', cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '', cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '', cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '', cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', }
ARR.push(obj); }
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormCGRKALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(ARR) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } })
} if (Type == '23') {
}
}
function btnAllCreate() {
debugger; var PoStatus; var jsonData = ''; var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据 var POCode = ""; var PORow = ""; var VenCode = ""; var WorkPoint = ""; var VendorLot = "";
//生产退料 if (Type == '1') { debugger; var ARR = []; for (var i in ids) { ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Code = $("#gridList").jqGrid('getRowData', ids[i]).ApplyNegCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
// console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(4); var minPackQty = thisCreateQty;//最小包装量 //minPackQty = minPackQty.toFixed(4); var createPageCount = 1;//本次生成张数 createPageCount = createPageCount.toFixed(0); console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty); if (Quantity == CreatedQty) { return false; } var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期 if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 } // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
var obj = { ID: ID, Code: Code, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项 ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '', BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '', Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '', Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '', cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '', cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '', cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '', cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '', cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '', cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '', cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '', cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '', cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '', cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', }
ARR.push(obj); }
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormGDTLALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(ARR) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } })
}
//普通到货单 if (Type == '7') { debugger; var ARR = []; for (var i in ids) { ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
//console.log("单号:" + DNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(4); var minPackQty = thisCreateQty;//最小包装量 //minPackQty = minPackQty.toFixed(4); var createPageCount = 1;//本次生成张数 createPageCount = createPageCount.toFixed(0); console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty); if (Quantity == CreatedQty) { return false; } if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 } var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期 // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
var obj = { ID: ID, Code: DNCode, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项
ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', } ARR.push(obj); }
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormSHDHALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(ARR) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } //委外到货单 if (Type == '8') { debugger; var ARR = []; for (var i in ids) { ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; ODNCode = $("#gridList").jqGrid('getRowData', ids[i]).ODNCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
// console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(4); var minPackQty = thisCreateQty;//最小包装量 //minPackQty = minPackQty.toFixed(4); var createPageCount = 1;//本次生成张数 createPageCount = createPageCount.toFixed(0); console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty); if (Quantity == CreatedQty) { return false; } if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 } var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期 // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
var obj = { ID: ID, Code: ODNCode, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项
ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '',
BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '',
Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '',
Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '',
cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '',
cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '',
cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '',
cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '',
cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '',
cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '',
cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '',
cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '',
cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '',
cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', } ARR.push(obj); } $.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormWWSHDHALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(obj) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } //成品入库单条码生成 if (Type == '9') {
debugger; var ARR = []; for (var i in ids) { ID = $("#gridList").jqGrid('getRowData', ids[i]).ID; Code = $("#gridList").jqGrid('getRowData', ids[i]).RCVCode; Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence; EffectiveEnable = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveEnable; EffectiveDays = $("#gridList").jqGrid('getRowData', ids[i]).EffectiveDays;
// console.log("单号:" + ODNCode + ",行号:" + Sequence + ",站位:" + WorkPoints);
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该单据条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(4); var minPackQty = thisCreateQty;//最小包装量 //minPackQty = minPackQty.toFixed(4); var createPageCount = 1;//本次生成张数 createPageCount = createPageCount.toFixed(0); console.log("thisCreateQty:" + thisCreateQty + ",minPackQty:" + minPackQty);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); // console.log("Quantity:" + Quantity + ",CreatedQty:" + CreatedQty); if (Quantity == CreatedQty) { return false; } var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期 if (EffectiveEnable == 'true') { var ExpirationDate = dateChange(EffectiveDays, PRODUCTDATE); } else { var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 } // console.log("ExpirationDate:" + ExpirationDate + ",PRODUCTDATE:" + PRODUCTDATE);
var obj = { ID: ID, Code: Code, Sequence: Sequence, thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1, //自由项 ProjectCode: $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).ProjectCode : '', BatchCode: $("#gridList").jqGrid('getRowData', ids[i]).BatchCode !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).BatchCode : '', Version: $("#gridList").jqGrid('getRowData', ids[i]).Version !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Version : '', Brand: $("#gridList").jqGrid('getRowData', ids[i]).Brand !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).Brand : '', cFree1: $("#gridList").jqGrid('getRowData', ids[i]).cFree1 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree1 : '', cFree2: $("#gridList").jqGrid('getRowData', ids[i]).cFree2 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree2 : '', cFree3: $("#gridList").jqGrid('getRowData', ids[i]).cFree3 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree3 : '', cFree4: $("#gridList").jqGrid('getRowData', ids[i]).cFree4 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree4 : '', cFree5: $("#gridList").jqGrid('getRowData', ids[i]).cFree5 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree5 : '', cFree6: $("#gridList").jqGrid('getRowData', ids[i]).cFree6 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree6 : '', cFree7: $("#gridList").jqGrid('getRowData', ids[i]).cFree7 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree7 : '', cFree8: $("#gridList").jqGrid('getRowData', ids[i]).cFree8 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree8 : '', cFree9: $("#gridList").jqGrid('getRowData', ids[i]).cFree9 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree9 : '', cFree10: $("#gridList").jqGrid('getRowData', ids[i]).cFree10 !== undefined ? $("#gridList").jqGrid('getRowData', ids[i]).cFree10 : '', }
ARR.push(obj); }
$.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormKLCPRKALL" + "?" + Math.random(), param: { keyValue: JSON.stringify(ARR) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } if (Type == '17') { for (var i in ids) { LotNo = $("#gridList").jqGrid('getRowData', ids[i]).LotNo;
var thisCreateQty = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1 - $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//本次生成数量 if (thisCreateQty == 0) { $.modalAlert("该条码已全部生成完毕!"); return; } thisCreateQty = thisCreateQty.toFixed(4); var minPackQty = thisCreateQty;//最小包装量 var createPageCount = 1;//本次生成张数 createPageCount = createPageCount.toFixed(0);
var Quantity = $("#gridList").jqGrid('getRowData', ids[i]).Quantity * 1;//采购订单总数 Quantity = Quantity.toFixed(2); var CreatedQty = $("#gridList").jqGrid('getRowData', ids[i]).LOTQTY * 1;//已生成数量 CreatedQty = CreatedQty.toFixed(2); if (Quantity == CreatedQty) { return false; } var ExpirationDate = '2999-12-31 00:00:00.000';//条码失效日期 var PRODUCTDATE = new Date().getFullYear() + "-" + (new Date().getMonth() + 1) + "-" + new Date().getDate();//条码生产日期
var obj = { thisCreateQty: thisCreateQty, minPackQty: minPackQty, createPageCount: createPageCount, //VendorLot: VendorLot, PRODUCTDATE: PRODUCTDATE, ExpirationDate: ExpirationDate, Amount: $("#gridList").jqGrid('getRowData', ids[i]).Amount * 1,
} $.submitForm({ url: "/PNWMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints, param: { keyValue: JSON.stringify(obj) }, success: function () { $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) } }
}
</script><iframe id="ifrm" src="" width="0" height="0"></iframe><script>
</script>
<div class="topPanel" style="height:149px;"> <div class="toolbar"> <div class="btn-group"> <a id="NF-ALLCreatePN" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnAllCreatePN()"><i class="fa fa-pencil-square-o"></i>整单条码生成</a> <a id="NF-ALLCreate" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnAllCreate()"><i class="fa fa-pencil-square-o"></i>一键生成</a> <a id="NF-CreateNew" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>生成条码(非规则)</a> <a id="NF-Create" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreate()"><i class="fa fa-pencil-square-o"></i>生成条码</a> <a id="NF-CreatePN" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreatePN()"><i class="fa fa-pencil-square-o"></i>生成条码</a> <a id="NF-Delete" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnDelete()"><i class="fa fa-pencil-square-o"></i>删除条码</a> <a id="NF-Print" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrint()"><i class="fa fa-pencil-square-o"></i>打印</a> <a id="NF-BatchPrint" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnBatchPrint()"><i class="fa fa-pencil-square-o"></i>批量打印</a> <a id="NF-btnInWareHouse" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnInWareHouse()"><i class="fa fa-pencil-square-o"></i>一键退库</a> <a id="NF-Prints" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrints()"><i class="fa fa-pencil-square-o"></i>单据批量打印</a> <a id="NF-ExportAll" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_ExportAll()"><i class="fa fa-pencil-square-o"></i>导出</a>
@*<a id="NF-ExportAll" authorize="yes" class="btn btn-default" onclick="btn_ExportAll()"><i class="fa fa-download"></i>导出</a>*@ <a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a>
</div> <div class="btn-group" style="display:block;padding-left:2px;"> <a class="btn btn-primary" id="downPrintControl" href="~/PrintActivex.exe" style="display:none">点击下载打印组件</a> <a id="NF-Import" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Import()"><i class="fa fa-pencil-square-o"></i>导入</a> <a id="NF-Rebind" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btn_Rebind()"><i class="fa fa-pencil-square-o"></i>重新绑定</a> <a id="NF-Looks" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnCreateLook()"><i class="fa fa-pencil-square-o"></i>查看子件信息</a> </div> <script>$('.toolbar').authorizeButton()</script> </div> <div class="search"> <table> <tr> <td class="POCodeShow" style="text-align:right;"><label class="lglabel " id="POCodeShowLable" for="txt_POCode"> </label>:</td> <td class="POCodeShow"> <div class="input-group"> <input id="txt_POCode" type="text" class="form-control" style="width: 130px;"> </div> </td> <td class="HideItemsSourceCode" style="text-align:right;"><label class="lglabel " for="txt_SourceCode"> </label>采购订单号:</td> <td class="HideItemsSourceCode"> <div class="input-group"> <input id="txt_SourceCode" type="text" class="form-control" style="width: 130px;"> </div> </td> <td class="HideItemsVednCode" style="text-align:right;"><label class="lglabel HideItemsVednCode" for="txt_VenCode"> 供应商代码</label>:</td> <td class="HideItemsVednCode"> <div class="input-group HideItemsVednCode"> <input id="txt_VenCode" type="text" class="form-control HideItemsVednCode" style="width: 130px;"> </div> </td>
<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenName"> 供应商名称</label>:</td> <td class="HideItems"> <div class="input-group HideItems"> <input id="txt_VenName" type="text" class="form-control HideItems" style="width: 130px;"> </div> </td> <td class="HideItems2" style="text-align:right;"><label class="lglabel HideItems2" for="txt_VenName"> 源头单据号</label>:</td> <td class="HideItems2"> <div class="input-group HideItems2"> <input id="txt_SCode" type="text" class="form-control HideItems2" style="width: 130px;"> </div> </td> <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName"> 日期(从)</label>:</td> <td class="HideItemsTime"> <div class="input-group HideItemsTime"> <input id="FromTime" name="FromTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(从)" /> </div> </td> <td class="HideItemsTime" style="text-align:right;"><label class="lglabel HideItemsTime" for="txt_VenName"> 日期(到)</label>:</td> <td class="HideItemsTime"> <div class="input-group HideItemsTime"> <input id="ToTime" name="ToTime" type="text" class="form-control HideItemsTime" style="width:130px;" maxlength="10" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" placeholder="日期(到)" /> </div> </td> <td class="HideClassGroup" style="text-align:right;"> <label> 班组: </label> </td> <td class="HideClassGroup"> <div class="input-group"> <select id="selClassGroup" name="F_Target" class="form-control" style="width: 130px;"> <option value=""></option> <option value="风电一组">风电一组</option> <option value="风电二组">风电二组</option> <option value="数控组">数控组</option> <option value="新能源组">新能源组</option> <option value="裁线组">裁线组</option> <option value="中高压组">中高压组</option> <option value="样品组">样品组</option> <option value="铜排">铜排</option> <option value="风电三组">风电三组</option> <option value="风电四组">风电四组</option> <option value="机器人线束">机器人线束</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_InvCode" type="text" class="form-control" style="width: 130px;"> </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: 130px;"> </div> </td> <td class="HideItems3" style="text-align:right;"><label class="lglabel HideItems3" for="txt_InvStd"> 规格型号</label>:</td> <td class="HideItems3"> <div class="input-group HideItems3"> <input id="txt_InvStd" type="text" class="form-control" style="width: 130px;"> </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: 130px;"> </div> </td> <td id="GDLX"> <label> 工单类型: </label> </td> <td id="GDLX2"> <div class="input-group"> <select id="SelGDLX" name="SelShow" class="form-control" style="width: 130px;"></select> </div> </td>
</tr> <tr> <td class="HideWH"> <label> 仓库编码: </label> </td> <td class="HideWH"> <div class="input-group HideWH"> <input id="txt_WHCode" type="text" class="form-control HideWH" style="width: 130px;"> </div> </td> <td> <label> 是否全部生成: </label> </td> <td> <div class="input-group"> <select id="selShow" name="F_Target" class="form-control" style="width: 130px;"> <option value="0" selected="selected">显示全部</option> <option value="1">已全部生成</option> <option value="2">未全部生成</option> </select> </div> </td> <td clsaa="Status"> <label> 是否全部入库: </label> </td> <td clsaa="Status"> <div class="input-group"> <select id="selStatus" name="F_Target" class="form-control" style="width: 130px;"> <option value="0" selected="selected">全部</option> <option value="1">未全部入库</option> <option value="2">已全部入库</option> </select> </div> </td> <td class="HideItems3"> <label> 条码是否打印: </label> </td> <td class="HideItems3"> <div class="input-group HideItems3"> <select id="selPrint" name="selPrint" class="form-control HideItems3" style="width: 130px;"> <option value="0" selected="selected">显示全部</option> <option value="1">已打印</option> <option value="2">未打印</option> </select> </div> </td> <td> <span class="input-group-btn"> <button id="btn_search" type="button" class="btn btn-primary"><i class="fa fa-search"></i></button> </span> </td> </tr>
</table> </div></div><div class="gridPanel"> <table id="gridList"></table> <div id="gridPager"></div></div>
|