You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4609 lines
238 KiB
4609 lines
238 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<script>
|
|
debugger;
|
|
var _Clos = new Array();
|
|
var Type = $.request("Type");
|
|
var Name = "单据号";
|
|
var ColModelMain = [];
|
|
var ColModelSub = [];
|
|
$(function () {
|
|
SetCols();
|
|
if (Type == '17') {
|
|
Name = "条码号";
|
|
$("#POCodeShowLable").text(Name);
|
|
|
|
} else {
|
|
$("#POCodeShowLable").text(Name);
|
|
}
|
|
if (Type!='3') {
|
|
$("#GDLX").css('display', 'none');
|
|
$("#GDLX2").css('display', 'none');
|
|
|
|
}
|
|
if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9' || Type == '17') {
|
|
$(".HideItems").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();
|
|
}
|
|
})
|
|
|
|
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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码', name: 'InvName', width: 60, 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: 60, 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: 'InvCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: "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: 60, 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: '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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: '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: 'EATTRIBUTE1', 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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: '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: 'WHCode', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码', name: 'InvCode', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 120, 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: '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: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
|
|
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: '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: 60, 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: 'ERP子ID', name: 'SourceDetailID', hidden: true, };
|
|
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: '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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码(母)', name: 'MInvCode', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品名称', name: 'InvName', width: 60, 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: 60, 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 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);
|
|
} 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: '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: '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(),
|
|
POStatus: $("#selShow").val()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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(),
|
|
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: "/WMS/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(),
|
|
POStatus: $("#selShow").val()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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(),
|
|
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: "/WMS/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(),
|
|
POStatus: $("#selShow").val(),
|
|
SelGDLX: $("#SelGDLX option:checked").val(),
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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,
|
|
//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(),
|
|
POStatus: $("#selShow").val(),
|
|
SelGDLX: $("#SelGDLX option:checked").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;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/WMS/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 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: "/WMS/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;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + SDNCode + "&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 gridList5() {
|
|
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: "/WMS/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(),
|
|
POStatus: $("#selShow").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;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/WMS/WMSCreateItemLot/GetSubGridJson?ApplyNegCode=" + InCode + "&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 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: "/WMS/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: "/WMS/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()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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: "CreateDateTime",
|
|
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);
|
|
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()
|
|
}
|
|
$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;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/WMS/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 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()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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()
|
|
}
|
|
$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;
|
|
// (6)创建jqGrid对象
|
|
$("#" + subgrid_table_id).dataGrid({
|
|
cellEdit: true,
|
|
url: "/WMS/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 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()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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()
|
|
}
|
|
$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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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(),
|
|
POStatus: $("#selShow").val()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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(),
|
|
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: "/WMS/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()
|
|
}
|
|
$gridList.dataGrid({
|
|
url: "/WMS/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()
|
|
}
|
|
$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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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: "/WMS/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 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: "/WMS/WMSCreateItemLot/DeleteItemLot",
|
|
param: { keyValue: JSON.stringify(objArr) },
|
|
success: function () {
|
|
$.currentWindow().$("#gridList").trigger("reloadGrid");
|
|
}
|
|
})
|
|
}
|
|
|
|
function btnAllCreate() {
|
|
debugger;
|
|
var PoStatus;
|
|
var jsonData = '';
|
|
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
|
|
//if (ids.length != 1) {
|
|
// $.modalAlertNew("WMS00100");
|
|
// return;
|
|
//}
|
|
var POCode = "";
|
|
var PORow = "";
|
|
var VenCode = "";
|
|
var WorkPoint = "";
|
|
var VendorLot = "";
|
|
//普通到货单
|
|
if (Type == '7') {
|
|
debugger;
|
|
var ARR = [];
|
|
for (var i in ids) {
|
|
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;
|
|
var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
//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 = {
|
|
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: "/WMS/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) {
|
|
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;
|
|
var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
// 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 = {
|
|
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: "/WMS/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) {
|
|
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;
|
|
var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
// 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 = {
|
|
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: "/WMS/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 WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location'
|
|
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: "/WMS/WMSCreateItemLot/SubmitFormBHGTM?LotNo=" + LotNo + "&WorkPoint=" + WorkPoints,
|
|
param: {
|
|
keyValue: JSON.stringify(obj)
|
|
},
|
|
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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "生产退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 1 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 2 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "成品条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?MOCode=" + encodeURI(encodeURI(MOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 3 + "&MODetailID=" + MODetailID + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "销售退货条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 4 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "其他入库条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 5 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "归还单条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 6 + "&" + Math.random(),
|
|
width: "550px",
|
|
height: "1000px",
|
|
callBack: function (iframeId) {
|
|
top.frames[iframeId].submitForm();
|
|
}
|
|
});
|
|
} else if (Type == '7') {
|
|
debugger;
|
|
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;
|
|
CreateDateTime = $("#gridList").jqGrid('getRowData', ids[i]).EATTRIBUTE1;
|
|
}
|
|
var ArrivalTime=new Date(CreateDateTime);
|
|
var NowTime=new Date();
|
|
if (ArrivalTime > NowTime) {
|
|
$.modalAlert("单据" + DNCode + "的到货日期大于当前时间,请确认!", "warning");
|
|
return;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核到货单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 7 + "&" + 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;
|
|
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核委外到货单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 8 + "&OODetailID=" + OODetailID + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "开立成品入库单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 9 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核拒收单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 10 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核委外拒收单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 11 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核领料申请退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 12 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "材料出库退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 13 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外领料退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 14 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外材料出库退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 15 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "返工工单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 16 + "&" + 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]).InvCode;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "副产品生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?FCPMOCode=" + encodeURI(encodeURI(FCPMOCode)) + "&Sequence=" + Sequence + "&InvCode=" + InvCode + "&Type=" + 18 + "&" + 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;
|
|
var 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'; }//副产品生成条码
|
|
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);
|
|
objArr = "" + objArr + "|";
|
|
arr.push(objArr);
|
|
}
|
|
}
|
|
if (objArr == "") {
|
|
$.modalAlertNew("WMS00101");
|
|
return;
|
|
}
|
|
$.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("/WMS/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: "/WMS/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: "/WMS/WMSCreateItemLot/FormMoPick" + "?" + Math.random() + "&MODetailID=" + MODetailID,
|
|
width: "90%",
|
|
height: "90%",
|
|
callBack: function (iframeId) {
|
|
top.frames[iframeId].submitForm();
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
function btn_Import() {
|
|
$.modalOpen({
|
|
id: "Upload",
|
|
title: "导入",
|
|
url: "/WMS/WMSCreateItemLot/ImportLot?" + Math.random(),
|
|
width: "400px",
|
|
height: "200px",
|
|
btn: null,
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
<iframe id="ifrm" src="" width="0" height="0"></iframe>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
<div class="topPanel" style="height:100px;">
|
|
<div class="toolbar">
|
|
<div class="btn-group">
|
|
<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-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-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-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-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: 100px;">
|
|
</div>
|
|
</td>
|
|
<td class="HideItems" style="text-align:right;"><label class="lglabel HideItems" for="txt_VenCode"> 供应商代码</label>:</td>
|
|
<td class="HideItems">
|
|
<div class="input-group HideItems">
|
|
<input id="txt_VenCode" type="text" class="form-control HideItems" style="width: 100px;">
|
|
</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: 100px;">
|
|
</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: 100px;">
|
|
</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: 100px;">
|
|
</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: 100px;">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<label> 是否全部生成: </label>
|
|
</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
|
|
<option value="0" selected="selected">显示全部</option>
|
|
<option value="1">已全部生成</option>
|
|
<option value="2">未全部生成</option>
|
|
</select>
|
|
</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: 100px;">
|
|
|
|
</select>
|
|
</div>
|
|
</td>
|
|
@*<td class="GDLX" style="display:none">
|
|
<label> 工单类型: </label>
|
|
</td>
|
|
<td class="GDLX" style="display:none">
|
|
<div class="input-group">
|
|
<select id="selShow" name="F_Target" class="form-control" style="width: 100px;">
|
|
<option value="0">显示全部</option>
|
|
<option value="1">已全部生成</option>
|
|
<option value="2" selected="selected">未全部生成</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>
|