diff --git a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs index 1127455..d17b4e1 100644 --- a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs +++ b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs @@ -1643,5 +1643,200 @@ left join (select b.TransCode,b.TransSequence,sum(isnull(Quantity,0)) LOTQTY fro return Repository().FindTableBySql(sql.ToString()); } + + public DataTable GetSubGridJsonLLSQDByCreate(string ApplyNegCode, string Sequence, string WorkPoint) + { + DataTable dt = new DataTable(); + //var queryParam = queryJson.ToJObject(); + List parameter = new List(); + string sql = @" select a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.Quantity,ISNULL(c.LOTQTY,0) AS CreatedQty, + (a.Quantity-ISNULL(c.LOTQTY,0)) as thisCreateQty + from ICSMOApplyNegDetail a + left join ICSMOApplyNeg d on a.ApplyNegCode=d.ApplyNegCode and a.WorkPoint=d.WorkPoint + left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint + left join ( + select b.TransCode,b.TransSequence,sum(isnull(Quantity,0)) LOTQTY from ICSInventoryLot a + left join ICSInventoryLotDetail b on a.LotNo=b.LotNo + group by b.TransCode,b.TransSequence + ) c on a.ApplyNegCode=c.TransCode and a.Sequence=c.TransSequence + WHERE d.Type='2' + and a.ApplyNegCode='" + ApplyNegCode + "' and a.Sequence='" + Sequence + "'"; + sql += " and a.WorkPoint='" + WorkPoint + "'"; + return Repository().FindTableBySql(sql.ToString()); + } + + //领料申请退料生成条码 + public int SubmitFormLLSQTL(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint) + { + var queryParam = keyValue.ToJObject(); + string WorkPoints = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(','); + int createPageCount = Convert.ToInt32(queryParam["createPageCount"].ToString()); + decimal minPackQty = Convert.ToDecimal(queryParam["minPackQty"].ToString()); + decimal thisCreateQty = Convert.ToDecimal(queryParam["thisCreateQty"].ToString()); + decimal LOTQTY = minPackQty; + //string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location; + //string VenCode = GetVendorCode(ApplyNegCode, Sequence, WorkPoint); + string Pre = ApplyNegCode + Sequence; + string sql = string.Empty; + //string VendorLot = queryParam["VendorLot"].ToString(); + string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; + string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; + string PRODUCTDATE = queryParam["PRODUCTDATE"].ToString(); + string sqls = string.Empty; + for (int i = 0; i < createPageCount; i++) + { + if (i + 1 == createPageCount) + { + if (minPackQty * createPageCount > thisCreateQty) + { + LOTQTY = thisCreateQty - (minPackQty * (createPageCount - 1)); + } + } + + string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 5); + sql += string.Format(@"Insert into ICSInventoryLotDetail(LotNo, TransCode,TransSequence,MUSER,MUSERName,MTIME,WorkPoint) + Values('{0}','{1}','{2}','{3}','{4}',getdate(),'{5}' )", + LotNo, ApplyNegCode, Sequence, MUSER, MUSERNAME, WorkPoints); + //if (SqlHelper.ExecuteNonQuery(sqls) > 0) + //{ + sql += string.Format(@"insert into ICSInventoryLot + (ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint) + select + newid(),'{0}',InvCode,'{1}','2999-12-31 00:00:00.000','{2}',ExtensionID,'3','{3}','{4}', getdate(),'{5}' + from ICSMOApplyNegDetail where ApplyNegCode='{6}' and Sequence='{7}' and WorkPoint='{5}' ", + LotNo, PRODUCTDATE, LOTQTY, MUSER, MUSERNAME, WorkPoints, ApplyNegCode, Sequence); + sql += "\r\n"; + //} + + } + int count = SqlHelper.CmdExecuteNonQueryLi(sql); + return count; + } + + //材料出库退料 + public DataTable GetGridJsonCLCK(string queryJson, ref Pagination jqgridparam) + { + DataTable dt = new DataTable(); + var queryParam = queryJson.ToJObject(); + List parameter = new List(); + + #region [SQL] + string sql = @" + select a.ID,a.ApplyNegCode,a.Sequence,a.SourceDetailID,a.InvCode,b.InvName,b.InvDesc,b.InvStd,b.InvUnit,a.Quantity,a.Amount,a.IssueNegQuantity,a.ExtensionID,a.MUSERName,a.MTIME ,c.LOTQTY,f.BatchCode + from ICSMOApplyNegDetail a + left join ICSMOApplyNeg d on a.ApplyNegCode=d.ApplyNegCode and a.WorkPoint=d.WorkPoint + left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint + left join ( + select mm.TransCode,mm.TransSequence,sum(isnull(ee.Quantity,0)) LOTQTY,ee.WorkPoint from ICSInventoryLot ee + left join ICSInventoryLotDetail mm on ee.LotNo=mm.LotNo + group by mm.TransCode,mm.TransSequence,ee.WorkPoint + )c + on a.ApplyNegCode=c.TransCode and a.Sequence=c.TransSequence and a.WorkPoint=c.WorkPoint + left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint + WHERE d.Type='3'"; + sql = string.Format(sql, DbHelper.GetErpIp(), DbHelper.GetErpName()); + #endregion + + if (!string.IsNullOrWhiteSpace(queryJson)) + { + if (!string.IsNullOrWhiteSpace(queryParam["POCode"].ToString())) + { + sql += " and a.RCVCode like '%" + queryParam["POCode"].ToString() + "%' "; + } + if (!string.IsNullOrWhiteSpace(queryParam["InvCode"].ToString())) + { + sql += " and a.InvCode like '%" + queryParam["InvCode"].ToString() + "%' "; + } + if (!string.IsNullOrWhiteSpace(queryParam["InvName"].ToString())) + { + sql += " and b.InvName like '%" + queryParam["InvName"].ToString() + "%' "; + } + if (!string.IsNullOrWhiteSpace(queryParam["BatchCode"].ToString())) + { + sql += " and f.BatchCode like '%" + queryParam["BatchCode"].ToString() + "%' "; + } + } + if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode != "admin") + { + sql += " and a.WorkPoint='" + NFine.Code.OperatorProvider.Provider.GetCurrent().Location + "'"; + } + if (NFine.Code.OperatorProvider.Provider.GetCurrent().RoleEnCode == "Vendor") + { + sql += " and a.VenCode='" + NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode + "'"; + } + return Repository().FindTablePageBySql(sql.ToString(), parameter.ToArray(), ref jqgridparam); + } + +//材料出库退料 + public DataTable GetSubGridJsonCLCKByCreate(string ApplyNegCode, string Sequence, string WorkPoint) + { + DataTable dt = new DataTable(); + //var queryParam = queryJson.ToJObject(); + List parameter = new List(); + string sql = @" select a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.Quantity,ISNULL(c.LOTQTY,0) AS CreatedQty, + (a.Quantity-ISNULL(c.LOTQTY,0)) as thisCreateQty + from ICSMOApplyNegDetail a + left join ICSMOApplyNeg d on a.ApplyNegCode=d.ApplyNegCode and a.WorkPoint=d.WorkPoint + left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint + left join ( + select b.TransCode,b.TransSequence,sum(isnull(Quantity,0)) LOTQTY from ICSInventoryLot a + left join ICSInventoryLotDetail b on a.LotNo=b.LotNo + group by b.TransCode,b.TransSequence + ) c on a.ApplyNegCode=c.TransCode and a.Sequence=c.TransSequence + WHERE d.Type='3' + and a.ApplyNegCode='" + ApplyNegCode + "' and a.Sequence='" + Sequence + "'"; + sql += " and a.WorkPoint='" + WorkPoint + "'"; + return Repository().FindTableBySql(sql.ToString()); + } + + + //材料出库退料生成条码 + public int SubmitFormCLCKT(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint) + { + var queryParam = keyValue.ToJObject(); + string WorkPoints = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(','); + int createPageCount = Convert.ToInt32(queryParam["createPageCount"].ToString()); + decimal minPackQty = Convert.ToDecimal(queryParam["minPackQty"].ToString()); + decimal thisCreateQty = Convert.ToDecimal(queryParam["thisCreateQty"].ToString()); + decimal LOTQTY = minPackQty; + //string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location; + //string VenCode = GetVendorCode(ApplyNegCode, Sequence, WorkPoint); + string Pre = ApplyNegCode + Sequence; + string sql = string.Empty; + //string VendorLot = queryParam["VendorLot"].ToString(); + string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; + string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; + string PRODUCTDATE = queryParam["PRODUCTDATE"].ToString(); + string sqls = string.Empty; + for (int i = 0; i < createPageCount; i++) + { + if (i + 1 == createPageCount) + { + if (minPackQty * createPageCount > thisCreateQty) + { + LOTQTY = thisCreateQty - (minPackQty * (createPageCount - 1)); + } + } + + string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 5); + sql += string.Format(@"Insert into ICSInventoryLotDetail(LotNo, TransCode,TransSequence,MUSER,MUSERName,MTIME,WorkPoint) + Values('{0}','{1}','{2}','{3}','{4}',getdate(),'{5}' )", + LotNo, ApplyNegCode, Sequence, MUSER, MUSERNAME, WorkPoints); + //if (SqlHelper.ExecuteNonQuery(sqls) > 0) + //{ + sql += string.Format(@"insert into ICSInventoryLot + (ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint) + select + newid(),'{0}',InvCode,'{1}','2999-12-31 00:00:00.000','{2}',ExtensionID,'3','{3}','{4}', getdate(),'{5}' + from ICSMOApplyNegDetail where ApplyNegCode='{6}' and Sequence='{7}' and WorkPoint='{5}' ", + LotNo, PRODUCTDATE, LOTQTY, MUSER, MUSERNAME, WorkPoints, ApplyNegCode, Sequence); + sql += "\r\n"; + //} + + } + int count = SqlHelper.CmdExecuteNonQueryLi(sql); + return count; + } + } } diff --git a/WMS-BS/NFine.Web/Areas/WMS/Controllers/WMSCreateItemLotController.cs b/WMS-BS/NFine.Web/Areas/WMS/Controllers/WMSCreateItemLotController.cs index 929d726..707d23a 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Controllers/WMSCreateItemLotController.cs +++ b/WMS-BS/NFine.Web/Areas/WMS/Controllers/WMSCreateItemLotController.cs @@ -819,7 +819,7 @@ where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoin } /// - /// 点击生成条码查询(审核到货单) + /// 点击生成条码查询(领料申请退料) /// [HttpGet] @@ -835,7 +835,7 @@ where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoin } /// - /// 点击生成条码查询(审核委外到货单) + /// 点击生成条码查询(领料申请退料) /// [HttpGet] @@ -849,5 +849,87 @@ where a.ID IN (" + keyValue.TrimEnd(',') + ") and a.WorkPoint in ('" + WorkPoin }; return Content(JsonData.ToJson()); } + + + [HttpGet] + [HandlerAjaxOnly] + public ActionResult GetSubGridJsonLLSQDByCreate(string ApplyNegCode, string Sequence, string WorkPoint) + { + DataTable ListData = App.GetSubGridJsonLLSQDByCreate(ApplyNegCode, Sequence, WorkPoint); + var JsonData = new + { + rows = ListData, + }; + return Content(JsonData.ToJson()); + } + + + + //领料申请退料生成条码 + [HttpPost] + [HandlerAjaxOnly] + [ValidateAntiForgeryToken] + public ActionResult SubmitFormLLSQTL(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint) + { + int i = App.SubmitFormLLSQTL(ApplyNegCode, Sequence, keyValue, WorkPoint); + if (i > 0) + { + return Success("生成成功!"); + } + else + { + return Error("生成失败!"); + } + } + + + //材料出库退料 + [HttpGet] + [HandlerAjaxOnly] + public ActionResult GetGridJsonCLCK(Pagination pagination, string queryJson) + { + DataTable ListData = App.GetGridJsonCLCK(queryJson, ref pagination); + var JsonData = new + + { + total = pagination.total, + page = pagination.page, + records = pagination.records, + rows = ListData, + }; + return Content(JsonData.ToJson()); + } + + + //材料出库退料 + [HttpGet] + [HandlerAjaxOnly] + public ActionResult GetSubGridJsonCLCKByCreate(string ApplyNegCode, string Sequence, string WorkPoint) + { + DataTable ListData = App.GetSubGridJsonCLCKByCreate(ApplyNegCode, Sequence, WorkPoint); + var JsonData = new + { + rows = ListData, + }; + return Content(JsonData.ToJson()); + } + + //材料出库退料生成条码 + [HttpPost] + [HandlerAjaxOnly] + [ValidateAntiForgeryToken] + public ActionResult SubmitFormCLCKT(string ApplyNegCode, string Sequence, string keyValue, string WorkPoint) + { + int i = App.SubmitFormCLCKT(ApplyNegCode, Sequence, keyValue, WorkPoint); + if (i > 0) + { + return Success("生成成功!"); + } + else + { + return Error("生成失败!"); + } + } + } } \ No newline at end of file diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml index b18f86b..322602e 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml @@ -50,8 +50,14 @@ if (Type == '11') { gridList11(); } - - + //领料申请退料生成条码 + if (Type == '12') { + gridList12(); + } + //材料出库退料生成条码 + if (Type == '13') { + gridList13(); + } @@ -1434,6 +1440,114 @@ }); } + //材料出库退料 + function gridList13() { + 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/GetGridJsonCLCK" + "?" + Math.random(), + postData: { queryJson: JSON.stringify(queryJson) }, + height: $(window).height() - 200, + width: $(window).width() - 300, + 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(), + } + $gridList.jqGrid('setGridParam', { + postData: { queryJson: JSON.stringify(queryJson) }, + }).trigger('reloadGrid'); + }); + + } + function bindSubGrid13(subgrid_id, rowid) { + $("#gridList").jqGrid("setSelection", rowid, false); + var subgrid_table_id; + subgrid_table_id = subgrid_id + "_t"; // (3)根据subgrid_id定义对应的子表格的table的id + + var subgrid_pager_id; + subgrid_pager_id = subgrid_id + "_pgr" // (4)根据subgrid_id定义对应的子表格的pager的id + + // (5)动态添加子报表的table和pager + $("#" + subgrid_id).html("
"); + 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 + "&" + 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: ColModelSub, + shrinkToFit: true,//宽度自适应 + multiselect: true, + prmNames: { search: "search" }, + viewrecords: true, + height: "100%", + rowNum: 20, + pager: subgrid_pager_id, + + }); + } + + @@ -1661,7 +1775,23 @@ $.modalOpen({ id: "FormAddItemLot", title: "审核领料申请退料生成条码", - url: "/WMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 11 + "&" + Math.random(), + url: "/WMS/WMSCreateItemLot/From?LLApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&Type=" + 12 + "&" + Math.random(), + width: "550px", + height: "1000px", + callBack: function (iframeId) { + top.frames[iframeId].submitForm(); + } + }); + } + 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) { @@ -1669,7 +1799,6 @@ } }); } - } function fullscreen() { @@ -1707,6 +1836,7 @@ if (Type == '10') { mold = '00010'; } if (Type == '11') { mold = '00011'; } if (Type == '12') { mold = '00012'; }//领料申请退料 + if (Type == '13') { mold = '00013'; }//材料出库退料 var objArr = ''; var arr = []; var obj = $("#gridList").jqGrid("getRowData"); diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/From.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/From.cshtml index 5cb902f..1862846 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/From.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/From.cshtml @@ -16,6 +16,8 @@ var ODNCode = $.request("ODNCode"); var RCVCode = $.request("RCVCode"); var LLApplyNegCode = $.request("LLApplyNegCode"); + var CLApplyNegCode = $.request("CLApplyNegCode"); + debugger; var WorkPoints = '@NFine.Code.OperatorProvider.Provider.GetCurrent().Location' $(function () { @@ -422,6 +424,77 @@ }); } } + if (Type == '12') { + if (!!LLApplyNegCode && !!Sequence) { + $.ajax({ + url: "/WMS/WMSCreateItemLot/GetSubGridJsonLLSQDByCreate?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints, + //data: { keyValue: keyValue }, + dataType: "json", + async: false, + success: function (data) { + debugger; + $("#InvCode").val(data.rows[0].InvCode); + $("#INVNAME").val(data.rows[0].InvName); + $("#INVSTD").val(data.rows[0].InvStd); + $("#Quantity").val(data.rows[0].Quantity); + $("#CreatedQty").val(data.rows[0].CreatedQty); + $("#thisCreateQty").val(data.rows[0].thisCreateQty); + VenCode = data.rows[0].VenCode; + WorkPoint = data.rows[0].WorkPoint; + if (data.rows[0].Quantity == data.rows[0].CreatedQty) { + $("#thisCreateQty").attr("disabled", "disabled"); + $("#minPackQty").attr("disabled", "disabled"); + $("#VendorLotNo").attr("disabled", "disabled"); + } + } + }); + $.ajax({ + url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint, + //data: { keyValue: keyValue }, + dataType: "json", + async: false, + success: function (data) { + $("#VendorLotNo").val(data.VendorLotNo); + } + }); + } + } + if (Type == '13') { + if (!!CLApplyNegCode && !!Sequence) { + $.ajax({ + url: "/WMS/WMSCreateItemLot/GetSubGridJsonCLCKByCreate?ApplyNegCode=" + CLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints, + //data: { keyValue: keyValue }, + dataType: "json", + async: false, + success: function (data) { + debugger; + $("#InvCode").val(data.rows[0].InvCode); + $("#INVNAME").val(data.rows[0].InvName); + $("#INVSTD").val(data.rows[0].InvStd); + $("#Quantity").val(data.rows[0].Quantity); + $("#CreatedQty").val(data.rows[0].CreatedQty); + $("#thisCreateQty").val(data.rows[0].thisCreateQty); + VenCode = data.rows[0].VenCode; + WorkPoint = data.rows[0].WorkPoint; + if (data.rows[0].Quantity == data.rows[0].CreatedQty) { + $("#thisCreateQty").attr("disabled", "disabled"); + $("#minPackQty").attr("disabled", "disabled"); + $("#VendorLotNo").attr("disabled", "disabled"); + } + } + }); + $.ajax({ + url: "/WMS/WMSCreateItemLot/GetVendorLotNo?VenCode=" + VenCode + "&WorkPoint=" + WorkPoint, + //data: { keyValue: keyValue }, + dataType: "json", + async: false, + success: function (data) { + $("#VendorLotNo").val(data.VendorLotNo); + } + }); + } + } + $("#minPackQty").change(minPackQty_Change); $("#thisCreateQty").change(thisCreateQty_Change); @@ -644,7 +717,28 @@ } }) } - + if (Type == '12') { + $.submitForm({ + url: "/WMS/WMSCreateItemLot/SubmitFormLLSQTL?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints, + param: { + keyValue: JSON.stringify(obj) + }, + success: function () { + $.currentWindow().$("#gridList").trigger("reloadGrid"); + } + }) + } + if (Type == '13') { + $.submitForm({ + url: "/WMS/WMSCreateItemLot/SubmitFormCLCKT?ApplyNegCode=" + LLApplyNegCode + "&Sequence=" + Sequence + "&WorkPoint=" + WorkPoints, + param: { + keyValue: JSON.stringify(obj) + }, + success: function () { + $.currentWindow().$("#gridList").trigger("reloadGrid"); + } + }) + } }