From 86e443e42c4bee972c5b795def4917e02f98ce40 Mon Sep 17 00:00:00 2001 From: wxw <Administrator@DESKTOP-5BIMHQ3> Date: 星期五, 11 七月 2025 16:45:08 +0800 Subject: [PATCH] 修改问题 --- Wms/WMS.BLL/HttpServer.cs | 2 HTML/views/HouseWithinSetting/LogWorkShop.html | 681 ++++++++++++++++++++++++++++++++++++++++++ Wms/Model/ModelVm/LogVm/LogWorkShopVm.cs | 44 ++ Pda/View/HouseDataSetting/AgvNullPallet.html | 7 Wms/WMS.IBLL/ILogServer/ILogWorkShopServer.cs | 12 Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 16 Wms/Wms/Controllers/BllCheckController.cs | 21 + Wms/Model/ModelDto/LogDto/LogWorkShopDto.cs | 61 +++ Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | 2 Wms/WMS.BLL/LogServer/LogWorkShopServer.cs | 77 ++++ 10 files changed, 909 insertions(+), 14 deletions(-) diff --git a/HTML/views/HouseWithinSetting/LogWorkShop.html b/HTML/views/HouseWithinSetting/LogWorkShop.html new file mode 100644 index 0000000..3f76978 --- /dev/null +++ b/HTML/views/HouseWithinSetting/LogWorkShop.html @@ -0,0 +1,681 @@ +<!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"> + <style type="text/css"> + .layui-form-item .layui-inline { + margin-bottom: 1px; + margin-right: 1px; + } + </style> + <script> + // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� + document.addEventListener("DOMContentLoaded", function () { + //鑾峰彇table榛樿鏄剧ず鏁� + pageCntFirst(); + //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� + GetIsSetColW(); + }); + </script> + +</head> + +<body id="body"> + <div class="layui-fluid" style="padding-bottom: 0;"> + <div class="layui-card"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto" id="top"> + <div class="layui-form-item" style="margin-bottom: 0px;"> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鐗╂枡缂栫爜</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="SkuNo" name="SkuNo" placeholder="鐗╂枡缂栫爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鐗╂枡鍚嶇О</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="SkuName" name="SkuName" placeholder="鐗╂枡鍚嶇О" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">鎵樼洏鍙�</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="PalletNo" name="PalletNo" placeholder="鎵樼洏鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline mingxi"> + <label class="layui-form-label" style="width: 60px;">鎵规鍙�</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + + <!-- 绠辩爜 绠辨敮鐘舵�� 妫�楠屾爣璁� 闆剁鏍囪 璐ㄩ噺鐘舵�� --> + + <div class="layui-inline zongdan"> + <label class="layui-form-label" style="width: 60px;">绠辩爜</label> + <div class="layui-input-inline" style="width: 170px; margin-right: 0px;"> + <input type="text" id="BoxNo" name="BoxNo" placeholder="绠辩爜" autocomplete="off" + class="layui-input"> + </div> + </div> + + + <div class="layui-inline sousuo"> + <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> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="daochu"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>瀵煎嚭 + </button> + </div> + </div> + </div> + + <div class="layui-card-body"> + <div style="position: relative;"> + <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> + <ul class="layui-tab-title" id="tab"> + <li class="layui-this">鎵樼洏鏄庣粏</li> + <li>绠辩爜鏄庣粏</li> + </ul> + + <div id="center"> + </div> + + <div class="layui-tab-content"> + <div class="layui-tab-item layui-show"> + <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 --> + </div> + </div> + <div class="layui-tab-item"> + <div class="position-relative"><!-- class="position-relative" --><!-- 鑷畾涔夎〃澶村姞涓� --> + <table id="LAY-app-content-list2" lay-filter="LAY-app-content-list2"></table> + <!-- #region 鑷畾涔夎〃澶� --> + <div class="headerSetIcon"> + <button class="layui-btn layui-btn-primary layui-btn-sm" + data-type="customCols2"> + <i class="layui-icon"></i> + </button> + </div> + <!-- #endregion --> + + <!-- #region 鑷畾涔夎〃澶� --> + <script type="text/html" id="templetProductionTime"> + {{# function GetBtn(d){ + return formatDate2(d.ProductionTime); + } + }} + {{ GetBtn(d) }} + </script> + <script type="text/html" id="templetExpirationTime"> + {{# function GetBtn(d){ + return formatDate2(d.ExpirationTime); + } + }} + {{ GetBtn(d) }} + </script> + + <script type="text/html" id="templetInspectTime"> + {{# function GetBtn1(d){ + return formatDate(d.InspectTime); + } + }} + {{ GetBtn1(d) }} + </script> + <!-- #endregion --> + </div> + </div> + </div> + </div> + + </div> + <script type="text/html" id="TypeTpl"> + {{# if(d.Type=='0'){ }} + <button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs">鍏ュ簱</button> + {{# } else if(d.Type == '1') { }} + <button class="layui-btn layui-btn-radius layui-btn-xs">鍑哄簱</button> + {{# } }} + </script> + + </div> + </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'); + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'table', 'laypage', 'layer', 'element', 'laydate'], function () { + var table = layui.table, + form = layui.form, + laypage = layui.laypage, + layer = layui.layer; + element = layui.element; + laydate = layui.laydate; + + var h1 = GetTableTabHeight(); + // var h1 = GetTkableTopHeight(); + // console.log(h1) + + laydate.render({ + elem: '#StartTime', + format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + laydate.render({ + elem: '#EndTime', + format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� + }); + //鑾峰彇褰撳墠鏃堕棿 + function getNowTime() { + var date = new Date(); + //骞� getFullYear()锛氬洓浣嶆暟瀛楄繑鍥炲勾浠� + var year = date.getFullYear(); //getFullYear()浠f浛getYear() + //鏈� getMonth()锛�0 ~ 11 + var month = date.getMonth() + 1; + //鏃� getDate()锛�(1 ~ 31) + var day = date.getDate(); + //鏃� getHours()锛�(0 ~ 23) + var hour = date.getHours(); + //鍒� getMinutes()锛� (0 ~ 59) + var minute = date.getMinutes(); + //绉� getSeconds()锛�(0 ~ 59) + var second = date.getSeconds(); + + var time = year + addZero(month) + addZero(day) + addZero(hour) + addZero(minute) + addZero(second); + return time; + + //灏忎簬10鐨勬嫾鎺ヤ笂0瀛楃涓� + + }; + function addZero(s) { + return s < 10 ? ('0' + s) : s; + }; + + var $ = layui.$; + var yemianid = 0; + refreshTable("", "", "", "", "", "", "", "", "", "", "", "", "", ""); + + // 琛ㄥ崟闇�瑕佺殑鍙橀噺 + var infoOptions; + //#region 鑷畾涔夎〃澶� + var TotalColsArr = [[ + { field: '', title: '搴忓彿', type: 'numbers', align: 'center', fixed: 'left', "disabled": true }, + { field: 'Type', title: '鍏ュ簱/鍑哄簱', align: 'center', templet: '#TypeTpl', width: 90, }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 100, }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 120, }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 120, }, + { field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 100, }, + { field: 'Qty', title: '鏁伴噺', align: 'center', width: 90, }, + { field: 'CreateUserName', title: '鎿嶄綔浜�', align: 'center', width: 100, }, + { field: 'CreateTime', title: '鎿嶄綔鏃堕棿', align: 'center', width: 100, }, + ]]; + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + //#endregion + //鑾峰彇鎵樼洏鏄庣粏 + function refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Type) { + //#region 鑷畾涔夎〃澶� + var colsJson + var param1 = { + Href: 'BllCheck/GetLogWorkShopList' + }; + 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 + } + infoOptions = { + elem: '#LAY-app-content-list', + height: h1, + id: 'LAY-app-content-list', + page: true, + limit: pageCnt, + limits: pageLimits, + even: true, + cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + done: function () { + //鑷畾涔夊垪瀹� + SetTableColW('LAY-app-content-list', 'BllCheck/GetLogWorkShopList', TotalColsSysArr); + }, + cols: colsJson + }; + + var param = { + SkuNo: SkuNo, //鐗╂枡鍙� + SkuName: SkuName, //鐗╂枡鍚嶇О + palletNo: PalletNo, //鎵樼洏鍙� + LotNo: LotNo, //鎵规鍙� + Type: Type, //绫诲瀷 + }; + sendData(IP + "/BllCheck/GetLogWorkShopList", param, 'post', function (res) { + console.log(res) + if (res.code == 0) { //鎴愬姛 + var list = res.data; + $.extend(infoOptions, { + data: list + }); + infoOptions.page = { + curr: 1 + } + tableIns = table.render(infoOptions); + } + else { //涓嶆垚鍔� + layer.msg('鑾峰彇杞﹂棿鍑哄叆搴撴棩蹇楀垪琛ㄤ俊鎭け璐ワ紒', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + }); + //#endregion + } + + // 琛ㄥ崟闇�瑕佺殑鍙橀噺 + var infoOptions2; + + //鑾峰彇鏄庣粏淇℃伅 + //#region 鑷畾涔夎〃澶� + var DetailColsArr = [[ + { field: '', title: '搴忓彿', type: 'numbers', fixed: 'left', "disabled": true }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center' }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center' }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', width: 110 }, + { field: 'BoxNo', title: '绠辩爜', align: 'center', width: 100 }, + { field: 'Status', title: '绠辨敮鐘舵��', align: 'center', templet: '#BoxStatus' }, + { field: 'LotNo', title: '鎵规鍙�', align: 'center' }, + { field: 'LotText', title: '鎵规鎻忚堪', align: 'center' }, + { field: 'Qty', title: '鏁伴噺', width: 90, align: 'center' }, + { field: 'FullQty', title: '鏁寸鏁伴噺', width: 100, align: 'center' }, + { field: 'ProductionTime', title: '鐢熶骇鏃ユ湡', align: 'center', templet: '#templetProductionTime' }, + { field: 'ExpirationTime', title: '鏈夋晥鏈�', align: 'center', templet: '#templetExpirationTime' }, + { field: 'InspectMark', title: '鎶芥鏍囪', align: 'center', templet: '#InspectMarkStatus' }, + { field: 'BitBoxMark', templet: '#BitPalletMarkStatus1', title: '闆剁鏍囪', align: 'center' }, + { field: 'InspectStatus', templet: '#InspectStatus1', title: '璐ㄦ鐘舵��', align: 'center' }, + { field: 'InspectTime', title: '澶嶆鏃堕棿', align: 'center', templet: '#templetInspectTime' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#table-content-list', "disabled": true } + ]]; + var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + //#endregion + function refreshTable2(Id, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, + StartTime, EndTime, WareHouseNo, AreaNo) { + //#region 鑷畾涔夎〃澶� + var colsJson2 + var param1 = { + Href: 'Statistical/GetBoxInfo' + }; + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson2 = DetailColsArr + } else { + colsJson2 = eval(res.data); + } + } else { + colsJson2 = DetailColsArr + } + infoOptions2 = { + elem: '#LAY-app-content-list2', + height: h1, + id: 'LAY-app-content-list2', + page: true, + limit: pageCnt, + limits: pageLimits, + even: true, + cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + done: function () { + //鑷畾涔夊垪瀹� + SetTableColW('LAY-app-content-list2', 'Statistical/GetBoxInfo', DetailColsSysArr); + }, + cols: colsJson2 + }; + + var param = { + Id: Id, + SkuNo: SkuNo, + SkuName: SkuName, + LotNo: LotNo, + PalletNo: PalletNo, + BoxNo: BoxNo, + Status: Status, + InspectMark: InspectMark, + BitBoxMark: BitBoxMark, + InspectStatu: InspectStatus, + StartTime: StartTime, + EndTime: EndTime, + WareHouseNo: WareHouseNo, + AreaNo: AreaNo, + } + sendData(IP + "/Statistical/GetBoxInfo", param, 'get', function (res) { + if (res.code == 0) //鎴愬姛 + { + var list = res.data; + $.extend(infoOptions2, { + data: list + }); + infoOptions2.page = { + curr: 1 + } + tableIns2 = table.render(infoOptions2); + } + else //涓嶆垚鍔� + { + layer.msg('鑾峰彇鏄庣粏鍒楄〃淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }) + }); + //#endregion + } + + //var url = IP + "/Statistical/GetInventoryList1"; + + + + //鎺ュ彈鍏ㄥ眬鍙橀噺 + let quanid = ''; + //鐩戝惉鎼滅储 + form.on('submit(LAY-app-contlist-search)', function (data) { + var SkuNo = $("#SkuNo").val(); + var SkuName = $("#SkuName").val(); + var LotNo = $("#LotNo").val(); + var PalletNo = $("#PalletNo").val(); + + var BoxNo = $("#BoxNo").val(); + var Status = $("#Status").val(); + var InspectMark = $("#InspectMark").val(); + var BitPalletMark = $("#BitPalletMark").val(); + var BitBoxMark = $("#BitBoxMark").val(); + var InspectStatus = $("#InspectStatus").val(); + + var OwnerNo = $("#OwnerNo").val(); + var OwnerName = $("#OwnerName").val(); + + var StartTime = $("#StartTime").val(); + var EndTime = $("#EndTime").val(); + var WareHouseNo = $("#WareHouseNo").val(); + var AreaNo = $("#AreaNo").val(); + + if (yemianid == 0) { + console.log("鎬诲崟"); + refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, + InspectStatus, OwnerNo, OwnerName, StartTime, EndTime, WareHouseNo, AreaNo); + } else if (yemianid == 1) { + quanid = ''; + console.log("鏄庣粏"); + refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, + InspectStatus, StartTime, EndTime, WareHouseNo, AreaNo); + } + + }); + //瑙﹀彂琛屽弻鍑讳簨浠� + table.on('rowDouble(LAY-app-content-list)', function (obj) { + $(".layui-tab-title>li").attr("class", ""); + $('.layui-tab-title>li').eq(1).attr('class', 'layui-this'); + $('.layui-tab-content .layui-tab-item').attr('class', 'layui-tab-item') + $('.layui-tab-content .layui-tab-item').eq(1).attr('class', 'layui-tab-item layui-show') + console.log(obj.data.Id); + quanid = obj.data.Id; + refreshTable2(obj.data.Id); + yemianid = 1; + }); + + //鐩戝惉Tab鍒囨崲锛屼互鏀瑰彉鍦板潃hash鍊� + element.on('tab(docDemoTabBrief)', function (data) { + var SkuNo = $("#SkuNo").val(); + var SkuName = $("#SkuName").val(); + var LotNo = $("#LotNo").val(); + var PalletNo = $("#PalletNo").val(); + + var BoxNo = $("#BoxNo").val(); + var Status = $("#Status").val(); + var InspectMark = $("#InspectMark").val(); + var BitPalletMark = $("#BitPalletMark").val(); + var BitBoxMark = $("#BitBoxMark").val(); + var InspectStatus = $("#InspectStatus").val(); + + var OwnerNo = $("#OwnerNo").val(); + var OwnerName = $("#OwnerName").val(); + + var StartTime = $("#StartTime").val(); + var EndTime = $("#EndTime").val(); + + console.log(data.index); + yemianid = data.index + if (yemianid == 0) { + console.log("鎬诲崟"); + refreshTable(SkuNo, SkuName, PalletNo, LotNo, BoxNo, Status, InspectMark, BitPalletMark, BitBoxMark, InspectStatus, OwnerNo, OwnerName, StartTime, EndTime); + } else if (yemianid == 1) { + console.log("鏄庣粏"); + refreshTable2(quanid, SkuNo, SkuName, LotNo, PalletNo, BoxNo, Status, InspectMark, BitBoxMark, InspectStatus, StartTime, EndTime); + } + }); + var doing = true; + // ------------------------------------璇︽儏--------------------------------------------------- + table.on('tool(LAY-app-content-list2)', function (obj) { + console.log(obj) + var data = obj.data; + //璇︽儏 + if (obj.event === 'edit') { + BoxNo = data.BoxNo; + console.log(data) + layer.open({ + type: 2, + title: '绠辨敮璇︽儏淇℃伅', + content: 'BoxSupportInfor.html?BoxNo=' + BoxNo, + maxmin: true, + area: ['80%', '85%'], + btn: ['鍏抽棴'], + yes: function (index, layero) { + var iframeWindow = window['layui-layer-iframe' + index], + submitID = 'layuiadmin-app-form-edit', + submit = layero.find('iframe').contents().find('#' + submitID); + if (doing) { + doing = false; + + layer.close(index); //鍏抽棴寮瑰眰 + refreshTable(); + doing = true; + + + } + } + }); + } + }); + + form.on('submit(daochu)', function () { + layer.confirm('纭畾瀵煎嚭褰撳墠鏁版嵁鍚楋紵', function (index) { + if (yemianid == 0) { + console.log("鎵樼洏鏄庣粏"); + var param = { + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + PalletNo: $("#PalletNo").val(), + + BoxNo: $("#BoxNo").val(), + Status: $("#Status").val(), + InspectMark: $("#InspectMark").val(), + BitPalletMark: $("#BitPalletMark").val(), + BitBoxMark: $("#BitBoxMark").val(), + InspectStatus: $("#InspectStatus").val(), + + StartTime: $("#StartTime").val(), + EndTime: $("#EndTime").val(), + }; + + sendData(IP + "/Statistical/GetBindListDaoChu", param, 'get', function (res) { + console.log(res); + if (res.code == 0) { //鎴愬姛 + var list = res.data; + table.exportFile(tableIns.config.id, list, 'xls', "鎵樼洏鏄庣粏淇℃伅" + getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� + layer.msg('瀵煎嚭鎴愬姛锛�', { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + + }); + + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } else if (yemianid == 1) { + console.log("绠辩爜鏄庣粏"); + var param = { + Id: quanid, + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + LocatNo: $("#LocatNo").val(), + PalletNo: $("#PalletNo").val(), + Status: $("#Status").val(), + InspectStatus: $("#InspectStatus").val(), + IsSamolingTray: $("#IsSamolingTray").val(), + StartTime: $("#StartTime").val(), + EndTime: $("#EndTime").val(), + }; + sendData(IP + "/Statistical/GetBoxInfoDaoChu", param, 'get', function (res) { + console.log(res); + if (res.code == 0) { //鎴愬姛 + var list = res.data; + table.exportFile(tableIns2.config.id, list, 'xls', "绠辩爜鏄庣粏淇℃伅" + getNowTime(),); //data 涓鸿瀹炰緥涓殑浠绘剰鏁伴噺鐨勬暟鎹� + layer.msg('瀵煎嚭鎴愬姛锛�', { + icon: 1, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + + }); + + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇淇℃伅澶辫触锛�', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + } + }); + + + }); + + + //鑾峰彇浠撳簱涓嬫媺妗嗕俊鎭� + sendData(IP + "/Sys/GetWarehouseDic", {}, 'get', function (res) { + if (res.code == 0) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + $("#WareHouseNo").append('<option value =' + res.data[i].WareHouseNo + '>' + res.data[i].WareHouseNo + '-' + + res.data[i].WareHouseName + '</option>'); + } + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { }); + } + }); + + getAR(""); + form.on('select(getWareHouseNo)', function (data) { + console.log(data); + getAR(data.value); + }); + function getAR(val) { + //鑾峰彇 鍖哄煙涓嬫媺妗� + sendData(IP + "/Sys/GetStorageAreaByHouseNo?wareHouseNo=" + val, {}, 'get', function (res) { + $("#AreaNo").empty(); + $("#AreaNo").append('<option value =""></option>'); + if (res.code == 0) { //鎴愬姛 + 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>'); + } + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg('鑾峰彇鍖哄煙淇℃伅澶辫触', { + icon: 2, + time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function () { + //鍥炶皟 + form.render('select'); + }); + } + }); + + }; + + //#region 鑷畾涔夎〃澶� + //鑷畾涔夎〃澶� + active = { + customCols: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBindList&ColsSysArr=' + TotalColsSysArr, + maxmin: false, + resize: false, + area: ['970px', '650px'] + }); + }, + customCols2: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=Statistical/GetBoxInfo&ColsSysArr=' + DetailColsSysArr, + 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> \ No newline at end of file diff --git a/Pda/View/HouseDataSetting/AgvNullPallet.html b/Pda/View/HouseDataSetting/AgvNullPallet.html index a8a2a28..781f86b 100644 --- a/Pda/View/HouseDataSetting/AgvNullPallet.html +++ b/Pda/View/HouseDataSetting/AgvNullPallet.html @@ -116,14 +116,14 @@ <label class="layui-form-label" lang>璧峰鍦扮爜锛�</label> <div class="layui-input-block"> <input id="LocatNo" type="text" lay-verify="stock" lang langholder placeholder="璧峰鍦扮爜" - autocomplete="off" class="layui-input" readonly> + autocomplete="off" class="layui-input"> </div> </div> <div id="" class="layui-form-item layout-dropdownlist"> <label class="layui-form-label" lang>鐩爣鍖哄煙锛�</label> <div class="layui-input-block" id="selectQuyu"> <select id="Quyu" lay-filter="getQuyu" lay-search> - <option value="B08" selected>B08-搴撳墠绌烘墭瀛樻斁鍖�</option> + <option value="B10" selected>B10-鍙犳墭鏈哄尯</option> </select> <img src="/assets/down_arraw.png"> </div> @@ -190,7 +190,8 @@ icon: 1, time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { - + $("#STOCKCODE").val(''), + $("#LocatNo").val('') }); } else { //涓嶆垚鍔� layer.msg(res.msg, { diff --git a/Wms/Model/ModelDto/LogDto/LogWorkShopDto.cs b/Wms/Model/ModelDto/LogDto/LogWorkShopDto.cs new file mode 100644 index 0000000..d998669 --- /dev/null +++ b/Wms/Model/ModelDto/LogDto/LogWorkShopDto.cs @@ -0,0 +1,61 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model.ModelDto.LogDto +{ + public class LogWorkShopDto + { + /// <summary> + /// Desc:绫诲瀷 + /// Default: + /// Nullable:True + /// </summary> + public string Type { get; set; } + + /// <summary> + /// Desc:鎵樼洏鍙� + /// Default: + /// Nullable:True + /// </summary> + public string PalletNo { get; set; } + + /// <summary> + /// Desc:鎵规鍙� + /// Default: + /// Nullable:True + /// </summary> + public string LotNo { get; set; } + + /// <summary> + /// Desc:鐗╂枡缂栫爜 + /// Default: + /// Nullable:True + /// </summary> + public string SkuNo { get; set; } + + /// <summary> + /// Desc:鐗╂枡鍚嶇О + /// Default: + /// Nullable:True + /// </summary> + public string SkuName { get; set; } + + /// <summary> + /// Desc:鏁伴噺 + /// Default: + /// Nullable:True + /// </summary> + public decimal Qty { get; set; } + + /// <summary> + /// 鎿嶄綔鏃堕棿 + /// </summary> + public string CreateTime { get; set; } + + /// <summary> + /// 鎿嶄綔浜� + /// </summary> + public string CreateUserName { get; set; } + } +} diff --git a/Wms/Model/ModelVm/LogVm/LogWorkShopVm.cs b/Wms/Model/ModelVm/LogVm/LogWorkShopVm.cs new file mode 100644 index 0000000..4177034 --- /dev/null +++ b/Wms/Model/ModelVm/LogVm/LogWorkShopVm.cs @@ -0,0 +1,44 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model.ModelVm.LogVm +{ + public class LogWorkShopVm : IndexPage + { + /// <summary> + /// Desc:绫诲瀷 + /// Default: + /// Nullable:True + /// </summary> + public string Type { get; set; } + + /// <summary> + /// Desc:鎵樼洏鍙� + /// Default: + /// Nullable:True + /// </summary> + public string PalletNo { get; set; } + + /// <summary> + /// Desc:鎵规鍙� + /// Default: + /// Nullable:True + /// </summary> + public string LotNo { get; set; } + + /// <summary> + /// Desc:鐗╂枡缂栫爜 + /// Default: + /// Nullable:True + /// </summary> + public string SkuNo { get; set; } + + /// <summary> + /// Desc:鐗╂枡鍚嶇О + /// Default: + /// Nullable:True + /// </summary> + public string SkuName { get; set; } + } +} diff --git a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs index 80ad10c..bae79e7 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs @@ -6572,7 +6572,7 @@ { foreach (var box in boxInfoList) { - var bllBox = Db.Queryable<BllBoxInfo>().First(w => w.IsDel == "0" && w.Status != "0"); + var bllBox = Db.Queryable<BllBoxInfo>().First(w => w.IsDel == "0" && w.Status != "0" && w.BoxNo == box.BoxNo); if (bllBox != null) { bllBox.Status = "0"; diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index 89f6e78..0c2ac49 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs @@ -1003,7 +1003,7 @@ EndLocat = await GetLocat(areaNo); //璧峰鍌ㄤ綅淇℃伅 - var storageLocat = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == stockDetail.LocatNo); + var storageLocat = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == locatNo); if (storageLocat == null) { throw Oops.Bah("鍌ㄤ綅淇℃伅涓嶅瓨鍦�,璇锋鏌�!"); @@ -1026,10 +1026,10 @@ Receiver = "WCS", IsSuccess = 0, //鏄惁涓嬪彂鎴愬姛 0澶辫触 1鎴愬姛 - StartLocat = stockDetail.LocatNo,//璧峰浣嶇疆 + StartLocat = storageLocat.LocatNo,//璧峰浣嶇疆 EndLocat = EndLocat,//鐩爣浣嶇疆 PalletNo = palletNo,//鎵樼洏鐮� - Msg = string.Format("杞繍浠诲姟锛歿0}=>>{1}", stockDetail.LocatNo, EndLocat), + Msg = string.Format("杞繍浠诲姟锛歿0}=>>{1}", storageLocat.LocatNo, EndLocat), IsSend = 1,//鏄惁鍙啀娆′笅鍙� IsCancel = 1,//鏄惁鍙彇娑� IsFinish = 1,//鏄惁鍙畬鎴� @@ -1046,11 +1046,11 @@ await Db.Updateable(storageLocat).ExecuteCommandAsync(); //淇敼鐩爣鍌ㄤ綅鍦板潃鐘舵�� - if (storageLocatEnd != null) - { - storageLocatEnd.Status = "4";//0锛氱┖鍌ㄤ綅 1锛氭湁鐗╁搧 2锛氬叆搴撲腑 3锛氬嚭搴撲腑 4锛氱Щ鍏ヤ腑 5锛氱Щ鍑轰腑 - await Db.Updateable(storageLocatEnd).ExecuteCommandAsync(); - } + //if (storageLocatEnd != null) + //{ + // storageLocatEnd.Status = "4";//0锛氱┖鍌ㄤ綅 1锛氭湁鐗╁搧 2锛氬叆搴撲腑 3锛氬嚭搴撲腑 4锛氱Щ鍏ヤ腑 5锛氱Щ鍑轰腑 + // await Db.Updateable(storageLocatEnd).ExecuteCommandAsync(); + //} //娣诲姞鎿嶄綔鏃ュ織璁板綍 var k = new OperationCrServer().AddLogOperationCr("PDA妯″潡", "AGV绌烘墭杞繍", palletNo, "绉诲簱", $"PDA鍛煎彨灏忚溅瀵规墭鐩樺彿锛歿palletNo}鍙戣捣杞繍", userId); diff --git a/Wms/WMS.BLL/HttpServer.cs b/Wms/WMS.BLL/HttpServer.cs index 97b2d33..3158a57 100644 --- a/Wms/WMS.BLL/HttpServer.cs +++ b/Wms/WMS.BLL/HttpServer.cs @@ -1468,7 +1468,7 @@ var stockDetail = Db.Queryable<DataStockDetail>().Where(m => m.PalletNo == task.PalletNo).ToList(); //鍒ゆ柇鏄惁鏄洖娴佸叆搴撳畬鎴� - if (!stockDetail.Any()) + if (!stockDetail.Any() && task.EndLocat!= "B100101")//B100101鏄┖鎵樼洏鏀堕泦鍣紝涓嶇敤鏍¢獙搴撳瓨 { throw new Exception("娌℃湁鏌ヨ鍒板簱瀛樹俊鎭�"); } diff --git a/Wms/WMS.BLL/LogServer/LogWorkShopServer.cs b/Wms/WMS.BLL/LogServer/LogWorkShopServer.cs new file mode 100644 index 0000000..c6ad64c --- /dev/null +++ b/Wms/WMS.BLL/LogServer/LogWorkShopServer.cs @@ -0,0 +1,77 @@ +锘縰sing Model.ModelDto.LogDto; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Text; +using WMS.DAL; +using WMS.Entity.Context; +using WMS.Entity.DataEntity; +using WMS.Entity.LogEntity; +using WMS.IBLL.IBllCheckServer; +using WMS.IBLL.ILogServer; + +namespace WMS.BLL.LogServer +{ + public class LogWorkShopServer : DbHelper<LogWorkShop>, ILogWorkShopServer + { + private static readonly SqlSugarScope Db = DataContext.Db; + public LogWorkShopServer() : base(Db) + { + } + + public List<LogWorkShopDto> GetLogWorkShopList(string type, string palletNo,string lotNo,string skuNo,string skuName,int page, int limit, out int count) + { + try + { + string sqlString = string.Empty; + string sqlCount = string.Empty; + string sqlPub = string.Empty; + sqlCount += "SELECT COUNT(tb1.ID) FROM LogWorkShop AS tb1 "; + sqlString += $@"select + tb1.Type,tb1.PalletNo,tb1.LotNo,tb1.SkuNo,tb1.SkuName,tb1.CreateUser,tb1.CreateTime,SUM(tb1.Qty) as Qty,tb2.RealName as CreateUserName + from LogWorkShop as tb1 + left join SysUserInfor as tb2 on tb1.CreateUser=tb2.Id "; + sqlPub += $"where 1=1 "; + + if (!string.IsNullOrEmpty(type)) + { + sqlPub += $"AND tb1.Type = '{type}' "; + } + if (!string.IsNullOrEmpty(palletNo)) + { + sqlPub += $"AND tb1.PalletNo like '%{palletNo.Trim()}%' "; + } + if (!string.IsNullOrEmpty(lotNo)) + { + sqlPub += $"AND tb1.LotNo like '%{lotNo.Trim()}%' "; + } + if (!string.IsNullOrEmpty(skuNo)) + { + sqlPub += $"AND tb1.SkuNo like '%{skuNo.Trim()}%' "; + } + if (!string.IsNullOrEmpty(skuName)) + { + sqlPub += $"AND tb1.SkuName like '%{skuName.Trim()}%' "; + } + sqlPub += " group by tb1.Type,tb1.PalletNo,tb1.LotNo,tb1.SkuNo,tb1.SkuName,tb1.CreateUser,tb1.CreateTime "; + sqlCount += sqlPub; + if (page == 0) + { + page = 1; + } + sqlString += sqlPub + $" offset {((page - 1) * limit)} rows fetch next {limit} rows only;"; + + var com = new Common(); + count = com.GetRowCount(sqlCount); + + var modelList = Db.Ado.SqlQuery<LogWorkShopDto>(sqlString); + + return modelList; + } + catch (Exception e) + { + throw new Exception(e.Message); + } + } + } +} diff --git a/Wms/WMS.IBLL/ILogServer/ILogWorkShopServer.cs b/Wms/WMS.IBLL/ILogServer/ILogWorkShopServer.cs new file mode 100644 index 0000000..defce54 --- /dev/null +++ b/Wms/WMS.IBLL/ILogServer/ILogWorkShopServer.cs @@ -0,0 +1,12 @@ +锘縰sing Model.ModelDto.LogDto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace WMS.IBLL.ILogServer +{ + public interface ILogWorkShopServer + { + List<LogWorkShopDto> GetLogWorkShopList(string type, string palletNo, string lotNo, string skuNo, string skuName, int page, int limit, out int count); + } +} diff --git a/Wms/Wms/Controllers/BllCheckController.cs b/Wms/Wms/Controllers/BllCheckController.cs index c3ea448..656f107 100644 --- a/Wms/Wms/Controllers/BllCheckController.cs +++ b/Wms/Wms/Controllers/BllCheckController.cs @@ -35,6 +35,7 @@ private readonly IWarehouseOutsidePalletsServer _stockPallet; //搴撳鎵樼洏 private readonly IStockFreectSetve _freect; //瑙e喕\鍐荤粨 + private readonly ILogWorkShopServer _logWorkShop; //杞﹂棿鍑哄叆搴撹褰� private readonly UserManager _userManager; /// <summary> @@ -46,7 +47,7 @@ /// <param name="logSvc">搴撳唴鎿嶄綔鏃ュ織Svc</param> /// <param name="stockPallet">搴撳鎵樼洏</param> /// <param name="freect">瑙e喕\鍐荤粨</param> - public BllCheckController(IOptions<ApiUrlConfig> setting, IStockCheckServer stockCheckSvc, IStockCheckLogServer stockCheckLogSvc, ITaskServer taskSvc, IOperationCRServer logSvc, IWarehouseOutsidePalletsServer stockPallet, IStockFreectSetve freect, UserManager userManager) + public BllCheckController(IOptions<ApiUrlConfig> setting, IStockCheckServer stockCheckSvc, IStockCheckLogServer stockCheckLogSvc, ITaskServer taskSvc, IOperationCRServer logSvc, IWarehouseOutsidePalletsServer stockPallet, IStockFreectSetve freect, ILogWorkShopServer logWorkShop, UserManager userManager) { _config = setting.Value; _stockCheckSvc = stockCheckSvc; @@ -55,6 +56,7 @@ _logSvc = logSvc; _stockPallet = stockPallet; _freect = freect; + _logWorkShop = logWorkShop; _userManager = userManager; } @@ -365,6 +367,23 @@ #endregion + #region 杞﹂棿鍑哄叆搴撹褰� + [HttpPost] + public IActionResult GetLogWorkShopList(LogWorkShopVm model) + { + try + { + var _list = _logWorkShop.GetLogWorkShopList(model.Type, model.PalletNo, model.LotNo, model.SkuNo, model.SkuName, model.Page, model.Limit, out int count); + + return Ok(new { code = 0, count = count, msg = "鑾峰彇杞﹂棿鍑哄叆搴撹褰�", data = _list }); + } + catch (Exception e) + { + return Ok(new { code = 1, msg = "鑾峰彇澶辫触" + e.Message }); + } + } + #endregion + #region AGV杞繍 /// <summary> -- Gitblit v1.8.0