From 452ec2a2e75264515a9b315d1965db3069433d82 Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期四, 11 七月 2024 08:31:48 +0800 Subject: [PATCH] 采购单据 --- Wms/WMS.Entity/BllAsnEntity/BllProcurePlanNotice.cs | 5 HTML/views/BaseSetting/Customer.html | 78 +++--- Wms/WMS.IBLL/IBllAsnServer/IProcurePlanServer.cs | 4 Wms/Wms/Controllers/BllAsnController.cs | 23 +- HTML/views/ASNSetting/ArrivalNotice.html | 437 ++++++++++++++++++++------------------- HTML/views/ASNSetting/ProcurePlanNotice.html | 2 Wms/WMS.BLL/BllAsnServer/ProcurePlanServer.cs | 71 ++---- 7 files changed, 306 insertions(+), 314 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html index 276c10c..7965c71 100644 --- a/HTML/views/ASNSetting/ArrivalNotice.html +++ b/HTML/views/ASNSetting/ArrivalNotice.html @@ -17,13 +17,16 @@ height: auto; line-height: 23px; } - .layui-table-tool-panel{ + + .layui-table-tool-panel { top: auto; bottom: 29px; } - .layui-table-tool{ + + .layui-table-tool { padding-left: 5px; } + /* 琛ㄦ牸涓嬫媺灏忕澶撮殣钘� */ .layui-table-grid-down { display: none; @@ -31,14 +34,14 @@ </style> <script> // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� - document.addEventListener("DOMContentLoaded", function() { + document.addEventListener("DOMContentLoaded", function () { //鑾峰彇table榛樿鏄剧ず鏁� pageCntFirst(); console.log(pageCnt) //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� GetIsSetColW(); }); - </script> + </script> </head> <body id="body"> @@ -49,8 +52,8 @@ <div class="layui-inline"> <label class="layui-form-label">鍏ュ簱鍗曞彿</label> <div class="layui-input-inline"> - <input type="text" id="ASNNo" name="ASNNo" placeholder="鍏ュ簱鍗曞彿" - autocomplete="off" class="layui-input"> + <input type="text" id="ASNNo" name="ASNNo" placeholder="鍏ュ簱鍗曞彿" autocomplete="off" + class="layui-input"> </div> </div> <div class="layui-inline"> @@ -120,15 +123,15 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 90px;">涓婃父绯荤粺鍗曞彿</label> <div class="layui-input-inline"> - <input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺鍗曞彿" - autocomplete="off" class="layui-input"> + <input type="text" id="OrderCode" name="OrderCode" placeholder="涓婃父绯荤粺鍗曞彿" autocomplete="off" + class="layui-input"> </div> </div> <div class="layui-inline"> <label class="layui-form-label">瀹㈡埛鍚嶇О</label> <div class="layui-input-inline"> - <input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О" autocomplete="off" - class="layui-input"> + <input type="text" id="CustomerName" name="CustomerName" placeholder="瀹㈡埛鍚嶇О" + autocomplete="off" class="layui-input"> </div> </div> <div class="layui-inline"> @@ -149,27 +152,28 @@ <label class="layui-form-label">鎾ら攢鍘熷洜</label> <div class="layui-input-inline"> <textarea id="Reason" name="Reason" placeholder="璇疯緭鍏ュ唴瀹�" class="layui-textarea"></textarea> - + </div> - </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 class="layui-inline" id="divEditDemo" style="display: none; padding-top: 10px;"> <label class="layui-form-label">澶囨敞</label> <div class="layui-input-inline" style="width: 300px;height: 100%;"> - <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" class="layui-textarea"></textarea> + <textarea placeholder="璇疯緭鍏ュ唴瀹�" id="NoticeDemo" name="NoticeDemo" + class="layui-textarea"></textarea> </div> </div> </div> </div> - <div id="center"> + <div id="center"> </div> <div class="layui-card-body"> @@ -314,7 +318,7 @@ <i class="layui-icon"></i>娣诲姞 </button> </script> - + <script type="text/html" id="toolbarDemoList"> {{# function GetBtn2(d){ console.log(d); @@ -425,14 +429,14 @@ }).extend({ index: 'lib/index' //涓诲叆鍙fā鍧� }).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () { - + var doing = true; - + var table = layui.table, form = layui.form, laypage = layui.laypage, layer = layui.layer; - + laydate = layui.laydate; laydate.render({ @@ -443,62 +447,62 @@ elem: '#EndTime' , format: 'yyyy-MM-dd' //鍙换鎰忕粍鍚� }); - + var h1 = GetTableTopHeight(); var h2 = GetTableBottomHeight(); - + refreshTable(); - refreshTablemx("鍗曞彿"); + refreshTablemx("鍗曞彿"); //娓叉煋鎬诲崟 //#region 鑷畾涔夎〃澶� var TotalColsArr = [[ - {field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true}, - {field: 'ASNNo',title: '鍏ュ簱鍗曞彿',align: 'center',fixed: 'left',sort: true,width: 180, "disabled": true}, - {field: 'Status',title: '鎵ц鐘舵��',align: 'center',templet: '#buttonTpl'}, - {field: 'Origin',title: '鏉ユ簮',align: 'center',width: 80}, - {field: 'CustomerName',title: '瀹㈡埛鍚嶇О',align: 'center'}, - {field: 'Type',title: '鍗曟嵁绫诲瀷',align: 'center',templet: '#templetType'}, - {field: 'OrderCode',title: '涓婃父绯荤粺鍗曞彿',align: 'center',width: 180}, - {field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center',templet: '#templetCompleteTime'}, - {field: 'Demo',title: '澶囨敞',align: 'center',width: 180}, - {field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 110}, - {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',templet: '#templetCreateTime'}, - {field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 110}, - {field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',templet: '#templetUpdateTime'}, - {field: 'CheckUserName',title: '澶嶆牳浜�',align: 'center',width: 110}, - {field: 'CheckTime',title: '澶嶆牳鏃堕棿',align: 'center',templet: '#templetCheckTime'}, - {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 280,align: 'center',toolbar: '#toolbarDemo1', "disabled": true} - ]]; - var TotalColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + { field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true }, + { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center', fixed: 'left', sort: true, width: 180, "disabled": true }, + { field: 'Status', title: '鎵ц鐘舵��', align: 'center', templet: '#buttonTpl' }, + { field: 'Origin', title: '鏉ユ簮', align: 'center', width: 80 }, + { field: 'CustomerName', title: '瀹㈡埛鍚嶇О', align: 'center' }, + { field: 'Type', title: '鍗曟嵁绫诲瀷', align: 'center', templet: '#templetType' }, + { field: 'OrderCode', title: '涓婃父绯荤粺鍗曞彿', align: 'center', width: 180 }, + { field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', templet: '#templetCompleteTime' }, + { field: 'Demo', title: '澶囨敞', align: 'center', width: 180 }, + { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 110 }, + { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', templet: '#templetCreateTime' }, + { field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 110 }, + { field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', templet: '#templetUpdateTime' }, + { field: 'CheckUserName', title: '澶嶆牳浜�', align: 'center', width: 110 }, + { field: 'CheckTime', title: '澶嶆牳鏃堕棿', align: 'center', templet: '#templetCheckTime' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true } + ]]; + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 //#endregion function refreshTable() { - + //#region 鑷畾涔夎〃澶� var colsJson - var param1={ - Href:'BllAsn/GetArrivalNoticeList' + var param1 = { + Href: 'BllAsn/GetArrivalNoticeList' }; - 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); + 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 + } else { + colsJson = TotalColsArr } var param = { ASNNo: $("#ASNNo").val(), Type: $("#Type").val(), Status: $("#Status").val(), - OrderCode:$("#OrderCode").val(), + OrderCode: $("#OrderCode").val(), CustomerName: $("#CustomerName").val(), LotNo: $("#LotNo").val(), SkuNo: $("#SkuNo").val(), SkuName: $("#SkuName").val(), - StartTime:$("#StartTime").val(), + StartTime: $("#StartTime").val(), EndTime: $("#EndTime").val() }; table.render({ @@ -508,17 +512,19 @@ height: h1, id: 'LAY-app-content-list', where: param, + parseData: FnParseData, contentType: 'application/json', - headers:{ToKen:$.cookie('token')}, + headers: { ToKen: $.cookie('token') }, page: true, even: true, limit: pageCnt, limits: pageLimits, cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - done: function(res) { - setRight(); + done: function (res) { + console.log(res); + setRight(); //鑷畾涔夊垪瀹� - SetTableColW('LAY-app-content-list','BllAsn/GetArrivalNoticeList',TotalColsSysArr); + SetTableColW('LAY-app-content-list', 'BllAsn/GetArrivalNoticeList', TotalColsSysArr); }, cols: colsJson }); @@ -527,64 +533,64 @@ } // 鍏ュ簱鍗晅able鍗曟満浜嬩欢 - table.on('row(LAY-app-content-list)', function(obj) { + table.on('row(LAY-app-content-list)', function (obj) { refreshTablemx(obj.data.ASNNo); }); - //娓叉煋鏄庣粏 + //娓叉煋鏄庣粏 //#region 鑷畾涔夎〃澶� var DetailColsArr = [[ - {field: '',title: '搴忓彿',type:'numbers',width: 50,align: 'center',fixed: 'left', "disabled": true}, - {field: 'ASNNo',title: '鍏ュ簱鍗曞彿',align: 'center',fixed: 'left',sort: true,width: 180, "disabled": true}, - {field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',width: 100}, - {field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',width: 200}, - {field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center',width: 130}, - {field: 'LotNo',title: '鎵规鍙�',align: 'center',width: 100}, - {field: 'SupplierLot',title: '渚涜揣鎵规',align: 'center',width: 100}, - {field: 'Qty',title: '鏁伴噺',align: 'center',width: 70}, - {field: 'FactQty',title: '宸茬粍鏁伴噺',align: 'center',width: 90}, - {field: 'CompleteQty',title: '瀹屾垚鏁伴噺',align: 'center',width: 90}, - {field: 'CompleteTime',title: '瀹屾垚鏃堕棿',align: 'center', width: 160,templet: '#templetCompleteTime2'}, - {field: 'IsSampling',title: '鏄惁鍙栨牱',align: 'center',width: 90,templet: '#templetIsSampling'}, - {field: 'InspectStatus',title: '璐ㄦ鐘舵��',align: 'center',width: 90,templet: '#templetInspectStatus'}, - {field: 'UnitName',title: '璁¢噺鍗曚綅',align: 'center',width: 90}, - // {field: 'Price',title: '鍗曚环',align: 'center',width: 65}, - // {field: 'Money',title: '閲戦',align: 'center',width: 65}, - {field: 'LotText',title: '鎵规鎻忚堪',align: 'center',width: 120}, - {field: 'PackagName',title: '鍖呰鍚嶇О',align: 'center',width: 110,}, - {field: 'IsBale',title: '鏄惁瑁瑰寘',align: 'center',width: 150}, - {field: 'IsBelt',title: '鏄惁鎵撳甫',align: 'center',width: 150}, - {field: 'UDF1',title: '鑷畾涔夊垪1',align: 'center',width: 140}, - {field: 'UDF2',title: '鑷畾涔夊垪2',align: 'center',width: 140}, - {field: 'UDF3',title: '鑷畾涔夊垪3',align: 'center',width: 140}, - {field: 'UDF4',title: '鑷畾涔夊垪4',align: 'center',width: 140}, - {field: 'UDF5',title: '鑷畾涔夊垪5',align: 'center',width: 140,templet:'#templetUDF5'}, - {field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 100}, - {field: 'CreateTime',title: '鍒涘缓鏃堕棿',align: 'center',width: 160,templet: '#templetCreateTime2'}, - {field: 'UpdateUserName',title: '淇敼浜�',align: 'center',width: 150,}, - {field: 'UpdateTime',title: '淇敼鏃堕棿',align: 'center',width: 150,templet: '#templetUpdateTime3'}, - {field: 'caozuo',title: '鎿嶄綔',fixed: 'right',width: 150,align: 'left',toolbar: '#toolbarDemoList', "disabled": true} - ]]; - var DetailColsSysArr=encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + { field: '', title: '搴忓彿', type: 'numbers', width: 50, align: 'center', fixed: 'left', "disabled": true }, + { field: 'ASNNo', title: '鍏ュ簱鍗曞彿', align: 'center', fixed: 'left', sort: true, width: 180, "disabled": true }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 100 }, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 200 }, + { field: 'Standard', title: '鐗╂枡瑙勬牸', align: 'center', width: 130 }, + { field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 100 }, + { field: 'SupplierLot', title: '渚涜揣鎵规', align: 'center', width: 100 }, + { field: 'Qty', title: '鏁伴噺', align: 'center', width: 70 }, + { field: 'FactQty', title: '宸茬粍鏁伴噺', align: 'center', width: 90 }, + { field: 'CompleteQty', title: '瀹屾垚鏁伴噺', align: 'center', width: 90 }, + { field: 'CompleteTime', title: '瀹屾垚鏃堕棿', align: 'center', width: 160, templet: '#templetCompleteTime2' }, + { field: 'IsSampling', title: '鏄惁鍙栨牱', align: 'center', width: 90, templet: '#templetIsSampling' }, + { field: 'InspectStatus', title: '璐ㄦ鐘舵��', align: 'center', width: 90, templet: '#templetInspectStatus' }, + { field: 'UnitName', title: '璁¢噺鍗曚綅', align: 'center', width: 90 }, + // {field: 'Price',title: '鍗曚环',align: 'center',width: 65}, + // {field: 'Money',title: '閲戦',align: 'center',width: 65}, + { field: 'LotText', title: '鎵规鎻忚堪', align: 'center', width: 120 }, + { field: 'PackagName', title: '鍖呰鍚嶇О', align: 'center', width: 110, }, + { field: 'IsBale', title: '鏄惁瑁瑰寘', align: 'center', width: 150 }, + { field: 'IsBelt', title: '鏄惁鎵撳甫', align: 'center', width: 150 }, + { field: 'UDF1', title: '鑷畾涔夊垪1', align: 'center', width: 140 }, + { field: 'UDF2', title: '鑷畾涔夊垪2', align: 'center', width: 140 }, + { field: 'UDF3', title: '鑷畾涔夊垪3', align: 'center', width: 140 }, + { field: 'UDF4', title: '鑷畾涔夊垪4', align: 'center', width: 140 }, + { field: 'UDF5', title: '鑷畾涔夊垪5', align: 'center', width: 140, templet: '#templetUDF5' }, + { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 }, + { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime2' }, + { field: 'UpdateUserName', title: '淇敼浜�', align: 'center', width: 150, }, + { field: 'UpdateTime', title: '淇敼鏃堕棿', align: 'center', width: 150, templet: '#templetUpdateTime3' }, + { field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 150, align: 'left', toolbar: '#toolbarDemoList', "disabled": true } + ]]; + var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 //#endregion function refreshTablemx(asnNo) { - + //#region 鑷畾涔夎〃澶� var colsJson2 - var param1={ - Href:'BllAsn/GetArrivalNoticeDetailList' + var param1 = { + Href: 'BllAsn/GetArrivalNoticeDetailList' }; - 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); + 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 - } + } else { + colsJson2 = DetailColsArr + } var param = { - ASNNo:asnNo + ASNNo: asnNo }; table.render({ elem: '#LAY-app-content-list2', @@ -594,53 +600,52 @@ id: 'LAY-app-content-list2', where: param, contentType: 'application/json', - toolbar:'#toolbarDemo', - defaultToolbar: [], //'filter','print', 'exports' - headers:{ToKen:$.cookie('token')}, + toolbar: '#toolbarDemo', + defaultToolbar: [], //'filter','print', 'exports' + headers: { ToKen: $.cookie('token') }, page: true, limit: pageCnt, limits: pageLimits, cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 - done: function() { + done: function () { setRight() //鑷畾涔夊垪瀹� - SetTableColW('LAY-app-content-list2','BllAsn/GetArrivalNoticeDetailList',DetailColsSysArr); - }, + SetTableColW('LAY-app-content-list2', 'BllAsn/GetArrivalNoticeDetailList', DetailColsSysArr); + }, cols: colsJson2 }); }); //#endregion } - function setRight() - { - $(function() { + function setRight() { + $(function () { $(".addClass").hide(); $(".editClass").hide(); - $(".delClass").hide(); + $(".delClass").hide(); // $(".cheXiaoClass").hide(); - $(".clossClass").hide(); + $(".clossClass").hide(); $(".editDemoClass").hide();//澶囨敞 $(".checkClass").hide(); //澶嶆牳 $(".addLabelClass").hide(); //澶嶆牳 - + }); - sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { + sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { if (res.code == 200) { //鎴愬姛 for (var k = 0; k < res.data.length; k++) { if (res.data[k].MenuName == "娣诲姞鍏ュ簱鍗�") { - $(function() { + $(function () { $(".addClass").show(); }); } if (res.data[k].MenuName == "缂栬緫鍏ュ簱鍗�") { - $(function() { + $(function () { $(".editClass").show(); }); } if (res.data[k].MenuName == "鍒犻櫎鍏ュ簱鍗�") { - $(function() { - $(".delClass").show(); + $(function () { + $(".delClass").show(); }); } // if (res.data[k].MenuName == "鎾ら攢鍏ュ簱鍗�") { @@ -649,23 +654,23 @@ // }); // } if (res.data[k].MenuName == "鍏抽棴鍏ュ簱鍗�") { - $(function() { - $(".clossClass").show(); + $(function () { + $(".clossClass").show(); }); } if (res.data[k].MenuName == "缁存姢鍏ュ簱鍗曞娉�") { - $(function() { - $(".editDemoClass").show(); + $(function () { + $(".editDemoClass").show(); }); } if (res.data[k].MenuName == "澶嶆牳鍏ュ簱鍗�") { - $(function() { - $(".checkClass").show(); + $(function () { + $(".checkClass").show(); }); } if (res.data[k].MenuName == "鐢熸垚鏍囩") { - $(function() { - $(".addLabelClass").show(); + $(function () { + $(".addLabelClass").show(); }); } } @@ -673,7 +678,7 @@ layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + }, function () { }); } }); } @@ -681,11 +686,11 @@ // 椤甸潰鐩戞帶锛岀偣鍑绘煡璇㈠姞杞藉叆搴撴�诲崟 form.on('submit(LAY-app-contlist-search)', function (data) { refreshTable(); - refreshTablemx("鍗曞彿"); + refreshTablemx("鍗曞彿"); }); - - table.on('toolbar(LAY-app-content-list2)', function(obj){ - if (obj.event == "add") { + + table.on('toolbar(LAY-app-content-list2)', function (obj) { + if (obj.event == "add") { layer.open({ type: 2, title: '娣诲姞鍏ュ簱鍗曟嵁', @@ -695,14 +700,13 @@ }); } }); - + var ImportId = 0; table.on('tool(LAY-app-content-list)', function (obj) { var data = obj.data; - switch(obj.event) - { - case "edit" : + switch (obj.event) { + case "edit": // 浠g爜鍖哄煙 var id = data.ASNNo; layer.open({ @@ -713,11 +717,11 @@ area: ['70%', '90%'] }); break; - case "del" : - layer.confirm('纭畾鍒犻櫎姝ゅ崟鎹悧锛�', function(index) { + case "del": + layer.confirm('纭畾鍒犻櫎姝ゅ崟鎹悧锛�', function (index) { // 浠g爜鍖哄煙 var param = { - ASNNo:data.ASNNo, + ASNNo: data.ASNNo, }; sendData(IP + "/BllAsn/DelArrivalNotice", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -726,7 +730,7 @@ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { refreshTable(); - refreshTablemx("鍗曞彿"); + refreshTablemx("鍗曞彿"); doing = true }); } else { //涓嶆垚鍔� @@ -736,14 +740,14 @@ }, function () { doing = true }); } }); - }); + }); break; - case "closs" : + case "closs": // 浠g爜鍖哄煙 - layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function(index) { + layer.confirm('纭畾鍏抽棴姝ゅ崟鎹悧锛�', function (index) { // 浠g爜鍖哄煙 var param = { - Id:data.Id, + Id: data.Id, }; sendData(IP + "/UpApi/CloseAsn", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -764,12 +768,12 @@ }); break; - case "check" : + case "check": // 浠g爜鍖哄煙 - layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function(index) { + layer.confirm('纭畾澶嶆牳姝ゅ崟鎹悧锛�', function (index) { // 浠g爜鍖哄煙 var param = { - Id:data.Id, + Id: data.Id, }; sendData(IP + "/UpApi/FinishAsn", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 @@ -788,111 +792,110 @@ } }); }); - + break; - case "chexiao" : + case "chexiao": layer.open({ type: 1, title: '鎾ら攢鐢宠', content: $('#divReason'), maxmin: true, - area: ['300px','265px'], + area: ['300px', '265px'], btn: ['纭畾', '鍙栨秷'], - yes: function(index, layero) { + yes: function (index, layero) { var pa = $('#Reason').val(); - if (doing== true) { - doing= false; - + if (doing == true) { + doing = false; + var param = { - Id: data.Id, + Id: data.Id, Reason: pa, }; console.log(param); - sendData(IP + "/BllAsn/CancelOrder", param, 'get', function(res) { + sendData(IP + "/BllAsn/CancelOrder", param, 'get', function (res) { console.log(res); if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { icon: 1, time: 3000 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { + }, function () { refreshTable(); - doing= true; + doing = true; }); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { + }, function () { refreshTable(); - doing= true; + doing = true; }); } layer.close(index); }); - }else{ + } else { layer.msg("璇峰嬁閲嶅鐐瑰嚮", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }); } - + } - }); - + }); + break; - case "editDemo" : + case "editDemo": $('#NoticeDemo').val(data.Demo); layer.open({ type: 1, title: '缁存姢澶囨敞', content: $('#divEditDemo'), maxmin: false, - area: ['420px','260px'], + area: ['420px', '260px'], btn: ['纭畾', '鍙栨秷'], - yes: function(index, layero) { + yes: function (index, layero) { var demo = $('#NoticeDemo').val(); var param = { id: data.Id, demo: demo, }; - sendData(IP + "/BllAsn/EditNoticeDemo", param, 'get', function(res) { + sendData(IP + "/BllAsn/EditNoticeDemo", param, 'get', function (res) { if (res.code == 0) { //鎴愬姛 refreshTable(); layer.msg(res.msg, { icon: 1, time: 1500 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { - + }, function () { + }); } else { //涓嶆垚鍔� layer.msg(res.msg, { icon: 2, time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() { + }, function () { refreshTable(); }); } layer.close(index); }); } - }); + }); break; - default:break; + default: break; } }); //鏄庣粏琛ㄦ搷浣滄爮浜嬩欢 table.on('tool(LAY-app-content-list2)', function (obj) { var data = obj.data; var id = data.Id; - switch(obj.event) - { - case "del" : - layer.confirm('纭畾鍒犻櫎鍏ュ簱鍗曟槑缁嗗悧锛�', function(index) { + switch (obj.event) { + case "del": + layer.confirm('纭畾鍒犻櫎鍏ュ簱鍗曟槑缁嗗悧锛�', function (index) { // 浠g爜鍖哄煙 var param = { - ASNNo:data.ASNNo, - Id:data.Id, - }; + ASNNo: data.ASNNo, + Id: data.Id, + }; sendData(IP + "/BllAsn/DelArrivalNoticeDetail", param, 'post', function (res) { if (res.code == 0) { //鎴愬姛 layer.msg(res.msg, { @@ -910,11 +913,11 @@ }, function () { doing = true }); } }); - }); + }); break; - case "Addlabel" : - if(data.Qty<=0){ + case "Addlabel": + if (data.Qty <= 0) { layer.msg("璇峰厛杈撳叆鍒拌揣鏁伴噺!", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 @@ -924,41 +927,41 @@ layer.open({ type: 2, title: '鐢熸垚鏍囩', - content: 'LabelPrintSelect.html?Id='+id+'&SupplierLot='+data.SupplierLot, + content: 'LabelPrintSelect.html?Id=' + id + '&SupplierLot=' + data.SupplierLot, maxmin: true, area: ['480px', '615px'], - btn: ['纭畾','鍙栨秷'], - yes: function(index, layero){ - var iframeWindow = window['layui-layer-iframe'+ index] - ,submitID = 'layuiadmin-app-form-edit' - ,submit = layero.find('iframe').contents().find('#'+ submitID); + btn: ['纭畾', '鍙栨秷'], + yes: function (index, layero) { + var iframeWindow = window['layui-layer-iframe' + index] + , submitID = 'layuiadmin-app-form-edit' + , submit = layero.find('iframe').contents().find('#' + submitID); //鐩戝惉鎻愪氦 - iframeWindow.layui.form.on('submit('+ submitID +')', function(data){ + iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� console.log(field); //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹� //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+ - var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime+"&SupplierLot="+field.SupplierLot; - + var str = "Id=" + id + "&IsReset=" + field.reset + "&ArriveQty=" + field.arriveQty + "&ProductionTime=" + field.productionTime + "&ExpirationTime=" + field.expirationTime + "&StoreTime=" + field.storeTime + "&SupplierLot=" + field.SupplierLot; + layer.open({ type: 2, title: '鐢熸垚鏍囩', - content: 'LabelPrint.html?'+str, + content: 'LabelPrint.html?' + str, maxmin: true, area: ['660px', '660px'], btn: ['鍙栨秷'], - + }); - }); + }); submit.trigger('click'); } }); break; - case "Addlabel2" : - if(data.Qty<=0){ + case "Addlabel2": + if (data.Qty <= 0) { layer.msg("璇峰厛杈撳叆鍒拌揣鏁伴噺!", { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 @@ -968,61 +971,61 @@ layer.open({ type: 2, title: '鐢熸垚鏍囩', - content: 'LabelPrintSelect.html?Id='+id+'&Type=4', + content: 'LabelPrintSelect.html?Id=' + id + '&Type=4', maxmin: true, area: ['480px', '615px'], - btn: ['纭畾','鍙栨秷'], - yes: function(index, layero){ - var iframeWindow = window['layui-layer-iframe'+ index] - ,submitID = 'layuiadmin-app-form-edit' - ,submit = layero.find('iframe').contents().find('#'+ submitID); + btn: ['纭畾', '鍙栨秷'], + yes: function (index, layero) { + var iframeWindow = window['layui-layer-iframe' + index] + , submitID = 'layuiadmin-app-form-edit' + , submit = layero.find('iframe').contents().find('#' + submitID); //鐩戝惉鎻愪氦 - iframeWindow.layui.form.on('submit('+ submitID +')', function(data){ + iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) { var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� console.log(field); //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹� //"&Level="+field.level+"&Type="+field.type+"&BoxType="+field.boxType+"&Qty="+field.qty+ - var str = "Id="+id+"&IsReset="+field.reset+"&ArriveQty="+field.arriveQty+"&ProductionTime="+field.productionTime+"&ExpirationTime="+field.expirationTime+"&StoreTime="+field.storeTime; - + var str = "Id=" + id + "&IsReset=" + field.reset + "&ArriveQty=" + field.arriveQty + "&ProductionTime=" + field.productionTime + "&ExpirationTime=" + field.expirationTime + "&StoreTime=" + field.storeTime; + layer.open({ type: 2, title: '鐢熸垚鏍囩', - content: 'LabelPrint.html?'+str, + content: 'LabelPrint.html?' + str, maxmin: true, area: ['660px', '660px'], btn: ['鍙栨秷'], - + }); - }); + }); submit.trigger('click'); } }); break; - default:break; + default: break; } }); //#region 鑷畾涔夎〃澶� //鑷畾涔夎〃澶� active = { - customCols: function(){ + customCols: function () { layer.open({ type: 2, title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeList&ColsSysArr='+TotalColsSysArr, + content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeList&ColsSysArr=' + TotalColsSysArr, maxmin: false, resize: false, area: ['970px', '650px'] }); }, - customCols2: function(){ + customCols2: function () { layer.open({ type: 2, title: '鑷畾涔夊垪', - content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList&ColsSysArr='+DetailColsSysArr, + content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetArrivalNoticeDetailList&ColsSysArr=' + DetailColsSysArr, maxmin: false, resize: false, area: ['970px', '650px'] @@ -1030,7 +1033,7 @@ } }; - $('.layui-btn').on('click', function() { + $('.layui-btn').on('click', function () { var type = $(this).data('type'); active[type] ? active[type].call(this) : ''; }); diff --git a/HTML/views/ASNSetting/ProcurePlanNotice.html b/HTML/views/ASNSetting/ProcurePlanNotice.html index 100d354..fcb1f54 100644 --- a/HTML/views/ASNSetting/ProcurePlanNotice.html +++ b/HTML/views/ASNSetting/ProcurePlanNotice.html @@ -331,6 +331,7 @@ height: h1, id: 'LAY-app-content-list', where: param, + parseData: FnParseData, contentType: 'application/json', headers: { ToKen: $.cookie('token') }, page: true, @@ -339,6 +340,7 @@ limits: pageLimits, cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 done: function (res) { + console.log(res); setRight(); //鑷畾涔夊垪瀹� SetTableColW('LAY-app-content-list', 'BllAsn/GetProcurePlanNoticeList', TotalColsSysArr); diff --git a/HTML/views/BaseSetting/Customer.html b/HTML/views/BaseSetting/Customer.html index aad7852..a00130f 100644 --- a/HTML/views/BaseSetting/Customer.html +++ b/HTML/views/BaseSetting/Customer.html @@ -12,12 +12,12 @@ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> <script> // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� - document.addEventListener("DOMContentLoaded", function() { - + document.addEventListener("DOMContentLoaded", function () { + //鑾峰彇table榛樿鏄剧ず鏁� pageCntFirst(); }); - </script> + </script> </head> <body> @@ -28,9 +28,8 @@ <div class="layui-inline"> <label class="layui-form-label" style="width: 56px;">瀹㈡埛缂栫爜</label> <div class="layui-input-inline"> - <input type="text" id="CustomerNo" name="CustomerNo" placeholder="瀹㈡埛缂栫爜" - autocomplete="off" class="layui-input" - onkeyup="this.value=this.value.replace(/[, ]/g,'')"> + <input type="text" id="CustomerNo" name="CustomerNo" placeholder="瀹㈡埛缂栫爜" autocomplete="off" + class="layui-input" onkeyup="this.value=this.value.replace(/[, ]/g,'')"> </div> </div> <div class="layui-inline"> @@ -108,11 +107,11 @@ laypage = layui.laypage, layer = layui.layer; - + refreshTable(); function refreshTable() { - + var no = $("#CustomerNo").val(); var name = $("#CustomerName").val(); var type = parseInt($("#CustomerType").val()); @@ -125,7 +124,7 @@ LinkMan: linkman, Phone: phone, Type: type - }; + }; table.render({ elem: '#LAY-app-content-list', url: IP + "/Basis/GetCustomerList", @@ -135,7 +134,7 @@ where: param, parseData: FnParseData, contentType: 'application/json', - headers:{ToKen:$.cookie('token')}, + headers: { ToKen: $.cookie('token') }, page: true, limit: pageCnt, limits: pageLimits, @@ -144,13 +143,14 @@ // response:{ // statusCode: 0 // }, - done: function () { - $(function() { + done: function (ref) { + console.log(ref); + $(function () { $(".editClass").hide(); $(".delClass").hide(); $(".addClass").hide(); }); - sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function(res) { + sendData(IP + "/Basis/GetRoleRightList", {}, 'get', function (res) { if (res.code == 200) { //鎴愬姛 for (var k = 0; k < res.data.length; k++) { if (res.data[k].MenuName == "缂栬緫瀹㈡埛") { @@ -167,13 +167,13 @@ layer.msg('鑾峰彇鏉冮檺淇℃伅澶辫触', { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 - }, function() {}); + }, function () { }); } - }); + }); }, - + cols: [ - [{ + [{ title: '搴忓彿', type: 'numbers', width: 65, @@ -195,13 +195,13 @@ width: 100, align: 'center', templet: function (d) { - if (d.Type ==0) { + if (d.Type == 0) { return "瀹㈡埛"; - } else if(d.Type ==1){ + } else if (d.Type == 1) { return "渚涜揣鍟�"; - } else if(d.Type ==2){ + } else if (d.Type == 2) { return "璐т富"; - }else{ + } else { return ""; } }, @@ -223,12 +223,12 @@ }, { field: 'BankAccount', title: '閾惰鍗″彿', - width: 120, + width: 120, align: 'center' }, { field: 'CreditRating', title: '淇$敤绛夌骇', - width: 90, + width: 90, align: 'center' }, { field: 'Demo', @@ -246,7 +246,7 @@ width: 160, templet: function (d) { return formatDate(d.CreateTime); - }, + }, }, { field: 'UpdateUserName', title: '淇敼浜�', @@ -259,7 +259,7 @@ width: 160, templet: function (d) { return formatDate(d.UpdateTime); - }, + }, }, { title: '鎿嶄綔', fixed: 'right', @@ -270,13 +270,13 @@ ], }); } - + //鐩戝惉鎼滅储 form.on('submit(LAY-app-contlist-search)', function (data) { - + refreshTable(); }); - + var doing = true; active = { batchdel: function () { @@ -294,7 +294,7 @@ var msg = []; for (var i = 0; i < checkData.length; i++) { msg.push(checkData[i].Id) - } + } var param = { Ids: msg, }; @@ -339,15 +339,15 @@ var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈� console.log(field); //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹� - var param = { + var param = { CustomerNo: field.CustomerNo, CustomerName: field.CustomerName, Address: field.Address, LinkMan: field.LinkMan, Phone: field.Phone, Type: parseInt(field.Type), - BankAccount:field.BankAccount, - CreditRating:field.CreditRating, + BankAccount: field.BankAccount, + CreditRating: field.CreditRating, Demo: field.Demo, }; sendData(IP + "/Basis/AddCustomer", param, 'post', @@ -358,11 +358,11 @@ icon: 1, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 }, function () { - refreshTable(); + refreshTable(); layer.close(index); //鍏抽棴寮瑰眰 doing = true; }); - } else if(res.code == 1){ + } else if (res.code == 1) { layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 @@ -386,8 +386,8 @@ var type = $(this).data('type'); active[type] ? active[type].call(this) : ''; }); - - + + var cusid = "0"; table.on('tool(LAY-app-content-list)', function (obj) { @@ -450,8 +450,8 @@ LinkMan: field.LinkMan, Phone: field.Phone, Type: parseInt(field.Type), - BankAccount:field.BankAccount, - CreditRating:field.CreditRating, + BankAccount: field.BankAccount, + CreditRating: field.CreditRating, Demo: field.Demo, }; sendData(IP + "/Basis/EditCustomer", param, 'post', @@ -466,7 +466,7 @@ layer.close(index); //鍏抽棴寮瑰眰 doing = true; }); - } else if(res.code == 1){ + } else if (res.code == 1) { layer.msg(res.msg, { icon: 2, time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 diff --git a/Wms/WMS.BLL/BllAsnServer/ProcurePlanServer.cs b/Wms/WMS.BLL/BllAsnServer/ProcurePlanServer.cs index a446852..48381e9 100644 --- a/Wms/WMS.BLL/BllAsnServer/ProcurePlanServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/ProcurePlanServer.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Threading.Tasks; using WMS.BLL.LogServer; using WMS.DAL; using WMS.Entity.BllAsnEntity; @@ -30,52 +31,32 @@ /// <param name="model"></param> /// <param name="count"></param> /// <returns></returns> - public List<ProcurePlanNoticeDto> GetProcurePlanNoticeList(ProcurePlanNoticeVm model, out int count) + public async Task<List<ProcurePlanNoticeDto>> GetProcurePlanNoticeList(ProcurePlanNoticeVm model, RefAsync<int> count) { - string sqlString = string.Empty; - string sqlCount = string.Empty; - string sqlPub = string.Empty; - try - { - sqlCount += "SELECT DISTINCT COUNT(tb1.ID) FROM BllProcurePlanNotice AS tb1 "; - sqlString += "SELECT DISTINCT tb1.*,tb3.RealName as CreateUserName,tb4.RealName as UpdateUserName FROM BllProcurePlanNotice AS tb1 "; - sqlPub += "LEFT JOIN BllProcurePlanNoticeDetail AS tb2 ON tb1.Id = tb2.ParentId "; - sqlPub += "LEFT JOIN SysUserInfor AS tb3 ON tb1.CreateUser = tb3.Id "; - sqlPub += "LEFT JOIN SysUserInfor AS tb4 ON tb1.UpdateUser = tb4.Id "; - sqlPub += $"WHERE tb1.IsDel = '0' "; - sqlPub += $"AND tb2.SkuNo LIKE '%{model.SkuNo}%' AND tb2.SkuName LIKE '%{model.SkuName}%' "; - sqlPub += $"AND tb2.CustomerName LIKE '%{model.CustomerName}%' "; - if (!string.IsNullOrEmpty(model.Status)) - { - sqlPub += $"AND tb1.Status = '{model.Status}' "; - } - if (!string.IsNullOrEmpty(model.StartTime)) - { - sqlPub += $"AND tb1.CreateTime >= '{model.StartTime}' "; - } - if (!string.IsNullOrEmpty(model.EndTime)) - { - sqlPub += $"AND tb1.CreateTime <= '{model.EndTime}' "; - } - sqlCount += sqlPub; - sqlPub += " order by tb1.Id desc "; - if (model.Page == 0) - { - model.Page = 1; - } - sqlString += sqlPub + $" offset {((model.Page - 1) * model.Limit)} rows fetch next {model.Limit} rows only;"; - - var com = new Common(); - count = com.GetRowCount(sqlCount); - - var modelList = Db.Ado.SqlQuery<ProcurePlanNoticeDto>(sqlString); - - return modelList; - } - catch (Exception ex) - { - throw ex; - } + var modelList = await Db.Queryable<BllProcurePlanNotice>() + .LeftJoin<BllProcurePlanNoticeDetail>((tb1, tb2) => tb1.Id == tb2.ParentId) + .LeftJoin<SysUserInfor>((tb1, tb2, tb3) => tb1.CreateUser == tb3.Id) + .LeftJoin<SysUserInfor>((tb1, tb2, tb3, tb4) => tb1.UpdateUser == tb4.Id) + .WhereIF(!string.IsNullOrWhiteSpace(model.Status), tb1 => tb1.Status == model.Status) + .WhereIF(!string.IsNullOrWhiteSpace(model.StartTime), tb1 => tb1.CreateTime >= Convert.ToDateTime(model.StartTime)) + .WhereIF(!string.IsNullOrWhiteSpace(model.EndTime), tb1 => tb1.CreateTime <= Convert.ToDateTime(model.EndTime).AddDays(1)) + .WhereIF(!string.IsNullOrWhiteSpace(model.SkuName), (tb1,tb2) => tb2.SkuName.Contains(model.SkuName)) + .Where(tb1 => tb1.IsDel == "0") + .OrderByDescending(tb1 => tb1.Id) + .Distinct() + .Select((tb1, tb2, tb3, tb4) => new ProcurePlanNoticeDto() { + Id = tb1.Id, + Status = tb1.Status, + OrderCode = tb1.OrderCode, + UserName = tb1.UserName, + CompleteTime = tb1.CompleteTime, + CreateTime = tb1.CreateTime, + CreateUserName = tb3.RealName, + UpdateTime = tb1.UpdateTime.ToString(), + UpdateUserName = tb4.RealName + }).ToPageListAsync(model.Page, model.Limit, count); + + return modelList; } /// <summary> /// 鑾峰彇閲囪喘鍗曟槑缁嗕俊鎭� diff --git a/Wms/WMS.Entity/BllAsnEntity/BllProcurePlanNotice.cs b/Wms/WMS.Entity/BllAsnEntity/BllProcurePlanNotice.cs index bb32ba7..3284b7b 100644 --- a/Wms/WMS.Entity/BllAsnEntity/BllProcurePlanNotice.cs +++ b/Wms/WMS.Entity/BllAsnEntity/BllProcurePlanNotice.cs @@ -24,6 +24,11 @@ public DateTime? CompleteTime { get; set; } /// <summary> + /// 鍒跺崟浜� + /// </summary> + public string UserName { get; set; } + + /// <summary> /// 涓婃父绯荤粺鍗曞彿 /// </summary> public string OrderCode { get; set; } diff --git a/Wms/WMS.IBLL/IBllAsnServer/IProcurePlanServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IProcurePlanServer.cs index b8f480c..361874c 100644 --- a/Wms/WMS.IBLL/IBllAsnServer/IProcurePlanServer.cs +++ b/Wms/WMS.IBLL/IBllAsnServer/IProcurePlanServer.cs @@ -1,9 +1,11 @@ 锘縰sing Model.InterFaceModel; using Model.ModelDto.BllAsnDto; using Model.ModelVm.BllAsnVm; +using SqlSugar; using System; using System.Collections.Generic; using System.Text; +using System.Threading.Tasks; namespace WMS.IBLL.IBllAsnServer { @@ -15,7 +17,7 @@ /// <param name="model"></param> /// <param name="count"></param> /// <returns></returns> - public List<ProcurePlanNoticeDto> GetProcurePlanNoticeList(ProcurePlanNoticeVm model, out int count); + Task <List<ProcurePlanNoticeDto>> GetProcurePlanNoticeList(ProcurePlanNoticeVm model, RefAsync<int> count); /// <summary> /// 鑾峰彇閲囪喘鍗曟槑缁嗕俊鎭� diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs index 3a703ac..235d44d 100644 --- a/Wms/Wms/Controllers/BllAsnController.cs +++ b/Wms/Wms/Controllers/BllAsnController.cs @@ -9,12 +9,17 @@ using WMS.IBLL.IBllAsnServer; using WMS.IBLL.ILogServer; using Model.ModelVm.BllAsnVm; +using Utility; +using Model.ModelDto.BllAsnDto; +using System.Threading.Tasks; +using SqlSugar; namespace Wms.Controllers { [Route("api/[controller]/[action]")] [ApiController] [Authorize] + public class BllAsnController : ControllerBase { #region 渚濊禆娉ㄥ叆 @@ -1164,20 +1169,14 @@ /// 鑾峰彇閲囪喘鍗曚俊鎭� /// </summary> /// <param name="model">鏌ヨ鏉′欢</param> - /// <returns>鍏ュ簱鍗曚俊鎭�</returns> + /// <returns>閲囪喘鍗曚俊鎭�</returns> [HttpPost] - public IActionResult GetProcurePlanNoticeList(ProcurePlanNoticeVm model) + [ServiceFilter(typeof(ApiResponseActionFilter))] + public async Task<SqlSugarPagedList<ProcurePlanNoticeDto>> GetProcurePlanNoticeList(ProcurePlanNoticeVm model) { - try - { - var models = _procurePlanSvc.GetProcurePlanNoticeList(model, out int count); - - return Ok(new { code = 0, count, msg = "鍏ュ簱鍗曚俊鎭�", data = models }); - } - catch (Exception e) - { - return Ok(new { code = 1, msg = e.Message }); - } + RefAsync<int> count = new RefAsync<int>(); + var bolls = await _procurePlanSvc.GetProcurePlanNoticeList(model, count); + return new SqlSugarPagedList<ProcurePlanNoticeDto>() { Items = bolls, Total = count }; } /// <summary> /// 鑾峰彇閲囪喘鍗曟槑缁嗕俊鎭� -- Gitblit v1.8.0