From d7fe0f4c66b134fca43bca44b1161c0e4aa28bcb Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期一, 10 三月 2025 15:27:52 +0800 Subject: [PATCH] 修改入库问题 --- Pda/web.config | 3 Pda/View/AsnSetting/requestRuku.html | 6 +- HTML/views/ASNSetting/PalletBind.html | 35 ++--------- HTML/views/ASNSetting/ArrivalNotice.html | 2 Wms/Model/ModelDto/BllAsnDto/PalletBindDto.cs | 6 ++ Wms/WMS.BLL/Logic/AllotLocation.cs | 67 ++++++++++++--------- Wms/Wms/Controllers/DownApiController.cs | 6 +- Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs | 9 +- 8 files changed, 66 insertions(+), 68 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html index 19b0bf3..fb683ad 100644 --- a/HTML/views/ASNSetting/ArrivalNotice.html +++ b/HTML/views/ASNSetting/ArrivalNotice.html @@ -302,7 +302,7 @@ <i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`; } - if((d.AsnType =="1" || d.AsnType == "4" || d.AsnType == "8") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){ + if((d.AsnType =="1" || d.AsnType == "4") && d.IsPasteCode == "1" && (d.Status == "0" || d.Status == "1")){ html += `<a class="layui-btn layui-btn-normal layui-btn-xs addLabelClass" lay-event="Addlabel"> <i class="layui-icon layui-icon-edit"></i>鐢熸垚鏍囩</a>`; } diff --git a/HTML/views/ASNSetting/PalletBind.html b/HTML/views/ASNSetting/PalletBind.html index 83dcf1e..580dc24 100644 --- a/HTML/views/ASNSetting/PalletBind.html +++ b/HTML/views/ASNSetting/PalletBind.html @@ -331,24 +331,7 @@ {{ GetBtn11(d) }} </script> - <script type="text/html" id="RoadwayButton"> - {{# - switch (d.RoadwayNo) { - case "R01": return '01宸烽亾'; - case "R02": return '02宸烽亾'; - case "R03": return '03宸烽亾'; - case "R04": return '04宸烽亾'; - case "R05": return '05宸烽亾'; - case "R06": return '06宸烽亾'; - case "R07": return '07宸烽亾'; - case "R08": return '08宸烽亾'; - case "R09": return '09宸烽亾'; - case "R10": return '10宸烽亾'; - default: return ""; - } - - }} - </script> + <!-- #endregion --> </div> @@ -417,9 +400,12 @@ // 鏌ヨ浜嬩欢 form.on('select(getWareHouseNo)', function (data) { - if ($("#WareHouseNo").val() == "W01") { + $("#RoadwayNo").html(''); + $("#RoadwayNo").append('<option value=""></option>'); + form.render('select'); + if ($("#WareHouseNo").val() != "") { //鑾峰彇宸烽亾涓嬫媺妗嗕俊鎭� - synData(IP + "/Sys/GetRoadwayList", {}, 'get', function (res) { + synData(IP + "/Sys/GetStorageRoadwayByHouseNo", {wareHouseNo:$("#WareHouseNo").val()}, 'get', function (res) { if (res.code == 0) { //鎴愬姛 for (var i = 0; i < res.data.length; i++) { @@ -436,12 +422,7 @@ } }); } - else { - $("#RoadwayNo").html(''); - $("#RoadwayNo").append('<option value=""></option>'); - form.render('select'); - } - + }); // 娓叉煋鎬昏〃 @@ -454,7 +435,7 @@ { field: 'PalletNo2', title: '鎵樼洏鍙稬V2', align: 'center' }, { field: 'PalletNo3', title: '鎵樼洏鍙稬V3', align: 'center' }, { field: 'LocatNo', title: '鍌ㄤ綅鍦板潃', align: 'center', width: 90 }, - { field: 'RoadwayNo', title: '鎵�灞炲贩閬�', align: 'center', width: 90, templet: '#RoadwayButton' }, + { field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center', width: 90 }, { field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center', width: 90 }, { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 110 }, { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' }, diff --git a/Pda/View/AsnSetting/requestRuku.html b/Pda/View/AsnSetting/requestRuku.html index 56c5a85..309c5ab 100644 --- a/Pda/View/AsnSetting/requestRuku.html +++ b/Pda/View/AsnSetting/requestRuku.html @@ -270,10 +270,10 @@ } var param = { PalletNo: $("#PalletNo").val(), - HouseNo:"W01" + HouseNo:"W02" } sendData(IP + "/DownApi/RequestLocation", param, 'post', function (res) { - if (res.code == 0) { //鎴愬姛 + if (res.Success == 0) { //鎴愬姛 layer.msg(res.msg, { icon: 1, time: 2500 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 @@ -297,7 +297,7 @@ $("#LocatNo").val(res.data.LocatNo); }); } else { //涓嶆垚鍔� - layer.msg(res.msg, { + layer.msg(res.Message, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { diff --git a/Pda/web.config b/Pda/web.config index 50fe318..e073197 100644 --- a/Pda/web.config +++ b/Pda/web.config @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> - <httpRedirect enabled="false" destination="login.html" exactDestination="true" childOnly="true" /> + <httpRedirect enabled="true" destination="test.html" exactDestination="false" childOnly="false" /> <defaultDocument> <files> <remove value="default.aspx" /> @@ -10,6 +10,7 @@ <remove value="index.htm" /> <remove value="Default.asp" /> <remove value="Default.htm" /> + <add value="test.html" /> <add value="login.html" /> </files> </defaultDocument> diff --git a/Wms/Model/ModelDto/BllAsnDto/PalletBindDto.cs b/Wms/Model/ModelDto/BllAsnDto/PalletBindDto.cs index 1dacdff..7e8d0b4 100644 --- a/Wms/Model/ModelDto/BllAsnDto/PalletBindDto.cs +++ b/Wms/Model/ModelDto/BllAsnDto/PalletBindDto.cs @@ -34,6 +34,12 @@ public string RoadwayNo { get; set; } /// <summary> + /// Desc:鎵�灞炲贩閬撳悕绉� + /// Default: + /// Nullable:True + /// </summary> + public string RoadwayName { get; set; } + /// <summary> /// Desc:鎵�灞炰粨搴� /// Default: /// Nullable:True diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs index 176002a..f3f3ab6 100644 --- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs @@ -646,10 +646,10 @@ .LeftJoin<BllArrivalNoticeDetail>((a, b) => a.ASNDetailNo == b.Id) .LeftJoin<SysUserInfor>((a, b, c) => a.CreateUser == c.Id) .LeftJoin<SysUserInfor>((a, b, c, d) => a.UpdateUser == d.Id) - .LeftJoin<SysStorageLocat>((a, b, c, d, e) => a.LocatNo == e.LocatNo) - .LeftJoin<SysWareHouse>((a, b, c, d, e,f) => a.WareHouseNo == f.WareHouseNo) - //.LeftJoin<BllBoxInfo>((a, b, c, d, e, f) => a.Id == e.BindNo) - .Select((a, b, c, d,e,f) => new PalletBindDto() + //.LeftJoin<SysStorageLocat>((a, b, c, d, e) => a.LocatNo == e.LocatNo) + .LeftJoin<SysWareHouse>((a, b, c, d,f) => a.WareHouseNo == f.WareHouseNo) + .LeftJoin<SysStorageRoadway>((a, b, c, d, f,g) => a.RoadwayNo == g.RoadwayNo) + .Select((a, b, c, d,f,g) => new PalletBindDto() { Id = a.Id, ASNNo = a.ASNNo, @@ -660,6 +660,7 @@ PalletNo3 = a.PalletNo3, LocatNo = a.LocatNo, RoadwayNo = a.RoadwayNo, + RoadwayName = g.RoadwayName, WareHouseNo = a.WareHouseNo, WareHouseName = a.WareHouseNo+"-"+f.WareHouseName, Qty = a.Qty, diff --git a/Wms/WMS.BLL/Logic/AllotLocation.cs b/Wms/WMS.BLL/Logic/AllotLocation.cs index 98fb833..8d1ca0a 100644 --- a/Wms/WMS.BLL/Logic/AllotLocation.cs +++ b/Wms/WMS.BLL/Logic/AllotLocation.cs @@ -377,21 +377,25 @@ locate = GetLocateByRoadway(l.RoadwayNo, topOrBom, leftOrRight, areaList, list, ref count); if (locate != null) { - list.Add(locate.LocatNo); - var isOk = LocateIsOk(locate); - if (!isOk) - { - locate = null; - } - if (isOk) - { - break; - } + break; + //list.Add(locate.LocatNo); + //var isOk = LocateIsOk(locate); + //if (!isOk) + //{ + // locate = null; + //} + //if (isOk) + //{ + // break; + //} } } while (count != 0 && locate == null);//褰撴煡璇㈠偍浣嶆暟閲忎笉绛�0 骞朵笖鍌ㄤ綅涓虹┖鏃讹紝鍐嶆寰幆宸烽亾銆佸尯鍩熸煡鎵惧偍浣� - + if (locate!=null) + { + break; + } } //濡傛灉璺冲贩閬撳苟涓旀湭鎵惧埌鍚堥�傜┖鍌ㄤ綅,鍒欒烦鍒版渶鍚庝竴娆′娇鐢ㄧ殑宸烽亾鏌ヨ if (!isRoadway) @@ -407,12 +411,13 @@ locate = GetLocateByRoadway(log.RoadwayNo, topOrBom, leftOrRight, areaList, list, ref count); if (locate != null) { - list.Add(locate.LocatNo); - var isOk = LocateIsOk(locate); - if (!isOk) - { - locate = null; - } + break; + //list.Add(locate.LocatNo); + //var isOk = LocateIsOk(locate); + //if (!isOk) + //{ + // locate = null; + //} } @@ -434,21 +439,25 @@ locate = GetLocateByRoadway(item.RoadwayNo, topOrBom, leftOrRight, areaList, list, ref count); if (locate != null) { - list.Add(locate.LocatNo); - var isOk = LocateIsOk(locate); - if (!isOk) - { - locate = null; - } - if (isOk) - { - break; - } + break; + //list.Add(locate.LocatNo); + //var isOk = LocateIsOk(locate); + //if (!isOk) + //{ + // locate = null; + //} + //if (isOk) + //{ + // break; + //} } } while (count != 0 && locate == null);//褰撴煡璇㈠偍浣嶆暟閲忎笉绛�0 骞朵笖鍌ㄤ綅涓虹┖鏃讹紝鍐嶆寰幆宸烽亾銆佸尯鍩熸煡鎵惧偍浣� - + if (locate != null) + { + break; + } } } @@ -515,7 +524,7 @@ } /// <summary> - /// 楠岃瘉鍌ㄤ綅鏄惁鍙叆搴� + /// 楠岃瘉鍌ㄤ綅鏄惁鍙叆搴� 鍙屾繁浣嶉獙璇� /// </summary> /// <param name="locate"></param> /// <returns></returns> diff --git a/Wms/Wms/Controllers/DownApiController.cs b/Wms/Wms/Controllers/DownApiController.cs index 0c77d05..c1f00c4 100644 --- a/Wms/Wms/Controllers/DownApiController.cs +++ b/Wms/Wms/Controllers/DownApiController.cs @@ -304,12 +304,12 @@ var claimsIdentity = this.User.Identity as ClaimsIdentity; if (claimsIdentity == null) { - return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + return Ok(new HttpReturnModel { Success = "1", Message = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); } var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; if (string.IsNullOrWhiteSpace(userId)) { - return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + return Ok(new HttpReturnModel { Success = "1", Message = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); } @@ -326,7 +326,7 @@ { new OperationASNServer().AddLogOperationAsn("鍏ュ簱浣滀笟", "鍏ュ簱鏃ュ織", model.PalletNo, "鐢宠鍌ㄤ綅", $"鐢宠鍌ㄤ綅鎵樼洏鍙凤細{model.PalletNo}鐨勫け璐ヤ俊鎭�", int.Parse(userId)); - return Ok(new ErpModel { Success = -1, Message = e.Message }); + return Ok(new HttpReturnModel { Success = "-1", Message = e.Message }); } } -- Gitblit v1.8.0