From f2df16d66c768d34d80320ea126c2e0fcfed1699 Mon Sep 17 00:00:00 2001 From: chengsc <11752@DESKTOP-DS49RCP> Date: 星期四, 03 四月 2025 16:56:20 +0800 Subject: [PATCH] 修改储位 --- HTML/js/public.js | 4 Wms/Wms/Controllers/SysController.cs | 3 Wms/WMS.BLL/SysServer/StorageAreaServer.cs | 6 Wms/WMS.BLL/SysServer/StorageLocatServer.cs | 63 ++++------ HTML/views/WareHouseSetting/Area.html | 6 HTML/views/WareHouseSetting/FlatLibraryLegend.html | 245 ++++++++++++++++++++-------------------- 6 files changed, 158 insertions(+), 169 deletions(-) diff --git a/HTML/js/public.js b/HTML/js/public.js index dc1bbb7..ed629a9 100644 --- a/HTML/js/public.js +++ b/HTML/js/public.js @@ -1,8 +1,8 @@ //var IP = "http://47.104.149.73:1991";//鎺ュ彛IP // var IP = "http://172.16.71.101:8082/";//鎺ュ彛IP //var IP = "http://localhost:13243/api"; -//var IP = "http://localhost:50515/api"; //鏈湴 -var IP = "http://172.16.105.10:8086/api"; +var IP = "http://localhost:50515/api"; //鏈湴 +//var IP = "http://172.16.105.10:8086/api"; // var IP = "http://localhost:44318/api"; //var IP = "http://192.168.1.6:8017"; //var IP = "http://192.168.1.226:8086"; diff --git a/HTML/views/WareHouseSetting/Area.html b/HTML/views/WareHouseSetting/Area.html index 6d8dbca..4a09965 100644 --- a/HTML/views/WareHouseSetting/Area.html +++ b/HTML/views/WareHouseSetting/Area.html @@ -44,9 +44,9 @@ <select name="Type" id="Type" lay-filter="Type" lay-search> <option value=""></option> <option value="0">鍑�妗跺尯</option> - <option value="1">棰勬贩鍖�</option> - <option value="2">鍗婃垚鍝佸尯</option> - <option value="3">鑴忔《鍖�</option> + <option value="1">婊℃《鍖�</option> + <option value="2">鑴忔《鍖�</option> + <option value="3">杞繍鍖�</option> <option value="4">璁惧鍖�</option> </select> </div> diff --git a/HTML/views/WareHouseSetting/FlatLibraryLegend.html b/HTML/views/WareHouseSetting/FlatLibraryLegend.html index f14c80c..8e3e6a1 100644 --- a/HTML/views/WareHouseSetting/FlatLibraryLegend.html +++ b/HTML/views/WareHouseSetting/FlatLibraryLegend.html @@ -103,9 +103,9 @@ } .btnShow { - width: auto; - height: auto; - cursor: pointer; + width: 20px; + height: 15px; + } .btnShow1 { width: 20px; @@ -124,7 +124,7 @@ <body> <div class="layui-fluid" style="height: 96%;width: 99%;"> <div class="layui-row layui-col-space15" style="width: auto;height: 100%;"> - <!-- 涓� --> + <!-- 椤�--> <div class="layui-col-md" style="width: auto;height: 10%;"> <div class="layui-card" style="width: auto;height: 100%;"> <div class="layui-card-body"> @@ -142,20 +142,12 @@ <label class="layui-form-label">妤煎眰</label> <div class="layui-input-inline"> <select name="Row" id="Row" lay-filter="SelectRow"> - <option value="1" selected>涓�妤�</option> + <option value="4" selected>鍥涙ゼ</option> <option value="3">涓夋ゼ</option> </select> </div> </div> - <!-- <div class="layui-inline"> - <label class="layui-form-label">娣卞害</label> - <div class="layui-input-inline"> - <select name="Depth" id="Depth" lay-filter="SelectDepth"> - <option value="01" selected>娣卞害1</option> - <option value="02" id="shendu2">娣卞害2</option> - </select> - </div> - </div> --> + <div class="layui-inline"> <!-- 鍌ㄤ綅鍥句緥 --> <table style="margin:0 auto;"> @@ -193,57 +185,128 @@ </div> </div> <!-- 涓� --> - <div class="layui-col-md" style="width: auto;height: 44%;"> + <div class="layui-col-md" style="width: auto;height: 24%;"> <div class="layui-row layui-col-space15" style="width: auto;height: 100%;"> - <!-- 涓�銆佷笁妤间笂宸01銆丅11 --> - <div class="layui-col-md6 divOneS" id="divOne"> + <!-- 绌� --> + <div class="layui-col-md1" style="height: 100%;"> <div class="layui-card" style="height: 100%;"> - <p id="a"></p> + <p></p> + <table class="container" style="width: 100%;height: 90%;"></table> + </div> + </div> + <!-- 绮夌瓫闂� --> + <div class="layui-col-md1 " id="divOne" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="a4">B01 绮夌瓫闂村尯</p> <table class="container" id="tabOne" style="width: 100%;height: 90%;"></table> </div> </div> - <!-- 涓�妤间笂涓乏B02 涓夋ゼ涓婁腑B12 --> - <div class="layui-col-md6 divOneS" id="divTwo"> + <!-- 涓�姝ュ埗绮�1--> + <div class="layui-col-md2 " id="divTwo" style="height: 100%;"> <div class="layui-card" style="height: 100%;"> - <p id="b"></p> + <p id="b4">涓�姝ュ埗绮�1</p> <table class="container" id="tabTwe" style="width: 100%;height: 90%;"></table> </div> </div> - <!-- 涓�妤间笂涓彸B03 --> - <div class="layui-col-md6 divOneS" id="divThree"> + <!-- 涓�姝ュ埗绮�2 --> + <div class="layui-col-md2 " id="divThree" style="height: 100%;"> <div class="layui-card" style="height: 100%;"> - <p id="c"></p> - <table class="container" id="tabThree" style="width: 100%;height: 90%;"></table> + <p id="c4">涓�姝ュ埗绮�2</p> + <table class="" id="tabThree" style="width: 100%;height: 90%;"></table> </div> </div> - <!-- 涓�銆佷笁妤间笂鍙矪04銆丅13 --> - <div class="layui-col-md6 divOneS" id="divFour"> + <!-- 涓�姝ュ埗绮�3 --> + <div class="layui-col-md2 " id="divFour" style="height: 100%;"> <div class="layui-card" style="height: 100%;"> - <p id="d"></p> + <p id="d4">涓�姝ュ埗绮�3</p> <table class="container" id="tabfour" style="width: 100%;height: 90%;"></table> + </div> + </div> + + <!-- 绌� --> + <div class="layui-col-md4 " id="divFour" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="e4"></p> + <table class="container" id="tabfive" style="width: 100%;height: 90%;"></table> </div> </div> </div> - </div> + <!-- 涓� --> + <div class="layui-col-md" style="width: auto;height: 39%;"> + <div class="layui-row layui-col-space15" style="width: auto;height: 100%;"> + <!-- 绌� --> + <div class="layui-col-md1" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p></p> + <table class="container" style="width: 100%;height: 90%;"></table> + </div> + </div> + <!-- 棰勬贩闂� --> + <div class="layui-col-md1 " id="divOne" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="a4"> 棰勬贩闂村尯</p> + <table class="container" id="tabOne" style="width: 100%;height: 90%;"></table> + </div> + </div> + <!-- 绌� --> + <div class="layui-col-md1 " id="divOne" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="a4"> </p> + <table class="container" id="tabOne" style="width: 100%;height: 90%;"></table> + </div> + </div> + <!-- 涓棿绔�--> + <div class="layui-col-md4 " id="divTwo" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="b4">涓棿绔�</p> + <table class="container" id="tabTwe" style="width: 100%;height: 90%;"></table> + </div> + </div> + + <!-- 涓�姝ュ埗绮�2 --> + <div class="layui-col-md2 " id="divThree" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="c4">鎬绘贩1</p> + <table class="" id="tabThree" style="width: 100%;height: 90%;"></table> + </div> + </div> + + <!-- 涓�姝ュ埗绮�3 --> + <div class="layui-col-md2 " id="divFour" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="d4">鎬绘贩2</p> + <table class="container" id="tabfour" style="width: 100%;height: 90%;"></table> + </div> + </div> + + <!-- 绌� --> + <div class="layui-col-md4 " id="divFour" style="height: 100%;"> + <div class="layui-card" style="height: 100%;"> + <p id="e4"></p> + <table class="container" id="tabfive" style="width: 100%;height: 90%;"></table> + </div> + </div> + </div> + </div> <!-- 涓� --> - <div class="layui-col-md" style="width: auto;height: 44%;"> + <div class="layui-col-md" style="width: auto;height: 24%;"> <div class="layui-row layui-col-space15" style="width: auto;height: 100%;"> <!-- 涓�銆佷笁妤间笅宸05銆丅14 --> <div class="layui-col-md6 divOneX" id="divFive"> <div class="layui-card" style="height: 100%;"> - <p id="e"></p> - <table class="container" id="tabfive" style="width: 100%;height: 90%;"></table> + <p id="f"></p> + <table class="container" id="tabfive2" style="width: 100%;height: 90%;"></table> </div> </div> <!-- 涓�妤间笅涓瑽06 --> <div class="layui-col-md6 divOneX" id="divSix"> <div class="layui-card" style="height: 100%;"> - <p id="f"></p> + <p id="g"></p> <table class="container" id="tabSix" style="width: 100%;height: 90%;"></table> </div> </div> @@ -251,7 +314,7 @@ <!-- 涓�銆佷笁涓嬪彸B07銆丅15 --> <div class="layui-col-md6 divOneX" id="divSeven"> <div class="layui-card" style="height: 100%;"> - <p id="j"></p> + <p id="h"></p> <table class="container" id="tabSeven" style="width: 100%;height: 90%;"></table> </div> </div> @@ -289,10 +352,10 @@ var xianga = ""; var xiangb = ""; - var ones = 'layui-col-md6 divOneS'; - var onex = 'layui-col-md6 divOneX'; - var threes = 'layui-col-md6 divThreeS'; - var threex = 'layui-col-md6 divThreeX'; + var ones = ' divOneS'; + var onex = ' divOneX'; + var threes = 'divThreeS'; + var threex = 'divThreeX'; var divOne=document.getElementById('divOne'); var divTwo=document.getElementById('divTwo'); var divThree=document.getElementById('divThree'); @@ -300,13 +363,13 @@ var divFive=document.getElementById('divFive'); var divSix=document.getElementById('divSix'); var divSeven=document.getElementById('divSeven'); - divOne.className=ones; - divTwo.className=ones; - divThree.className=ones; - divFour.className=ones; - divFive.className=onex; - divSix.className=onex; - divSeven.className=onex; + // divOne.className=ones; + // divTwo.className=ones; + // divThree.className=ones; + // divFour.className=ones; + // divFive.className=onex; + // divSix.className=onex; + // divSeven.className=onex; //鑾峰彇浠撳簱涓嬫媺妗嗕俊鎭� synData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) { @@ -364,13 +427,7 @@ } GetSlotVm($("#WareHouseNo").val(), $("#Row").val()); }); - - // // 娣卞害鏌ヨ浜嬩欢 - // form.on('select(SelectDepth)', function (data) { - // GetSlotVm($("#WareHouseNo").val(), $("#RoadwayNo").val(), $("#Row").val(), $("#Depth").val()); - // }); - - + //鑾峰彇鏁版嵁娓叉煋搴撲綅鍥� function GetSlotVm(houseNo, row) { var param = { @@ -380,22 +437,14 @@ sendData(IP + "/Sys/GetFlatLibraryLegend", param, 'get', function (res) { console.log(res) if (res.code == 0) { - - $("#a").html(""); - $("#b").html(""); - $("#c").html(""); - $("#d").html(""); - $("#e").html(""); - $("#f").html(""); - $("#j").html(""); - + $("#tabOne").html(""); $("#tabTwe").html(""); $("#tabThree").html(""); $("#tabfour").html(""); $("#tabfive").html(""); - $("#tabSix").html(""); - $("#tabSeven").html(""); + // $("#tabSix").html(""); + // $("#tabSeven").html(""); var html1 = '<tr>'; @@ -406,43 +455,6 @@ var html6 = '<tr>'; var html7 = '<tr>'; - // //鍒ゆ柇涓�妤兼垨涓夋ゼ - if($("#Row").val() == "1") - { - /* - - B01 1妤兼敹璐ф帴椹冲尯 - B02 1妤煎彂璐ф帴椹冲尯 - B03 1妤奸��璐х紦瀛樺尯 - B04 1妤兼娊鏍风紦瀛樺尯 - B05 1妤兼崲鎵樿创鏍囧尯 - B06 1妤煎寘鏉愭殏瀛橀棿 - B07 1妤艰溅闂翠緵鏂欏尯 - - B11 3妤兼墭鐩樼粍缂撳瓨鍖� - B12 3妤煎師杈呮枡缂撳瓨鍖� - B13 3妤肩┖鎵樼洏鏀堕泦鍖� - B14 3妤肩О閲嶅楠屽尯 - B15 3妤兼嫞璐ф嫾鎵樺尯 - */ - // 涓�妤� - $("#a").append("B01 1妤兼敹璐ф帴椹冲尯"); - $("#b").append("B02 1妤煎彂璐ф帴椹冲尯"); - $("#c").append("B03 1妤奸��璐х紦瀛樺尯"); - $("#d").append("B04 1妤兼娊鏍风紦瀛樺尯"); - $("#e").append("B05 1妤兼崲鎵樿创鏍囧尯"); - $("#f").append("B06 1妤煎寘鏉愭殏瀛橀棿"); - $("#j").append("B07 1妤艰溅闂翠緵鏂欏尯"); - } - else if($("#Row").val() == "3") - { - $("#a").append("B14 3妤肩О閲嶅楠屽尯"); - $("#b").append("B13 3妤肩┖鎵樼洏鏀堕泦鍖�"); - $("#d").append("B15 3妤兼嫞璐ф嫾鎵樺尯"); - $("#e").append("B11 3妤兼墭鐩樼粍缂撳瓨鍖�"); - $("#j").append("B12 3妤煎師杈呮枡缂撳瓨鍖�"); - } - var list = res.data; var B06 = 0; var B07 = 0; @@ -452,18 +464,9 @@ list.forEach(item => { //鍒ゆ柇涓�妤兼垨涓夋ゼ - if($("#Row").val() == "1") + if($("#Row").val() == "4") { - // 涓�妤� - /* - B01 tabOne html1 - B02 tabTwe html2 - B03 tabThree html3 - B04 tabfour html4 - B05 tabfive html5 - B06 tabSix html6 - B07 tabSeven html7 - */ + //鍒ゆ柇鍚勪釜鍖哄煙 if(item.AreaNo == "B01") { @@ -500,7 +503,6 @@ html1 += '<td><button value=' + item.LocatNo + ' class="btnShow five" style="width: 100%;height: 100%;" ></button></td>' } } else { - // console.log(i, a); html1 += '<td></td>' } @@ -549,38 +551,39 @@ html2 += '<tr></tr>' } } - else if(item.AreaNo == "B03") + else if(item.AreaNo == "C12") { + console.log(item); //4鎺�4鍒� if (item != undefined) { //鍒ゆ柇鍌ㄤ綅鏍囪瘑鏄惁涓�0 if(item.Flag != '0') { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow filg" ></button></td>' } //绌哄偍浣� 0 else if (item.Status == 0) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow zero" ></button></td>' } //鏈夌墿鍝� 1 else if (item.Status == 1) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow one" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow one" ></button></td>' } //鍏ュ簱涓� 2 else if (item.Status == 2) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow two" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow two" ></button></td>' } //鍑哄簱涓� 3 else if (item.Status == 3) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow three" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow three" ></button></td>' } //绉诲叆涓� 4 else if (item.Status == 4) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow four" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow four" ></button></td>' } //绉诲嚭涓� 5 else if (item.Status == 5) { - html3 += '<td><button value=' + item.LocatNo + ' class="btnShow five" style="width: 100%;height: 100%;" ></button></td>' + html3 += '<td><button value=' + item.LocatNo + ' class="btnShow five" ></button></td>' } } else { // console.log(i, a); @@ -592,6 +595,7 @@ } else if(item.AreaNo == "B04") { + if (item != undefined) { //鍒ゆ柇鍌ㄤ綅鏍囪瘑鏄惁涓�0 if(item.Flag != '0') @@ -982,6 +986,7 @@ html7 += '</tr>'; $("#tabOne").append(html1); $("#tabTwe").append(html2); + console.log(html3) $("#tabThree").append(html3); $("#tabfour").append(html4); $("#tabfive").append(html5); diff --git a/Wms/WMS.BLL/SysServer/StorageAreaServer.cs b/Wms/WMS.BLL/SysServer/StorageAreaServer.cs index 156c344..5519169 100644 --- a/Wms/WMS.BLL/SysServer/StorageAreaServer.cs +++ b/Wms/WMS.BLL/SysServer/StorageAreaServer.cs @@ -314,13 +314,13 @@ str = "鍑�妗跺尯"; break; case "1": - str = "棰勬贩鍖�"; + str = "婊℃《鍖�"; break; case "2": - str = "鍗婃垚鍝佸尯"; + str = "鑴忔《鍖�"; break; case "3": - str = "鑴忔《鍖�"; + str = "杞繍鍖�"; break; case "4": str = "璁惧鍖�"; diff --git a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs index 30f6152..a7a101a 100644 --- a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs +++ b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs @@ -260,20 +260,27 @@ } foreach (var item in _list) { - if (model.AisleNum > 0) - { - if (item.LocatNo != _list[0].LocatNo) + //if (model.AisleNum > 0) + //{ + //if (item.LocatNo != _list[0].LocatNo) + //{ + // item.AisleOne = _list[0].LocatNo; + //} + if (model.AisleNum == 0) { - item.AisleOne = _list[0].LocatNo; - } - if (model.AisleNum > 1) + if (item.LocatNo != _list[0].LocatNo) + { + item.AisleOne = _list[0].LocatNo; + } + } + if (model.AisleNum == 1) { if (item.LocatNo != _list[model.Col-1].LocatNo) { - item.AisleTwo = _list[model.Col - 1].LocatNo; + item.AisleOne = _list[model.Col - 1].LocatNo; } } - } + //} await LocatRst.AddAsync(item); } return _list.Count; @@ -844,41 +851,19 @@ { try { - //涓�妤煎尯鍩� - //List<string> row1 = new List<string>() - //{ - // "B01", - // "B02", - // "B03", - // "B04", - // "B05", - // "B06", - // "B07", - //}; - ////浜屾ゼ鍖哄煙 - //List<string> row3 = new List<string>() - //{ - // "B11", - // "B12", - // "B13", - // "B14", - // "B15", - //}; - string row1 = "'B01','B02','B03','B04','B05','B06','B07'"; - string row3 = "'B11','B12','B13','B14','B15'"; - string str = $"select * from SysStorageLocat where IsDel = '0' and WareHouseNo = '{wareHouseNo}' and "; - if (row == "1") + var area = Db.Queryable<SysStorageArea>().Where(m => m.IsDel == "0" && m.Status == "0" && m.WareHouseNo == wareHouseNo).ToList(); + + var areaStr = new List<string>(); + if (row == "3") { - str += $" AreaNo in ({row1})"; + areaStr = area.Where(m => m.AreaName.Contains("3妤�")).Select(m => m.AreaNo).ToList(); } - else if (row == "3") + else if (row == "4") { - str += $" AreaNo in ({row3})"; + areaStr = area.Where(m => m.AreaName.Contains("4妤�")).Select(m => m.AreaNo).ToList(); } - - var list = Db.Ado.SqlQuery<SysStorageLocat>(str); - - //var list = Db.Queryable<SysStorageLocat>().Where(m => m.IsDel == "0" && m.WareHouseNo == wareHouseNo && row == "1" ? row1.Contains(m.AreaNo) : row3.Contains(m.AreaNo)).ToList(); + + var list = Db.Queryable<SysStorageLocat>().Where(m => m.IsDel == "0" && m.WareHouseNo == wareHouseNo && areaStr.Contains(m.AreaNo)).ToList(); return list; } diff --git a/Wms/Wms/Controllers/SysController.cs b/Wms/Wms/Controllers/SysController.cs index a524fa1..bf3e615 100644 --- a/Wms/Wms/Controllers/SysController.cs +++ b/Wms/Wms/Controllers/SysController.cs @@ -1719,8 +1719,7 @@ return Ok(new { - data = storagelist, - //dic, + data = storagelist, code = 0, msg = "" }); -- Gitblit v1.8.0