diff --git a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs index 6846813..7dc4942 100644 --- a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs +++ b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs @@ -1612,7 +1612,7 @@ WHERE DateTime MTime = DateTime.Now; string sql = $@"SELECT * FROM ICSDeliveryNotice WHERE ID in({ids}) AND DNCode NOT IN(SELECT TransCode From ICSInventoryLotDetail) "; var dataset = Repository().FindDataSetBySql(sql); - if (dataset.Tables.Count == 0) + if (dataset.Tables.Count <= 0) return 0; DataTable table = dataset.Tables[0]; StringBuilder sqlString = new StringBuilder(); @@ -1665,6 +1665,10 @@ WHERE newid(),'{LotNo}','{invCode}','{MTime}','2999-12-31','{quantity}','{extensionID}','7','{MUSER}','{MUSERNAME}', getdate(),'{workPoint}','{amount}');"); } + if (sqlString.IsEmpty()) + { + return 0; + } int count = SqlHelper.CmdExecuteNonQueryLi(sqlString.ToString()); return count; } @@ -1872,6 +1876,10 @@ WHERE newid(),'{LotNo}','{invCode}','{MTime}','2999-12-31','{quantity}','{extensionID}','9','{MUSER}','{MUSERNAME}', getdate(),'{workPoint}','{amount}');"); } + if (sqlString.IsEmpty()) + { + return 0; + } int count = SqlHelper.CmdExecuteNonQueryLi(sqlString.ToString()); return count; } 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 c84b344..8736624 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/WMSCreateItemLot/CreateItemLot.cshtml @@ -18,6 +18,10 @@ if (Type != '9') { $(".Workorder").css('display', 'none'); } + if (Type != '7') + { + $(".txt_DNID1").css('display', 'none'); + } if (Type == '1') { gridList(); @@ -81,12 +85,14 @@ }) //显示的列内容 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 }; @@ -3193,8 +3199,7 @@ $("#PickID").val(''); var sign = ''; var objID = ''; - var arr = []; - + var status = ''; var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); if (objList.length <= 0) { $.modalAlert("请先选择单据!", "warning"); @@ -3222,9 +3227,14 @@ param: { keyValue: JSON.stringify(objID) }, - success: function () { - //sign = data.count; + success: function (data) { + if (data.state == "success") { + $.modalMsg(data.message, data.state); + } else { + $.modalAlert(data.message, data.state); + } $.currentWindow().$("#gridList").trigger("reloadGrid"); +; } }); } @@ -3239,63 +3249,23 @@ keyValue: JSON.stringify(objID) }, success: function (data) { - sign = data.count; + if (data.state == "success") { + $.modalMsg(data.message, data.state); + } else { + $.modalAlert(data.message, data.state); + } + $.currentWindow().$("#gridList").trigger("reloadGrid"); } }); } - - //if (sign > 0) { - - // $.modalAlert("操作成功"); - // return; - //} - } - - function btnBatchCreateCP() { - debugger; - $("#PickID").val(''); - var sign = ''; - var objID = ''; - var arr = []; - - var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); - if (objList.length <= 0) { - $.modalAlert("请先选择单据!", "warning"); - return; - } - for (var i = 0; i < objList.length; i++) { - - if (objList[i] != undefined) { - objID += "'" + objList[i] + "',"; - - } - - - //objArr = "" + objArr + "|"; - //arr.push(objArr); - } - objID = objID.substring(0, objID.length - 1); - - $.ajax({ - url: "/WMS/WMSCreateItemLot/SubmitKLCPRK?ids=" + objID, - dataType: "json", - type: "post", - async: false, - param: { - keyValue: JSON.stringify(objID) - }, - success: function (data) { - sign = data.count; - } - }); - if (sign>0) { - - $.modalAlert("操作成功"); + if (sign != '') { + $.modalAlertNew('',sign,); return; } } - + + @@ -3391,8 +3361,8 @@ - : - + : +