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.
3259 lines
166 KiB
3259 lines
166 KiB
@{
|
|
ViewBag.Title = "Index";
|
|
Layout = "~/Views/Shared/_Index.cshtml";
|
|
}
|
|
<script>
|
|
|
|
debugger;
|
|
var _Clos = new Array();
|
|
var Type = $.request("Type");
|
|
|
|
var ColModelMain = [];
|
|
var ColModelSub = [];
|
|
$(function () {
|
|
SetCols();
|
|
if (Type == '1' || Type == '2' || Type == '3' || Type == '4' || Type == '5' || Type == '6' || Type == '9') {
|
|
$(".HideItems").css('display', 'none');
|
|
}
|
|
if (Type != '9') {
|
|
$(".Workorder").css('display', 'none');
|
|
}
|
|
|
|
if (Type == '1') {
|
|
gridList();
|
|
}
|
|
if (Type == '2') {
|
|
gridList2();
|
|
}
|
|
if (Type == '3') {
|
|
gridList3();
|
|
}
|
|
if (Type == '4') {
|
|
gridList4();
|
|
}
|
|
if (Type == '5') {
|
|
gridList5();
|
|
}
|
|
if (Type == '6') {
|
|
gridList6();
|
|
}
|
|
//审核到货单生成条码
|
|
if (Type == '7') {
|
|
gridList7();
|
|
}
|
|
//审核委外到货单生成条码
|
|
if (Type == '8') {
|
|
gridList8();
|
|
}
|
|
//开立成品入库单生成条码
|
|
if (Type == '9') {
|
|
$(".HideItems9").css('display', 'none');
|
|
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();
|
|
}
|
|
|
|
})
|
|
//显示的列内容
|
|
function SetCols() {
|
|
$.ajax({
|
|
url: "/Print/SelectColumnName?" + Math.random(),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
var cols = new Array();
|
|
|
|
if (Type == '1') {
|
|
var collast = { label: "主键", name: "ID", hidden: true, key: true };
|
|
cols.push(collast);
|
|
var collast = { label: '退料单号', 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: 'Area', 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: '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 == '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: 'Area', 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: '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);
|
|
}
|
|
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: 'Area', 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: "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: 'BatchCode', width: 100, align: 'left' };
|
|
//cols.push(collast);
|
|
}
|
|
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: 'Area', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '仓库', name: 'WHCode', 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: 'InvDescribe', 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);
|
|
|
|
|
|
var collast = { label: '站点', name: 'WorkPoint', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '装运点', name: 'Points', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '交货类型', name: 'DeliveryType', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '交货描述', name: 'DeliveryDescribe', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '辅助描述', name: 'OtherDescribe', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '销售单位', name: 'SalesUnit', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '序列号参数', name: 'IsSerialNumber', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
}
|
|
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: 'Area', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '仓库', name: 'WHCode', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码', name: 'InvCode', width: 50, 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', hidden: true };
|
|
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);
|
|
|
|
var collast = { label: '站点', name: 'WorkPoint', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '单据类型', name: 'OrderType', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '类型描述', name: 'TypeDescribe', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '成本中心', name: 'CostCenter', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '备注', name: 'Remarks', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '人员号', name: 'PersonNumber', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '物料描述', name: 'InvDescribe', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '基本计量单位', name: 'Unit', width: 150, align: 'left', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
|
|
}
|
|
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: 'Area', 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', hidden: true };
|
|
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);
|
|
}
|
|
//审核到货单生成条码
|
|
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: 'InvCode', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
//var collast = { label: '物料描述', name: 'InvName', width: 120, align: 'left' };
|
|
//cols.push(collast);
|
|
var collast = { label: '区域', name: 'Area', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '仓库', name: 'WHCode', 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: 'DNID', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '采购凭证的项目', name: 'DNDetailID', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '站点', name: 'WorkPoint', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '检验类型', name: 'InspectionType', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '物料描述', name: 'InvoDescribe', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 50, align: 'left', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '单位', name: 'Unity', width: 50, 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', hidden: true };
|
|
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);
|
|
}
|
|
//审核委外到货单生成条码
|
|
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: '区域', name: 'Area', width: 120, 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', hidden: true };
|
|
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);
|
|
}
|
|
//开立成品入库单生成条码
|
|
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: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '生产订单', name: 'OrderNumber', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '存储区域', name: 'Area', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '料品编码', name: 'InvCode', width: 150, 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', hidden: true };
|
|
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: 'CreatePerson', width: 60, align: 'left', };
|
|
cols.push(collast);
|
|
var collast = { label: '创建时间', name: 'CreateDateTime', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
|
|
var collast = { label: '站点', name: 'WorkPoint', width: 120, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '单据类型', name: 'EATTRIBUTE', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '物料描述', name: 'InvDescribe', width: 150, align: 'left', hidden: true };
|
|
cols.push(collast);
|
|
var collast = { label: '物料号(父项生产订单主物料)', name: 'OrderNumber', width: 200, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '物料描述(父项生产订单主物料)', name: 'OrderInvDescribe', width: 200, align: 'left' };
|
|
cols.push(collast);
|
|
//var collast = { label: '批次', name: 'BatchCode', width: 100, align: 'left' };
|
|
//cols.push(collast);
|
|
var collast = { label: '出入库', name: 'BillType', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '备注', name: 'Remarks', width: 150, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '基本计量单位', name: 'Unit', width: 120, align: 'left', };
|
|
cols.push(collast);
|
|
var collast = { label: '特殊库存标识', name: 'StockIndicator', width: 120, align: 'left', };
|
|
cols.push(collast);
|
|
var collast = { label: '备注项', name: 'RemarksTerm', width: 100, align: 'left' };
|
|
cols.push(collast);
|
|
}
|
|
//审核拒收单生成条码
|
|
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: 'Area', 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', hidden: true };
|
|
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);
|
|
}
|
|
//审核委外拒收单生成条码
|
|
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: 'Area', 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', hidden: true };
|
|
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);
|
|
}
|
|
//领料申请退料生成条码
|
|
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: 'Area', width: 50, align: 'left' };
|
|
cols.push(collast);
|
|
var collast = { label: '仓库', name: 'WHCode', 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: '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 == '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: 'Area', 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: '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: 'Area', 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: '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);
|
|
}
|
|
//委外材料出库退料生成条码
|
|
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: 'Area', 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: '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);
|
|
}
|
|
//返工工单生成条码
|
|
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: 'Area', 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: '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);
|
|
}
|
|
|
|
var cols1 = new Array();
|
|
var collast1 = { label: "主键", name: "ID", hidden: true, key: true };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: "来源单据号", name: "TransCode", width: 200, align: 'left' };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: '来源单据行', name: 'TransSequence', width: 200, align: 'left' };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: '条码', name: 'LotNo', width: 200, align: 'left' };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: '条码数量', name: 'Quantity', width: 200, align: 'left' };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: '操作人', name: 'MUSERName', width: 200, align: 'left' };
|
|
cols1.push(collast1);
|
|
var collast1 = { label: '操作时间', name: 'MTIME', width: 200, 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(),
|
|
}
|
|
$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: 'ApplyNegCode',
|
|
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);
|
|
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(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
}
|
|
$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',
|
|
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);
|
|
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(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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' },
|
|
//],
|
|
//colModel: ColModelMain,
|
|
width: "100%",
|
|
autowidth: true,
|
|
//shrinkToFit: true,
|
|
gridComplete: function () {
|
|
},
|
|
pager: "#gridPager",
|
|
sortname: 'MOCode',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").val(),
|
|
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").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: "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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").val(),
|
|
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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() {
|
|
debugger;
|
|
var $gridList = $("#gridList");
|
|
var queryJson = {
|
|
POCode: $("#txt_POCode").val(),
|
|
VenCode: $("#txt_VenCode").val(),
|
|
VenName: $("#txt_VenName").val(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
BatchCode: $("#txt_BatchCode").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',
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
BatchCode: $("#txt_BatchCode").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
postData: { queryJson: JSON.stringify(queryJson) },
|
|
page: 1,
|
|
}).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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
OrderNumber: $("#txt_OrderNumber").val(),
|
|
Area: $("#txt_Area").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
BatchCode: $("#txt_BatchCode").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',
|
|
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);
|
|
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(),
|
|
OrderNumber: $("#txt_OrderNumber").val(),
|
|
Area: $("#txt_Area").val(),
|
|
InvCode: $("#txt_InvCode").val(),
|
|
InvName: $("#txt_InvName").val(),
|
|
BatchCode: $("#txt_BatchCode").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
Location: $("#txt_Location").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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" },
|
|
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(),
|
|
Area: $("#txt_Area").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',
|
|
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);
|
|
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(),
|
|
Area: $("#txt_Area").val(),
|
|
}
|
|
$gridList.jqGrid('setGridParam', {
|
|
page: 1,
|
|
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 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 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "生产退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?ApplyNegCode=" + ApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?OApplyNegCode=" + OApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "成品条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?MOCode=" + MOCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "销售退货条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?SDNCode=" + SDNCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "其他入库条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?InCode=" + InCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "归还单条码产生",
|
|
url: "/WMS/WMSCreateItemLot/From?ReturnCode=" + ReturnCode + "&Sequence=" + Sequence + "&Type=" + 6 + "&" + Math.random(),
|
|
width: "550px",
|
|
height: "1000px",
|
|
callBack: function (iframeId) {
|
|
top.frames[iframeId].submitForm();
|
|
}
|
|
});
|
|
} else if (Type == '7') {
|
|
for (var i in ids) {
|
|
DNCode = $("#gridList").jqGrid('getRowData', ids[i]).DNCode;
|
|
Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核到货单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核委外到货单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&Type=" + 8 + "&" + 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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "开立成品入库单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?RCVCode=" + RCVCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核拒收单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?DNCode=" + DNCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核委外拒收单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?ODNCode=" + ODNCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "审核领料申请退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "材料出库退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?CLApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外领料退料条码生成",
|
|
url: "/WMS/WMSCreateItemLot/From?WWLLOApplyNegCode=" + WWLLOApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "委外材料出库退料生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?WWCLOApplyNegCode=" + WWCLOApplyNegCode + "&Sequence=" + Sequence + "&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;
|
|
}
|
|
$.modalOpen({
|
|
id: "FormAddItemLot",
|
|
title: "返工工单生成条码",
|
|
url: "/WMS/WMSCreateItemLot/From?FGGDMOCode=" + FGGDMOCode + "&Sequence=" + Sequence + "&Type=" + 16 + "&" + 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'; }//返工工单
|
|
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) {
|
|
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();
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
<iframe id="ifrm" src="" width="0" height="0"></iframe>
|
|
<script>
|
|
//function btnPrint() {
|
|
// 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 == "") {
|
|
// $.modalAlert("请选择子表数据打印!");
|
|
// return;
|
|
// }
|
|
// var strPrintData;
|
|
// var bIsInstallPrintControl;
|
|
// var strPrintControlCookie;
|
|
// $.ajax({
|
|
// url: "/WMS/WMSCreateItemLot/PrintItemLot?Type=" + Type,
|
|
// type: "post",
|
|
// data: { keyValue: JSON.stringify(objArr) },
|
|
// dataType: "json",
|
|
// async: false,
|
|
// success: function (data) {
|
|
// strPrintData = data.strPrintData_1;
|
|
// bIsInstallPrintControl = data.bIsInstallPrintControl_1;
|
|
// strPrintControlCookie = data.strPrintControlCookie_1;
|
|
// }
|
|
// });
|
|
// if (strPrintData != '') {
|
|
// var test = "ChuLinPrint:" + strPrintData;
|
|
// $("#ifrm")[0].src = "ChuLinPrint:" + strPrintData;
|
|
// }
|
|
// if (bIsInstallPrintControl == 'False') {
|
|
// if (confirm("检测到打印控件未安装,您是否下载安装?")) {
|
|
// $("#downPrintControl").click();
|
|
// }
|
|
// }
|
|
// if (bIsInstallPrintControl == 'True') {
|
|
// var strPrintControlCookie = strPrintControlCookie;
|
|
// if (strPrintControlCookie != '') { //延时3秒后再次检测打印控件是否安装
|
|
// setTimeout("checkPrintControlInstall()", 8000);
|
|
// function checkPrintControlInstall() {
|
|
// $.ajax({
|
|
// url: "/WMS/WMSCreateItemLot/IsCheckInstall?checkInstall=" + strPrintControlCookie,
|
|
// dataType: "json",
|
|
// async: false,
|
|
// success: function (strResult) {
|
|
// if (strResult.indexOf("PrintControlInstall") == -1) {
|
|
// if (confirm("检测到打印控件未安装,您是否下载安装?")) {
|
|
// $("#downPrintControl").click();
|
|
// }
|
|
// }
|
|
// }
|
|
// });
|
|
// }
|
|
// }
|
|
// }
|
|
// $("#btn_search").click();
|
|
//}
|
|
</script>
|
|
|
|
<div class="topPanel" style="height:100px;">
|
|
<div class="toolbar">
|
|
<div class="btn-group">
|
|
<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 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>
|
|
</div>
|
|
<script>$('.toolbar').authorizeButton()</script>
|
|
</div>
|
|
<div class="search">
|
|
<table>
|
|
<tr>
|
|
<td style="text-align:right;"><label class="lglabel" for="txt_POCode"> 单据号</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_POCode" type="text" class="form-control" style="width: 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>
|
|
|
|
<td style="text-align:right;"><label class="lglabel " for="txt_Area"> 区域</label>:</td>
|
|
<td >
|
|
<div class="input-group ">
|
|
<input id="txt_Area" type="text" class="form-control " style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
|
|
<td class="Workorder" style="text-align:right;"><label class="lglabel " for="txt_OrderNumber"> 生产订单</label>:</td>
|
|
<td class="Workorder">
|
|
<div class="input-group ">
|
|
<input id="txt_OrderNumber" type="text" class="form-control " style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
|
|
@*<td class="Workorder" style="text-align:right;"><label class="lglabel " for="txt_Area9"> 存储区域</label>:</td>
|
|
<td class="Workorder" >
|
|
<div class="input-group ">
|
|
<input id="txt_Area9" type="text" class="form-control " style="width: 100px;">
|
|
</div>
|
|
</td>*@
|
|
|
|
</tr>
|
|
<tr>
|
|
|
|
<td style="text-align:right;"><label class="lglabel " for="txt_Location"> 仓库</label>:</td>
|
|
<td >
|
|
<div class="input-group ">
|
|
<input id="txt_Location" type="text" class="form-control " style="width: 100px;">
|
|
</div>
|
|
</td>
|
|
|
|
|
|
@*<td style="text-align:right;"><label class="lglabel" for="txt_Location"> 库存地点</label>:</td>
|
|
<td>
|
|
<div class="input-group">
|
|
<input id="txt_Location" type="text" class="form-control" style="width: 100px;">
|
|
</div>
|
|
</td>*@
|
|
|
|
<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>
|
|
<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>
|