HTML/views/ASNSetting/ArrivalNoticeDetail.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HTML/views/ASNSetting/SelMaterials.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
HTML/views/SOSetting/ExportNotice.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Pda/View/AsnSetting/productEnterQuantity.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.Entity/DataEntity/DataStockDetail.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Wms/Wms/Controllers/PdaAsnController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HTML/views/ASNSetting/ArrivalNoticeDetail.html
@@ -439,6 +439,7 @@ active = { add: function () { var typeValue = $("#Type").val(); console.log(typeValue) layer.open({ type: 2, title: '添加明细', HTML/views/ASNSetting/SelMaterials.html
@@ -32,6 +32,7 @@ <option value="4">车间余料退回入库</option> <option value="5">其它入库</option> <option value="6">代储入库</option> <option value="7">寄存入库</option> </select> </div> </div> HTML/views/SOSetting/ExportNotice.html
@@ -333,9 +333,11 @@ var html = ''; if(d.IsWave == '0'){ if(d.Status == '0' || d.Status == '1' ){ html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto"> <i class="layui-icon layui-icon-ok"></i>自动分配 </a>`; if(d.type != "8") { html += `<a class="layui-btn layui-btn-normal layui-btn-xs zifenClass" lay-event="auto"> <i class="layui-icon layui-icon-ok"></i>自动分配 </a>`; } } if(d.Status == '0' && d.Origin == 'WMS'){ html += `<a class="layui-btn layui-btn-normal layui-btn-xs uptClass" lay-event="edit"> Pda/View/AsnSetting/productEnterQuantity.html
@@ -219,7 +219,7 @@ </form> </div> <br> <!-- <br> --> <div id="" class="cut-line"> <img src="/assets/fengexian.png"> @@ -339,6 +339,22 @@ </table> <!-- <div id="demodiv" class="layui-form-item layout-input"> <label class="layui-form-label" lang>寄存备注:</label> <div class="layui-input-block"> <textarea placeholder="请输入内容" id="Demo" name="Demo" class="layui-textarea" ></textarea> </div> </div> --> <!-- 维护备注弹框 --> <div id="demodiv" class="layui-form-item layout-input" style="height: auto;"> <label class="layui-form-label">寄存备注:</label> <div class="layui-input-inline" style="width: 365px;height: auto;"> <textarea placeholder="请输入内容" id="NoticeDemo" name="NoticeDemo" class="layui-textarea" ></textarea> </div> <br> </div> <table class="layout-tbl-submit" border="" cellspacing="" cellpadding=""> <tr> <td style="width: 23%;"></td> @@ -355,6 +371,11 @@ </div> <br> <br> <div id="demodiv1"> <br><br><br><br><br><br><br> </div> <div id="" class="cut-line"> <img src="/assets/fengexian.png"> @@ -409,7 +430,8 @@ var form = layui.form /* 标签切换代码 */ $('#demodiv').hide(); $('#demodiv1').hide(); var xianshiyemian = 0; $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //选中后颜色 @@ -431,7 +453,8 @@ xianshiyemian = 1; $('#content1').hide(); $('#option1').attr("style", "background-color: #999;width: 45.77%;float: left;text-align: center;"); //默认颜色 $('#content2').show(); $('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //选中后颜色 @@ -652,6 +675,7 @@ }); //选中入库单事件-数量 form.on('select(getbar1)', function (data) { updateDemoDiv(); updateGoodList() setOrderGoods(); }); @@ -758,6 +782,7 @@ AsnDetailId: parseInt($("#goodSelect1").val()), //入库单明细ID LotNo: $("#goodSelect1").find("option:selected").text(), //物料批次 SkuQty: parseInt($("#SkuQty").val()), //物料数量 Demo: $("#NoticeDemo").val(), //物料数量 Origin: "PDA" } @@ -788,6 +813,35 @@ return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 }); // 根据入库单号 获取备注是否显示及备注信息 function updateDemoDiv() { var param = { AsnNo: $("#bar1").val(), }; synData(IP + "/PdaAsn/GetArrivalNotice", param, 'post', function (res) { console.log(res) if (res.code == 0 && res.data != null) { //成功 //判断默认选中是否为寄存物料 if(res.data[0].Type == "7") { $("textarea[name='NoticeDemo']").val(res.data[0].Demo); //备注 $('#demodiv').show(); $('#demodiv1').show(); } else { $('#demodiv').hide(); $('#demodiv1').hide(); } } else{ $('#demodiv').hide(); $('#demodiv1').hide(); } }); } // 根据入库明细ID 获取详细信息 function setOrderGoods() { @@ -825,6 +879,7 @@ $("#Standard1").val(res.data.Standard); $("#ImportFactQuantity1").val(res.data.FactQty + ""); } else{} }); } @@ -914,6 +969,7 @@ asnDetails = res.data; for (var i = 0; i < res.data.length; i++) { if (skuNo != '' && skuNo == res.data[i].SkuNo) { if (i == 0) { $("#goodSelect1").append('<option value =' + res.data[i].Id + ' selected>' + res.data[i] .SkuName); @@ -947,6 +1003,7 @@ $('#goodSelect1').siblings("div.layui-form-select").find('dl').find(sel).addClass('layui-this') } } else { } }); } Wms/Model/ModelVm/PdaVm/PdaAsnVm.cs
@@ -69,5 +69,10 @@ /// Desc:批次号 /// </summary> public string LotNo { get; set; } /// <summary> /// Desc:备注 /// </summary> public string Demo { get; set; } } } Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -177,7 +177,7 @@ skuType = "(4)"; break; case "7"://寄存入库 skuType = "(0,1,2,3,4)"; skuType = "(3)"; break; default: //其它 skuType = "(0,1,2,3,4)"; Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -42,6 +42,23 @@ } } //根据入库单号获取入库总单信息 public List<BllArrivalNotice> GetArrivalNotice(ArrivalNoticeVm model) { string sqlString = string.Empty; try { sqlString = $"select * from BllArrivalNotice where ASNNo = '{model.ASNNo}' and isdel='0' "; var modelList = Db.Ado.SqlQuery<BllArrivalNotice>(sqlString); return modelList; } catch (Exception ex) { throw ex; } } // 根据单据号获取单据明细列表 public List<ArrivalNoticeDetailDto> GetArrivalNoticeDetails(ArrivalNoticeVm model) { @@ -1286,7 +1303,7 @@ /// </summary> /// <param name="locatNo">储位编码</param> /// <returns></returns> public string CheckLocatNo(string locatNo) public string CheckLocatNo(string locatNo) { try { @@ -1810,6 +1827,52 @@ } } int isDeposit = 0; //判断总单单据是否为寄存单据 if (notice.Type == "7") { isDeposit = 1; } if (isDeposit == 1) { //判断总单备注是否为空 if (!string.IsNullOrWhiteSpace(notice.Demo)) { //分割总单备注及托盘备注 var noticeDemo = notice.Demo.Split('、'); //总单备注 var palletDemo = model.Demo.Split('、'); //托盘备注 //循环托盘备注 foreach (var itemPallet in palletDemo) { int isDemo = 0; //循环总单备注 foreach (var itemNotice in noticeDemo) { //判断是否有相同备注 if (itemPallet == itemNotice) { isDemo = 1; break; } } if (isDemo == 0) { throw new Exception("-1:总单备注与托盘备注不符,请核实后重新绑定!"); } } } else if (string.IsNullOrWhiteSpace(notice.Demo)) { //判断托盘备注是否为空 if (!string.IsNullOrWhiteSpace(model.Demo)) { throw new Exception("-1:请添加总单备注后输入托盘备注!"); } } } #endregion Db.BeginTran(); @@ -1836,40 +1899,46 @@ var package = Db.Queryable<SysPackag>().Where(m => m.IsDel == "0"); var sku = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == detail.SkuNo); var pack = package.First(m => m.IsDel == "0" && m.PackagNo == sku.PackagNo); if (pack == null) { throw new Exception("-1:获取物料包装失败,请核实!"); } var pNum = 0;//托盘物品数量 var bNum = 0;//箱码物品数量 if (pack.L5Num.HasValue) //判断是否为寄存物料 if (isDeposit == 0) { pNum = (int)pack.L5Num; bNum = (int)pack.L4Num; } else if (pack.L4Num.HasValue) { pNum = (int)pack.L4Num; bNum = (int)pack.L3Num; } else if (pack.L3Num.HasValue) { pNum = (int)pack.L3Num; bNum = (int)pack.L2Num; } else if (pack.L2Num.HasValue) { pNum = (int)pack.L2Num; bNum = (int)pack.L1Num; } else if (pack.L1Num.HasValue) { pNum = (int)pack.L1Num; bNum = (int)pack.L1Num; } if (pNum == 0 || bNum == 0) { throw new Exception($"绑定失败,{detail.SkuNo}物品包装未找到!"); if (pack == null) { throw new Exception("-1:获取物料包装失败,请核实!"); } if (pack.L5Num.HasValue) { pNum = (int)pack.L5Num; bNum = (int)pack.L4Num; } else if (pack.L4Num.HasValue) { pNum = (int)pack.L4Num; bNum = (int)pack.L3Num; } else if (pack.L3Num.HasValue) { pNum = (int)pack.L3Num; bNum = (int)pack.L2Num; } else if (pack.L2Num.HasValue) { pNum = (int)pack.L2Num; bNum = (int)pack.L1Num; } else if (pack.L1Num.HasValue) { pNum = (int)pack.L1Num; bNum = (int)pack.L1Num; } if (pNum == 0 || bNum == 0) { throw new Exception($"绑定失败,{detail.SkuNo}物品包装未找到!"); } } #endregion @@ -1910,9 +1979,11 @@ BitPalletMark = "1", IsBale = "0", IsBelt = "0", CreateUser = userId CreateUser = userId, Demo = model.Demo, }; if (model.SkuQty > pNum) if (model.SkuQty > pNum && isDeposit == 0) { throw new Exception($"绑定失败,{model.PalletNo}托盘绑定数量大于该物品托盘包装数量!"); } @@ -2002,7 +2073,7 @@ // 更新托盘绑定表 bind.Qty += factQty; } if (bind.FullQty < bind.Qty) if (bind.FullQty < bind.Qty && isDeposit == 0) { throw new Exception("托盘绑定数量已超出该物料包装数量"); } @@ -2011,7 +2082,7 @@ { bind.BitPalletMark = "0"; } if (bind.Qty > pNum) if (bind.Qty > pNum && isDeposit == 0) { throw new Exception($"绑定失败,{bind.PalletNo}托盘绑定数量大于该物品托盘包装数量!"); } @@ -2155,7 +2226,7 @@ { // 不贴码物料 无需验证箱码信息 } else else { //验证箱码信息是否存在 if (boxInfoList.Count <= 0) Wms/WMS.Entity/BllAsnEntity/BllPalletBind.cs
@@ -168,7 +168,12 @@ /// </summary> public string IsBelt {get;set;} /// <summary> /// Desc:备注 /// Default: /// Nullable:True /// </summary> public string Demo { get; set; } } } Wms/WMS.Entity/DataEntity/DataStockDetail.cs
@@ -235,7 +235,12 @@ /// </summary> public string IsBelt {get;set;} /// <summary> /// Desc:备注 /// Default: /// Nullable:True /// </summary> public string Demo { get; set; } } } Wms/WMS.IBLL/IPdaServer/IPdaAsnServer.cs
@@ -17,6 +17,9 @@ // 根据单据号获取单据明细列表 List<ArrivalNoticeDetailDto> GetArrivalNoticeDetails(ArrivalNoticeVm model); //根据入库单号获取入库总单信息 List<BllArrivalNotice> GetArrivalNotice(ArrivalNoticeVm model); // 根据单据明细ID获取明细详情 ArrivalNoticeDetailDto GetArrivalNoticeDetail(ArrivalNoticeDetailVm model); Wms/Wms/Controllers/PdaAsnController.cs
@@ -46,6 +46,33 @@ } /// <summary> /// 根据入库单获取入库总单信息 /// </summary> /// <param name="model">ASNNo:入库单号</param> /// <returns></returns> [HttpPost] public IActionResult GetArrivalNotice(ArrivalNoticeVm model) { try { var models = _PdaAsnSvc.GetArrivalNotice(model); if (models == null) { return Ok(new { code = 1, msg = "入库单信息", data = models }); } else { return Ok(new { code = 0, msg = "入库单信息", data = models }); } } catch (Exception e) { return Ok(new { code = 1, msg = e.Message }); } } /// <summary> /// 判断托盘是否可用 /// </summary> /// <param name="model">PalletNo:托盘条码</param>