From fe41831b0e9057a16aef1e82048105aee671bbda Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期六, 19 十月 2024 19:08:06 +0800 Subject: [PATCH] Merge branch 'master' into Liudl --- Wms/Wms/Controllers/UpApiController.cs | 8 Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs | 4 Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 44 + Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs | 2 HTML/views/WareHouseSetting/LocateEditArea.html | 178 +++++++ Wms/Model/ModelVm/IdVm.cs | 11 HTML/views/SystemSettings/LogOperation.html | 249 ++++++++++ Wms/Model/ModelDto/BllAsnDto/ArrivalNoticeDto.cs | 21 Wms/Model/ModelVm/SysVm/LocateVm.cs | 45 + Wms/WMS.BLL/LogServer/OperationSysServer.cs | 189 +++++-- HTML/views/ASNSetting/LabelPrintSelect.html | 6 HTML/views/WareHouseSetting/Locate.html | 166 ++++-- Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs | 7 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs | 20 Wms/Wms/Controllers/SysController.cs | 65 ++ HTML/views/index.html | 25 + Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs | 26 HTML/views/ASNSetting/ArrivalNotice.html | 105 +++ Wms/WMS.BLL/SysServer/StorageLocatServer.cs | 113 ++++ HTML/views/SOSetting/ExportNotice.html | 100 +++ Pda/View/SoSetting/SampleOut.html | 23 21 files changed, 1,227 insertions(+), 180 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html index 6190fca..9bf5690 100644 --- a/HTML/views/ASNSetting/ArrivalNotice.html +++ b/HTML/views/ASNSetting/ArrivalNotice.html @@ -145,7 +145,22 @@ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储 </button> </div> - + <div class="layui-inline" id="divFinish" style="display: none; padding-top: 10px;"> + <div class="layui-inline"> + <label class="layui-form-label">璐﹀彿</label> + <div class="layui-input-inline" style="width: 220px;"> + <input type="text" id="admin" name="admin" placeholder="璐﹀彿" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> + <label class="layui-form-label">瀵嗙爜</label> + <div class="layui-input-inline" style="width: 220px;"> + <input type="text" id="password" name="password" placeholder="瀵嗙爜" autocomplete="off" + class="layui-input"> + </div> + </div> + </div> <!-- 缁存姢澶囨敞寮规 --> <div class="layui-inline" id="divEditDemo" style="display: none; padding-top: 10px;"> <label class="layui-form-label">澶囨敞</label> @@ -728,30 +743,78 @@ break; case "check" : - // 浠g爜鍖哄煙 - layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function(index) { - // 浠g爜鍖哄煙 - var param = { - Id:data.Id, - }; - sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) { - if (res.code == 0) { //鎴愬姛 - layer.msg(res.msg, { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { - refreshTable(); - doing = true + layer.open({ + type: 1, + title: '澶嶆牳纭', + content: $('#divFinish'), + maxmin: true, + area: ['350px','215px'], + btn: ['纭畾', '鍙栨秷'], + yes: function(index, layero) { + var pa = $('#PickingArea').val(); + console.log(pa) + if (doing== true) { + doing= false; + + if($('#admin').val()==''){ + layer.msg("璇疯緭鍏ヨ处鍙�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + doing= true; + return; + } + if($("#password").val() == '') + { + layer.msg("璇疯緭鍏ュ瘑鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + doing= true; + return; + } + + var param = { + Id:data.Id, + UserNo:$('#admin').val(), + Password:$('#password').val(), + }; + console.log(param); + sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 + layer.msg(res.msg, { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + refreshTable(); + $('#admin').val(""); + $('#password').val(""); + doing = true + }); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + doing = true ; + $('#admin').val(""); + $('#password').val("") + }); + } + layer.close(index); }); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { + + + }else{ + layer.msg("璇峰嬁閲嶅鐐瑰嚮", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { doing = true }); + }); } - }); - }); - + + } + }); + break; case "chexiao" : layer.open({ diff --git a/HTML/views/ASNSetting/LabelPrintSelect.html b/HTML/views/ASNSetting/LabelPrintSelect.html index 09fa573..6bf016f 100644 --- a/HTML/views/ASNSetting/LabelPrintSelect.html +++ b/HTML/views/ASNSetting/LabelPrintSelect.html @@ -141,7 +141,11 @@ synData(IP + "/BllAsn/GetAsnDetailQtyList", param , 'get', function (res) { if (res.code == 0) { //鎴愬姛 - $("#arriveQty").val(res.data); + $("#arriveQty").val(res.data.Qty); + $("#productionTime").val(res.data.ProductionTime); + $("#expirationTime").val(res.data.ExpirationTime); + $("#storeTime").val(res.data.StoreTime); + console.log(res.data); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, diff --git a/HTML/views/SOSetting/ExportNotice.html b/HTML/views/SOSetting/ExportNotice.html index 7934f3e..cc00349 100644 --- a/HTML/views/SOSetting/ExportNotice.html +++ b/HTML/views/SOSetting/ExportNotice.html @@ -173,6 +173,22 @@ </div> </div> </div> + <div class="layui-inline" id="divFinish" style="display: none; padding-top: 10px;"> + <div class="layui-inline"> + <label class="layui-form-label">璐﹀彿</label> + <div class="layui-input-inline" style="width: 220px;"> + <input type="text" id="admin" name="admin" placeholder="璐﹀彿" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> + <label class="layui-form-label">瀵嗙爜</label> + <div class="layui-input-inline" style="width: 220px;"> + <input type="text" id="password" name="password" placeholder="瀵嗙爜" autocomplete="off" + class="layui-input"> + </div> + </div> + </div> <!-- 缁存姢澶囨敞寮规 --> <div class="layui-inline" id="divEditDemo" style="display: none; padding-top: 10px;"> <label class="layui-form-label">澶囨敞</label> @@ -977,27 +993,77 @@ } }); }else if(obj.event === 'check'){//澶嶆牳 - // 浠g爜鍖哄煙 - layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function(index) { - var param = { - Id:data.Id, - }; - sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) { - if (res.code == 0) { //鎴愬姛 - layer.msg(res.msg, { - icon: 1, - time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { - refreshTable(); - doing = true + + layer.open({ + type: 1, + title: '澶嶆牳纭', + content: $('#divFinish'), + maxmin: true, + area: ['350px','215px'], + btn: ['纭畾', '鍙栨秷'], + yes: function(index, layero) { + var pa = $('#PickingArea').val(); + console.log(pa) + if (isChongFu== true) { + isChongFu= false; + + if($('#admin').val()==''){ + layer.msg("璇疯緭鍏ヨ处鍙�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + isChongFu= true; + return; + } + if($("#password").val() == '') + { + layer.msg("璇疯緭鍏ュ瘑鐮�", { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + isChongFu= true; + return; + } + + var param = { + Id:data.Id, + UserNo:$('#admin').val(), + Password:$('#password').val(), + }; + console.log(param); + sendData(IP + "/UpApi/FinishExportNotice", param, 'post', function (res) { + if (res.code == 0) { //鎴愬姛 + layer.msg(res.msg, { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + refreshTable(); + $('#admin').val(""); + $('#password').val(""); + isChongFu = true + }); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + isChongFu = true ; + $('#admin').val(""); + $('#password').val("") + }); + } + layer.close(index); }); - } else { //涓嶆垚鍔� - layer.msg(res.msg, { + + + }else{ + layer.msg("璇峰嬁閲嶅鐐瑰嚮", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function () { doing = true }); + }); } - }); + + } }); } }); diff --git a/HTML/views/SystemSettings/LogOperation.html b/HTML/views/SystemSettings/LogOperation.html index b2ed405..081cd9b 100644 --- a/HTML/views/SystemSettings/LogOperation.html +++ b/HTML/views/SystemSettings/LogOperation.html @@ -1,5 +1,252 @@ <!DOCTYPE html> <html> + +<head> + <meta charset="utf-8"> + <title>鎿嶄綔璁板綍</title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> + <link rel="stylesheet" href="../../css/public.css" media="all"> + + <script> + // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� + document.addEventListener("DOMContentLoaded", function () { + //鑾峰彇table榛樿鏄剧ず鏁� + pageCntFirst(); + //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� + GetIsSetColW(); + }); + </script> + +</head> + +<body id="body"> + <div class="layui-card" style="padding-bottom: 0"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> + <div class="layui-form-item"> + + <div class="layui-inline"> + <label class="layui-form-label">鑿滃崟鍚嶇О</label> + <div class="layui-input-inline"> + <input type="text" id="MenuName" name="MenuName" placeholder="璇疯緭鍏ヨ彍鍗曞悕绉�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 45px;">绫诲瀷</label> + <div class="layui-input-inline"> + <select name="Type" id="Type" lay-verify="" lay-search> + <option value=""></option> + </select> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鎿嶄綔鍐呭</label> + <div class="layui-input-inline"> + <input type="text" id="Msg" name="Msg" placeholder="璇疯緭鍏ユ搷浣滃唴瀹�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 60px;">寮�濮嬫椂闂�</label> + <div class="layui-input-inline"> + <input type="text" autocomplete="off" name="StartTime" id="StartTime" class="layui-input" + placeholder="寮�濮嬫椂闂�"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 60px;">缁撴潫鏃堕棿</label> + <div class="layui-input-inline"> + <input type="text" autocomplete="off" name="EndTime" id="EndTime" class="layui-input" + placeholder="缁撴潫鏃堕棿"> + </div> + </div> + <div class="layui-inline"> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit + lay-filter="LAY-app-contlist-search"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储 + </button> + </div> + </div> + </div> + <div id="center"></div> + <div class="layui-card-body"> + <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> + <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table> + <!-- #region 鑷畾涔夎〃澶� --> + <div class="headerSetIcon"> + <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> + <i class="layui-icon"></i> + </button> + </div> + <!-- #endregion --> + + <!-- #region 鑷畾涔夎〃澶� --> + <script type="text/html" id="templetCreateTime"> + {{# function GetBtn(d){ + return formatDate(d.CreateTime); + } + }} + {{ GetBtn(d) }} + </script> + <!-- #endregion --> + </div> + </div> + </div> + <script src="../../layuiadmin/layui/layui.js"></script> + <script src="../../js/jquery-3.5.1.min.js"></script> + <script src="../../js/jquery.cookie.js"></script> + <script src="../../js/public.js"></script> + + <script> + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () { + var table = layui.table, + form = layui.form, + laypage = layui.laypage, + layer = layui.layer; + laydate = layui.laydate; + laydate.render({ + elem: '#StartTime' + , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + laydate.render({ + elem: '#EndTime' + , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + + var h1 = GetTableHeight(); + + refreshTable(); + //鑾峰彇绫诲瀷鑿滃崟涓嬫媺 + + sendData(IP + "/Sys/GetDictionaryByParentNo", { parentNo: "LogType" }, 'get', function (res) { + var html = ''; + console.log(res); + if (res.code == 0) { //鎴愬姛 + var list = res.data; + for (var i = 0; i < list.length; i++) { + html += '<option value = "' + list[i].Id + '">' + list[i].DictName + '</option>'; + } + $("#Type").append(html); + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇鎿嶄綔绫诲瀷淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }); + } + }); + + //娓叉煋琛ㄦ牸 + //#region 鑷畾涔夎〃澶� + var TotalColsArr = [[ + { field: '', title: '搴忓彿', type: 'numbers', width: 65, align: 'center', fixed: 'left', "disabled": true }, + { field: 'ParentNo', title: '妯″潡鍙�', align: 'center', fixed: 'left', width: 80, "disabled": true }, + { field: 'MenuNo', title: '鑿滃崟鍙�', align: 'center', fixed: 'left', width: 80, "disabled": true }, + { field: 'MenuName', title: '鑿滃崟鍚嶇О', align: 'center', width: 190 }, + { field: 'FkNo', title: '鏁版嵁缂栧彿', align: 'center', width: 180 }, + { field: 'Type', title: '绫诲瀷', align: 'center', width: 100 }, + { field: 'Msg', title: '鎿嶄綔鍐呭', align: 'center' }, + { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 120 }, + { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime' } + ]]; + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + + function refreshTable() { + + //#region 鑷畾涔夎〃澶� + var colsJson + var param1 = { + Href: 'Sys/GetLogOperationList' + }; + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson = TotalColsArr + } else { + colsJson = eval(res.data); + } + } else { + colsJson = TotalColsArr + } + var param = { + MenuName: $("#MenuName").val(), + Type: $("#Type").val(), + Msg: $("#Msg").val(), + StartTime: $("#StartTime").val(), + EndTime: $("#EndTime").val(), + }; + table.render({ + elem: '#LAY-app-content-list', + url: IP + "/Sys/GetLogOperationList", + method: 'POST', + height: h1, + id: 'LAY-app-content-list', + where: param, + contentType: 'application/json', + headers: { ToKen: $.cookie('token') }, + page: true, + limit: pageCnt, + limits: pageLimits, + cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + cols: colsJson, + done: function (res) { + //鑷畾涔夊垪瀹� + SetTableColW('LAY-app-content-list', 'Sys/GetLogOperationList', TotalColsSysArr); + }, + }); + }); + //#endregion + + } + //鐩戝惉鎼滅储 + form.on('submit(LAY-app-contlist-search)', function (data) { + + refreshTable(); + }); + + //#region 鑷畾涔夎〃澶� + //鑷畾涔夎〃澶� + active = { + customCols: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=Sys/GetLogOperationList&ColsSysArr=' + TotalColsSysArr, + maxmin: false, + resize: false, + area: ['970px', '650px'] + }); + } + }; + $('.layui-btn').on('click', function () { + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + //#endregion + }); + </script> +</body> + +</html> + + + + + + + + +<!-- <!DOCTYPE html> +<html> <head> <meta charset="utf-8"> <title>鐢ㄦ埛淇℃伅鍒楄〃</title> @@ -200,4 +447,4 @@ }); </script> </body> -</html> +</html> --> \ No newline at end of file diff --git a/HTML/views/WareHouseSetting/Locate.html b/HTML/views/WareHouseSetting/Locate.html index 9f52be6..315d822 100644 --- a/HTML/views/WareHouseSetting/Locate.html +++ b/HTML/views/WareHouseSetting/Locate.html @@ -152,48 +152,12 @@ // 琛ㄥ崟闇�瑕佺殑鍙橀噺 var doing = true; active = { - + editList: function () { - var checkStatus = table.checkStatus('LAY-app-content-list'), - checkData = checkStatus.data; //寰楀埌閫変腑鐨勬暟鎹� - if (checkData.length === 0) { - return layer.msg('璇烽�夋嫨鏁版嵁'); - } - else if(checkData.length > 1) - { - var li = 0; - var ping = 0; - var WareNo = "W01"; - checkData.forEach(item => { - if (item.WareHouseName == "鍔涜绔嬩綋搴�") - { - li += 1; - WareNo = "W01"; - if (ping > 0) - { - return; - } - } - if (item.WareHouseName == "鍔涜骞冲簱") - { - ping += 1; - WareNo = "W02"; - if (li > 0) - { - return; - } - } - }); - if (li != 0 && ping != 0) - { - return layer.msg('璇峰嬁閫夋嫨澶氱浠撳簱锛�'); - } - } - layer.open({ type: 2, title: '缂栬緫鍌ㄤ綅鐘舵�侀泦鍚�', - content: 'LocateFrom.html?WareHouseNo='+WareNo, + content: 'LocateEditArea.html', maxmin: true, area: ['560px', '510px'], btn: ['纭畾', '鍙栨秷'], @@ -205,23 +169,23 @@ iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� console.log(field); - var msg = []; - for (var i = 0; i < checkData.length; i++) { - // msg.push(checkData[i].Id); - msg.push(checkData[i].Id) - } - console.log(msg); - + //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹� var param = { - Id: msg, + RoadWayNo: field.RoadwayNo, + AreaNo:field.AreaNo, + Row:parseInt(field.Row), + Column:parseInt(field.Column), + Layer: parseInt(field.Layer), + Dept:parseInt(field.Depth), Status:field.Status, Flag:field.Flag, - Temperature:field.Temp + }; + console.log(param); if (doing) { doing = false; - sendData(IP + "/Sys/EditStorageLocatList", param, 'post', function (res) { + sendData(IP + "/Sys/EditStorageLocatListNew", param, 'post', function (res) { console.log(res); if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { @@ -249,13 +213,115 @@ } }); } - - //$.ajax({}); }); submit.trigger('click'); } }); } + + // editList: function () { + // var checkStatus = table.checkStatus('LAY-app-content-list'), + // checkData = checkStatus.data; //寰楀埌閫変腑鐨勬暟鎹� + // if (checkData.length === 0) { + // return layer.msg('璇烽�夋嫨鏁版嵁'); + // } + // else if(checkData.length > 1) + // { + // var li = 0; + // var ping = 0; + // var WareNo = "W01"; + // checkData.forEach(item => { + // if (item.WareHouseName == "鍔涜绔嬩綋搴�") + // { + // li += 1; + // WareNo = "W01"; + // if (ping > 0) + // { + // return; + // } + // } + // if (item.WareHouseName == "鍔涜骞冲簱") + // { + // ping += 1; + // WareNo = "W02"; + // if (li > 0) + // { + // return; + // } + // } + // }); + // if (li != 0 && ping != 0) + // { + // return layer.msg('璇峰嬁閫夋嫨澶氱浠撳簱锛�'); + // } + // } + + // layer.open({ + // type: 2, + // title: '缂栬緫鍌ㄤ綅鐘舵�侀泦鍚�', + // content: 'LocateFrom.html?WareHouseNo='+WareNo, + // maxmin: true, + // area: ['560px', '510px'], + // btn: ['纭畾', '鍙栨秷'], + // yes: function (index, layero) { + // var iframeWindow = window['layui-layer-iframe' + index], + // submitID = 'layuiadmin-app-form-submit', + // submit = layero.find('iframe').contents().find('#' + submitID); + // //鐩戝惉鎻愪氦 + // iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { + // var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� + // console.log(field); + // var msg = []; + // for (var i = 0; i < checkData.length; i++) { + // // msg.push(checkData[i].Id); + // msg.push(checkData[i].Id) + // } + // console.log(msg); + + // //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹� + // var param = { + // Id: msg, + // Status:field.Status, + // Flag:field.Flag, + // Temperature:field.Temp + // }; + // if (doing) { + // doing = false; + // sendData(IP + "/Sys/EditStorageLocatList", param, 'post', function (res) { + // console.log(res); + // if (res.code == 0) { //鎴愬姛 + // layer.msg(res.msg, { + // icon: 1, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function () { + // tableIns.reload({ + // page: { + // curr: 1 + // } + // }); + // layer.close(index); //鍏抽棴寮瑰眰 + // doing = true; + // }); + // } else if(res.code == 1){ + // layer.msg(res.msg, { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {doing = true;}); + // } else { //涓嶆垚鍔� + // layer.msg(res.statusText, { + // icon: 2, + // time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + // }, function() {doing = true;}); + // } + // }); + // } + + // //$.ajax({}); + // }); + // submit.trigger('click'); + // } + // }); + // } }; $('.layui-btn.layuiadmin-btn-list').on('click', function () { var type = $(this).data('type'); diff --git a/HTML/views/WareHouseSetting/LocateEditArea.html b/HTML/views/WareHouseSetting/LocateEditArea.html new file mode 100644 index 0000000..1d84444 --- /dev/null +++ b/HTML/views/WareHouseSetting/LocateEditArea.html @@ -0,0 +1,178 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <title>鍌ㄤ綅鍖哄煙缂栬緫</title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + </head> + <body> + <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" + style="padding: 20px 30px 0 0;"> + + + <div class="layui-form-item"> + <label class="layui-form-label">鎵�灞炲贩閬�</label> + <div class="layui-input-inline"> + <select name="RoadwayNo" id="RoadwayNo" lay-filter="getRoadwayNo" lay-search > + <option value=""></option> + </select> + </div> + <label class="layui-form-label">鎵�灞炲尯鍩�</label> + <div class="layui-input-inline"> + <select name="AreaNo" id="AreaNo" lay-filter="getAreaNo" lay-search> + <option value=""></option> + </select> + </div> + </div> + + <div class="layui-form-item"> + <label class="layui-form-label">  鍌ㄦ帓</label> + <div class="layui-input-inline"> + <input type="number" id="Row" name="Row" placeholder="鎺捖仿仿�" autocomplete="off" + class="layui-input" > + </div> + <label class="layui-form-label">  鍌ㄥ垪</label> + <div class="layui-input-inline"> + <input type="number" id="Column" name="Column" placeholder="鍒椔仿仿�" autocomplete="off" + class="layui-input" > + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label">  鍌ㄥ眰</label> + <div class="layui-input-inline"> + <input type="number" id="Layer" name="Layer" placeholder="灞偮仿仿�" autocomplete="off" + class="layui-input" > + </div> + <label class="layui-form-label">鍌ㄤ綅娣卞害</label> + <div class="layui-input-inline"> + <input type="number" id="Depth" name="Depth" placeholder="鍌ㄤ綅娣卞害路路路" autocomplete="off" + class="layui-input" oninput="value=value.replace(/^[0-9]+$/,'')" + onafterpaste="this.value=this.value.replace(/^[0-9]+$/,'')"> + </div> + + </div> + <div class="layui-form-item"> + <label class="layui-form-label">鍌ㄤ綅鐘舵��</label> + <div class="layui-input-inline"> + <select name="Status" id="Status" lay-filter="getStatus" lay-search > + <option value=""></option> + <option value="0">绌哄偍浣�</option> + <option value="1">鏈夌墿鍝�</option> + <option value="2">姝e湪鍏ュ簱</option> + <option value="3">姝e湪鍑哄簱</option> + <option value="4">姝e湪绉诲叆</option> + <option value="5">姝e湪绉诲嚭</option> + </select> + </div> + <label class="layui-form-label">鍌ㄤ綅鏍囧織</label> + <div class="layui-input-inline"> + <select name="Flag" id="Flag" lay-filter="getFlag" lay-search > + <option value=""></option> + <option value="0">姝e父</option> + <option value="1">灞忚斀</option> + <option value="2">鎹熷潖</option> + </select> + </div> + </div> + + <!-- --> + <div class="layui-form-item layui-hide"> + <input type="button" lay-submit lay-filter="layuiadmin-app-form-submit" id="layuiadmin-app-form-submit" + value="纭娣诲姞"> + <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" + value="纭缂栬緫"> + </div> + </div> + <script src="../../layuiadmin/layui/layui.js"></script> + <script src="../../js/public.js"></script> + <script src="../../js/jquery-3.5.1.min.js"></script> + <script src="../../js/jquery.cookie.js"></script> + <script> + var uid = $.cookie('userId'); + if(uid==null){ + alert('璇风櫥褰曞悗鎿嶄綔'); + window.parent.location.href='../Login.html' + } + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'layer'], function() { + var $ = layui.$, + form = layui.form, + layer = layui.layer; + + //var no = getQueryString('WareHouseNo'); + GetRoadway(""); + + GetArea(''); + + //鑾峰彇鍖哄煙 + function GetArea(val){ + + var param = { + wareHouseNo: "W01" //绔嬪簱W01 + } + sendData(IP + "/Sys/GetStorageAreaByHouseNo", param, 'get', function(res) { + console.log(res) + if (res.code == 0) { //鎴愬姛 + $("#AreaNo").empty(); + $("#AreaNo").append('<option value =""></option>'); + for (var i = 0; i < res.data.length; i++) { + $("#AreaNo").append('<option value =' + res.data[i].AreaNo + '>' + res.data[i].AreaNo + '-' + + res.data[i].AreaName + '</option>'); + } + $("select[name='AreaNo']").val(val); + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇鍖哄煙淇℃伅澶辫触', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + //鍥炶皟 + form.render('select'); + }); + } + }); + } + //鑾峰彇宸烽亾 + function GetRoadway(val){ + sendData(IP + "/Sys/GetStorageRoadwayByHouseNo", {}, 'get', function(res) { + + if (res.code == 0) { //鎴愬姛 + $("#RoadwayNo").empty(); + $("#RoadwayNo").append('<option value =""></option>'); + for (var i = 0; i < res.data.length; i++) { + $("#RoadwayNo").append('<option value =' + res.data[i].RoadwayNo + '>' + res.data[i].RoadwayNo + '-' + + res.data[i].RoadwayName + '</option>'); + } + $("select[name='RoadwayNo']").val(val); + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇宸烽亾淇℃伅澶辫触', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + //鍥炶皟 + form.render('select'); + }); + } + }); + } + + //鑾峰彇娴忚鍣ㄥ弬鏁� + function getQueryString(name) { + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); + var r = window.location.search.substr(1).match(reg); + if (r != null) return unescape(r[2]); + return null; + } + + }) + </script> + </body> +</html> diff --git a/HTML/views/index.html b/HTML/views/index.html index ba720fe..8238ecd 100644 --- a/HTML/views/index.html +++ b/HTML/views/index.html @@ -136,6 +136,31 @@ }else{ $("#token").text($.cookie('token')); } + + var lastTime = new Date().getTime(); + var currentTime = new Date().getTime(); + var timeOut = 1*5*1000; + $(function () { + $(document).mouseover(function () { + lastTime = new Date().getTime(); + }) + }); + function testTime() { + // console.log("璁℃椂锛�"+new Date().getTime()); + console.log("lastTime锛�"+lastTime); + //console.log("currentTime锛�"+currentTime); + + //console.log("lastTime - currentTime锛�"+lastTime - currentTime); + + currentTime = new Date().getTime(); + if(currentTime - lastTime > timeOut){ + console.log("瓒呮椂"); + location.href = "Login.html"; + } + } + + window.setInterval(testTime,1000); + var element = layui.element; var xml = ''; diff --git a/Pda/View/SoSetting/SampleOut.html b/Pda/View/SoSetting/SampleOut.html index 8ed7e48..2602607 100644 --- a/Pda/View/SoSetting/SampleOut.html +++ b/Pda/View/SoSetting/SampleOut.html @@ -169,12 +169,13 @@ </ul> </div> - <ul> + <!-- <ul> <li id="option1">鏍囩</li> <li id="option2">鏁伴噺</li> - </ul> - - <br /> + </ul> --> + <button id="option1" class="layout-btn" type="button">鏍囩</button> + <button id="option2" class="layout-btn" type="button">鏁伴噺</button> + <br /><br /> <!-- 鏈夌爜 --> <div id="content1"> @@ -560,18 +561,18 @@ $('#kuneiQty').hide(); - $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //閫変腑鍚庨鑹� - $('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊 + $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹� + $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊 $('#content2').hide(); $(document).ready(function () { $('#option1').click(function () { - // qingkong(); + // qingkong();aqua xianshiyemian = 0; $('#content1').show(); - $('#option1').attr("style", "background-color: aqua;width: 45.77%;float: left;text-align: center;"); //閫変腑鍚庨鑹� + $('#option1').attr("style", "background-color: red;width: 50%;float: left;text-align: center;"); //閫変腑鍚庨鑹� $('#content2').hide(); - $('#option2').attr("style", "background-color: #999;width: 45.77%;float: right;text-align: center;"); //榛樿棰滆壊 + $('#option2').attr("style", "background-color: #999;width: 50%;float: right;text-align: center;"); //榛樿棰滆壊 $("#palletNo").focus();//鍏夋爣榛樿閫変腑 }); @@ -579,10 +580,10 @@ // qingkong(); xianshiyemian = 1; $('#content1').hide(); - $('#option1').attr("style", "background-color: #999;width: 45.77%;float: left;text-align: center;"); //榛樿棰滆壊 + $('#option1').attr("style", "background-color: #999;width: 50%;float: left;text-align: center;"); //榛樿棰滆壊 $('#content2').show(); - $('#option2').attr("style", "background-color: aqua;width: 45.77%;float: right;text-align: center;"); //閫変腑鍚庨鑹� + $('#option2').attr("style", "background-color: red;width: 50%;float: right;text-align: center;"); //閫変腑鍚庨鑹� $("#palletNo2").focus();//鍏夋爣榛樿閫変腑 }); }); diff --git a/Wms/Model/ModelDto/BllAsnDto/ArrivalNoticeDto.cs b/Wms/Model/ModelDto/BllAsnDto/ArrivalNoticeDto.cs index 824d16f..e2fc37a 100644 --- a/Wms/Model/ModelDto/BllAsnDto/ArrivalNoticeDto.cs +++ b/Wms/Model/ModelDto/BllAsnDto/ArrivalNoticeDto.cs @@ -99,4 +99,25 @@ public string CheckUserName { get; set; } } + + public class LabelPrintInfoDto + { + /// <summary> + /// 鍓╀綑鎵撳嵃鐨勬暟閲� + /// </summary> + public string Qty { get; set; } + /// <summary> + /// 鐢熶骇鏃ユ湡 + /// </summary> + public string ProductionTime { get; set; } + /// <summary> + /// 鏈夋晥鏈� + /// </summary> + public string ExpirationTime { get; set; } + /// <summary> + /// 鍌ㄥ瓨鏈熻嚦 + /// </summary> + public string StoreTime { get; set; } + } + } diff --git a/Wms/Model/ModelVm/IdVm.cs b/Wms/Model/ModelVm/IdVm.cs index 57606d1..ac7cf1e 100644 --- a/Wms/Model/ModelVm/IdVm.cs +++ b/Wms/Model/ModelVm/IdVm.cs @@ -7,4 +7,15 @@ public int Id { get; set; } public List<int> Ids { get; set; } } + + /// <summary> + /// 澶嶆牳VM + /// </summary> + public class FinshVm + { + public int Id { get; set; } + public string UserNo { get; set; } + public string Password { get; set; } + } + } diff --git a/Wms/Model/ModelVm/SysVm/LocateVm.cs b/Wms/Model/ModelVm/SysVm/LocateVm.cs index de363a7..cfd673b 100644 --- a/Wms/Model/ModelVm/SysVm/LocateVm.cs +++ b/Wms/Model/ModelVm/SysVm/LocateVm.cs @@ -38,12 +38,57 @@ [MaxLength(3)] [Required] public string Flag { get; set; } + /// <summary> /// 瀛樺偍鐜 /// </summary> [MaxLength(3)] public string Temperature { get; set; } + } + + + /// <summary> + /// 淇敼鍌ㄤ綅闆嗗悎model + /// </summary> + public class EditLocateListNewVm + { + /// <summary> + /// 鐘舵�� + /// </summary> + public string Status { get; set; } + /// <summary> + /// 鍌ㄤ綅鏍囧織 + /// </summary> + public string Flag { get; set; } + + /// <summary> + /// 宸烽亾 + /// </summary> + public string RoadWayNo { get; set; } + + /// <summary> + /// 鍖哄煙 + /// </summary> + public string AreaNo { get; set; } + /// <summary> + /// 鎺� + /// </summary> + public int? Row { get; set; } + /// <summary> + /// 鍒� + /// </summary> + public int? Column { get; set; } + /// <summary> + /// 灞� + /// </summary> + public int? Layer { get; set; } + /// <summary> + /// 娣卞害 + /// </summary> + public int? Dept { get; set; } + } + /// <summary> /// 淇敼鍌ㄤ綅model /// </summary> diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs index d1c0479..242eccd 100644 --- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs @@ -131,7 +131,7 @@ } //鑾峰彇鍏ュ簱鍗曟槑缁嗗墿浣欐墦鍗版暟閲� - public string GetAsnDetailQtyList(int id) + public LabelPrintInfoDto GetAsnDetailQtyList(int id) { try { @@ -140,11 +140,29 @@ { throw new Exception("鏈煡璇㈠埌鍏ュ簱鍗曟槑缁�"); } + var data = new LabelPrintInfoDto(); + + var notice = Db.Queryable<BllArrivalNotice>().Where(m => m.IsDel == "0" && m.ASNNo == detail.ASNNo).First(); + if (notice != null && notice.Type == "4") //鍒ゆ柇鏄惁鏄綑鏂欓��鍥炲崟 + { + var noticeStr = Db.Queryable<BllArrivalNotice>().Where(m => m.Type == "1").Select(m => m.ASNNo).ToList(); + var detailOld = Db.Queryable<BllArrivalNoticeDetail>().Where(m => m.IsDel == "0" && noticeStr.Contains(m.ASNNo) && m.SkuNo == detail.SkuNo && m.LotNo == detail.LotNo).OrderByDescending(m => m.CreateTime).First(); + if (detailOld != null) + { + var boxInfo = Db.Queryable<BllBoxInfo>().First(m => m.IsDel == "0" && m.ASNNo == detailOld.ASNNo); + if (boxInfo!= null) + { + data.ProductionTime = boxInfo.ProductionTime!= null ? ((DateTime)boxInfo.ProductionTime).ToString("yyyy-MM-dd"):""; + data.ExpirationTime = boxInfo.ExpirationTime != null ? ((DateTime)boxInfo.ExpirationTime).ToString("yyyy-MM-dd") : ""; + data.StoreTime = boxInfo.StoreTime != null ? ((DateTime)boxInfo.StoreTime).ToString("yyyy-MM-dd") : ""; + } + } + } var labelQty = Db.Queryable<BllBoxInfo>().Where(m => m.IsDel == "0" && m.ASNDetailNo == id).Sum(m => m.Qty); var qty = detail.Qty - labelQty; - - return qty.ToString(); + data.Qty = qty.ToString(); + return data; } catch (Exception e) { @@ -1083,10 +1101,22 @@ } //璁㈠崟鍥炰紶涓婃父绯荤粺 - public bool FinishAsn(int id, string erpUrl, string mesUrl,string mesTokenUrl, int userId) + public bool FinishAsn(int id, string erpUrl, string mesUrl,string mesTokenUrl,string userNo,string pwd, int userId) { try { + var loginPwd = Md5Tools.CalcMd5(pwd); + var date = Db.Queryable<SysUserInfor>().First(m =>m.IsDel=="0" && m.UserName == userNo && m.PassWord == loginPwd); + + if (date == null) //璐﹀彿瀵嗙爜鏄惁姝g‘ + { + throw new Exception("璐﹀彿瀵嗙爜涓嶆纭垨娌℃湁姝よ处鍙�"); + } + if (date.Status != "0") //褰撳墠璐﹀彿鏄惁姝e父鍚敤 + { + throw new Exception("褰撳墠璐﹀彿闈炲惎鐢ㄧ姸鎬�"); + } + var notice = Db.Queryable<BllArrivalNotice>().First(m => m.Id == id && m.IsDel == "0"); if (notice == null) { @@ -1101,7 +1131,7 @@ { throw new Exception("鏈煡璇㈠埌鍗曟嵁鏄庣粏淇℃伅"); } - if (userId == notice.UpdateUser) + if (date.Id == notice.UpdateUser) { throw new Exception("澶嶆牳澶辫触锛屽鏍镐汉鍛樺拰鍏抽棴璁㈠崟浜哄憳涓嶈兘鐩稿悓锛�"); } @@ -1182,10 +1212,10 @@ notice.Status = "4"; notice.CheckTime = DateTime.Now; - notice.CheckUser = userId; + notice.CheckUser = date.Id; Db.Updateable(notice).ExecuteCommand(); - new OperationASNServer().AddLogOperationAsn("鍏ュ簱浣滀笟", "鍏ュ簱鍗曟嵁", notice.ASNNo, "澶嶆牳", $"澶嶆牳浜嗗崟鎹彿涓簕notice.ASNNo}鐨勫崟鎹俊鎭�", userId); + new OperationASNServer().AddLogOperationAsn("鍏ュ簱浣滀笟", "鍏ュ簱鍗曟嵁", notice.ASNNo, "澶嶆牳", $"{date.RealName}澶嶆牳浜嗗崟鎹彿涓簕notice.ASNNo}鐨勫崟鎹俊鎭�", userId); return true; } catch (Exception e) diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs index bccc202..c714390 100644 --- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs +++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs @@ -262,10 +262,22 @@ } //鍥炰紶鍑哄簱鍗� - public bool FinishSo(int id, string url, int userId) + public bool FinishSo(int id, string url, string userNo, string pwd, int userId) { try { + var loginPwd = Md5Tools.CalcMd5(pwd); + var date = Db.Queryable<SysUserInfor>().First(m => m.IsDel == "0" && m.UserName == userNo && m.PassWord == loginPwd); + + if (date == null) //璐﹀彿瀵嗙爜鏄惁姝g‘ + { + throw new Exception("璐﹀彿瀵嗙爜涓嶆纭垨娌℃湁姝よ处鍙�"); + } + if (date.Status != "0") //褰撳墠璐﹀彿鏄惁姝e父鍚敤 + { + throw new Exception("褰撳墠璐﹀彿闈炲惎鐢ㄧ姸鎬�"); + } + var notice = Db.Queryable<BllExportNotice>().First(m => m.Id == id && m.IsDel == "0"); if (notice == null) { @@ -280,7 +292,7 @@ { throw new Exception("鏈煡璇㈠埌鍗曟嵁鏄庣粏淇℃伅"); } - if (userId == notice.UpdateUser) + if (date.Id == notice.UpdateUser) { throw new Exception("澶嶆牳澶辫触锛屽鏍镐汉鍛樺拰鍏抽棴璁㈠崟浜哄憳涓嶈兘鐩稿悓锛�"); } @@ -315,10 +327,10 @@ notice.Status = "6"; notice.CheckTime = DateTime.Now; - notice.CheckUser = userId; + notice.CheckUser = date.Id; Db.Updateable(notice).ExecuteCommand(); - new OperationSOServer().AddLogOperationSo("鍑哄簱浣滀笟", "鍑哄簱鍗曟嵁", notice.SONo, "澶嶆牳", $"澶嶆牳浜嗗崟鎹彿涓簕notice.SONo}鐨勫崟鎹俊鎭�", userId); + new OperationSOServer().AddLogOperationSo("鍑哄簱浣滀笟", "鍑哄簱鍗曟嵁", notice.SONo, "澶嶆牳", $"{date.RealName}澶嶆牳浜嗗崟鎹彿涓簕notice.SONo}鐨勫崟鎹俊鎭�", userId); return true; } catch (Exception e) diff --git a/Wms/WMS.BLL/LogServer/OperationSysServer.cs b/Wms/WMS.BLL/LogServer/OperationSysServer.cs index abbf1fa..7d2d0fd 100644 --- a/Wms/WMS.BLL/LogServer/OperationSysServer.cs +++ b/Wms/WMS.BLL/LogServer/OperationSysServer.cs @@ -33,55 +33,148 @@ } - ///// <summary> - ///// 鏌ヨ鎿嶄綔鏃ュ織 - ///// </summary> - ///// <param name="menuName">鑿滃崟鍚嶇О</param> - ///// <param name="type">绫诲瀷</param> - ///// <param name="msg">鍐呭</param> - ///// <param name="startTime">寮�濮嬫棩鏈�</param> - ///// <param name="endTime">缁撴潫鏃ユ湡</param> - ///// <param name="page"></param> - ///// <param name="limit"></param> - ///// <param name="count"></param> - ///// <returns></returns> - //public List<OperationDto> GetOperationSysList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count) - //{ - // try - // { - // Expression<Func<LogOperationSys, bool>> item = Expressionable.Create<LogOperationSys>() - // .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) - // .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) - // .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) - // .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) - // .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(startTime).AddDays(1)) - // .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + /// <summary> + /// 鏌ヨ鎿嶄綔鏃ュ織 + /// </summary> + /// <param name="menuName">鑿滃崟鍚嶇О</param> + /// <param name="type">绫诲瀷</param> + /// <param name="msg">鍐呭</param> + /// <param name="startTime">寮�濮嬫棩鏈�</param> + /// <param name="endTime">缁撴潫鏃ユ湡</param> + /// <param name="page"></param> + /// <param name="limit"></param> + /// <param name="count"></param> + /// <returns></returns> + public List<OperationDto> GetOperationList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count) + { + try + { + var total = 0; + #region asn - // var data = GetAllWhereAsync(item) - // .Includes(x => x.TypeInfo) - // .Includes(x => x.CreateUserInfo) - // .Includes(x => x.UpdateUserInfo).ToList(); - // count = data.Count; - // return data.Select(m => new OperationDto() - // { - // Id = m.Id, - // ParentNo = m.ParentNo, - // MenuNo = m.MenuNo, - // MenuName = m.MenuName, - // FkNo = m.FkNo, - // Type = m.TypeInfo == null ? "" : m.TypeInfo.DictName, - // Msg = m.Msg, - // CreateTime = m.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), - // CreateUserName = m.CreateUserInfo == null ? "" : m.CreateUserInfo.UserName, - // UpdateTime = m.UpdateTime == null ? "" : ((DateTime)m.UpdateTime).ToString("yyyy-MM-dd HH:mm:ss"), - // UpdateUserName = m.UpdateUserInfo == null ? "" : m.UpdateUserInfo.UserName - // }).ToList(); - // } - // catch (Exception e) - // { - // throw new Exception(e.Message); - // } - //} + var item = Expressionable.Create<LogOperationASN>() + .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) + .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) + .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) + .And(it=>it.IsDel == "0") + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + + var list = Db.Queryable<LogOperationASN>().Where(item) + .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) + .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) + .Select((it, dic, users) => new OperationDto() + { + Id = it.Id, + ParentNo = it.ParentNo, + MenuNo = it.MenuNo, + MenuName = it.MenuName, + FkNo = it.FkNo, + Type = dic.DictName, + Msg = it.Msg, + CreateTime = it.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), + CreateUserName = users.RealName, + }); + + #endregion + + #region so + + var item2 = Expressionable.Create<LogOperationSO>() + .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) + .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) + .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) + .And(it => it.IsDel == "0") + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + + var list2 = Db.Queryable<LogOperationSO>().Where(item2) + .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) + .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) + .Select((it, dic, users) => new OperationDto() + { + Id = it.Id, + ParentNo = it.ParentNo, + MenuNo = it.MenuNo, + MenuName = it.MenuName, + FkNo = it.FkNo, + Type = dic.DictName, + Msg = it.Msg, + CreateTime = it.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), + CreateUserName = users.RealName, + }); + + #endregion + + #region cr + + var item3 = Expressionable.Create<LogOperationCR>() + .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) + .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) + .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(endTime).AddDays(1)) + .And(it => it.IsDel == "0") + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + + var list3 = Db.Queryable<LogOperationCR>().Where(item3) + .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) + .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) + .Select((it, dic, users) => new OperationDto() + { + Id = it.Id, + ParentNo = it.ParentNo, + MenuNo = it.MenuNo, + MenuName = it.MenuName, + FkNo = it.FkNo, + Type = dic.DictName, + Msg = it.Msg, + CreateTime = it.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), + CreateUserName = users.RealName, + }); + + #endregion + + #region sys + + var item4 = Expressionable.Create<LogOperationSys>() + .AndIF(!string.IsNullOrWhiteSpace(menuName), it => it.MenuName.Contains(menuName.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(type), it => it.Type == type) + .AndIF(!string.IsNullOrWhiteSpace(msg), it => it.Msg.Contains(msg.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(startTime), it => it.CreateTime >= Convert.ToDateTime(startTime)) + .AndIF(!string.IsNullOrWhiteSpace(endTime), it => it.CreateTime <= Convert.ToDateTime(startTime).AddDays(1)) + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + + var list4 = Db.Queryable<LogOperationSys>().Where(item4) + .LeftJoin<SysDictionary>((it, dic) => it.Type == dic.Id.ToString()) + .LeftJoin<SysUserInfor>((it, dic, users) => it.CreateUser == users.Id) + .Select((it, dic, users) => new OperationDto() + { + Id = it.Id, + ParentNo = it.ParentNo, + MenuNo = it.MenuNo, + MenuName = it.MenuName, + FkNo = it.FkNo, + Type = dic.DictName, + Msg = it.Msg, + CreateTime = it.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), + CreateUserName = users.RealName, + }); + + #endregion + + var data = Db.UnionAll(list, list2, list3, list4).OrderByDescending(it => it.CreateTime) + .ToOffsetPage(page, limit, ref total); + count = total; + return data.OrderByDescending(m => m.CreateTime).ToList(); + } + catch (Exception e) + { + throw new Exception(e.Message); + } + } /// <summary> /// 娣诲姞鎿嶄綔鏃ュ織 diff --git a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs index e87f209..318052b 100644 --- a/Wms/WMS.BLL/SysServer/StorageLocatServer.cs +++ b/Wms/WMS.BLL/SysServer/StorageLocatServer.cs @@ -2,16 +2,19 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; +using System.Runtime.Intrinsics.X86; using System.Text; using System.Threading.Tasks; using Model.ModelDto.SysDto; using Model.ModelVm.SysVm; using SqlSugar; +using WMS.BLL.LogServer; using WMS.DAL; using WMS.Entity.BllAsnEntity; using WMS.Entity.Context; using WMS.Entity.DataEntity; using WMS.Entity.SysEntity; +using WMS.IBLL.ILogServer; using WMS.IBLL.ISysServer; using WMS.IDAL.ISysInterface; @@ -298,6 +301,116 @@ throw new Exception(e.Message); } } + public bool EditStorageLocatListNew(EditLocateListNewVm model, int userId) + { + try + { + if (string.IsNullOrWhiteSpace(model.RoadWayNo)) + { + throw new Exception("宸烽亾涓嶈兘涓虹┖"); + } + bool isRow = false; + if (model.Row != null) + { + if (model.Row <= 0) + { + throw new Exception("鎺掗渶瑕佸ぇ浜�0"); + } + isRow = true; + } + bool isColumn = false; + if (model.Column != null) + { + if (model.Column <= 0) + { + throw new Exception("鍒楅渶瑕佸ぇ浜�0"); + } + isColumn = true; + } + bool isLayer = false; + if (model.Layer != null ) + { + if (model.Column <= 0) + { + throw new Exception("灞傞渶瑕佸ぇ浜�0"); + } + isLayer = true; + } + bool isDepth = false; + if (model.Dept != null) + { + if (model.Dept != 1 && model.Dept != 2) + { + throw new Exception("娣卞害鍙兘涓�1鎴�2"); + } + isDepth = true; + } + Expression<Func<SysStorageLocat, bool>> item = Expressionable.Create<SysStorageLocat>() //鍒涘缓琛ㄨ揪寮� + .AndIF(isRow, it => it.Row == model.Row) + .AndIF(isColumn, it => it.Column == model.Column) + .AndIF(isLayer, it => it.Layer == model.Layer) + .AndIF(isDepth, it => it.Depth == "0"+model.Dept) + .AndIF(!string.IsNullOrWhiteSpace(model.RoadWayNo), it => it.RoadwayNo == model.RoadWayNo) + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + var locateList = Db.Queryable<SysStorageLocat>().Where(item).ToList(); + if (locateList.Count == 0) + { + throw new Exception($"鏈煡璇㈠埌鐩稿搴旂殑鍌ㄤ綅淇℃伅"); + } + + var com = new Common(); + var i = 0; + Db.BeginTran(); + foreach (var locate in locateList) + { + if (model.Flag == "2" && locate.Depth == "01")//鏍囪瘑鏄崯鍧忎笖娣卞害鏄�01鏃� 闇�鎶婃繁搴︿负2鐨勫偍浣嶇粰灞忚斀 + { + var locate2 = com.GetLocateNoDepth2(locate.WareHouseNo, locate.LocatNo); + if (locate2.Flag == "0" && !locateList.Contains(locate2)) + { + locate2.Flag = "1"; + locate2.UpdateUser = userId; + locate2.UpdateTime = DateTime.Now; + var m = Db.Updateable(locate2).ExecuteCommand(); + } + + } + if (model.Flag == "0" && locate.Depth == "02")//鏍囪瘑鏄甯镐笖娣卞害鏄�02鏃� 闇�鍒ゆ柇娣卞害涓�1鐨勫偍浣嶇姸鎬佹槸鍚︽甯� + { + var locate1 = com.GetLocateNoDepth1(locate.WareHouseNo, locate.LocatNo); + + if (locate1.Flag == "2") + { + throw new Exception($"闇�鍏堜慨鏀箋locate1.LocatNo}鐨勫偍浣嶆爣璇嗕负涓嶆槸鎹熷潖"); + } + } + + if (!string.IsNullOrEmpty(model.Status)) + { + locate.Status = model.Status; + } + if (!string.IsNullOrEmpty(model.Flag)) + { + locate.Flag = model.Flag; + } + if (!string.IsNullOrEmpty(model.AreaNo)) + { + locate.AreaNo = model.AreaNo; + } + locate.UpdateUser = userId; + locate.UpdateTime = DateTime.Now; + i = Db.Updateable(locate).ExecuteCommand(); + } + Db.CommitTran(); + return i > 0; + + } + catch (Exception e) + { + Db.RollbackTran(); + throw new Exception(e.Message); + } + } /// <summary> /// 鏌ヨ鍌ㄤ綅鐘舵�� diff --git a/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs index a55e6df..e8a088d 100644 --- a/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs +++ b/Wms/WMS.IBLL/IBllAsnServer/IArrivalNoticeServer.cs @@ -32,7 +32,7 @@ /// </summary> /// <param name="id">id</param> /// <returns></returns> - string GetAsnDetailQtyList(int id); + LabelPrintInfoDto GetAsnDetailQtyList(int id); /// <summary> /// 鑾峰彇鐗╂枡淇℃伅锛堟坊鍔犲叆搴撳崟鏄庣粏浣跨敤锛� @@ -103,7 +103,7 @@ /// <param name="mesTokenUrl">mes鑾峰彇浠ょ墝璺緞</param> /// <param name="userId">鎿嶄綔浜�</param> /// <returns></returns> - bool FinishAsn(int id, string erpurl, string mesUrl,string mesTokenUrl, int userId); + bool FinishAsn(int id, string erpurl, string mesUrl,string mesTokenUrl, string userNo, string pwd, int userId); void UpLocate(string wareNo, string locatNo); diff --git a/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs b/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs index 165a748..ee5de99 100644 --- a/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs +++ b/Wms/WMS.IBLL/IBllSoServer/IExportNoticeServer.cs @@ -23,7 +23,7 @@ /// <param name="url">涓婁紶璺緞</param> /// <param name="userId">鎿嶄綔浜�</param> /// <returns></returns> - bool FinishSo(int id, string url, int userId); + bool FinishSo(int id, string url, string userNo, string pwd, int userId); //------------------------------------------------------------------------------------------ /// <summary> diff --git a/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs b/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs index 488b4cd..6f73bc6 100644 --- a/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs +++ b/Wms/WMS.IBLL/ILogServer/IOperationSysServer.cs @@ -10,19 +10,19 @@ { public interface IOperationSysServer { - ///// <summary> - ///// 鏌ヨ鎿嶄綔鏃ュ織 - ///// </summary> - ///// <param name="menuName">鑿滃崟鍚嶇О</param> - ///// <param name="type">绫诲瀷</param> - ///// <param name="msg">鍐呭</param> - ///// <param name="startTime">寮�濮嬫棩鏈�</param> - ///// <param name="endTime">缁撴潫鏃ユ湡</param> - ///// <param name="page"></param> - ///// <param name="limit"></param> - ///// <param name="count"></param> - ///// <returns></returns> - //List<OperationDto> GetOperationSysList(string menuName,string type,string msg,string startTime,string endTime,int page,int limit,out int count); + /// <summary> + /// 鏌ヨ鎿嶄綔鏃ュ織 + /// </summary> + /// <param name="menuName">鑿滃崟鍚嶇О</param> + /// <param name="type">绫诲瀷</param> + /// <param name="msg">鍐呭</param> + /// <param name="startTime">寮�濮嬫棩鏈�</param> + /// <param name="endTime">缁撴潫鏃ユ湡</param> + /// <param name="page"></param> + /// <param name="limit"></param> + /// <param name="count"></param> + /// <returns></returns> + List<OperationDto> GetOperationList(string menuName, string type, string msg, string startTime, string endTime, int page, int limit, out int count); /// <summary> /// 娣诲姞鎿嶄綔鏃ュ織 diff --git a/Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs b/Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs index fe4f801..177cceb 100644 --- a/Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs +++ b/Wms/WMS.IBLL/ISysServer/IStorageLocatServer.cs @@ -81,6 +81,13 @@ /// <param name="userId">鎿嶄綔浜�</param> /// <returns></returns> bool EditStorageLocatList(EditLocateListVm model, int userId); + /// <summary> + /// 鎵归噺淇敼鍌ㄤ綅淇℃伅 鐘舵�併�佹爣璇嗐�佸尯鍩� + /// </summary> + /// <param name="model"></param> + /// <param name="userId"></param> + /// <returns></returns> + bool EditStorageLocatListNew(EditLocateListNewVm model, int userId); /// <summary> /// 鑾峰彇鍌ㄤ綅淇℃伅 diff --git a/Wms/Wms/Controllers/SysController.cs b/Wms/Wms/Controllers/SysController.cs index a77e393..43f7184 100644 --- a/Wms/Wms/Controllers/SysController.cs +++ b/Wms/Wms/Controllers/SysController.cs @@ -21,6 +21,7 @@ using Model.ModelDto; using Model.ModelDto.LogDto; using Newtonsoft.Json.Linq; +using Model.ModelVm.LogVm; namespace Wms.Controllers { @@ -1260,6 +1261,47 @@ return Ok(new { code = 1, msg = "鏁版嵁鏍煎紡閿欒" }); } } + + /// <summary> + /// 淇敼鍌ㄤ綅鐘舵�佹爣璇嗕俊鎭泦鍚� + /// </summary> + /// <param name="model">妯″瀷</param> + /// <returns></returns> + [HttpPost] + public IActionResult EditStorageLocatListNew (EditLocateListNewVm model) + { + try + { + //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D + var claimsIdentity = this.User.Identity as ClaimsIdentity; + if (claimsIdentity == null) + { + return Ok(new { code = 1, msg = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + } + var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value; + if (string.IsNullOrWhiteSpace(userId)) + { + return Ok(new { code = 1, msg = "涓鸿幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); + } + var bolls = _locatSvc.EditStorageLocatListNew(model, int.Parse(userId)); + if (bolls) + { + _operation.InsertOperation("浠撳簱璁剧疆", "鍌ㄤ綅绠$悊", "", "淇敼", $"淇敼宸烽亾锛歿model.RoadWayNo}銆佹帓:{model.Row}銆佸垪:{model.Column}銆佸眰:{model.Layer}銆佹繁搴︼細{model.Dept}鐨勫尯鍩燂細{model.AreaNo}銆佺姸鎬�:{model.Status}銆佹爣璇嗭細{model.Flag}鐨勫偍浣嶄俊鎭� ", Convert.ToInt32(userId)); + + return Ok(new { code = 0, msg = "缂栬緫鎴愬姛", data = "" }); + } + else + { + return Ok(new { code = 1, msg = "缂栬緫澶辫触", data = "" }); + } + + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + #endregion #region 鎵樼洏鏉$爜绠$悊 @@ -2001,7 +2043,30 @@ #endregion + #region 鎿嶄綔鏃ュ織 + /// <summary> + /// 鑾峰彇鎿嶄綔鏃ュ織淇℃伅 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [AllowAnonymous] + [HttpPost] + public IActionResult GetLogOperationList(GetOperationVm model) + { + try + { + var bolls = _operation.GetOperationList(model.MenuName, model.Type, model.Msg, model.StartTime, model.EndTime, model.Page, model.Limit, out int count); + + return Ok(new { code = 0, count, msg = "鎿嶄綔鏃ュ織淇℃伅", data = bolls }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = e.Message }); + } + } + + #endregion #region 鏁版嵁琛ㄦ牸琛ㄥご鑷畾涔�(閫氱敤鏂规硶) /// <summary> diff --git a/Wms/Wms/Controllers/UpApiController.cs b/Wms/Wms/Controllers/UpApiController.cs index 0c805e3..e215e71 100644 --- a/Wms/Wms/Controllers/UpApiController.cs +++ b/Wms/Wms/Controllers/UpApiController.cs @@ -74,7 +74,7 @@ /// <param name="model">鍏ュ簱鍗曞彿</param> /// <returns></returns> [HttpPost] - public IActionResult FinishAsn(IdVm model) + public IActionResult FinishAsn(FinshVm model) { try { @@ -89,7 +89,7 @@ { return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); } - _arrivalNoticeSvc.FinishAsn(model.Id, _config.ErpHost + _config.AsnFinishUrl, _config.MesHost + _config.MesAsnFinishUrl, _config.MesHost + _config.MesGetTokenUrl, int.Parse(userId)); + _arrivalNoticeSvc.FinishAsn(model.Id, _config.ErpHost + _config.AsnFinishUrl, _config.MesHost + _config.MesAsnFinishUrl, _config.MesHost + _config.MesGetTokenUrl,model.UserNo,model.Password, int.Parse(userId)); return Ok(new { code = 0, count = 0, msg = "鍏ュ簱鍗曞鏍稿苟涓婁紶鎴愬姛" }); } @@ -135,7 +135,7 @@ /// <param name="model"></param> /// <returns></returns> [HttpPost] - public IActionResult FinishExportNotice(IdVm model) + public IActionResult FinishExportNotice(FinshVm model) { try { @@ -150,7 +150,7 @@ { return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" }); } - _exNoticeSvc.FinishSo(model.Id, _config.ErpHost + _config.SoFinishUrl, int.Parse(userId)); + _exNoticeSvc.FinishSo(model.Id, _config.ErpHost + _config.SoFinishUrl, model.UserNo, model.Password, int.Parse(userId)); return Ok(new { code = 0, count = 0, msg = "鍑哄簱鍗曞鏍稿苟涓婁紶鎴愬姛" }); } catch (Exception e) -- Gitblit v1.8.0