From 6c5a7bd1a9342d8e6792773aef3d62588a60714d Mon Sep 17 00:00:00 2001 From: liuying <1427574514@qq.com> Date: 周四, 28 11月 2024 15:23:57 +0800 Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/LA24030-LuLI_PackageLine --- CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21_FinishTask.cs | 16 CC/iWareSql/DataAccess/TaskHandler.cs | 4 LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_LineQueue.ts | 78 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordInput.cs | 277 ++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json | 4 LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/validateQiTaoOutput.ts | 78 LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/component/editDialog.vue | 248 ++ LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/component/editDialog.vue | 268 ++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_LineQueue.cs | 30 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutOutput.cs | 75 LA24030_LuLiPackageLine_Web/src/api/main/ReportCenter/mes_Package_UnLine_Record.ts | 78 LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/index.vue | 367 +++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/MesPushPaperCutService.cs | 197 + LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueOutput.cs | 135 + CC/iWareCC_ASRS/ThreadService/03_BZ12(机器人码包工位)/DataProcess_BZ12.cs | 1 LA24030_LuLiPackageLine_Print/LA24030_LuLiPackageLine_PrintService/WindowsFormsApplication1/Form1.cs | 10 LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/component/editDialog.vue | 179 + CC/iWareCC_ASRS/ThreadService/04_BZ21(搬运整垛机器人)/DataProcess_BZ21.cs | 44 LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/index.vue | 367 +++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs | 207 ++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs | 102 + LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherInput.cs | 293 ++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Mes_Package_LineQueueService.cs | 207 ++ LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/index.vue | 335 +++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_Gather.cs | 33 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Mes_Package_UnLine_RecordService.cs | 207 ++ LA24030_LuLiPackageLine_Web/src/api/main/ThirdInterFace/mesPushPaperCut.ts | 78 LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/component/editDialog.vue | 268 ++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/MesPushPaperCut.cs | 9 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueInput.cs | 293 ++ LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/component/editDialog.vue | 268 ++ LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_Gather.ts | 78 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_UnLine_Record.cs | 32 LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordOutput.cs | 130 + LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/index.vue | 367 +++ LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutInput.cs | 177 + LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherOutput.cs | 135 + LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/index.vue | 272 ++ 38 files changed, 5,847 insertions(+), 100 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" index 1b1d699..16f7a44 100644 --- "a/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/03_BZ12\050\346\234\272\345\231\250\344\272\272\347\240\201\345\214\205\345\267\245\344\275\215\051/DataProcess_BZ12.cs" @@ -92,6 +92,7 @@ continue; } upiObj.UpiStatus = (int)UpiStatusEnum.鐮佸灈涓�; + upiObj.AreaCode = (int)AreaCodeEnum.鐮佸灈鍖哄煙; //鏌ュ杩欏寘鎵�鏈夌殑鏁伴噺 var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList(); //鏌ヨ鏄惁鏈澘骞朵笖鍒ゆ柇鏈夋病鏈夋贩鎵� diff --git "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" index a02976f..4d19cd1 100644 --- "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21.cs" @@ -62,16 +62,13 @@ continue; } var upiCode = result.Replace("/r", ""); ; - short cartonwidth = 0;//鏄惁鏈澘 - short cartonhigh = 0;//鏄惁鏃嬭浆 - short placeX = 0; - short placeY = 0; - short placeZ = 0; + short cartonwidth = 0;//绾哥瀹� + short cartonhigh = 0;//绾哥楂� string place = "22"; using (WmsDBModel wmsDB = new WmsDBModel()) { //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛� - var isValidate = TaskHandler.ValidateIssueTaskForBZ21(wmsDB,result); + var isValidate = TaskHandler.ValidateIssueTaskForBZ21(wmsDB, result); if (!isValidate) { SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫"; @@ -83,28 +80,35 @@ SystemWarningMsg._lbl_alert_DataProcess_BZ21 = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 "; continue; } + var mesgather = wmsDB.mes_package_gather.Where(x => x.PackageCode == upiObj.PackageCode).FirstOrDefault(); + if (mesgather != null) + { + mesgather.AreaCode = (int)AreaCodeEnum.鍚堝寘瑁佸垏鍖�; + mesgather.UpiStatus = (int)UpiStatusEnum.宸插悎鍖�; + } - placeX = (short)upiObj.MachineXCenter; - placeY = (short)upiObj.MachineYCenter; - placeZ = (short)upiObj.MachineZCenter; cartonhigh = (short)upiObj.Info3; cartonwidth = (short)upiObj.Info2; - + upiObj.UpiStatus = (int)UpiStatusEnum.宸插悎鍖�; + upiObj.AreaCode = (int)AreaCodeEnum.鍚堝寘瑁佸垏鍖�; //璁板綍浠诲姟 var _id = Yitter.IdGenerator.YitIdHelper.NextId(); + var putpakegecodeid = Yitter.IdGenerator.YitIdHelper.NextId(); var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask(); + var mesinequeue = ClassHelper.RotationMapping<mes_package_linequeue, mes_batchOrderUPI_new>(upiObj); + mesinequeue.Id = Yitter.IdGenerator.YitIdHelper.NextId(); var putpakegecode = new mes_push_packagecode() { - Id = _id, - PackageCode=upiObj.PackageCode, - PushStatus=0, - PushNum=0, - ApiMessage="11", + Id = putpakegecodeid, + PackageCode = upiObj.PackageCode, + PushStatus = 0, + PushNum = 0, + ApiMessage = "11", CreateTime = DateTime.Now, CreateUserName = "CC", UpdateTime = DateTime.Now, UpdateUserName = "CC", - CreateOrgName="11" + CreateOrgName = "11" }; var task = new wms_rbline_task() { @@ -129,14 +133,14 @@ UpdateUserName = "CC", PlaceCode = place }; - + wmsDB.mes_package_linequeue.Add(mesinequeue); wmsDB.wms_rbline_task.Add(task); - // wmsDB.mes_push_packagecode.Add(putpakegecode); + wmsDB.mes_push_packagecode.Add(putpakegecode); using (StationServiceClient client = new StationServiceClient()) { - var res = client.WriteSurroundTaskInfo((int)EDevice.Station, rgvLocation, short.Parse(task.TaskNo), - (short)upiObj.Length, (short)upiObj.Width,cartonhigh,cartonwidth,placeX,placeY); + var res = client.WriteSurroundTaskInfo((int)EDevice.Station, rgvLocation, short.Parse(task.TaskNo), + (short)upiObj.Length, (short)upiObj.Width, cartonhigh, cartonwidth, 0, 0); if (!res.result) { SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,WriteInStoreTaskInfoAsync 杩斿洖:{res.resMsg}"; diff --git "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" index 1fa1756..57252a4 100644 --- "a/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/04_BZ21\357\274\210\346\220\254\350\277\220\346\225\264\345\236\233\346\234\272\345\231\250\344\272\272\357\274\211/DataProcess_BZ21_FinishTask.cs" @@ -53,18 +53,30 @@ var task = wmsDB.wms_rbline_task.Where(x => x.TaskNo == obj.R_SurrouondTaskNo.ToString() && x.RbTaskType == (int)RbTaskTypeEnum.澶规澘浠诲姟 - && x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙�).FirstOrDefault(); + ).OrderByDescending(x=>x.Id).FirstOrDefault(); if (task == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()},鏍规嵁 R_InboundNumber:{obj.R_InboundNumber}娌℃湁鎵惧埌宸蹭笅鍙戠殑浠诲姟 "; continue; + } + else + { + if (task.TaskStatus == (int)TaskStatusEnum.宸插畬鎴�) + { + //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙� + using (StationServiceClient client = new StationServiceClient()) + { + var res = client.SetSurroundTaskFinishAck((int)EDevice.Station, true, rgvLocation); + } + continue; + } } var upiobj = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == task.PackageCode).ToList(); if (upiobj.Count > 0) { foreach (var item in upiobj) { - item.UpiStatus = 4; + item.UpiStatus = (int)UpiStatusEnum.宸插悎鍖�; } } task.TaskStatus = (int)TaskStatusEnum.宸插畬鎴�; diff --git a/CC/iWareSql/DataAccess/TaskHandler.cs b/CC/iWareSql/DataAccess/TaskHandler.cs index ddf08dd..5ac39ba 100644 --- a/CC/iWareSql/DataAccess/TaskHandler.cs +++ b/CC/iWareSql/DataAccess/TaskHandler.cs @@ -43,7 +43,7 @@ public static bool ValidateIssueTaskForBZ12(WmsDBModel.WmsDBModel wmsDB,string str) { var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙� - && x.RbTaskType == (int)RbTaskTypeEnum.鐮佹澘浠诲姟).ToList(); + && x.RbTaskType == (int)RbTaskTypeEnum.鐮佹澘浠诲姟 && x.UPI == str).ToList(); if (isExist?.Count() > 0) { return false; @@ -53,7 +53,7 @@ public static bool ValidateIssueTaskForBZ21(WmsDBModel.WmsDBModel wmsDB,string str) { var isExist = wmsDB.wms_rbline_task.Where(x => x.TaskStatus == (int)TaskStatusEnum.宸蹭笅鍙� - && x.RbTaskType == (int)RbTaskTypeEnum.澶规澘浠诲姟).ToList(); + && x.RbTaskType == (int)RbTaskTypeEnum.澶规澘浠诲姟&&x.UPI==str).ToList(); if (isExist?.Count() > 0) { return false; diff --git a/LA24030_LuLiPackageLine_Print/LA24030_LuLiPackageLine_PrintService/WindowsFormsApplication1/Form1.cs b/LA24030_LuLiPackageLine_Print/LA24030_LuLiPackageLine_PrintService/WindowsFormsApplication1/Form1.cs index 528d7b8..bd0ea2f 100644 --- a/LA24030_LuLiPackageLine_Print/LA24030_LuLiPackageLine_PrintService/WindowsFormsApplication1/Form1.cs +++ b/LA24030_LuLiPackageLine_Print/LA24030_LuLiPackageLine_PrintService/WindowsFormsApplication1/Form1.cs @@ -329,9 +329,15 @@ double leijisaomiaomj = 0; foreach (var aa in finsiList) { - leijisaomiaomj += Convert.ToDouble(aa.Info13); + if (!string.IsNullOrEmpty(aa.Info13)) + { + leijisaomiaomj += Convert.ToDouble(aa.Info13); + } } - leijisaomiaomj += Convert.ToDouble(item.Info13); + if (!string.IsNullOrEmpty(item.Info13)) + { + leijisaomiaomj += Convert.ToDouble(item.Info13); + } data.Add("leijisaomiaomj", leijisaomiaomj);//绱鎵弿闈㈢Н //鏌ヨ涓� 鍖呮暟鎹� diff --git a/LA24030_LuLiPackageLine_Web/src/api/main/ReportCenter/mes_Package_UnLine_Record.ts b/LA24030_LuLiPackageLine_Web/src/api/main/ReportCenter/mes_Package_UnLine_Record.ts new file mode 100644 index 0000000..79fc6ec --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/api/main/ReportCenter/mes_Package_UnLine_Record.ts @@ -0,0 +1,78 @@ +锘縤mport request from '/@/utils/request'; +enum Api { + AddMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/add', + DeleteMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/delete', + UpdateMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/update', + PageMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/page', + ListMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/list', + DetailMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/detail', + ImportExcelMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/importExcel', + DownloadExcelTemplateMes_Package_UnLine_Record = '/api/mes_Package_UnLine_Record/downloadExcelTemplate', +} + +// 澧炲姞鍖呬笅绾胯褰� +export const addMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.AddMes_Package_UnLine_Record, + method: 'post', + data: params + }); + +// 鍒犻櫎鍖呬笅绾胯褰� +export const deleteMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.DeleteMes_Package_UnLine_Record, + method: 'post', + data: params + }); + +// 缂栬緫鍖呬笅绾胯褰� +export const updateMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.UpdateMes_Package_UnLine_Record, + method: 'post', + data: params + }); + +// 瀵煎叆鍖呬笅绾胯褰� +export const importExcelMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.ImportExcelMes_Package_UnLine_Record, + method: 'post', + data: params + }); + +// 涓嬭浇瀵煎叆鍖呬笅绾胯褰曟ā鏉� +export const downloadExcelTemplateMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.DownloadExcelTemplateMes_Package_UnLine_Record, + method: 'get', + data: params, + responseType: 'blob' + }); + + +// 鍒嗛〉鏌ヨ鍖呬笅绾胯褰� +export const pageMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.PageMes_Package_UnLine_Record, + method: 'post', + data: params + }); + +// 涓嶅垎椤垫煡璇㈠寘涓嬬嚎璁板綍 +export const listMes_Package_UnLine_Record = (params?: any) => + request({ + url: Api.ListMes_Package_UnLine_Record, + method: 'get', + data: params + }); + +// 璇︽儏鍖呬笅绾胯褰� +export const detailMes_Package_UnLine_Record = (id: any) => + request({ + url: Api.DetailMes_Package_UnLine_Record, + method: 'get', + data: { id } + }); + diff --git a/LA24030_LuLiPackageLine_Web/src/api/main/ThirdInterFace/mesPushPaperCut.ts b/LA24030_LuLiPackageLine_Web/src/api/main/ThirdInterFace/mesPushPaperCut.ts new file mode 100644 index 0000000..c51a1ed --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/api/main/ThirdInterFace/mesPushPaperCut.ts @@ -0,0 +1,78 @@ +锘縤mport request from '/@/utils/request'; +enum Api { + AddMesPushPaperCut = '/api/mesPushPaperCut/add', + DeleteMesPushPaperCut = '/api/mesPushPaperCut/delete', + UpdateMesPushPaperCut = '/api/mesPushPaperCut/update', + PageMesPushPaperCut = '/api/mesPushPaperCut/page', + ListMesPushPaperCut = '/api/mesPushPaperCut/list', + DetailMesPushPaperCut = '/api/mesPushPaperCut/detail', + ImportExcelMesPushPaperCut = '/api/mesPushPaperCut/importExcel', + DownloadExcelTemplateMesPushPaperCut = '/api/mesPushPaperCut/downloadExcelTemplate', +} + +// 澧炲姞绾哥鏈哄鎺� +export const addMesPushPaperCut = (params?: any) => + request({ + url: Api.AddMesPushPaperCut, + method: 'post', + data: params + }); + +// 鍒犻櫎绾哥鏈哄鎺� +export const deleteMesPushPaperCut = (params?: any) => + request({ + url: Api.DeleteMesPushPaperCut, + method: 'post', + data: params + }); + +// 缂栬緫绾哥鏈哄鎺� +export const updateMesPushPaperCut = (params?: any) => + request({ + url: Api.UpdateMesPushPaperCut, + method: 'post', + data: params + }); + +// 瀵煎叆绾哥鏈哄鎺� +export const importExcelMesPushPaperCut = (params?: any) => + request({ + url: Api.ImportExcelMesPushPaperCut, + method: 'post', + data: params + }); + +// 涓嬭浇瀵煎叆绾哥鏈哄鎺ユā鏉� +export const downloadExcelTemplateMesPushPaperCut = (params?: any) => + request({ + url: Api.DownloadExcelTemplateMesPushPaperCut, + method: 'get', + data: params, + responseType: 'blob' + }); + + +// 鍒嗛〉鏌ヨ绾哥鏈哄鎺� +export const pageMesPushPaperCut = (params?: any) => + request({ + url: Api.PageMesPushPaperCut, + method: 'post', + data: params + }); + +// 涓嶅垎椤垫煡璇㈢焊绠辨満瀵规帴 +export const listMesPushPaperCut = (params?: any) => + request({ + url: Api.ListMesPushPaperCut, + method: 'get', + data: params + }); + +// 璇︽儏绾哥鏈哄鎺� +export const detailMesPushPaperCut = (id: any) => + request({ + url: Api.DetailMesPushPaperCut, + method: 'get', + data: { id } + }); + diff --git a/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_Gather.ts b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_Gather.ts new file mode 100644 index 0000000..b609f9e --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_Gather.ts @@ -0,0 +1,78 @@ +锘縤mport request from '/@/utils/request'; +enum Api { + AddMes_Package_Gather = '/api/mes_Package_Gather/add', + DeleteMes_Package_Gather = '/api/mes_Package_Gather/delete', + UpdateMes_Package_Gather = '/api/mes_Package_Gather/update', + PageMes_Package_Gather = '/api/mes_Package_Gather/page', + ListMes_Package_Gather = '/api/mes_Package_Gather/list', + DetailMes_Package_Gather = '/api/mes_Package_Gather/detail', + ImportExcelMes_Package_Gather = '/api/mes_Package_Gather/importExcel', + DownloadExcelTemplateMes_Package_Gather = '/api/mes_Package_Gather/downloadExcelTemplate', +} + +// 澧炲姞鍖呮暟鎹� +export const addMes_Package_Gather = (params?: any) => + request({ + url: Api.AddMes_Package_Gather, + method: 'post', + data: params + }); + +// 鍒犻櫎鍖呮暟鎹� +export const deleteMes_Package_Gather = (params?: any) => + request({ + url: Api.DeleteMes_Package_Gather, + method: 'post', + data: params + }); + +// 缂栬緫鍖呮暟鎹� +export const updateMes_Package_Gather = (params?: any) => + request({ + url: Api.UpdateMes_Package_Gather, + method: 'post', + data: params + }); + +// 瀵煎叆鍖呮暟鎹� +export const importExcelMes_Package_Gather = (params?: any) => + request({ + url: Api.ImportExcelMes_Package_Gather, + method: 'post', + data: params + }); + +// 涓嬭浇瀵煎叆鍖呮暟鎹ā鏉� +export const downloadExcelTemplateMes_Package_Gather = (params?: any) => + request({ + url: Api.DownloadExcelTemplateMes_Package_Gather, + method: 'get', + data: params, + responseType: 'blob' + }); + + +// 鍒嗛〉鏌ヨ鍖呮暟鎹� +export const pageMes_Package_Gather = (params?: any) => + request({ + url: Api.PageMes_Package_Gather, + method: 'post', + data: params + }); + +// 涓嶅垎椤垫煡璇㈠寘鏁版嵁 +export const listMes_Package_Gather = (params?: any) => + request({ + url: Api.ListMes_Package_Gather, + method: 'get', + data: params + }); + +// 璇︽儏鍖呮暟鎹� +export const detailMes_Package_Gather = (id: any) => + request({ + url: Api.DetailMes_Package_Gather, + method: 'get', + data: { id } + }); + diff --git a/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_LineQueue.ts b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_LineQueue.ts new file mode 100644 index 0000000..5adf873 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/mes_Package_LineQueue.ts @@ -0,0 +1,78 @@ +锘縤mport request from '/@/utils/request'; +enum Api { + AddMes_Package_LineQueue = '/api/mes_Package_LineQueue/add', + DeleteMes_Package_LineQueue = '/api/mes_Package_LineQueue/delete', + UpdateMes_Package_LineQueue = '/api/mes_Package_LineQueue/update', + PageMes_Package_LineQueue = '/api/mes_Package_LineQueue/page', + ListMes_Package_LineQueue = '/api/mes_Package_LineQueue/list', + DetailMes_Package_LineQueue = '/api/mes_Package_LineQueue/detail', + ImportExcelMes_Package_LineQueue = '/api/mes_Package_LineQueue/importExcel', + DownloadExcelTemplateMes_Package_LineQueue = '/api/mes_Package_LineQueue/downloadExcelTemplate', +} + +// 澧炲姞鍖呴槦鍒楁暟鎹� +export const addMes_Package_LineQueue = (params?: any) => + request({ + url: Api.AddMes_Package_LineQueue, + method: 'post', + data: params + }); + +// 鍒犻櫎鍖呴槦鍒楁暟鎹� +export const deleteMes_Package_LineQueue = (params?: any) => + request({ + url: Api.DeleteMes_Package_LineQueue, + method: 'post', + data: params + }); + +// 缂栬緫鍖呴槦鍒楁暟鎹� +export const updateMes_Package_LineQueue = (params?: any) => + request({ + url: Api.UpdateMes_Package_LineQueue, + method: 'post', + data: params + }); + +// 瀵煎叆鍖呴槦鍒楁暟鎹� +export const importExcelMes_Package_LineQueue = (params?: any) => + request({ + url: Api.ImportExcelMes_Package_LineQueue, + method: 'post', + data: params + }); + +// 涓嬭浇瀵煎叆鍖呴槦鍒楁暟鎹ā鏉� +export const downloadExcelTemplateMes_Package_LineQueue = (params?: any) => + request({ + url: Api.DownloadExcelTemplateMes_Package_LineQueue, + method: 'get', + data: params, + responseType: 'blob' + }); + + +// 鍒嗛〉鏌ヨ鍖呴槦鍒楁暟鎹� +export const pageMes_Package_LineQueue = (params?: any) => + request({ + url: Api.PageMes_Package_LineQueue, + method: 'post', + data: params + }); + +// 涓嶅垎椤垫煡璇㈠寘闃熷垪鏁版嵁 +export const listMes_Package_LineQueue = (params?: any) => + request({ + url: Api.ListMes_Package_LineQueue, + method: 'get', + data: params + }); + +// 璇︽儏鍖呴槦鍒楁暟鎹� +export const detailMes_Package_LineQueue = (id: any) => + request({ + url: Api.DetailMes_Package_LineQueue, + method: 'get', + data: { id } + }); + diff --git a/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/validateQiTaoOutput.ts b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/validateQiTaoOutput.ts new file mode 100644 index 0000000..a421d6c --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/api/main/WmsOrder/validateQiTaoOutput.ts @@ -0,0 +1,78 @@ +锘縤mport request from '/@/utils/request'; +enum Api { + AddValidateQiTaoOutput = '/api/validateQiTaoOutput/add', + DeleteValidateQiTaoOutput = '/api/validateQiTaoOutput/delete', + UpdateValidateQiTaoOutput = '/api/validateQiTaoOutput/update', + PageValidateQiTaoOutput = '/api/validateQiTaoOutput/page', + ListValidateQiTaoOutput = '/api/validateQiTaoOutput/list', + DetailValidateQiTaoOutput = '/api/validateQiTaoOutput/detail', + ImportExcelValidateQiTaoOutput = '/api/validateQiTaoOutput/importExcel', + DownloadExcelTemplateValidateQiTaoOutput = '/api/validateQiTaoOutput/downloadExcelTemplate', +} + +// 澧炲姞鍖呮暟鎹� +export const addValidateQiTaoOutput = (params?: any) => + request({ + url: Api.AddValidateQiTaoOutput, + method: 'post', + data: params + }); + +// 鍒犻櫎鍖呮暟鎹� +export const deleteValidateQiTaoOutput = (params?: any) => + request({ + url: Api.DeleteValidateQiTaoOutput, + method: 'post', + data: params + }); + +// 缂栬緫鍖呮暟鎹� +export const updateValidateQiTaoOutput = (params?: any) => + request({ + url: Api.UpdateValidateQiTaoOutput, + method: 'post', + data: params + }); + +// 瀵煎叆鍖呮暟鎹� +export const importExcelValidateQiTaoOutput = (params?: any) => + request({ + url: Api.ImportExcelValidateQiTaoOutput, + method: 'post', + data: params + }); + +// 涓嬭浇瀵煎叆鍖呮暟鎹ā鏉� +export const downloadExcelTemplateValidateQiTaoOutput = (params?: any) => + request({ + url: Api.DownloadExcelTemplateValidateQiTaoOutput, + method: 'get', + data: params, + responseType: 'blob' + }); + + +// 鍒嗛〉鏌ヨ鍖呮暟鎹� +export const pageValidateQiTaoOutput = (params?: any) => + request({ + url: Api.PageValidateQiTaoOutput, + method: 'post', + data: params + }); + +// 涓嶅垎椤垫煡璇㈠寘鏁版嵁 +export const listValidateQiTaoOutput = (params?: any) => + request({ + url: Api.ListValidateQiTaoOutput, + method: 'get', + data: params + }); + +// 璇︽儏鍖呮暟鎹� +export const detailValidateQiTaoOutput = (id: any) => + request({ + url: Api.DetailValidateQiTaoOutput, + method: 'get', + data: { id } + }); + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/component/editDialog.vue new file mode 100644 index 0000000..1ca3255 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/component/editDialog.vue @@ -0,0 +1,248 @@ +锘�<template> + <div class="mes_Package_UnLine_Record-container"> + <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> + <template #header> + <div style="color: #fff"> + <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> + <span>{{ props.title }}</span> + </div> + </template> + <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules" v-loading="loading"> + <el-row :gutter="35"> + <el-form-item v-show="false"> + <el-input v-model="ruleForm.id" /> + </el-form-item> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰鍙�" prop="packageCode"> + <el-input v-model="ruleForm.packageCode" placeholder="璇疯緭鍏ュ寘瑁呭彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鐢熶骇鍗曞彿" prop="info5"> + <el-input v-model="ruleForm.info5" placeholder="璇疯緭鍏ョ敓浜у崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵规鍙�" prop="planNo"> + <el-input v-model="ruleForm.planNo" placeholder="璇疯緭鍏ユ壒娆″彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="璁㈠崟鍙�" prop="orderId"> + <el-input v-model="ruleForm.orderId" placeholder="璇疯緭鍏ヨ鍗曞彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥闀�" prop="info1"> + <el-input v-model="ruleForm.info1" placeholder="璇疯緭鍏ョ焊绠遍暱" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥瀹�" prop="info2"> + <el-input v-model="ruleForm.info2" placeholder="璇疯緭鍏ョ焊绠卞" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥楂�" prop="info3"> + <el-input v-model="ruleForm.info3" placeholder="璇疯緭鍏ョ焊绠遍珮" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�" prop="info4"> + <el-input v-model="ruleForm.info4" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绗嚑鍖�" prop="info6"> + <el-input v-model="ruleForm.info6" placeholder="璇疯緭鍏ョ鍑犲寘" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="缁忛攢搴楀悕绉�" prop="info7"> + <el-input v-model="ruleForm.info7" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="浜у搧鍚嶇О" prop="info8"> + <el-input v-model="ruleForm.info8" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="瀹㈡埛鍚嶇О" prop="info10"> + <el-input v-model="ruleForm.info10" placeholder="璇疯緭鍏ュ鎴峰悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鑷彁or鍙戣揣" prop="info11"> + <el-input v-model="ruleForm.info11" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�" prop="info12"> + <el-input v-model="ruleForm.info12" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰闈㈢Н" prop="info13"> + <el-input v-model="ruleForm.info13" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="澶囨敞" prop="opRemark"> + <el-input v-model="ruleForm.opRemark" placeholder="璇疯緭鍏ュ娉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + </el-row> + </el-form> + <template #footer> + <span class="dialog-footer"> + <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submit" :disabled="disabled_btn">纭� 瀹�</el-button> + </span> + </template> + </el-dialog> + </div> +</template> +<style scoped> +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> +<script lang="ts" setup> + import { ref,onMounted } from "vue"; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { ElMessage } from "element-plus"; + import type { FormRules } from "element-plus"; + import { addMes_Package_UnLine_Record, updateMes_Package_UnLine_Record, detailMes_Package_UnLine_Record } from "/@/api/main/ReportCenter/mes_Package_UnLine_Record"; + + //鐖剁骇浼犻�掓潵鐨勫弬鏁� + var props = defineProps({ + title: { + type: String, + default: "", + }, + }); + //鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟 + const emit = defineEmits(["reloadTable"]); + const ruleFormRef = ref(); + const isShowDialog = ref(false); + const loading = ref(false); + const disabled_btn = ref(false); + const ruleForm = ref<any>({}); + //鑷娣诲姞鍏朵粬瑙勫垯 + const rules = ref<FormRules>({ + packageCode: [{required: true, message: '璇疯緭鍏ュ寘瑁呭彿锛�', trigger: 'blur',},], + planNo: [{required: true, message: '璇疯緭鍏ユ壒娆″彿锛�', trigger: 'blur',},], + orderId: [{required: true, message: '璇疯緭鍏ヨ鍗曞彿锛�', trigger: 'blur',},], + isDelete: [{required: true, message: '璇烽�夋嫨杞垹闄わ紒', trigger: 'change',},], + }); + + /* + * 鎵撳紑寮圭獥 + * @param flag 鏍囪锛�1鏂板 2缂栬緫 3鏌ョ湅锛� + * @param row 琛屾暟鎹� + */ + const openDialog = async (flag: number,row: any) => { + // ruleForm.value = JSON.parse(JSON.stringify(row)); + // 鏀圭敤detail鑾峰彇鏈�鏂版暟鎹潵缂栬緫 + let rowData = JSON.parse(JSON.stringify(row)); + if (rowData.id) + ruleForm.value = (await detailMes_Package_UnLine_Record(rowData.id)).data.result; + else { + ruleForm.value = rowData; + } + isShowDialog.value = true; + }; + + // 鍏抽棴寮圭獥 + const closeDialog = () => { + emit("reloadTable"); + isShowDialog.value = false; + }; + + // 鍙栨秷 + const cancel = () => { + isShowDialog.value = false; + }; + + // 鎻愪氦 + const submit = async () => { + disabled_btn.value = true; + ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { + if (isValid) { + loading.value = true; + let values = ruleForm.value; + let ret={}; + let title='鏂板'; + if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { + ret = await addMes_Package_UnLine_Record(values); + } else { + title='缂栬緫'; + ret = await updateMes_Package_UnLine_Record(values); + } + loading.value = false; + disabled_btn.value = false; + if(ret.data.type=="success"){ + ElMessage.success(title+'鎴愬姛'); + closeDialog(); + } + } else { + disabled_btn.value = false; + ElMessage({ + message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜, + type: "error", + }); + } + }); + }; + + + + + + + + // 椤甸潰鍔犺浇鏃� + onMounted(async () => { + }); + + //灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠� + defineExpose({ openDialog }); +</script> + + + + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/index.vue new file mode 100644 index 0000000..1dcc07b --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/ReportCenter/mes_Package_UnLine_Record/index.vue @@ -0,0 +1,335 @@ +锘�<template> + <div class="mes_Package_UnLine_Record-container"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form :model="queryParamsMes_Package_UnLine_Record" ref="queryForm" labelWidth="90"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> + <el-form-item label="鍏抽敭瀛�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.searchKey" clearable="" placeholder="鍖呰鍙�,鐢熶骇鍗曞彿,鎵规鍙�,璁㈠崟鍙�,閿�鍞悎鍚屽崟鍙�,绗嚑鍖�,缁忛攢搴楀悕绉�,浜у搧鍚嶇О,瀹㈡埛鍚嶇О,鑷彁or鍙戣揣,鍖呰閮ㄤ欢鎬绘暟閲�,鍖呰闈㈢Н,澶囨敞,鍒涘缓浜�,淇敼浜�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鍖呰鍙�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.packageCode" clearable="" placeholder="璇疯緭鍏ュ寘瑁呭彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鐢熶骇鍗曞彿"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info5" clearable="" placeholder="璇疯緭鍏ョ敓浜у崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鎵规鍙�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.planNo" clearable="" placeholder="璇疯緭鍏ユ壒娆″彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="璁㈠崟鍙�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.orderId" clearable="" placeholder="璇疯緭鍏ヨ鍗曞彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="绾哥闀�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info1" clearable="" placeholder="璇疯緭鍏ョ焊绠遍暱"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="绾哥瀹�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info2" clearable="" placeholder="璇疯緭鍏ョ焊绠卞"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="绾哥楂�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info3" clearable="" placeholder="璇疯緭鍏ョ焊绠遍珮"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info4" clearable="" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="绗嚑鍖�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info6" clearable="" placeholder="璇疯緭鍏ョ鍑犲寘"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="缁忛攢搴楀悕绉�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info7" clearable="" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="浜у搧鍚嶇О"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info8" clearable="" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="瀹㈡埛鍚嶇О"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info10" clearable="" placeholder="璇疯緭鍏ュ鎴峰悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鑷彁or鍙戣揣"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info11" clearable="" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info12" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="鍖呰闈㈢Н"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.info13" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_UnLine_Record"> + <el-form-item label="澶囨敞"> + <el-input v-model="queryParamsMes_Package_UnLine_Record.opRemark" clearable="" placeholder="璇疯緭鍏ュ娉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-form-item> + <el-button-group style="display: flex; align-items: center;"> + <el-button type="primary" icon="ele-Search" @click="handleQueryMes_Package_UnLine_Record" v-auth="'mes_Package_UnLine_Record:page'" :disabled="disabled_btnMes_Package_UnLine_Record"> 鏌ヨ </el-button> + <el-button icon="ele-Refresh" @click="resetMes_Package_UnLine_Record"> 閲嶇疆 </el-button> + <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUIMes_Package_UnLine_Record" v-if="!showAdvanceQueryUIMes_Package_UnLine_Record" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> + <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUIMes_Package_UnLine_Record" v-if="showAdvanceQueryUIMes_Package_UnLine_Record" style="margin-left:5px;"> 闅愯棌 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddMes_Package_UnLine_Record" v-auth="'mes_Package_UnLine_Record:add'"> 鏂板 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Download" @click="handleExportExcelMes_Package_UnLine_Record" v-auth="'mes_Package_UnLine_Record:exportExcel'" > 瀵煎嚭 </el-button> + </el-button-group> + </el-form-item> + + </el-col> + </el-row> + </el-form> + </el-card> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-table + ref="tableRefMes_Package_UnLine_Record" + :data="tableDataMes_Package_UnLine_Record" + style="width: 100%" + v-loading="loadingMes_Package_UnLine_Record" + tooltip-effect="light" + row-key="id" + @sort-change="sortChangeMes_Package_UnLine_Record" + border=""> + <el-table-column type="index" label="搴忓彿" width="55" align="center"/> + <el-table-column prop="packageCode" label="鍖呰鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info5" label="鐢熶骇鍗曞彿" show-overflow-tooltip="" /> + <el-table-column prop="planNo" label="鎵规鍙�" show-overflow-tooltip="" /> + <el-table-column prop="orderId" label="璁㈠崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info1" label="绾哥闀�" show-overflow-tooltip="" /> + <el-table-column prop="info2" label="绾哥瀹�" show-overflow-tooltip="" /> + <el-table-column prop="info3" label="绾哥楂�" show-overflow-tooltip="" /> + <el-table-column prop="info4" label="閿�鍞悎鍚屽崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info6" label="绗嚑鍖�" show-overflow-tooltip="" /> + <el-table-column prop="info7" label="缁忛攢搴楀悕绉�" show-overflow-tooltip="" /> + <el-table-column prop="info8" label="浜у搧鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info10" label="瀹㈡埛鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info11" label="鑷彁or鍙戣揣" show-overflow-tooltip="" /> + <el-table-column prop="info12" label="鍖呰閮ㄤ欢鎬绘暟閲�" show-overflow-tooltip="" /> + <el-table-column prop="info13" label="鍖呰闈㈢Н" show-overflow-tooltip="" /> + <el-table-column prop="opRemark" label="澶囨敞" show-overflow-tooltip="" /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> + <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> + <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('mes_Package_UnLine_Record:update') || auth('mes_Package_UnLine_Record:delete')"> + <template #default="scope"> + <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditMes_Package_UnLine_Record(scope.row)" v-auth="'mes_Package_UnLine_Record:update'"> 缂栬緫 </el-button> + <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delMes_Package_UnLine_Record(scope.row)" v-auth="'mes_Package_UnLine_Record:delete'"> 鍒犻櫎 </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + v-model:currentPage="tableParamsMes_Package_UnLine_Record.page" + v-model:page-size="tableParamsMes_Package_UnLine_Record.pageSize" + :total="tableParamsMes_Package_UnLine_Record.total" + :page-sizes="[10, 20, 50, 100, 200, 500]" + small="" + background="" + @size-change="handleSizeChangeMes_Package_UnLine_Record" + @current-change="handleCurrentChangeMes_Package_UnLine_Record" + layout="total, sizes, prev, pager, next, jumper" + /> + <printDialogMes_Package_UnLine_Record + ref="printDialogRefMes_Package_UnLine_Record" + :title="printMes_Package_UnLine_RecordTitle" + @reloadTable="handleQueryMes_Package_UnLine_Record" /> + <editDialogMes_Package_UnLine_Record + ref="editDialogRefMes_Package_UnLine_Record" + :title="editMes_Package_UnLine_RecordTitle" + @reloadTable="handleQueryMes_Package_UnLine_Record" + /> + </el-card> + </div> +</template> + +<script lang="ts" setup="" name="mes_Package_UnLine_Record"> + import { ref,onMounted } from "vue"; + import { ElMessageBox, ElMessage } from "element-plus"; + import { auth } from '/@/utils/authFunction'; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { formatDate,formatDate_T_Date,formatDate_T_Time,defaultTimeRange } from '/@/utils/formatTime'; + import { exportPageExcel } from '/@/utils/exportPageExcel' //寮曞叆瀵煎嚭鏂规硶 + + + import printDialogMes_Package_UnLine_Record from '/@/views/system/print/component/hiprint/preview.vue' + import { pageMes_Package_UnLine_Record, deleteMes_Package_UnLine_Record,importExcelMes_Package_UnLine_Record,downloadExcelTemplateMes_Package_UnLine_Record } from '/@/api/main/ReportCenter/mes_Package_UnLine_Record'; + + + + /***************************************************[鍖呬笅绾胯褰曟搷浣淽寮�濮�***************************************************/ + const showAdvanceQueryUIMes_Package_UnLine_Record = ref(false); + const tableRefMes_Package_UnLine_Record = ref(null); + const printDialogRefMes_Package_UnLine_Record = ref(); + const editDialogRefMes_Package_UnLine_Record = ref(); + const loadingMes_Package_UnLine_Record = ref(false); + const disabled_btnMes_Package_UnLine_Record = ref(false); + const tableDataMes_Package_UnLine_Record = ref<any>([]); + const queryParamsMes_Package_UnLine_Record = ref<any>({}); + const tableParamsMes_Package_UnLine_Record = ref({ + page: 1, + pageSize: 10, + total: 0, + }); + + const printMes_Package_UnLine_RecordTitle = ref(""); + const editMes_Package_UnLine_RecordTitle = ref(""); + + // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� + const changeAdvanceQueryUIMes_Package_UnLine_Record = () => { + showAdvanceQueryUIMes_Package_UnLine_Record.value = !showAdvanceQueryUIMes_Package_UnLine_Record.value; + } + + // 鏌ヨ鍖呬笅绾胯褰� + const handleQueryMes_Package_UnLine_Record = async () => { + loadingMes_Package_UnLine_Record.value = true; + disabled_btnMes_Package_UnLine_Record.value = true; + var res = await pageMes_Package_UnLine_Record(Object.assign(queryParamsMes_Package_UnLine_Record.value, tableParamsMes_Package_UnLine_Record.value)); + if(res.data.type=="success"){ + tableDataMes_Package_UnLine_Record.value = res.data.result?.items ?? []; + tableParamsMes_Package_UnLine_Record.value.total = res.data.result?.total; + } + loadingMes_Package_UnLine_Record.value = false; + disabled_btnMes_Package_UnLine_Record.value = false; + }; + + // 閲嶇疆鍖呬笅绾胯褰曟煡璇� + const resetMes_Package_UnLine_Record = async () => { + queryParamsMes_Package_UnLine_Record.value = {} + }; + + // 鍖呬笅绾胯褰曞垪鎺掑簭 + const sortChangeMes_Package_UnLine_Record = async (column: any) => { + queryParamsMes_Package_UnLine_Record.value.field = column.prop; + queryParamsMes_Package_UnLine_Record.value.order = column.order; + await handleQueryMes_Package_UnLine_Record(); + }; + + // 鎵撳紑鏂板鍖呬笅绾胯褰曢〉闈� + const openAddMes_Package_UnLine_Record = () => { + editMes_Package_UnLine_RecordTitle.value = '娣诲姞鍖呬笅绾胯褰�'; + editDialogRefMes_Package_UnLine_Record.value.openDialog(1,{}); + }; + + // 鎵撳紑鎵撳嵃鍖呬笅绾胯褰曢〉闈� + const openPrintMes_Package_UnLine_Record = async (row: any) => { + printMes_Package_UnLine_RecordTitle.value = '鎵撳嵃鍖呬笅绾胯褰�'; + } + + // 鎵撳紑缂栬緫鍖呬笅绾胯褰曢〉闈� + const openEditMes_Package_UnLine_Record = (row: any) => { + editMes_Package_UnLine_RecordTitle.value = '缂栬緫鍖呬笅绾胯褰�'; + editDialogRefMes_Package_UnLine_Record.value.openDialog(2,row); + }; + + // 鍒犻櫎鍖呬笅绾胯褰� + const delMes_Package_UnLine_Record = (row: any) => { + ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + loadingMes_Package_UnLine_Record.value = true; + var ret = await deleteMes_Package_UnLine_Record(row); + if(ret.data.type=="success"){ + ElMessage.success("鍒犻櫎鎴愬姛"); + } + loadingMes_Package_UnLine_Record.value = false; + handleQueryMes_Package_UnLine_Record(); + }) + .catch(() => {}); + }; + + // 鏀瑰彉鍖呬笅绾胯褰曢〉闈㈠閲� + const handleSizeChangeMes_Package_UnLine_Record = (val: number) => { + tableParamsMes_Package_UnLine_Record.value.pageSize = val; + handleQueryMes_Package_UnLine_Record(); + }; + + // 鏀瑰彉鍖呬笅绾胯褰曢〉鐮佸簭鍙� + const handleCurrentChangeMes_Package_UnLine_Record = (val: number) => { + tableParamsMes_Package_UnLine_Record.value.page = val; + handleQueryMes_Package_UnLine_Record(); + }; + +/***************************************************[鍖呬笅绾胯褰曟搷浣淽缁撴潫***************************************************/ +/***************************************************[鍖呬笅绾胯褰曞鍑篯寮�濮�***************************************************/ +//瀹氫箟褰撳墠椤甸潰鐨勬柟娉曠粍 +const functionMapMes_Package_UnLine_Record = { + formatDate_T_Date, + formatDate_T_Time +}; +//鐐瑰嚮瀵煎嚭鎸夐挳 +const handleExportExcelMes_Package_UnLine_Record = async (formData:Blob) => { + loadingMes_Package_UnLine_Record.value = true; + disabled_btnMes_Package_UnLine_Record.value = true; + var new_tableParamsMes_Package_UnLine_Record=JSON.parse(JSON.stringify(tableParamsMes_Package_UnLine_Record.value)); + new_tableParamsMes_Package_UnLine_Record.page = 1; + new_tableParamsMes_Package_UnLine_Record.pageSize = 100000; + var res = await pageMes_Package_UnLine_Record(Object.assign(queryParamsMes_Package_UnLine_Record.value, new_tableParamsMes_Package_UnLine_Record)); + if(res.data.type=="success"){ + exportExcelMes_Package_UnLine_Record(res.data.result?.items ?? []); + } + loadingMes_Package_UnLine_Record.value = false; + disabled_btnMes_Package_UnLine_Record.value = false; +}; +//瀵煎嚭 +const exportExcelMes_Package_UnLine_Record = async (exportDataList:Array) => { + exportPageExcel(exportDataList, tableRefMes_Package_UnLine_Record,"鍖呬笅绾胯褰�",functionMapMes_Package_UnLine_Record); +}; +/***************************************************[鍖呬笅绾胯褰曞鍑篯缁撴潫***************************************************/ + // 鍖呬笅绾胯褰曢〉闈㈠姞杞芥椂 + onMounted(async () => { + }); + + handleQueryMes_Package_UnLine_Record(); +</script> +<style scoped> +:deep(.el-input), +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/component/editDialog.vue new file mode 100644 index 0000000..b5b37d8 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/component/editDialog.vue @@ -0,0 +1,179 @@ +锘�<template> + <div class="mesPushPaperCut-container"> + <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> + <template #header> + <div style="color: #fff"> + <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> + <span>{{ props.title }}</span> + </div> + </template> + <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules" v-loading="loading"> + <el-row :gutter="35"> + <el-form-item v-show="false"> + <el-input v-model="ruleForm.id" /> + </el-form-item> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰鍙�" prop="packageCode"> + <el-input v-model="ruleForm.packageCode" placeholder="璇疯緭鍏ュ寘瑁呭彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎺ㄩ�佺姸鎬�" prop="pushStatus"> + <el-select clearable v-model="ruleForm.pushStatus" placeholder="璇烽�夋嫨鎺ㄩ�佺姸鎬�"> + <el-option v-for="(item,index) in getEnumPushStatusData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎺ㄩ�佹椂闂�" prop="pushTime"> + <el-date-picker v-model="ruleForm.pushTime" type="date" placeholder="鎺ㄩ�佹椂闂�" /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎺ㄩ�佹鏁�" prop="pushNum"> + <el-input-number v-model="ruleForm.pushNum" placeholder="璇疯緭鍏ユ帹閫佹鏁�" clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎺ュ彛杩斿洖鍙傛暟" prop="apiMessage"> + <el-input v-model="ruleForm.apiMessage" placeholder="璇疯緭鍏ユ帴鍙h繑鍥炲弬鏁�" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + </el-row> + </el-form> + <template #footer> + <span class="dialog-footer"> + <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submit" :disabled="disabled_btn">纭� 瀹�</el-button> + </span> + </template> + </el-dialog> + </div> +</template> +<style scoped> +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> +<script lang="ts" setup> + import { ref,onMounted } from "vue"; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { ElMessage } from "element-plus"; + import type { FormRules } from "element-plus"; + import { addMesPushPaperCut, updateMesPushPaperCut, detailMesPushPaperCut } from "/@/api/main/ThirdInterFace/mesPushPaperCut"; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + + const getEnumPushStatusData = ref<any>([]); + //鐖剁骇浼犻�掓潵鐨勫弬鏁� + var props = defineProps({ + title: { + type: String, + default: "", + }, + }); + //鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟 + const emit = defineEmits(["reloadTable"]); + const ruleFormRef = ref(); + const isShowDialog = ref(false); + const loading = ref(false); + const disabled_btn = ref(false); + const ruleForm = ref<any>({}); + //鑷娣诲姞鍏朵粬瑙勫垯 + const rules = ref<FormRules>({ + packageCode: [{required: true, message: '璇疯緭鍏ュ寘瑁呭彿锛�', trigger: 'blur',},], + pushStatus: [{required: true, message: '璇烽�夋嫨鎺ㄩ�佺姸鎬侊紒', trigger: 'change',},], + pushNum: [{required: true, message: '璇疯緭鍏ユ帹閫佹鏁帮紒', trigger: 'blur',},], + apiMessage: [{required: true, message: '璇疯緭鍏ユ帴鍙h繑鍥炲弬鏁帮紒', trigger: 'blur',},], + isDelete: [{required: true, message: '璇烽�夋嫨杞垹闄わ紒', trigger: 'change',},], + }); + + /* + * 鎵撳紑寮圭獥 + * @param flag 鏍囪锛�1鏂板 2缂栬緫 3鏌ョ湅锛� + * @param row 琛屾暟鎹� + */ + const openDialog = async (flag: number,row: any) => { + // ruleForm.value = JSON.parse(JSON.stringify(row)); + // 鏀圭敤detail鑾峰彇鏈�鏂版暟鎹潵缂栬緫 + let rowData = JSON.parse(JSON.stringify(row)); + if (rowData.id) + ruleForm.value = (await detailMesPushPaperCut(rowData.id)).data.result; + else { + ruleForm.value = rowData; + } + isShowDialog.value = true; + }; + + // 鍏抽棴寮圭獥 + const closeDialog = () => { + emit("reloadTable"); + isShowDialog.value = false; + }; + + // 鍙栨秷 + const cancel = () => { + isShowDialog.value = false; + }; + + // 鎻愪氦 + const submit = async () => { + disabled_btn.value = true; + ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { + if (isValid) { + loading.value = true; + let values = ruleForm.value; + let ret={}; + let title='鏂板'; + if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { + ret = await addMesPushPaperCut(values); + } else { + title='缂栬緫'; + ret = await updateMesPushPaperCut(values); + } + loading.value = false; + disabled_btn.value = false; + if(ret.data.type=="success"){ + ElMessage.success(title+'鎴愬姛'); + closeDialog(); + } + } else { + disabled_btn.value = false; + ElMessage({ + message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜, + type: "error", + }); + } + }); + }; + + + + + + + + // 椤甸潰鍔犺浇鏃� + onMounted(async () => { + getEnumPushStatusData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('PushStatusEnum')).data.result ?? []; + }); + + //灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠� + defineExpose({ openDialog }); +</script> + + + + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/index.vue new file mode 100644 index 0000000..97a44ce --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/ThirdInterFace/mesPushPaperCut/index.vue @@ -0,0 +1,272 @@ +锘�<template> + <div class="mesPushPaperCut-container"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form :model="queryParamsMesPushPaperCut" ref="queryForm" labelWidth="90"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> + <el-form-item label="鍏抽敭瀛�"> + <el-input v-model="queryParamsMesPushPaperCut.searchKey" clearable="" placeholder="鍖呰鍙�,鎺ュ彛杩斿洖鍙傛暟,鍒涘缓浜�,淇敼浜�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMesPushPaperCut"> + <el-form-item label="鍖呰鍙�"> + <el-input v-model="queryParamsMesPushPaperCut.packageCode" clearable="" placeholder="璇疯緭鍏ュ寘瑁呭彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMesPushPaperCut"> + <el-form-item label="鎺ㄩ�佺姸鎬�"> + <el-select clearable="" v-model="queryParamsMesPushPaperCut.pushStatus" placeholder="璇烽�夋嫨鎺ㄩ�佺姸鎬�"> + <el-option v-for="(item,index) in getEnumPushStatusData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMesPushPaperCut"> + <el-form-item label="鎺ㄩ�佹椂闂�"> + <el-date-picker placeholder="璇烽�夋嫨鎺ㄩ�佹椂闂�" value-format="YYYY/MM/DD" type="daterange" v-model="queryParamsMesPushPaperCut.pushTimeRange" /> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMesPushPaperCut"> + <el-form-item label="鎺ㄩ�佹鏁�"> + <el-input-number v-model="queryParamsMesPushPaperCut.pushNum" clearable="" placeholder="璇疯緭鍏ユ帹閫佹鏁�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMesPushPaperCut"> + <el-form-item label="鎺ュ彛杩斿洖鍙傛暟"> + <el-input v-model="queryParamsMesPushPaperCut.apiMessage" clearable="" placeholder="璇疯緭鍏ユ帴鍙h繑鍥炲弬鏁�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-form-item> + <el-button-group style="display: flex; align-items: center;"> + <el-button type="primary" icon="ele-Search" @click="handleQueryMesPushPaperCut" v-auth="'mesPushPaperCut:page'" :disabled="disabled_btnMesPushPaperCut"> 鏌ヨ </el-button> + <el-button icon="ele-Refresh" @click="resetMesPushPaperCut"> 閲嶇疆 </el-button> + <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUIMesPushPaperCut" v-if="!showAdvanceQueryUIMesPushPaperCut" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> + <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUIMesPushPaperCut" v-if="showAdvanceQueryUIMesPushPaperCut" style="margin-left:5px;"> 闅愯棌 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddMesPushPaperCut" v-auth="'mesPushPaperCut:add'"> 鏂板 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Download" @click="handleExportExcelMesPushPaperCut" v-auth="'mesPushPaperCut:exportExcel'" > 瀵煎嚭 </el-button> + </el-button-group> + </el-form-item> + + </el-col> + </el-row> + </el-form> + </el-card> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-table + ref="tableRefMesPushPaperCut" + :data="tableDataMesPushPaperCut" + style="width: 100%" + v-loading="loadingMesPushPaperCut" + tooltip-effect="light" + row-key="id" + @sort-change="sortChangeMesPushPaperCut" + border=""> + <el-table-column type="index" label="搴忓彿" width="55" align="center"/> + <el-table-column prop="packageCode" label="鍖呰鍙�" show-overflow-tooltip="" /> + <el-table-column prop="pushStatus" label="鎺ㄩ�佺姸鎬�" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.pushStatus, getEnumPushStatusData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="pushTime" label="鎺ㄩ�佹椂闂�" width="80" :formatter="formatDate_T_Date" show-overflow-tooltip="" /> + <el-table-column prop="pushNum" label="鎺ㄩ�佹鏁�" show-overflow-tooltip="" /> + <el-table-column prop="apiMessage" label="鎺ュ彛杩斿洖鍙傛暟" show-overflow-tooltip="" /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> + <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> + <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('mesPushPaperCut:update') || auth('mesPushPaperCut:delete')"> + <template #default="scope"> + <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditMesPushPaperCut(scope.row)" v-auth="'mesPushPaperCut:update'"> 缂栬緫 </el-button> + <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delMesPushPaperCut(scope.row)" v-auth="'mesPushPaperCut:delete'"> 鍒犻櫎 </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + v-model:currentPage="tableParamsMesPushPaperCut.page" + v-model:page-size="tableParamsMesPushPaperCut.pageSize" + :total="tableParamsMesPushPaperCut.total" + :page-sizes="[10, 20, 50, 100, 200, 500]" + small="" + background="" + @size-change="handleSizeChangeMesPushPaperCut" + @current-change="handleCurrentChangeMesPushPaperCut" + layout="total, sizes, prev, pager, next, jumper" + /> + <printDialogMesPushPaperCut + ref="printDialogRefMesPushPaperCut" + :title="printMesPushPaperCutTitle" + @reloadTable="handleQueryMesPushPaperCut" /> + <editDialogMesPushPaperCut + ref="editDialogRefMesPushPaperCut" + :title="editMesPushPaperCutTitle" + @reloadTable="handleQueryMesPushPaperCut" + /> + </el-card> + </div> +</template> + +<script lang="ts" setup="" name="mesPushPaperCut"> + import { ref,onMounted } from "vue"; + import { ElMessageBox, ElMessage } from "element-plus"; + import { auth } from '/@/utils/authFunction'; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { formatDate,formatDate_T_Date,formatDate_T_Time,defaultTimeRange } from '/@/utils/formatTime'; + import { exportPageExcel } from '/@/utils/exportPageExcel' //寮曞叆瀵煎嚭鏂规硶 + + + import printDialogMesPushPaperCut from '/@/views/system/print/component/hiprint/preview.vue' + import { pageMesPushPaperCut, deleteMesPushPaperCut,importExcelMesPushPaperCut,downloadExcelTemplateMesPushPaperCut } from '/@/api/main/ThirdInterFace/mesPushPaperCut'; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + import commonFunction from '/@/utils/commonFunction'; + + const getEnumPushStatusData_Index = ref<any>([]); + + const { getEnumDesc } = commonFunction(); + + /***************************************************[绾哥鏈哄鎺ユ搷浣淽寮�濮�***************************************************/ + const showAdvanceQueryUIMesPushPaperCut = ref(false); + const tableRefMesPushPaperCut = ref(null); + const printDialogRefMesPushPaperCut = ref(); + const editDialogRefMesPushPaperCut = ref(); + const loadingMesPushPaperCut = ref(false); + const disabled_btnMesPushPaperCut = ref(false); + const tableDataMesPushPaperCut = ref<any>([]); + const queryParamsMesPushPaperCut = ref<any>({}); + const tableParamsMesPushPaperCut = ref({ + page: 1, + pageSize: 10, + total: 0, + }); + + const printMesPushPaperCutTitle = ref(""); + const editMesPushPaperCutTitle = ref(""); + + // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� + const changeAdvanceQueryUIMesPushPaperCut = () => { + showAdvanceQueryUIMesPushPaperCut.value = !showAdvanceQueryUIMesPushPaperCut.value; + } + + // 鏌ヨ绾哥鏈哄鎺� + const handleQueryMesPushPaperCut = async () => { + loadingMesPushPaperCut.value = true; + disabled_btnMesPushPaperCut.value = true; + var res = await pageMesPushPaperCut(Object.assign(queryParamsMesPushPaperCut.value, tableParamsMesPushPaperCut.value)); + if(res.data.type=="success"){ + tableDataMesPushPaperCut.value = res.data.result?.items ?? []; + tableParamsMesPushPaperCut.value.total = res.data.result?.total; + } + loadingMesPushPaperCut.value = false; + disabled_btnMesPushPaperCut.value = false; + }; + + // 閲嶇疆绾哥鏈哄鎺ユ煡璇� + const resetMesPushPaperCut = async () => { + queryParamsMesPushPaperCut.value = {} + }; + + // 绾哥鏈哄鎺ュ垪鎺掑簭 + const sortChangeMesPushPaperCut = async (column: any) => { + queryParamsMesPushPaperCut.value.field = column.prop; + queryParamsMesPushPaperCut.value.order = column.order; + await handleQueryMesPushPaperCut(); + }; + + // 鎵撳紑鏂板绾哥鏈哄鎺ラ〉闈� + const openAddMesPushPaperCut = () => { + editMesPushPaperCutTitle.value = '娣诲姞绾哥鏈哄鎺�'; + editDialogRefMesPushPaperCut.value.openDialog(1,{}); + }; + + // 鎵撳紑鎵撳嵃绾哥鏈哄鎺ラ〉闈� + const openPrintMesPushPaperCut = async (row: any) => { + printMesPushPaperCutTitle.value = '鎵撳嵃绾哥鏈哄鎺�'; + } + + // 鎵撳紑缂栬緫绾哥鏈哄鎺ラ〉闈� + const openEditMesPushPaperCut = (row: any) => { + editMesPushPaperCutTitle.value = '缂栬緫绾哥鏈哄鎺�'; + editDialogRefMesPushPaperCut.value.openDialog(2,row); + }; + + // 鍒犻櫎绾哥鏈哄鎺� + const delMesPushPaperCut = (row: any) => { + ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + loadingMesPushPaperCut.value = true; + var ret = await deleteMesPushPaperCut(row); + if(ret.data.type=="success"){ + ElMessage.success("鍒犻櫎鎴愬姛"); + } + loadingMesPushPaperCut.value = false; + handleQueryMesPushPaperCut(); + }) + .catch(() => {}); + }; + + // 鏀瑰彉绾哥鏈哄鎺ラ〉闈㈠閲� + const handleSizeChangeMesPushPaperCut = (val: number) => { + tableParamsMesPushPaperCut.value.pageSize = val; + handleQueryMesPushPaperCut(); + }; + + // 鏀瑰彉绾哥鏈哄鎺ラ〉鐮佸簭鍙� + const handleCurrentChangeMesPushPaperCut = (val: number) => { + tableParamsMesPushPaperCut.value.page = val; + handleQueryMesPushPaperCut(); + }; + +/***************************************************[绾哥鏈哄鎺ユ搷浣淽缁撴潫***************************************************/ +/***************************************************[绾哥鏈哄鎺ュ鍑篯寮�濮�***************************************************/ +//瀹氫箟褰撳墠椤甸潰鐨勬柟娉曠粍 +const functionMapMesPushPaperCut = { + getEnumPushStatusData_Index, + formatDate_T_Date, + formatDate_T_Time +}; +//鐐瑰嚮瀵煎嚭鎸夐挳 +const handleExportExcelMesPushPaperCut = async (formData:Blob) => { + loadingMesPushPaperCut.value = true; + disabled_btnMesPushPaperCut.value = true; + var new_tableParamsMesPushPaperCut=JSON.parse(JSON.stringify(tableParamsMesPushPaperCut.value)); + new_tableParamsMesPushPaperCut.page = 1; + new_tableParamsMesPushPaperCut.pageSize = 100000; + var res = await pageMesPushPaperCut(Object.assign(queryParamsMesPushPaperCut.value, new_tableParamsMesPushPaperCut)); + if(res.data.type=="success"){ + exportExcelMesPushPaperCut(res.data.result?.items ?? []); + } + loadingMesPushPaperCut.value = false; + disabled_btnMesPushPaperCut.value = false; +}; +//瀵煎嚭 +const exportExcelMesPushPaperCut = async (exportDataList:Array) => { + exportPageExcel(exportDataList, tableRefMesPushPaperCut,"绾哥鏈哄鎺�",functionMapMesPushPaperCut); +}; +/***************************************************[绾哥鏈哄鎺ュ鍑篯缁撴潫***************************************************/ + // 绾哥鏈哄鎺ラ〉闈㈠姞杞芥椂 + onMounted(async () => { + getEnumPushStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('PushStatusEnum')).data.result ?? []; + }); + + handleQueryMesPushPaperCut(); +</script> +<style scoped> +:deep(.el-input), +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/component/editDialog.vue new file mode 100644 index 0000000..c4db1cc --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/component/editDialog.vue @@ -0,0 +1,268 @@ +锘�<template> + <div class="mes_Package_Gather-container"> + <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> + <template #header> + <div style="color: #fff"> + <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> + <span>{{ props.title }}</span> + </div> + </template> + <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules" v-loading="loading"> + <el-row :gutter="35"> + <el-form-item v-show="false"> + <el-input v-model="ruleForm.id" /> + </el-form-item> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰鍙�" prop="packageCode"> + <el-input v-model="ruleForm.packageCode" placeholder="璇疯緭鍏ュ寘瑁呭彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鐢熶骇鍗曞彿" prop="info5"> + <el-input v-model="ruleForm.info5" placeholder="璇疯緭鍏ョ敓浜у崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵规鍙�" prop="planNo"> + <el-input v-model="ruleForm.planNo" placeholder="璇疯緭鍏ユ壒娆″彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="璁㈠崟鍙�" prop="orderId"> + <el-input v-model="ruleForm.orderId" placeholder="璇疯緭鍏ヨ鍗曞彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵�鍦ㄥ尯鍩�" prop="areaCode"> + <el-select clearable v-model="ruleForm.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鏉挎枡鐘舵��" prop="upiStatus"> + <el-select clearable v-model="ruleForm.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥闀�" prop="info1"> + <el-input v-model="ruleForm.info1" placeholder="璇疯緭鍏ョ焊绠遍暱" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥瀹�" prop="info2"> + <el-input v-model="ruleForm.info2" placeholder="璇疯緭鍏ョ焊绠卞" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥楂�" prop="info3"> + <el-input v-model="ruleForm.info3" placeholder="璇疯緭鍏ョ焊绠遍珮" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�" prop="info4"> + <el-input v-model="ruleForm.info4" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绗嚑鍖�" prop="info6"> + <el-input v-model="ruleForm.info6" placeholder="璇疯緭鍏ョ鍑犲寘" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="缁忛攢搴楀悕绉�" prop="info7"> + <el-input v-model="ruleForm.info7" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="浜у搧鍚嶇О" prop="info8"> + <el-input v-model="ruleForm.info8" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="瀹㈡埛鍚嶇О" prop="info10"> + <el-input v-model="ruleForm.info10" placeholder="璇疯緭鍏ュ鎴峰悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鑷彁or鍙戣揣" prop="info11"> + <el-input v-model="ruleForm.info11" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�" prop="info12"> + <el-input v-model="ruleForm.info12" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰闈㈢Н" prop="info13"> + <el-input v-model="ruleForm.info13" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + </el-row> + </el-form> + <template #footer> + <span class="dialog-footer"> + <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submit" :disabled="disabled_btn">纭� 瀹�</el-button> + </span> + </template> + </el-dialog> + </div> +</template> +<style scoped> +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> +<script lang="ts" setup> + import { ref,onMounted } from "vue"; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { ElMessage } from "element-plus"; + import type { FormRules } from "element-plus"; + import { addMes_Package_Gather, updateMes_Package_Gather, detailMes_Package_Gather } from "/@/api/main/WmsOrder/mes_Package_Gather"; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + + const getEnumAreaCodeData = ref<any>([]); + const getEnumUpiStatusData = ref<any>([]); + //鐖剁骇浼犻�掓潵鐨勫弬鏁� + var props = defineProps({ + title: { + type: String, + default: "", + }, + }); + //鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟 + const emit = defineEmits(["reloadTable"]); + const ruleFormRef = ref(); + const isShowDialog = ref(false); + const loading = ref(false); + const disabled_btn = ref(false); + const ruleForm = ref<any>({}); + //鑷娣诲姞鍏朵粬瑙勫垯 + const rules = ref<FormRules>({ + packageCode: [{required: true, message: '璇疯緭鍏ュ寘瑁呭彿锛�', trigger: 'blur',},], + planNo: [{required: true, message: '璇疯緭鍏ユ壒娆″彿锛�', trigger: 'blur',},], + orderId: [{required: true, message: '璇疯緭鍏ヨ鍗曞彿锛�', trigger: 'blur',},], + upiStatus: [{required: true, message: '璇烽�夋嫨鏉挎枡鐘舵�侊紒', trigger: 'change',},], + isDelete: [{required: true, message: '璇烽�夋嫨杞垹闄わ紒', trigger: 'change',},], + }); + + /* + * 鎵撳紑寮圭獥 + * @param flag 鏍囪锛�1鏂板 2缂栬緫 3鏌ョ湅锛� + * @param row 琛屾暟鎹� + */ + const openDialog = async (flag: number,row: any) => { + // ruleForm.value = JSON.parse(JSON.stringify(row)); + // 鏀圭敤detail鑾峰彇鏈�鏂版暟鎹潵缂栬緫 + let rowData = JSON.parse(JSON.stringify(row)); + if (rowData.id) + ruleForm.value = (await detailMes_Package_Gather(rowData.id)).data.result; + else { + ruleForm.value = rowData; + } + isShowDialog.value = true; + }; + + // 鍏抽棴寮圭獥 + const closeDialog = () => { + emit("reloadTable"); + isShowDialog.value = false; + }; + + // 鍙栨秷 + const cancel = () => { + isShowDialog.value = false; + }; + + // 鎻愪氦 + const submit = async () => { + disabled_btn.value = true; + ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { + if (isValid) { + loading.value = true; + let values = ruleForm.value; + let ret={}; + let title='鏂板'; + if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { + ret = await addMes_Package_Gather(values); + } else { + title='缂栬緫'; + ret = await updateMes_Package_Gather(values); + } + loading.value = false; + disabled_btn.value = false; + if(ret.data.type=="success"){ + ElMessage.success(title+'鎴愬姛'); + closeDialog(); + } + } else { + disabled_btn.value = false; + ElMessage({ + message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜, + type: "error", + }); + } + }); + }; + + + + + + + + // 椤甸潰鍔犺浇鏃� + onMounted(async () => { + getEnumAreaCodeData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + //灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠� + defineExpose({ openDialog }); +</script> + + + + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/index.vue new file mode 100644 index 0000000..5a15001 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_Gather/index.vue @@ -0,0 +1,367 @@ +锘�<template> + <div class="mes_Package_Gather-container"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form :model="queryParamsMes_Package_Gather" ref="queryForm" labelWidth="90"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> + <el-form-item label="鍏抽敭瀛�"> + <el-input v-model="queryParamsMes_Package_Gather.searchKey" clearable="" placeholder="鍖呰鍙�,鐢熶骇鍗曞彿,鎵规鍙�,璁㈠崟鍙�,閿�鍞悎鍚屽崟鍙�,绗嚑鍖�,缁忛攢搴楀悕绉�,浜у搧鍚嶇О,瀹㈡埛鍚嶇О,鑷彁or鍙戣揣,鍖呰閮ㄤ欢鎬绘暟閲�,鍖呰闈㈢Н,鍒涘缓浜�,淇敼浜�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鍖呰鍙�"> + <el-input v-model="queryParamsMes_Package_Gather.packageCode" clearable="" placeholder="璇疯緭鍏ュ寘瑁呭彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鐢熶骇鍗曞彿"> + <el-input v-model="queryParamsMes_Package_Gather.info5" clearable="" placeholder="璇疯緭鍏ョ敓浜у崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鎵规鍙�"> + <el-input v-model="queryParamsMes_Package_Gather.planNo" clearable="" placeholder="璇疯緭鍏ユ壒娆″彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="璁㈠崟鍙�"> + <el-input v-model="queryParamsMes_Package_Gather.orderId" clearable="" placeholder="璇疯緭鍏ヨ鍗曞彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鎵�鍦ㄥ尯鍩�"> + <el-select clearable="" v-model="queryParamsMes_Package_Gather.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鏉挎枡鐘舵��"> + <el-select clearable="" v-model="queryParamsMes_Package_Gather.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="绾哥闀�"> + <el-input v-model="queryParamsMes_Package_Gather.info1" clearable="" placeholder="璇疯緭鍏ョ焊绠遍暱"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="绾哥瀹�"> + <el-input v-model="queryParamsMes_Package_Gather.info2" clearable="" placeholder="璇疯緭鍏ョ焊绠卞"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="绾哥楂�"> + <el-input v-model="queryParamsMes_Package_Gather.info3" clearable="" placeholder="璇疯緭鍏ョ焊绠遍珮"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�"> + <el-input v-model="queryParamsMes_Package_Gather.info4" clearable="" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="绗嚑鍖�"> + <el-input v-model="queryParamsMes_Package_Gather.info6" clearable="" placeholder="璇疯緭鍏ョ鍑犲寘"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="缁忛攢搴楀悕绉�"> + <el-input v-model="queryParamsMes_Package_Gather.info7" clearable="" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="浜у搧鍚嶇О"> + <el-input v-model="queryParamsMes_Package_Gather.info8" clearable="" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="瀹㈡埛鍚嶇О"> + <el-input v-model="queryParamsMes_Package_Gather.info10" clearable="" placeholder="璇疯緭鍏ュ鎴峰悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鑷彁or鍙戣揣"> + <el-input v-model="queryParamsMes_Package_Gather.info11" clearable="" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�"> + <el-input v-model="queryParamsMes_Package_Gather.info12" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_Gather"> + <el-form-item label="鍖呰闈㈢Н"> + <el-input v-model="queryParamsMes_Package_Gather.info13" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-form-item> + <el-button-group style="display: flex; align-items: center;"> + <el-button type="primary" icon="ele-Search" @click="handleQueryMes_Package_Gather" v-auth="'mes_Package_Gather:page'" :disabled="disabled_btnMes_Package_Gather"> 鏌ヨ </el-button> + <el-button icon="ele-Refresh" @click="resetMes_Package_Gather"> 閲嶇疆 </el-button> + <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUIMes_Package_Gather" v-if="!showAdvanceQueryUIMes_Package_Gather" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> + <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUIMes_Package_Gather" v-if="showAdvanceQueryUIMes_Package_Gather" style="margin-left:5px;"> 闅愯棌 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddMes_Package_Gather" v-auth="'mes_Package_Gather:add'"> 鏂板 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Download" @click="handleExportExcelMes_Package_Gather" v-auth="'mes_Package_Gather:exportExcel'" > 瀵煎嚭 </el-button> + </el-button-group> + </el-form-item> + + </el-col> + </el-row> + </el-form> + </el-card> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-table + ref="tableRefMes_Package_Gather" + :data="tableDataMes_Package_Gather" + style="width: 100%" + v-loading="loadingMes_Package_Gather" + tooltip-effect="light" + row-key="id" + @sort-change="sortChangeMes_Package_Gather" + border=""> + <el-table-column type="index" label="搴忓彿" width="55" align="center"/> + <el-table-column prop="packageCode" label="鍖呰鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info5" label="鐢熶骇鍗曞彿" show-overflow-tooltip="" /> + <el-table-column prop="planNo" label="鎵规鍙�" show-overflow-tooltip="" /> + <el-table-column prop="orderId" label="璁㈠崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="areaCode" label="鎵�鍦ㄥ尯鍩�" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.areaCode, getEnumAreaCodeData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="upiStatus" label="鏉挎枡鐘舵��" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.upiStatus, getEnumUpiStatusData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="info1" label="绾哥闀�" show-overflow-tooltip="" /> + <el-table-column prop="info2" label="绾哥瀹�" show-overflow-tooltip="" /> + <el-table-column prop="info3" label="绾哥楂�" show-overflow-tooltip="" /> + <el-table-column prop="info4" label="閿�鍞悎鍚屽崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info6" label="绗嚑鍖�" show-overflow-tooltip="" /> + <el-table-column prop="info7" label="缁忛攢搴楀悕绉�" show-overflow-tooltip="" /> + <el-table-column prop="info8" label="浜у搧鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info10" label="瀹㈡埛鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info11" label="鑷彁or鍙戣揣" show-overflow-tooltip="" /> + <el-table-column prop="info12" label="鍖呰閮ㄤ欢鎬绘暟閲�" show-overflow-tooltip="" /> + <el-table-column prop="info13" label="鍖呰闈㈢Н" show-overflow-tooltip="" /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> + <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> + <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('mes_Package_Gather:update') || auth('mes_Package_Gather:delete')"> + <template #default="scope"> + <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditMes_Package_Gather(scope.row)" v-auth="'mes_Package_Gather:update'"> 缂栬緫 </el-button> + <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delMes_Package_Gather(scope.row)" v-auth="'mes_Package_Gather:delete'"> 鍒犻櫎 </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + v-model:currentPage="tableParamsMes_Package_Gather.page" + v-model:page-size="tableParamsMes_Package_Gather.pageSize" + :total="tableParamsMes_Package_Gather.total" + :page-sizes="[10, 20, 50, 100, 200, 500]" + small="" + background="" + @size-change="handleSizeChangeMes_Package_Gather" + @current-change="handleCurrentChangeMes_Package_Gather" + layout="total, sizes, prev, pager, next, jumper" + /> + <printDialogMes_Package_Gather + ref="printDialogRefMes_Package_Gather" + :title="printMes_Package_GatherTitle" + @reloadTable="handleQueryMes_Package_Gather" /> + <editDialogMes_Package_Gather + ref="editDialogRefMes_Package_Gather" + :title="editMes_Package_GatherTitle" + @reloadTable="handleQueryMes_Package_Gather" + /> + </el-card> + </div> +</template> + +<script lang="ts" setup="" name="mes_Package_Gather"> + import { ref,onMounted } from "vue"; + import { ElMessageBox, ElMessage } from "element-plus"; + import { auth } from '/@/utils/authFunction'; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { formatDate,formatDate_T_Date,formatDate_T_Time,defaultTimeRange } from '/@/utils/formatTime'; + import { exportPageExcel } from '/@/utils/exportPageExcel' //寮曞叆瀵煎嚭鏂规硶 + + + import printDialogMes_Package_Gather from '/@/views/system/print/component/hiprint/preview.vue' + import editDialogMes_Package_Gather from '/@/views/main/WmsOrder/mes_Package_Gather/component/editDialog.vue' + import { pageMes_Package_Gather, deleteMes_Package_Gather,importExcelMes_Package_Gather,downloadExcelTemplateMes_Package_Gather } from '/@/api/main/WmsOrder/mes_Package_Gather'; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + import commonFunction from '/@/utils/commonFunction'; + + const getEnumAreaCodeData_Index = ref<any>([]); + const getEnumUpiStatusData_Index = ref<any>([]); + + const { getEnumDesc } = commonFunction(); + + /***************************************************[鍖呮暟鎹搷浣淽寮�濮�***************************************************/ + const showAdvanceQueryUIMes_Package_Gather = ref(false); + const tableRefMes_Package_Gather = ref(null); + const printDialogRefMes_Package_Gather = ref(); + const editDialogRefMes_Package_Gather = ref(); + const loadingMes_Package_Gather = ref(false); + const disabled_btnMes_Package_Gather = ref(false); + const tableDataMes_Package_Gather = ref<any>([]); + const queryParamsMes_Package_Gather = ref<any>({}); + const tableParamsMes_Package_Gather = ref({ + page: 1, + pageSize: 10, + total: 0, + }); + + const printMes_Package_GatherTitle = ref(""); + const editMes_Package_GatherTitle = ref(""); + + // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� + const changeAdvanceQueryUIMes_Package_Gather = () => { + showAdvanceQueryUIMes_Package_Gather.value = !showAdvanceQueryUIMes_Package_Gather.value; + } + + // 鏌ヨ鍖呮暟鎹� + const handleQueryMes_Package_Gather = async () => { + loadingMes_Package_Gather.value = true; + disabled_btnMes_Package_Gather.value = true; + var res = await pageMes_Package_Gather(Object.assign(queryParamsMes_Package_Gather.value, tableParamsMes_Package_Gather.value)); + if(res.data.type=="success"){ + tableDataMes_Package_Gather.value = res.data.result?.items ?? []; + tableParamsMes_Package_Gather.value.total = res.data.result?.total; + } + loadingMes_Package_Gather.value = false; + disabled_btnMes_Package_Gather.value = false; + }; + + // 閲嶇疆鍖呮暟鎹煡璇� + const resetMes_Package_Gather = async () => { + queryParamsMes_Package_Gather.value = {} + }; + + // 鍖呮暟鎹垪鎺掑簭 + const sortChangeMes_Package_Gather = async (column: any) => { + queryParamsMes_Package_Gather.value.field = column.prop; + queryParamsMes_Package_Gather.value.order = column.order; + await handleQueryMes_Package_Gather(); + }; + + // 鎵撳紑鏂板鍖呮暟鎹〉闈� + const openAddMes_Package_Gather = () => { + editMes_Package_GatherTitle.value = '娣诲姞鍖呮暟鎹�'; + editDialogRefMes_Package_Gather.value.openDialog(1,{}); + }; + + // 鎵撳紑鎵撳嵃鍖呮暟鎹〉闈� + const openPrintMes_Package_Gather = async (row: any) => { + printMes_Package_GatherTitle.value = '鎵撳嵃鍖呮暟鎹�'; + } + + // 鎵撳紑缂栬緫鍖呮暟鎹〉闈� + const openEditMes_Package_Gather = (row: any) => { + editMes_Package_GatherTitle.value = '缂栬緫鍖呮暟鎹�'; + editDialogRefMes_Package_Gather.value.openDialog(2,row); + }; + + // 鍒犻櫎鍖呮暟鎹� + const delMes_Package_Gather = (row: any) => { + ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + loadingMes_Package_Gather.value = true; + var ret = await deleteMes_Package_Gather(row); + if(ret.data.type=="success"){ + ElMessage.success("鍒犻櫎鎴愬姛"); + } + loadingMes_Package_Gather.value = false; + handleQueryMes_Package_Gather(); + }) + .catch(() => {}); + }; + + // 鏀瑰彉鍖呮暟鎹〉闈㈠閲� + const handleSizeChangeMes_Package_Gather = (val: number) => { + tableParamsMes_Package_Gather.value.pageSize = val; + handleQueryMes_Package_Gather(); + }; + + // 鏀瑰彉鍖呮暟鎹〉鐮佸簭鍙� + const handleCurrentChangeMes_Package_Gather = (val: number) => { + tableParamsMes_Package_Gather.value.page = val; + handleQueryMes_Package_Gather(); + }; + +/***************************************************[鍖呮暟鎹搷浣淽缁撴潫***************************************************/ +/***************************************************[鍖呮暟鎹鍑篯寮�濮�***************************************************/ +//瀹氫箟褰撳墠椤甸潰鐨勬柟娉曠粍 +const functionMapMes_Package_Gather = { + getEnumAreaCodeData_Index, + getEnumUpiStatusData_Index, + formatDate_T_Date, + formatDate_T_Time +}; +//鐐瑰嚮瀵煎嚭鎸夐挳 +const handleExportExcelMes_Package_Gather = async (formData:Blob) => { + loadingMes_Package_Gather.value = true; + disabled_btnMes_Package_Gather.value = true; + var new_tableParamsMes_Package_Gather=JSON.parse(JSON.stringify(tableParamsMes_Package_Gather.value)); + new_tableParamsMes_Package_Gather.page = 1; + new_tableParamsMes_Package_Gather.pageSize = 100000; + var res = await pageMes_Package_Gather(Object.assign(queryParamsMes_Package_Gather.value, new_tableParamsMes_Package_Gather)); + if(res.data.type=="success"){ + exportExcelMes_Package_Gather(res.data.result?.items ?? []); + } + loadingMes_Package_Gather.value = false; + disabled_btnMes_Package_Gather.value = false; +}; +//瀵煎嚭 +const exportExcelMes_Package_Gather = async (exportDataList:Array) => { + exportPageExcel(exportDataList, tableRefMes_Package_Gather,"鍖呮暟鎹�",functionMapMes_Package_Gather); +}; +/***************************************************[鍖呮暟鎹鍑篯缁撴潫***************************************************/ + // 鍖呮暟鎹〉闈㈠姞杞芥椂 + onMounted(async () => { + getEnumAreaCodeData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + handleQueryMes_Package_Gather(); +</script> +<style scoped> +:deep(.el-input), +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/component/editDialog.vue new file mode 100644 index 0000000..9e9887a --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/component/editDialog.vue @@ -0,0 +1,268 @@ +锘�<template> + <div class="mes_Package_LineQueue-container"> + <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> + <template #header> + <div style="color: #fff"> + <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> + <span>{{ props.title }}</span> + </div> + </template> + <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules" v-loading="loading"> + <el-row :gutter="35"> + <el-form-item v-show="false"> + <el-input v-model="ruleForm.id" /> + </el-form-item> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰鍙�" prop="packageCode"> + <el-input v-model="ruleForm.packageCode" placeholder="璇疯緭鍏ュ寘瑁呭彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鐢熶骇鍗曞彿" prop="info5"> + <el-input v-model="ruleForm.info5" placeholder="璇疯緭鍏ョ敓浜у崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵规鍙�" prop="planNo"> + <el-input v-model="ruleForm.planNo" placeholder="璇疯緭鍏ユ壒娆″彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="璁㈠崟鍙�" prop="orderId"> + <el-input v-model="ruleForm.orderId" placeholder="璇疯緭鍏ヨ鍗曞彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵�鍦ㄥ尯鍩�" prop="areaCode"> + <el-select clearable v-model="ruleForm.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鏉挎枡鐘舵��" prop="upiStatus"> + <el-select clearable v-model="ruleForm.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥闀�" prop="info1"> + <el-input v-model="ruleForm.info1" placeholder="璇疯緭鍏ョ焊绠遍暱" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥瀹�" prop="info2"> + <el-input v-model="ruleForm.info2" placeholder="璇疯緭鍏ョ焊绠卞" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥楂�" prop="info3"> + <el-input v-model="ruleForm.info3" placeholder="璇疯緭鍏ョ焊绠遍珮" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�" prop="info4"> + <el-input v-model="ruleForm.info4" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绗嚑鍖�" prop="info6"> + <el-input v-model="ruleForm.info6" placeholder="璇疯緭鍏ョ鍑犲寘" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="缁忛攢搴楀悕绉�" prop="info7"> + <el-input v-model="ruleForm.info7" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="浜у搧鍚嶇О" prop="info8"> + <el-input v-model="ruleForm.info8" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="瀹㈡埛鍚嶇О" prop="info10"> + <el-input v-model="ruleForm.info10" placeholder="璇疯緭鍏ュ鎴峰悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鑷彁or鍙戣揣" prop="info11"> + <el-input v-model="ruleForm.info11" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�" prop="info12"> + <el-input v-model="ruleForm.info12" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰闈㈢Н" prop="info13"> + <el-input v-model="ruleForm.info13" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + </el-row> + </el-form> + <template #footer> + <span class="dialog-footer"> + <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submit" :disabled="disabled_btn">纭� 瀹�</el-button> + </span> + </template> + </el-dialog> + </div> +</template> +<style scoped> +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> +<script lang="ts" setup> + import { ref,onMounted } from "vue"; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { ElMessage } from "element-plus"; + import type { FormRules } from "element-plus"; + import { addMes_Package_LineQueue, updateMes_Package_LineQueue, detailMes_Package_LineQueue } from "/@/api/main/WmsOrder/mes_Package_LineQueue"; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + + const getEnumAreaCodeData = ref<any>([]); + const getEnumUpiStatusData = ref<any>([]); + //鐖剁骇浼犻�掓潵鐨勫弬鏁� + var props = defineProps({ + title: { + type: String, + default: "", + }, + }); + //鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟 + const emit = defineEmits(["reloadTable"]); + const ruleFormRef = ref(); + const isShowDialog = ref(false); + const loading = ref(false); + const disabled_btn = ref(false); + const ruleForm = ref<any>({}); + //鑷娣诲姞鍏朵粬瑙勫垯 + const rules = ref<FormRules>({ + packageCode: [{required: true, message: '璇疯緭鍏ュ寘瑁呭彿锛�', trigger: 'blur',},], + planNo: [{required: true, message: '璇疯緭鍏ユ壒娆″彿锛�', trigger: 'blur',},], + orderId: [{required: true, message: '璇疯緭鍏ヨ鍗曞彿锛�', trigger: 'blur',},], + upiStatus: [{required: true, message: '璇烽�夋嫨鏉挎枡鐘舵�侊紒', trigger: 'change',},], + isDelete: [{required: true, message: '璇烽�夋嫨杞垹闄わ紒', trigger: 'change',},], + }); + + /* + * 鎵撳紑寮圭獥 + * @param flag 鏍囪锛�1鏂板 2缂栬緫 3鏌ョ湅锛� + * @param row 琛屾暟鎹� + */ + const openDialog = async (flag: number,row: any) => { + // ruleForm.value = JSON.parse(JSON.stringify(row)); + // 鏀圭敤detail鑾峰彇鏈�鏂版暟鎹潵缂栬緫 + let rowData = JSON.parse(JSON.stringify(row)); + if (rowData.id) + ruleForm.value = (await detailMes_Package_LineQueue(rowData.id)).data.result; + else { + ruleForm.value = rowData; + } + isShowDialog.value = true; + }; + + // 鍏抽棴寮圭獥 + const closeDialog = () => { + emit("reloadTable"); + isShowDialog.value = false; + }; + + // 鍙栨秷 + const cancel = () => { + isShowDialog.value = false; + }; + + // 鎻愪氦 + const submit = async () => { + disabled_btn.value = true; + ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { + if (isValid) { + loading.value = true; + let values = ruleForm.value; + let ret={}; + let title='鏂板'; + if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { + ret = await addMes_Package_LineQueue(values); + } else { + title='缂栬緫'; + ret = await updateMes_Package_LineQueue(values); + } + loading.value = false; + disabled_btn.value = false; + if(ret.data.type=="success"){ + ElMessage.success(title+'鎴愬姛'); + closeDialog(); + } + } else { + disabled_btn.value = false; + ElMessage({ + message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜, + type: "error", + }); + } + }); + }; + + + + + + + + // 椤甸潰鍔犺浇鏃� + onMounted(async () => { + getEnumAreaCodeData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + //灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠� + defineExpose({ openDialog }); +</script> + + + + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/index.vue new file mode 100644 index 0000000..77b9b86 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/mes_Package_LineQueue/index.vue @@ -0,0 +1,367 @@ +锘�<template> + <div class="mes_Package_LineQueue-container"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form :model="queryParamsMes_Package_LineQueue" ref="queryForm" labelWidth="90"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> + <el-form-item label="鍏抽敭瀛�"> + <el-input v-model="queryParamsMes_Package_LineQueue.searchKey" clearable="" placeholder="鍖呰鍙�,鐢熶骇鍗曞彿,鎵规鍙�,璁㈠崟鍙�,閿�鍞悎鍚屽崟鍙�,绗嚑鍖�,缁忛攢搴楀悕绉�,浜у搧鍚嶇О,瀹㈡埛鍚嶇О,鑷彁or鍙戣揣,鍖呰閮ㄤ欢鎬绘暟閲�,鍖呰闈㈢Н,鍒涘缓浜�,淇敼浜�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鍖呰鍙�"> + <el-input v-model="queryParamsMes_Package_LineQueue.packageCode" clearable="" placeholder="璇疯緭鍏ュ寘瑁呭彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鐢熶骇鍗曞彿"> + <el-input v-model="queryParamsMes_Package_LineQueue.info5" clearable="" placeholder="璇疯緭鍏ョ敓浜у崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鎵规鍙�"> + <el-input v-model="queryParamsMes_Package_LineQueue.planNo" clearable="" placeholder="璇疯緭鍏ユ壒娆″彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="璁㈠崟鍙�"> + <el-input v-model="queryParamsMes_Package_LineQueue.orderId" clearable="" placeholder="璇疯緭鍏ヨ鍗曞彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鎵�鍦ㄥ尯鍩�"> + <el-select clearable="" v-model="queryParamsMes_Package_LineQueue.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鏉挎枡鐘舵��"> + <el-select clearable="" v-model="queryParamsMes_Package_LineQueue.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="绾哥闀�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info1" clearable="" placeholder="璇疯緭鍏ョ焊绠遍暱"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="绾哥瀹�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info2" clearable="" placeholder="璇疯緭鍏ョ焊绠卞"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="绾哥楂�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info3" clearable="" placeholder="璇疯緭鍏ョ焊绠遍珮"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info4" clearable="" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="绗嚑鍖�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info6" clearable="" placeholder="璇疯緭鍏ョ鍑犲寘"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="缁忛攢搴楀悕绉�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info7" clearable="" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="浜у搧鍚嶇О"> + <el-input v-model="queryParamsMes_Package_LineQueue.info8" clearable="" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="瀹㈡埛鍚嶇О"> + <el-input v-model="queryParamsMes_Package_LineQueue.info10" clearable="" placeholder="璇疯緭鍏ュ鎴峰悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鑷彁or鍙戣揣"> + <el-input v-model="queryParamsMes_Package_LineQueue.info11" clearable="" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�"> + <el-input v-model="queryParamsMes_Package_LineQueue.info12" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIMes_Package_LineQueue"> + <el-form-item label="鍖呰闈㈢Н"> + <el-input v-model="queryParamsMes_Package_LineQueue.info13" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-form-item> + <el-button-group style="display: flex; align-items: center;"> + <el-button type="primary" icon="ele-Search" @click="handleQueryMes_Package_LineQueue" v-auth="'mes_Package_LineQueue:page'" :disabled="disabled_btnMes_Package_LineQueue"> 鏌ヨ </el-button> + <el-button icon="ele-Refresh" @click="resetMes_Package_LineQueue"> 閲嶇疆 </el-button> + <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUIMes_Package_LineQueue" v-if="!showAdvanceQueryUIMes_Package_LineQueue" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> + <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUIMes_Package_LineQueue" v-if="showAdvanceQueryUIMes_Package_LineQueue" style="margin-left:5px;"> 闅愯棌 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddMes_Package_LineQueue" v-auth="'mes_Package_LineQueue:add'"> 鏂板 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Download" @click="handleExportExcelMes_Package_LineQueue" v-auth="'mes_Package_LineQueue:exportExcel'" > 瀵煎嚭 </el-button> + </el-button-group> + </el-form-item> + + </el-col> + </el-row> + </el-form> + </el-card> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-table + ref="tableRefMes_Package_LineQueue" + :data="tableDataMes_Package_LineQueue" + style="width: 100%" + v-loading="loadingMes_Package_LineQueue" + tooltip-effect="light" + row-key="id" + @sort-change="sortChangeMes_Package_LineQueue" + border=""> + <el-table-column type="index" label="搴忓彿" width="55" align="center"/> + <el-table-column prop="packageCode" label="鍖呰鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info5" label="鐢熶骇鍗曞彿" show-overflow-tooltip="" /> + <el-table-column prop="planNo" label="鎵规鍙�" show-overflow-tooltip="" /> + <el-table-column prop="orderId" label="璁㈠崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="areaCode" label="鎵�鍦ㄥ尯鍩�" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.areaCode, getEnumAreaCodeData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="upiStatus" label="鏉挎枡鐘舵��" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.upiStatus, getEnumUpiStatusData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="info1" label="绾哥闀�" show-overflow-tooltip="" /> + <el-table-column prop="info2" label="绾哥瀹�" show-overflow-tooltip="" /> + <el-table-column prop="info3" label="绾哥楂�" show-overflow-tooltip="" /> + <el-table-column prop="info4" label="閿�鍞悎鍚屽崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info6" label="绗嚑鍖�" show-overflow-tooltip="" /> + <el-table-column prop="info7" label="缁忛攢搴楀悕绉�" show-overflow-tooltip="" /> + <el-table-column prop="info8" label="浜у搧鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info10" label="瀹㈡埛鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info11" label="鑷彁or鍙戣揣" show-overflow-tooltip="" /> + <el-table-column prop="info12" label="鍖呰閮ㄤ欢鎬绘暟閲�" show-overflow-tooltip="" /> + <el-table-column prop="info13" label="鍖呰闈㈢Н" show-overflow-tooltip="" /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> + <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> + <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('mes_Package_LineQueue:update') || auth('mes_Package_LineQueue:delete')"> + <template #default="scope"> + <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditMes_Package_LineQueue(scope.row)" v-auth="'mes_Package_LineQueue:update'"> 缂栬緫 </el-button> + <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delMes_Package_LineQueue(scope.row)" v-auth="'mes_Package_LineQueue:delete'"> 鍒犻櫎 </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + v-model:currentPage="tableParamsMes_Package_LineQueue.page" + v-model:page-size="tableParamsMes_Package_LineQueue.pageSize" + :total="tableParamsMes_Package_LineQueue.total" + :page-sizes="[10, 20, 50, 100, 200, 500]" + small="" + background="" + @size-change="handleSizeChangeMes_Package_LineQueue" + @current-change="handleCurrentChangeMes_Package_LineQueue" + layout="total, sizes, prev, pager, next, jumper" + /> + <printDialogMes_Package_LineQueue + ref="printDialogRefMes_Package_LineQueue" + :title="printMes_Package_LineQueueTitle" + @reloadTable="handleQueryMes_Package_LineQueue" /> + <editDialogMes_Package_LineQueue + ref="editDialogRefMes_Package_LineQueue" + :title="editMes_Package_LineQueueTitle" + @reloadTable="handleQueryMes_Package_LineQueue" + /> + </el-card> + </div> +</template> + +<script lang="ts" setup="" name="mes_Package_LineQueue"> + import { ref,onMounted } from "vue"; + import { ElMessageBox, ElMessage } from "element-plus"; + import { auth } from '/@/utils/authFunction'; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { formatDate,formatDate_T_Date,formatDate_T_Time,defaultTimeRange } from '/@/utils/formatTime'; + import { exportPageExcel } from '/@/utils/exportPageExcel' //寮曞叆瀵煎嚭鏂规硶 + + + import printDialogMes_Package_LineQueue from '/@/views/system/print/component/hiprint/preview.vue' + import editDialogMes_Package_LineQueue from '/@/views/main/WmsOrder/mes_Package_LineQueue/component/editDialog.vue' + import { pageMes_Package_LineQueue, deleteMes_Package_LineQueue,importExcelMes_Package_LineQueue,downloadExcelTemplateMes_Package_LineQueue } from '/@/api/main/WmsOrder/mes_Package_LineQueue'; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + import commonFunction from '/@/utils/commonFunction'; + + const getEnumAreaCodeData_Index = ref<any>([]); + const getEnumUpiStatusData_Index = ref<any>([]); + + const { getEnumDesc } = commonFunction(); + + /***************************************************[鍖呴槦鍒楁暟鎹搷浣淽寮�濮�***************************************************/ + const showAdvanceQueryUIMes_Package_LineQueue = ref(false); + const tableRefMes_Package_LineQueue = ref(null); + const printDialogRefMes_Package_LineQueue = ref(); + const editDialogRefMes_Package_LineQueue = ref(); + const loadingMes_Package_LineQueue = ref(false); + const disabled_btnMes_Package_LineQueue = ref(false); + const tableDataMes_Package_LineQueue = ref<any>([]); + const queryParamsMes_Package_LineQueue = ref<any>({}); + const tableParamsMes_Package_LineQueue = ref({ + page: 1, + pageSize: 10, + total: 0, + }); + + const printMes_Package_LineQueueTitle = ref(""); + const editMes_Package_LineQueueTitle = ref(""); + + // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� + const changeAdvanceQueryUIMes_Package_LineQueue = () => { + showAdvanceQueryUIMes_Package_LineQueue.value = !showAdvanceQueryUIMes_Package_LineQueue.value; + } + + // 鏌ヨ鍖呴槦鍒楁暟鎹� + const handleQueryMes_Package_LineQueue = async () => { + loadingMes_Package_LineQueue.value = true; + disabled_btnMes_Package_LineQueue.value = true; + var res = await pageMes_Package_LineQueue(Object.assign(queryParamsMes_Package_LineQueue.value, tableParamsMes_Package_LineQueue.value)); + if(res.data.type=="success"){ + tableDataMes_Package_LineQueue.value = res.data.result?.items ?? []; + tableParamsMes_Package_LineQueue.value.total = res.data.result?.total; + } + loadingMes_Package_LineQueue.value = false; + disabled_btnMes_Package_LineQueue.value = false; + }; + + // 閲嶇疆鍖呴槦鍒楁暟鎹煡璇� + const resetMes_Package_LineQueue = async () => { + queryParamsMes_Package_LineQueue.value = {} + }; + + // 鍖呴槦鍒楁暟鎹垪鎺掑簭 + const sortChangeMes_Package_LineQueue = async (column: any) => { + queryParamsMes_Package_LineQueue.value.field = column.prop; + queryParamsMes_Package_LineQueue.value.order = column.order; + await handleQueryMes_Package_LineQueue(); + }; + + // 鎵撳紑鏂板鍖呴槦鍒楁暟鎹〉闈� + const openAddMes_Package_LineQueue = () => { + editMes_Package_LineQueueTitle.value = '娣诲姞鍖呴槦鍒楁暟鎹�'; + editDialogRefMes_Package_LineQueue.value.openDialog(1,{}); + }; + + // 鎵撳紑鎵撳嵃鍖呴槦鍒楁暟鎹〉闈� + const openPrintMes_Package_LineQueue = async (row: any) => { + printMes_Package_LineQueueTitle.value = '鎵撳嵃鍖呴槦鍒楁暟鎹�'; + } + + // 鎵撳紑缂栬緫鍖呴槦鍒楁暟鎹〉闈� + const openEditMes_Package_LineQueue = (row: any) => { + editMes_Package_LineQueueTitle.value = '缂栬緫鍖呴槦鍒楁暟鎹�'; + editDialogRefMes_Package_LineQueue.value.openDialog(2,row); + }; + + // 鍒犻櫎鍖呴槦鍒楁暟鎹� + const delMes_Package_LineQueue = (row: any) => { + ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + loadingMes_Package_LineQueue.value = true; + var ret = await deleteMes_Package_LineQueue(row); + if(ret.data.type=="success"){ + ElMessage.success("鍒犻櫎鎴愬姛"); + } + loadingMes_Package_LineQueue.value = false; + handleQueryMes_Package_LineQueue(); + }) + .catch(() => {}); + }; + + // 鏀瑰彉鍖呴槦鍒楁暟鎹〉闈㈠閲� + const handleSizeChangeMes_Package_LineQueue = (val: number) => { + tableParamsMes_Package_LineQueue.value.pageSize = val; + handleQueryMes_Package_LineQueue(); + }; + + // 鏀瑰彉鍖呴槦鍒楁暟鎹〉鐮佸簭鍙� + const handleCurrentChangeMes_Package_LineQueue = (val: number) => { + tableParamsMes_Package_LineQueue.value.page = val; + handleQueryMes_Package_LineQueue(); + }; + +/***************************************************[鍖呴槦鍒楁暟鎹搷浣淽缁撴潫***************************************************/ +/***************************************************[鍖呴槦鍒楁暟鎹鍑篯寮�濮�***************************************************/ +//瀹氫箟褰撳墠椤甸潰鐨勬柟娉曠粍 +const functionMapMes_Package_LineQueue = { + getEnumAreaCodeData_Index, + getEnumUpiStatusData_Index, + formatDate_T_Date, + formatDate_T_Time +}; +//鐐瑰嚮瀵煎嚭鎸夐挳 +const handleExportExcelMes_Package_LineQueue = async (formData:Blob) => { + loadingMes_Package_LineQueue.value = true; + disabled_btnMes_Package_LineQueue.value = true; + var new_tableParamsMes_Package_LineQueue=JSON.parse(JSON.stringify(tableParamsMes_Package_LineQueue.value)); + new_tableParamsMes_Package_LineQueue.page = 1; + new_tableParamsMes_Package_LineQueue.pageSize = 100000; + var res = await pageMes_Package_LineQueue(Object.assign(queryParamsMes_Package_LineQueue.value, new_tableParamsMes_Package_LineQueue)); + if(res.data.type=="success"){ + exportExcelMes_Package_LineQueue(res.data.result?.items ?? []); + } + loadingMes_Package_LineQueue.value = false; + disabled_btnMes_Package_LineQueue.value = false; +}; +//瀵煎嚭 +const exportExcelMes_Package_LineQueue = async (exportDataList:Array) => { + exportPageExcel(exportDataList, tableRefMes_Package_LineQueue,"鍖呴槦鍒楁暟鎹�",functionMapMes_Package_LineQueue); +}; +/***************************************************[鍖呴槦鍒楁暟鎹鍑篯缁撴潫***************************************************/ + // 鍖呴槦鍒楁暟鎹〉闈㈠姞杞芥椂 + onMounted(async () => { + getEnumAreaCodeData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + handleQueryMes_Package_LineQueue(); +</script> +<style scoped> +:deep(.el-input), +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/component/editDialog.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/component/editDialog.vue new file mode 100644 index 0000000..43ede7a --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/component/editDialog.vue @@ -0,0 +1,268 @@ +锘�<template> + <div class="validateQiTaoOutput-container"> + <el-dialog v-model="isShowDialog" :width="800" draggable="" :close-on-click-modal="false"> + <template #header> + <div style="color: #fff"> + <!--<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>--> + <span>{{ props.title }}</span> + </div> + </template> + <el-form :model="ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules" v-loading="loading"> + <el-row :gutter="35"> + <el-form-item v-show="false"> + <el-input v-model="ruleForm.id" /> + </el-form-item> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰鍙�" prop="packageCode"> + <el-input v-model="ruleForm.packageCode" placeholder="璇疯緭鍏ュ寘瑁呭彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鐢熶骇鍗曞彿" prop="info5"> + <el-input v-model="ruleForm.info5" placeholder="璇疯緭鍏ョ敓浜у崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵规鍙�" prop="planNo"> + <el-input v-model="ruleForm.planNo" placeholder="璇疯緭鍏ユ壒娆″彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="璁㈠崟鍙�" prop="orderId"> + <el-input v-model="ruleForm.orderId" placeholder="璇疯緭鍏ヨ鍗曞彿" maxlength="50" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鎵�鍦ㄥ尯鍩�" prop="areaCode"> + <el-select clearable v-model="ruleForm.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鏉挎枡鐘舵��" prop="upiStatus"> + <el-select clearable v-model="ruleForm.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData" :key="index" :value="item.value" :label="`${item.describe}`"></el-option> + + </el-select> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥闀�" prop="info1"> + <el-input v-model="ruleForm.info1" placeholder="璇疯緭鍏ョ焊绠遍暱" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥瀹�" prop="info2"> + <el-input v-model="ruleForm.info2" placeholder="璇疯緭鍏ョ焊绠卞" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绾哥楂�" prop="info3"> + <el-input v-model="ruleForm.info3" placeholder="璇疯緭鍏ョ焊绠遍珮" maxlength="53" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�" prop="info4"> + <el-input v-model="ruleForm.info4" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="绗嚑鍖�" prop="info6"> + <el-input v-model="ruleForm.info6" placeholder="璇疯緭鍏ョ鍑犲寘" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="缁忛攢搴楀悕绉�" prop="info7"> + <el-input v-model="ruleForm.info7" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="浜у搧鍚嶇О" prop="info8"> + <el-input v-model="ruleForm.info8" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="瀹㈡埛鍚嶇О" prop="info10"> + <el-input v-model="ruleForm.info10" placeholder="璇疯緭鍏ュ鎴峰悕绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鑷彁or鍙戣揣" prop="info11"> + <el-input v-model="ruleForm.info11" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�" prop="info12"> + <el-input v-model="ruleForm.info12" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> + <el-form-item label="鍖呰闈㈢Н" prop="info13"> + <el-input v-model="ruleForm.info13" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�" maxlength="60" show-word-limit clearable /> + + </el-form-item> + + </el-col> + </el-row> + </el-form> + <template #footer> + <span class="dialog-footer"> + <el-button @click="cancel">鍙� 娑�</el-button> + <el-button type="primary" @click="submit" :disabled="disabled_btn">纭� 瀹�</el-button> + </span> + </template> + </el-dialog> + </div> +</template> +<style scoped> +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> +<script lang="ts" setup> + import { ref,onMounted } from "vue"; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { ElMessage } from "element-plus"; + import type { FormRules } from "element-plus"; + import { addValidateQiTaoOutput, updateValidateQiTaoOutput, detailValidateQiTaoOutput } from "/@/api/main/WmsOrder/validateQiTaoOutput"; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + + const getEnumAreaCodeData = ref<any>([]); + const getEnumUpiStatusData = ref<any>([]); + //鐖剁骇浼犻�掓潵鐨勫弬鏁� + var props = defineProps({ + title: { + type: String, + default: "", + }, + }); + //鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟 + const emit = defineEmits(["reloadTable"]); + const ruleFormRef = ref(); + const isShowDialog = ref(false); + const loading = ref(false); + const disabled_btn = ref(false); + const ruleForm = ref<any>({}); + //鑷娣诲姞鍏朵粬瑙勫垯 + const rules = ref<FormRules>({ + packageCode: [{required: true, message: '璇疯緭鍏ュ寘瑁呭彿锛�', trigger: 'blur',},], + planNo: [{required: true, message: '璇疯緭鍏ユ壒娆″彿锛�', trigger: 'blur',},], + orderId: [{required: true, message: '璇疯緭鍏ヨ鍗曞彿锛�', trigger: 'blur',},], + upiStatus: [{required: true, message: '璇烽�夋嫨鏉挎枡鐘舵�侊紒', trigger: 'change',},], + isDelete: [{required: true, message: '璇烽�夋嫨杞垹闄わ紒', trigger: 'change',},], + }); + + /* + * 鎵撳紑寮圭獥 + * @param flag 鏍囪锛�1鏂板 2缂栬緫 3鏌ョ湅锛� + * @param row 琛屾暟鎹� + */ + const openDialog = async (flag: number,row: any) => { + // ruleForm.value = JSON.parse(JSON.stringify(row)); + // 鏀圭敤detail鑾峰彇鏈�鏂版暟鎹潵缂栬緫 + let rowData = JSON.parse(JSON.stringify(row)); + if (rowData.id) + ruleForm.value = (await detailValidateQiTaoOutput(rowData.id)).data.result; + else { + ruleForm.value = rowData; + } + isShowDialog.value = true; + }; + + // 鍏抽棴寮圭獥 + const closeDialog = () => { + emit("reloadTable"); + isShowDialog.value = false; + }; + + // 鍙栨秷 + const cancel = () => { + isShowDialog.value = false; + }; + + // 鎻愪氦 + const submit = async () => { + disabled_btn.value = true; + ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => { + if (isValid) { + loading.value = true; + let values = ruleForm.value; + let ret={}; + let title='鏂板'; + if (ruleForm.value.id == undefined || ruleForm.value.id == null || ruleForm.value.id == "" || ruleForm.value.id == 0) { + ret = await addValidateQiTaoOutput(values); + } else { + title='缂栬緫'; + ret = await updateValidateQiTaoOutput(values); + } + loading.value = false; + disabled_btn.value = false; + if(ret.data.type=="success"){ + ElMessage.success(title+'鎴愬姛'); + closeDialog(); + } + } else { + disabled_btn.value = false; + ElMessage({ + message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜, + type: "error", + }); + } + }); + }; + + + + + + + + // 椤甸潰鍔犺浇鏃� + onMounted(async () => { + getEnumAreaCodeData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + //灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠� + defineExpose({ openDialog }); +</script> + + + + diff --git a/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/index.vue b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/index.vue new file mode 100644 index 0000000..2d60479 --- /dev/null +++ b/LA24030_LuLiPackageLine_Web/src/views/main/WmsOrder/validateQiTaoOutput/index.vue @@ -0,0 +1,367 @@ +锘�<template> + <div class="validateQiTaoOutput-container"> + <el-card shadow="hover" :body-style="{ paddingBottom: '0' }"> + <el-form :model="queryParamsValidateQiTaoOutput" ref="queryForm" labelWidth="90"> + <el-row> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10"> + <el-form-item label="鍏抽敭瀛�"> + <el-input v-model="queryParamsValidateQiTaoOutput.searchKey" clearable="" placeholder="鍖呰鍙�,鐢熶骇鍗曞彿,鎵规鍙�,璁㈠崟鍙�,閿�鍞悎鍚屽崟鍙�,绗嚑鍖�,缁忛攢搴楀悕绉�,浜у搧鍚嶇О,瀹㈡埛鍚嶇О,鑷彁or鍙戣揣,鍖呰閮ㄤ欢鎬绘暟閲�,鍖呰闈㈢Н,鍒涘缓浜�,淇敼浜�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鍖呰鍙�"> + <el-input v-model="queryParamsValidateQiTaoOutput.packageCode" clearable="" placeholder="璇疯緭鍏ュ寘瑁呭彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鐢熶骇鍗曞彿"> + <el-input v-model="queryParamsValidateQiTaoOutput.info5" clearable="" placeholder="璇疯緭鍏ョ敓浜у崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鎵规鍙�"> + <el-input v-model="queryParamsValidateQiTaoOutput.planNo" clearable="" placeholder="璇疯緭鍏ユ壒娆″彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="璁㈠崟鍙�"> + <el-input v-model="queryParamsValidateQiTaoOutput.orderId" clearable="" placeholder="璇疯緭鍏ヨ鍗曞彿"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鎵�鍦ㄥ尯鍩�"> + <el-select clearable="" v-model="queryParamsValidateQiTaoOutput.areaCode" placeholder="璇烽�夋嫨鎵�鍦ㄥ尯鍩�"> + <el-option v-for="(item,index) in getEnumAreaCodeData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鏉挎枡鐘舵��"> + <el-select clearable="" v-model="queryParamsValidateQiTaoOutput.upiStatus" placeholder="璇烽�夋嫨鏉挎枡鐘舵��"> + <el-option v-for="(item,index) in getEnumUpiStatusData_Index" :key="index" :value="item.value" :label="`${item.describe}`" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="绾哥闀�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info1" clearable="" placeholder="璇疯緭鍏ョ焊绠遍暱"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="绾哥瀹�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info2" clearable="" placeholder="璇疯緭鍏ョ焊绠卞"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="绾哥楂�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info3" clearable="" placeholder="璇疯緭鍏ョ焊绠遍珮"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="閿�鍞悎鍚屽崟鍙�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info4" clearable="" placeholder="璇疯緭鍏ラ攢鍞悎鍚屽崟鍙�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="绗嚑鍖�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info6" clearable="" placeholder="璇疯緭鍏ョ鍑犲寘"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="缁忛攢搴楀悕绉�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info7" clearable="" placeholder="璇疯緭鍏ョ粡閿�搴楀悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="浜у搧鍚嶇О"> + <el-input v-model="queryParamsValidateQiTaoOutput.info8" clearable="" placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="瀹㈡埛鍚嶇О"> + <el-input v-model="queryParamsValidateQiTaoOutput.info10" clearable="" placeholder="璇疯緭鍏ュ鎴峰悕绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鑷彁or鍙戣揣"> + <el-input v-model="queryParamsValidateQiTaoOutput.info11" clearable="" placeholder="璇疯緭鍏ヨ嚜鎻恛r鍙戣揣"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鍖呰閮ㄤ欢鎬绘暟閲�"> + <el-input v-model="queryParamsValidateQiTaoOutput.info12" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴儴浠舵�绘暟閲�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUIValidateQiTaoOutput"> + <el-form-item label="鍖呰闈㈢Н"> + <el-input v-model="queryParamsValidateQiTaoOutput.info13" clearable="" placeholder="璇疯緭鍏ュ寘瑁呴潰绉�"/> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" class="mb10"> + <el-form-item> + <el-button-group style="display: flex; align-items: center;"> + <el-button type="primary" icon="ele-Search" @click="handleQueryValidateQiTaoOutput" v-auth="'validateQiTaoOutput:page'" :disabled="disabled_btnValidateQiTaoOutput"> 鏌ヨ </el-button> + <el-button icon="ele-Refresh" @click="resetValidateQiTaoOutput"> 閲嶇疆 </el-button> + <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUIValidateQiTaoOutput" v-if="!showAdvanceQueryUIValidateQiTaoOutput" style="margin-left:5px;"> 楂樼骇鏌ヨ </el-button> + <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUIValidateQiTaoOutput" v-if="showAdvanceQueryUIValidateQiTaoOutput" style="margin-left:5px;"> 闅愯棌 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddValidateQiTaoOutput" v-auth="'validateQiTaoOutput:add'"> 鏂板 </el-button> + <el-button type="primary" style="margin-left:5px;" icon="ele-Download" @click="handleExportExcelValidateQiTaoOutput" v-auth="'validateQiTaoOutput:exportExcel'" > 瀵煎嚭 </el-button> + </el-button-group> + </el-form-item> + + </el-col> + </el-row> + </el-form> + </el-card> + <el-card class="full-table" shadow="hover" style="margin-top: 5px"> + <el-table + ref="tableRefValidateQiTaoOutput" + :data="tableDataValidateQiTaoOutput" + style="width: 100%" + v-loading="loadingValidateQiTaoOutput" + tooltip-effect="light" + row-key="id" + @sort-change="sortChangeValidateQiTaoOutput" + border=""> + <el-table-column type="index" label="搴忓彿" width="55" align="center"/> + <el-table-column prop="packageCode" label="鍖呰鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info5" label="鐢熶骇鍗曞彿" show-overflow-tooltip="" /> + <el-table-column prop="planNo" label="鎵规鍙�" show-overflow-tooltip="" /> + <el-table-column prop="orderId" label="璁㈠崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="areaCode" label="鎵�鍦ㄥ尯鍩�" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.areaCode, getEnumAreaCodeData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="upiStatus" label="鏉挎枡鐘舵��" show-overflow-tooltip="" > + <template #default="scope"> + <el-tag>{{ getEnumDesc(scope.row.upiStatus, getEnumUpiStatusData_Index)}}</el-tag> + </template> + </el-table-column> + <el-table-column prop="info1" label="绾哥闀�" show-overflow-tooltip="" /> + <el-table-column prop="info2" label="绾哥瀹�" show-overflow-tooltip="" /> + <el-table-column prop="info3" label="绾哥楂�" show-overflow-tooltip="" /> + <el-table-column prop="info4" label="閿�鍞悎鍚屽崟鍙�" show-overflow-tooltip="" /> + <el-table-column prop="info6" label="绗嚑鍖�" show-overflow-tooltip="" /> + <el-table-column prop="info7" label="缁忛攢搴楀悕绉�" show-overflow-tooltip="" /> + <el-table-column prop="info8" label="浜у搧鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info10" label="瀹㈡埛鍚嶇О" show-overflow-tooltip="" /> + <el-table-column prop="info11" label="鑷彁or鍙戣揣" show-overflow-tooltip="" /> + <el-table-column prop="info12" label="鍖呰閮ㄤ欢鎬绘暟閲�" show-overflow-tooltip="" /> + <el-table-column prop="info13" label="鍖呰闈㈢Н" show-overflow-tooltip="" /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="updateTime" label="淇敼鏃堕棿" width="130" :formatter="formatDate_T_Time" show-overflow-tooltip="" /> + <el-table-column prop="createUserName" label="鍒涘缓浜�" show-overflow-tooltip="" /> + <el-table-column prop="updateUserName" label="淇敼浜�" show-overflow-tooltip="" /> + <el-table-column label="鎿嶄綔" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('validateQiTaoOutput:update') || auth('validateQiTaoOutput:delete')"> + <template #default="scope"> + <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditValidateQiTaoOutput(scope.row)" v-auth="'validateQiTaoOutput:update'"> 缂栬緫 </el-button> + <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delValidateQiTaoOutput(scope.row)" v-auth="'validateQiTaoOutput:delete'"> 鍒犻櫎 </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination + v-model:currentPage="tableParamsValidateQiTaoOutput.page" + v-model:page-size="tableParamsValidateQiTaoOutput.pageSize" + :total="tableParamsValidateQiTaoOutput.total" + :page-sizes="[10, 20, 50, 100, 200, 500]" + small="" + background="" + @size-change="handleSizeChangeValidateQiTaoOutput" + @current-change="handleCurrentChangeValidateQiTaoOutput" + layout="total, sizes, prev, pager, next, jumper" + /> + <printDialogValidateQiTaoOutput + ref="printDialogRefValidateQiTaoOutput" + :title="printValidateQiTaoOutputTitle" + @reloadTable="handleQueryValidateQiTaoOutput" /> + <editDialogValidateQiTaoOutput + ref="editDialogRefValidateQiTaoOutput" + :title="editValidateQiTaoOutputTitle" + @reloadTable="handleQueryValidateQiTaoOutput" + /> + </el-card> + </div> +</template> + +<script lang="ts" setup="" name="validateQiTaoOutput"> + import { ref,onMounted } from "vue"; + import { ElMessageBox, ElMessage } from "element-plus"; + import { auth } from '/@/utils/authFunction'; + import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils'; + import { formatDate,formatDate_T_Date,formatDate_T_Time,defaultTimeRange } from '/@/utils/formatTime'; + import { exportPageExcel } from '/@/utils/exportPageExcel' //寮曞叆瀵煎嚭鏂规硶 + + + import printDialogValidateQiTaoOutput from '/@/views/system/print/component/hiprint/preview.vue' + import editDialogValidateQiTaoOutput from '/@/views/main/WmsOrder/validateQiTaoOutput/component/editDialog.vue' + import { pageValidateQiTaoOutput, deleteValidateQiTaoOutput,importExcelValidateQiTaoOutput,downloadExcelTemplateValidateQiTaoOutput } from '/@/api/main/WmsOrder/validateQiTaoOutput'; + import { getAPI } from '/@/utils/axios-utils'; + import { SysEnumApi } from '/@/api-services/api'; + import commonFunction from '/@/utils/commonFunction'; + + const getEnumAreaCodeData_Index = ref<any>([]); + const getEnumUpiStatusData_Index = ref<any>([]); + + const { getEnumDesc } = commonFunction(); + + /***************************************************[鍖呮暟鎹搷浣淽寮�濮�***************************************************/ + const showAdvanceQueryUIValidateQiTaoOutput = ref(false); + const tableRefValidateQiTaoOutput = ref(null); + const printDialogRefValidateQiTaoOutput = ref(); + const editDialogRefValidateQiTaoOutput = ref(); + const loadingValidateQiTaoOutput = ref(false); + const disabled_btnValidateQiTaoOutput = ref(false); + const tableDataValidateQiTaoOutput = ref<any>([]); + const queryParamsValidateQiTaoOutput = ref<any>({}); + const tableParamsValidateQiTaoOutput = ref({ + page: 1, + pageSize: 10, + total: 0, + }); + + const printValidateQiTaoOutputTitle = ref(""); + const editValidateQiTaoOutputTitle = ref(""); + + // 鏀瑰彉楂樼骇鏌ヨ鐨勬帶浠舵樉绀虹姸鎬� + const changeAdvanceQueryUIValidateQiTaoOutput = () => { + showAdvanceQueryUIValidateQiTaoOutput.value = !showAdvanceQueryUIValidateQiTaoOutput.value; + } + + // 鏌ヨ鍖呮暟鎹� + const handleQueryValidateQiTaoOutput = async () => { + loadingValidateQiTaoOutput.value = true; + disabled_btnValidateQiTaoOutput.value = true; + var res = await pageValidateQiTaoOutput(Object.assign(queryParamsValidateQiTaoOutput.value, tableParamsValidateQiTaoOutput.value)); + if(res.data.type=="success"){ + tableDataValidateQiTaoOutput.value = res.data.result?.items ?? []; + tableParamsValidateQiTaoOutput.value.total = res.data.result?.total; + } + loadingValidateQiTaoOutput.value = false; + disabled_btnValidateQiTaoOutput.value = false; + }; + + // 閲嶇疆鍖呮暟鎹煡璇� + const resetValidateQiTaoOutput = async () => { + queryParamsValidateQiTaoOutput.value = {} + }; + + // 鍖呮暟鎹垪鎺掑簭 + const sortChangeValidateQiTaoOutput = async (column: any) => { + queryParamsValidateQiTaoOutput.value.field = column.prop; + queryParamsValidateQiTaoOutput.value.order = column.order; + await handleQueryValidateQiTaoOutput(); + }; + + // 鎵撳紑鏂板鍖呮暟鎹〉闈� + const openAddValidateQiTaoOutput = () => { + editValidateQiTaoOutputTitle.value = '娣诲姞鍖呮暟鎹�'; + editDialogRefValidateQiTaoOutput.value.openDialog(1,{}); + }; + + // 鎵撳紑鎵撳嵃鍖呮暟鎹〉闈� + const openPrintValidateQiTaoOutput = async (row: any) => { + printValidateQiTaoOutputTitle.value = '鎵撳嵃鍖呮暟鎹�'; + } + + // 鎵撳紑缂栬緫鍖呮暟鎹〉闈� + const openEditValidateQiTaoOutput = (row: any) => { + editValidateQiTaoOutputTitle.value = '缂栬緫鍖呮暟鎹�'; + editDialogRefValidateQiTaoOutput.value.openDialog(2,row); + }; + + // 鍒犻櫎鍖呮暟鎹� + const delValidateQiTaoOutput = (row: any) => { + ElMessageBox.confirm(`纭畾瑕佸垹闄ゅ悧?`, "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(async () => { + loadingValidateQiTaoOutput.value = true; + var ret = await deleteValidateQiTaoOutput(row); + if(ret.data.type=="success"){ + ElMessage.success("鍒犻櫎鎴愬姛"); + } + loadingValidateQiTaoOutput.value = false; + handleQueryValidateQiTaoOutput(); + }) + .catch(() => {}); + }; + + // 鏀瑰彉鍖呮暟鎹〉闈㈠閲� + const handleSizeChangeValidateQiTaoOutput = (val: number) => { + tableParamsValidateQiTaoOutput.value.pageSize = val; + handleQueryValidateQiTaoOutput(); + }; + + // 鏀瑰彉鍖呮暟鎹〉鐮佸簭鍙� + const handleCurrentChangeValidateQiTaoOutput = (val: number) => { + tableParamsValidateQiTaoOutput.value.page = val; + handleQueryValidateQiTaoOutput(); + }; + +/***************************************************[鍖呮暟鎹搷浣淽缁撴潫***************************************************/ +/***************************************************[鍖呮暟鎹鍑篯寮�濮�***************************************************/ +//瀹氫箟褰撳墠椤甸潰鐨勬柟娉曠粍 +const functionMapValidateQiTaoOutput = { + getEnumAreaCodeData_Index, + getEnumUpiStatusData_Index, + formatDate_T_Date, + formatDate_T_Time +}; +//鐐瑰嚮瀵煎嚭鎸夐挳 +const handleExportExcelValidateQiTaoOutput = async (formData:Blob) => { + loadingValidateQiTaoOutput.value = true; + disabled_btnValidateQiTaoOutput.value = true; + var new_tableParamsValidateQiTaoOutput=JSON.parse(JSON.stringify(tableParamsValidateQiTaoOutput.value)); + new_tableParamsValidateQiTaoOutput.page = 1; + new_tableParamsValidateQiTaoOutput.pageSize = 100000; + var res = await pageValidateQiTaoOutput(Object.assign(queryParamsValidateQiTaoOutput.value, new_tableParamsValidateQiTaoOutput)); + if(res.data.type=="success"){ + exportExcelValidateQiTaoOutput(res.data.result?.items ?? []); + } + loadingValidateQiTaoOutput.value = false; + disabled_btnValidateQiTaoOutput.value = false; +}; +//瀵煎嚭 +const exportExcelValidateQiTaoOutput = async (exportDataList:Array) => { + exportPageExcel(exportDataList, tableRefValidateQiTaoOutput,"鍖呮暟鎹�",functionMapValidateQiTaoOutput); +}; +/***************************************************[鍖呮暟鎹鍑篯缁撴潫***************************************************/ + // 鍖呮暟鎹〉闈㈠姞杞芥椂 + onMounted(async () => { + getEnumAreaCodeData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('AreaCodeEnum')).data.result ?? []; + getEnumUpiStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('UpiStatusEnum')).data.result ?? []; + }); + + handleQueryValidateQiTaoOutput(); +</script> +<style scoped> +:deep(.el-input), +:deep(.el-select), +:deep(.el-input-number) { + width: 100%; +} +</style> + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json index 2a5e9c1..0430219 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Configuration/Database.json @@ -9,7 +9,9 @@ //"ConfigId": "1300000000001", // 榛樿搴撴爣璇�-绂佹淇敼 "DbType": "SqlServer", // MySql銆丼qlServer銆丼qlite銆丱racle銆丳ostgreSQL銆丏m銆並dbndp銆丱scar銆丮ySqlConnector銆丄ccess銆丱penGauss銆丵uestDB銆丠G銆丆lickHouse銆丟Base銆丱dbc銆丆ustom // "ConnectionString": "Server=.;Database=iWare_RawMaterialWarehouse_Wms;User=sa;Password=123456;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 - "ConnectionString": "Server=172.17.1.111;Database=LA24030_LuLiPackageLine;User=sa;Password=admin@123;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 + // "ConnectionString": "Server=172.17.1.111;Database=LA24030_LuLiPackageLine;User=sa;Password=admin@123;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 + "ConnectionString": "Server=.;Database=LA24030_LuLiPackageLine;User=sa;Password=123abc.com;MultipleActiveResultSets=True;", // 搴撹繛鎺ュ瓧绗︿覆 + //"SlaveConnectionConfigs": [ // 璇诲啓鍒嗙/涓讳粠 // { // "HitRate": 10, diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/MesPushPaperCut.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/MesPushPaperCut.cs index 4d2013b..e6a6b45 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/MesPushPaperCut.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/MesPushPaperCut.cs @@ -18,14 +18,7 @@ [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] public string PackageCode { get; set; } - [SugarColumn(ColumnName = "Info1", ColumnDescription = "绾哥闀�", Length = 50)] - public float? Info1 { get; set; } - - [SugarColumn(ColumnName = "Info2", ColumnDescription = "绾哥瀹�", Length = 50)] - public float? Info2 { get; set; } - - [SugarColumn(ColumnName = "Info3", ColumnDescription = "绾哥楂�", Length = 50)] - public float? Info3 { get; set; } + #endregion diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_Gather.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_Gather.cs index 8ca808c..3b7b94e 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_Gather.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_Gather.cs @@ -15,6 +15,16 @@ { [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } + + [Required] [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] public string PlanNo { get; set; } @@ -22,11 +32,7 @@ [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] public string OrderId { get; set; } - /// <summary> - /// 鐢熶骇鍗曞彿 - /// </summary> - [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] - public string? Info5 { get; set; } + #region wms鏂板瀛楁 銆怑ditby shaocx,2024-11-20銆� @@ -44,17 +50,6 @@ [Required] [SugarColumn(ColumnName = "UpiStatus", ColumnDescription = "鏉挎枡鐘舵��")] public UpiStatusEnum UpiStatus { get; set; } = UpiStatusEnum.鍒濆; - - #endregion - - - #region 鍖呰绾挎湁鍏� - - [Required] - [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] - public string PackageCode { get; set; } - - #endregion @@ -99,12 +94,6 @@ /// </summary> [SugarColumn(ColumnName = "Info10", ColumnDescription = "瀹㈡埛鍚嶇О", Length = 60)] public string? Info10 { get; set; } - - /// <summary> - /// 鍖呰缂栫爜 - /// </summary> - [SugarColumn(ColumnName = "Info9", ColumnDescription = "鍖呰缂栫爜", Length = 60)] - public string? Info9 { get; set; } /// <summary> /// 鑷彁or鍙戣揣 diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_LineQueue.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_LineQueue.cs index 6cbd4c4..e5a9dd2 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_LineQueue.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_LineQueue.cs @@ -13,6 +13,15 @@ [SugarTable("mes_package_linequeue", "鍖呬骇绾块槦鍒楁暟鎹�")] public class Mes_Package_LineQueue : EntityBase { + [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } [Required] [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] @@ -22,11 +31,7 @@ [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] public string OrderId { get; set; } - /// <summary> - /// 鐢熶骇鍗曞彿 - /// </summary> - [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] - public string? Info5 { get; set; } + #region wms鏂板瀛楁 銆怑ditby shaocx,2024-11-20銆� @@ -47,16 +52,6 @@ #endregion - - #region 鍖呰绾挎湁鍏� - - [Required] - [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] - public string PackageCode { get; set; } - - - - #endregion @@ -100,11 +95,6 @@ [SugarColumn(ColumnName = "Info10", ColumnDescription = "瀹㈡埛鍚嶇О", Length = 60)] public string? Info10 { get; set; } - /// <summary> - /// 鍖呰缂栫爜 - /// </summary> - [SugarColumn(ColumnName = "Info9", ColumnDescription = "鍖呰缂栫爜", Length = 60)] - public string? Info9 { get; set; } /// <summary> /// 鑷彁or鍙戣揣 diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_UnLine_Record.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_UnLine_Record.cs index 565346e..a643823 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_UnLine_Record.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Entity/WmsOrder/Mes_Package_UnLine_Record.cs @@ -13,6 +13,15 @@ [SugarTable("mes_package_unline_record", "鍖呬骇绾夸笅绾胯褰曟暟鎹�")] public class Mes_Package_UnLine_Record : EntityBase { + [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } [Required] [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] @@ -22,23 +31,7 @@ [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] public string OrderId { get; set; } - /// <summary> - /// 鐢熶骇鍗曞彿 - /// </summary> - [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] - public string? Info5 { get; set; } - - - #region 鍖呰绾挎湁鍏� - - [Required] - [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] - public string PackageCode { get; set; } - - - - #endregion - + [SugarColumn(ColumnName = "Info1", ColumnDescription = "绾哥闀�", Length = 50)] @@ -81,11 +74,6 @@ [SugarColumn(ColumnName = "Info10", ColumnDescription = "瀹㈡埛鍚嶇О", Length = 60)] public string? Info10 { get; set; } - /// <summary> - /// 鍖呰缂栫爜 - /// </summary> - [SugarColumn(ColumnName = "Info9", ColumnDescription = "鍖呰缂栫爜", Length = 60)] - public string? Info9 { get; set; } /// <summary> /// 鑷彁or鍙戣揣 diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordInput.cs new file mode 100644 index 0000000..aadc555 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordInput.cs @@ -0,0 +1,277 @@ +锘縰sing Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// <summary> + /// 鍖呬笅绾胯褰曞熀纭�杈撳叆鍙傛暟 + /// </summary> + public class Mes_Package_UnLine_RecordBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + public virtual string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public virtual string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public virtual string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public virtual string OrderId { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public virtual float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public virtual float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public virtual float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public virtual string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public virtual string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public virtual string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public virtual string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public virtual string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public virtual string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public virtual string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public virtual string Info13 { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public virtual string OpRemark { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public virtual DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public virtual DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public virtual long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public virtual string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public virtual long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public virtual string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public virtual bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呬笅绾胯褰曞垎椤垫煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class Mes_Package_UnLine_RecordInput : BasePageInput + { + /// <summary> + /// 鍏抽敭瀛楁煡璇� + /// </summary> + public string? SearchKey { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string? PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string? Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string? PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string? OrderId { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string? Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string? Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string? Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string? Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string? Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string? Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string? Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string? Info13 { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public string? OpRemark { get; set; } + + } + + /// <summary> + /// 鍖呬笅绾胯褰曞鍔犺緭鍏ュ弬鏁� + /// </summary> + public class AddMes_Package_UnLine_RecordInput : Mes_Package_UnLine_RecordBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + [Required(ErrorMessage = "鍖呰鍙蜂笉鑳戒负绌�")] + public override string PackageCode { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [Required(ErrorMessage = "鎵规鍙蜂笉鑳戒负绌�")] + public override string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + [Required(ErrorMessage = "璁㈠崟鍙蜂笉鑳戒负绌�")] + public override string OrderId { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + [Required(ErrorMessage = "杞垹闄や笉鑳戒负绌�")] + public override bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呬笅绾胯褰曞垹闄よ緭鍏ュ弬鏁� + /// </summary> + public class DeleteMes_Package_UnLine_RecordInput : BaseIdInput + { + } + + /// <summary> + /// 鍖呬笅绾胯褰曟洿鏂拌緭鍏ュ弬鏁� + /// </summary> + public class UpdateMes_Package_UnLine_RecordInput : AddMes_Package_UnLine_RecordInput + { + /// <summary> + /// 涓婚敭Id + /// </summary> + [Required(ErrorMessage = "涓婚敭Id涓嶈兘涓虹┖")] + public long Id { get; set; } + + } + + /// <summary> + /// 鍖呬笅绾胯褰曚富閿煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class QueryByIdMes_Package_UnLine_RecordInput : DeleteMes_Package_UnLine_RecordInput + { + + } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordOutput.cs new file mode 100644 index 0000000..0941b05 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Dto/Mes_Package_UnLine_RecordOutput.cs @@ -0,0 +1,130 @@ +锘縩amespace Admin.NET.Application; + +/// <summary> +/// 鍖呬笅绾胯褰曡緭鍑哄弬鏁� +/// </summary> +public class Mes_Package_UnLine_RecordOutput +{ + /// <summary> + /// 涓婚敭Id + /// </summary> + public long? Id { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string OrderId { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string Info13 { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + public string OpRemark { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public bool IsDelete { get; set; } + + } + + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Mes_Package_UnLine_RecordService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Mes_Package_UnLine_RecordService.cs new file mode 100644 index 0000000..e525bd6 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ReportCenter/Mes_Package_UnLine_Record/Mes_Package_UnLine_RecordService.cs @@ -0,0 +1,207 @@ +锘縰sing Admin.NET.Core.Service; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +using System.Data; +using System.Web; +using System.Text; +namespace Admin.NET.Application; +/// <summary> +/// 鍖呬笅绾胯褰曟湇鍔� +/// </summary> +[ApiDescriptionSettings(ApplicationConst.ReportCenterGroupName, Order = 100)] +public class Mes_Package_UnLine_RecordService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository<Mes_Package_UnLine_Record> _rep; + public Mes_Package_UnLine_RecordService(SqlSugarRepository<Mes_Package_UnLine_Record> rep) + { + _rep = rep; + } + + /// <summary> + /// 鍒嗛〉鏌ヨ鍖呬笅绾胯褰� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + [Description("Mes_Package_UnLine_Record/Page")] + public async Task<SqlSugarPagedList<Mes_Package_UnLine_RecordOutput>> Page(Mes_Package_UnLine_RecordInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").ToPagedListAsync(input.Page, input.PageSize); + } + + /// <summary> + /// 涓嶅垎椤垫煡璇㈠寘涓嬬嚎璁板綍 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + [Description("Mes_Package_UnLine_Record/List")] + public async Task<List<Mes_Package_UnLine_RecordOutput>> List([FromQuery] Mes_Package_UnLine_RecordInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").Select<Mes_Package_UnLine_RecordOutput>().ToListAsync(); + } + + /// <summary> + /// 澧炲姞鍖呬笅绾胯褰� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + [Description("Mes_Package_UnLine_Record/Add")] + public async Task<long> Add(AddMes_Package_UnLine_RecordInput input) + { + var entity = input.Adapt<Mes_Package_UnLine_Record>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity); + + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// <summary> + /// 鍒犻櫎鍖呬笅绾胯褰� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + [Description("Mes_Package_UnLine_Record/Delete")] + public async Task Delete(DeleteMes_Package_UnLine_RecordInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + //await _rep.FakeDeleteAsync(entity); //鍋囧垹闄� + await _rep.DeleteAsync(entity); //鐪熷垹闄� + } + + /// <summary> + /// 鏇存柊鍖呬笅绾胯褰� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + [Description("Mes_Package_UnLine_Record/Update")] + public async Task Update(UpdateMes_Package_UnLine_RecordInput input) + { + var entity = input.Adapt<Mes_Package_UnLine_Record>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity,true); + + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// <summary> + /// 鑾峰彇鍖呬笅绾胯褰� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + [Description("Mes_Package_UnLine_Record/Detail")] + public async Task<Mes_Package_UnLine_Record> Detail([FromQuery] QueryByIdMes_Package_UnLine_RecordInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + + + + + + #region 绉佹湁鏂规硶 + + /// <summary> + /// 鍏叡鏌ヨ鍖呬笅绾胯褰曟潯浠� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + private ISugarQueryable<Mes_Package_UnLine_RecordOutput> CommonPageFilter(Mes_Package_UnLine_RecordInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.PackageCode.Contains(input.SearchKey.Trim()) + || u.Info5.Contains(input.SearchKey.Trim()) + || u.PlanNo.Contains(input.SearchKey.Trim()) + || u.OrderId.Contains(input.SearchKey.Trim()) + || u.Info4.Contains(input.SearchKey.Trim()) + || u.Info6.Contains(input.SearchKey.Trim()) + || u.Info7.Contains(input.SearchKey.Trim()) + || u.Info8.Contains(input.SearchKey.Trim()) + || u.Info10.Contains(input.SearchKey.Trim()) + || u.Info11.Contains(input.SearchKey.Trim()) + || u.Info12.Contains(input.SearchKey.Trim()) + || u.Info13.Contains(input.SearchKey.Trim()) + || u.OpRemark.Contains(input.SearchKey.Trim()) + || u.CreateUserName.Contains(input.SearchKey.Trim()) + || u.UpdateUserName.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info5), u => u.Info5.Contains(input.Info5.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.PlanNo), u => u.PlanNo.Contains(input.PlanNo.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.OrderId), u => u.OrderId.Contains(input.OrderId.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info4), u => u.Info4.Contains(input.Info4.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info6), u => u.Info6.Contains(input.Info6.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info7), u => u.Info7.Contains(input.Info7.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info8), u => u.Info8.Contains(input.Info8.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info10), u => u.Info10.Contains(input.Info10.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info11), u => u.Info11.Contains(input.Info11.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info12), u => u.Info12.Contains(input.Info12.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info13), u => u.Info13.Contains(input.Info13.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.OpRemark), u => u.OpRemark.Contains(input.OpRemark.Trim())) + .Select<Mes_Package_UnLine_RecordOutput>(); + return query; + } + + /// <summary> + /// 閲嶅鎬ч獙璇� + /// </summary> + /// <param name="input">楠岃瘉瀵硅薄</param> + /// <param name="isEdit">鏄惁鏄紪杈�</param> + /// <returns></returns> + private async Task CheckExist( Mes_Package_UnLine_Record input,bool isEdit=false) + { + + + + //娌℃湁閰嶇疆缁勫悎鏍¢獙锛屼笉闇�瑕侀獙閲� + + + //娌℃湁閰嶇疆鍗曠嫭鏍¢獙锛屼笉闇�瑕侀獙閲� + } + + /// <summary> + /// 鏍规嵁缁勫悎鏍¢獙鍜屽崟鐙牎楠岄獙璇佹暟鎹槸鍚﹀凡瀛樺湪-瀵煎叆鏃堕獙璇� + /// </summary> + /// <param name="inputs"></param> + /// <returns></returns> + private async Task CheckExisitForImport(List<Mes_Package_UnLine_Record> inputs) + { + if (inputs?.Count <= 0) + { + throw Oops.Oh($"瀵煎叆鏁版嵁涓嶈兘涓虹┖"); + } + //鏍规嵁缁勫悎鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + + + + + + //鏍规嵁鍗曠嫭鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + } + #endregion + +} + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutInput.cs new file mode 100644 index 0000000..c9c0b57 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutInput.cs @@ -0,0 +1,177 @@ +锘縰sing Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// <summary> + /// 绾哥鏈哄鎺ュ熀纭�杈撳叆鍙傛暟 + /// </summary> + public class MesPushPaperCutBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + public virtual string PackageCode { get; set; } + + /// <summary> + /// 鎺ㄩ�佺姸鎬� + /// </summary> + public virtual Admin.NET.Core.Enum.PushStatusEnum PushStatus { get; set; } + + /// <summary> + /// 鎺ㄩ�佹椂闂� + /// </summary> + public virtual DateTime? PushTime { get; set; } + + /// <summary> + /// 鎺ㄩ�佹鏁� + /// </summary> + public virtual int PushNum { get; set; } + + /// <summary> + /// 鎺ュ彛杩斿洖鍙傛暟 + /// </summary> + public virtual string ApiMessage { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public virtual DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public virtual DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public virtual long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public virtual string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public virtual long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public virtual string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public virtual bool IsDelete { get; set; } + + } + + /// <summary> + /// 绾哥鏈哄鎺ュ垎椤垫煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class MesPushPaperCutInput : BasePageInput + { + /// <summary> + /// 鍏抽敭瀛楁煡璇� + /// </summary> + public string? SearchKey { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string? PackageCode { get; set; } + + /// <summary> + /// 鎺ㄩ�佺姸鎬� + /// </summary> + public Admin.NET.Core.Enum.PushStatusEnum? PushStatus { get; set; } + + /// <summary> + /// 鎺ㄩ�佹椂闂� + /// </summary> + public DateTime? PushTime { get; set; } + + /// <summary> + /// 鎺ㄩ�佹椂闂磋寖鍥� + /// </summary> + public List<DateTime?> PushTimeRange { get; set; } + /// <summary> + /// 鎺ㄩ�佹鏁� + /// </summary> + public int? PushNum { get; set; } + + /// <summary> + /// 鎺ュ彛杩斿洖鍙傛暟 + /// </summary> + public string? ApiMessage { get; set; } + + } + + /// <summary> + /// 绾哥鏈哄鎺ュ鍔犺緭鍏ュ弬鏁� + /// </summary> + public class AddMesPushPaperCutInput : MesPushPaperCutBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + [Required(ErrorMessage = "鍖呰鍙蜂笉鑳戒负绌�")] + public override string PackageCode { get; set; } + + /// <summary> + /// 鎺ㄩ�佺姸鎬� + /// </summary> + [Required(ErrorMessage = "鎺ㄩ�佺姸鎬佷笉鑳戒负绌�")] + public override Admin.NET.Core.Enum.PushStatusEnum PushStatus { get; set; } + + /// <summary> + /// 鎺ㄩ�佹鏁� + /// </summary> + [Required(ErrorMessage = "鎺ㄩ�佹鏁颁笉鑳戒负绌�")] + public override int PushNum { get; set; } + + /// <summary> + /// 鎺ュ彛杩斿洖鍙傛暟 + /// </summary> + [Required(ErrorMessage = "鎺ュ彛杩斿洖鍙傛暟涓嶈兘涓虹┖")] + public override string ApiMessage { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + [Required(ErrorMessage = "杞垹闄や笉鑳戒负绌�")] + public override bool IsDelete { get; set; } + + } + + /// <summary> + /// 绾哥鏈哄鎺ュ垹闄よ緭鍏ュ弬鏁� + /// </summary> + public class DeleteMesPushPaperCutInput : BaseIdInput + { + } + + /// <summary> + /// 绾哥鏈哄鎺ユ洿鏂拌緭鍏ュ弬鏁� + /// </summary> + public class UpdateMesPushPaperCutInput : AddMesPushPaperCutInput + { + /// <summary> + /// 涓婚敭Id + /// </summary> + [Required(ErrorMessage = "涓婚敭Id涓嶈兘涓虹┖")] + public long Id { get; set; } + + } + + /// <summary> + /// 绾哥鏈哄鎺ヤ富閿煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class QueryByIdMesPushPaperCutInput : DeleteMesPushPaperCutInput + { + + } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutOutput.cs new file mode 100644 index 0000000..989d7a0 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/Dto/MesPushPaperCutOutput.cs @@ -0,0 +1,75 @@ +锘縩amespace Admin.NET.Application; + +/// <summary> +/// 绾哥鏈哄鎺ヨ緭鍑哄弬鏁� +/// </summary> +public class MesPushPaperCutOutput +{ + /// <summary> + /// 涓婚敭Id + /// </summary> + public long? Id { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string PackageCode { get; set; } + + /// <summary> + /// 鎺ㄩ�佺姸鎬� + /// </summary> + public Admin.NET.Core.Enum.PushStatusEnum PushStatus { get; set; } + + /// <summary> + /// 鎺ㄩ�佹椂闂� + /// </summary> + public DateTime? PushTime { get; set; } + + /// <summary> + /// 鎺ㄩ�佹鏁� + /// </summary> + public int PushNum { get; set; } + + /// <summary> + /// 鎺ュ彛杩斿洖鍙傛暟 + /// </summary> + public string ApiMessage { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public bool IsDelete { get; set; } + + } + + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/MesPushPaperCutService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/MesPushPaperCutService.cs new file mode 100644 index 0000000..c82ba73 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/MesPushPaperCut/MesPushPaperCutService.cs @@ -0,0 +1,197 @@ +锘縰sing Admin.NET.Core.Service; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +using System.Data; +using System.Web; +using System.Text; +namespace Admin.NET.Application; +/// <summary> +/// 绾哥鏈哄鎺ユ湇鍔� +/// </summary> +[ApiDescriptionSettings(ApplicationConst.ThirdInterFaceGroupName, Order = 100)] +public class MesPushPaperCutService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository<MesPushPaperCut> _rep; + public MesPushPaperCutService(SqlSugarRepository<MesPushPaperCut> rep) + { + _rep = rep; + } + + /// <summary> + /// 鍒嗛〉鏌ヨ绾哥鏈哄鎺� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + [Description("MesPushPaperCut/Page")] + public async Task<SqlSugarPagedList<MesPushPaperCutOutput>> Page(MesPushPaperCutInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").ToPagedListAsync(input.Page, input.PageSize); + } + + /// <summary> + /// 涓嶅垎椤垫煡璇㈢焊绠辨満瀵规帴 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + [Description("MesPushPaperCut/List")] + public async Task<List<MesPushPaperCutOutput>> List([FromQuery] MesPushPaperCutInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").Select<MesPushPaperCutOutput>().ToListAsync(); + } + + /// <summary> + /// 澧炲姞绾哥鏈哄鎺� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + [Description("MesPushPaperCut/Add")] + public async Task<long> Add(AddMesPushPaperCutInput input) + { + var entity = input.Adapt<MesPushPaperCut>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity); + + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// <summary> + /// 鍒犻櫎绾哥鏈哄鎺� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + [Description("MesPushPaperCut/Delete")] + public async Task Delete(DeleteMesPushPaperCutInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + //await _rep.FakeDeleteAsync(entity); //鍋囧垹闄� + await _rep.DeleteAsync(entity); //鐪熷垹闄� + } + + /// <summary> + /// 鏇存柊绾哥鏈哄鎺� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + [Description("MesPushPaperCut/Update")] + public async Task Update(UpdateMesPushPaperCutInput input) + { + var entity = input.Adapt<MesPushPaperCut>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity,true); + + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// <summary> + /// 鑾峰彇绾哥鏈哄鎺� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + [Description("MesPushPaperCut/Detail")] + public async Task<MesPushPaperCut> Detail([FromQuery] QueryByIdMesPushPaperCutInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + + + + + + #region 绉佹湁鏂规硶 + + /// <summary> + /// 鍏叡鏌ヨ绾哥鏈哄鎺ユ潯浠� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + private ISugarQueryable<MesPushPaperCutOutput> CommonPageFilter(MesPushPaperCutInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.PackageCode.Contains(input.SearchKey.Trim()) + || u.ApiMessage.Contains(input.SearchKey.Trim()) + || u.CreateUserName.Contains(input.SearchKey.Trim()) + || u.UpdateUserName.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) + .WhereIF(input.PushStatus.HasValue, u => u.PushStatus == input.PushStatus) + .WhereIF(input.PushNum>0, u => u.PushNum == input.PushNum) + .WhereIF(!string.IsNullOrWhiteSpace(input.ApiMessage), u => u.ApiMessage.Contains(input.ApiMessage.Trim())) + .Select<MesPushPaperCutOutput>(); + if(input.PushTimeRange != null && input.PushTimeRange.Count >0) + { + DateTime? start= input.PushTimeRange[0].Value.AddDays(-1); + query = query.WhereIF(start.HasValue, u => u.PushTime > start); + if (input.PushTimeRange.Count >1 && input.PushTimeRange[1].HasValue) + { + var end = input.PushTimeRange[1].Value.AddDays(1); + query = query.Where(u => u.PushTime < end); + } + } + return query; + } + + /// <summary> + /// 閲嶅鎬ч獙璇� + /// </summary> + /// <param name="input">楠岃瘉瀵硅薄</param> + /// <param name="isEdit">鏄惁鏄紪杈�</param> + /// <returns></returns> + private async Task CheckExist( MesPushPaperCut input,bool isEdit=false) + { + + + + //娌℃湁閰嶇疆缁勫悎鏍¢獙锛屼笉闇�瑕侀獙閲� + + + //娌℃湁閰嶇疆鍗曠嫭鏍¢獙锛屼笉闇�瑕侀獙閲� + } + + /// <summary> + /// 鏍规嵁缁勫悎鏍¢獙鍜屽崟鐙牎楠岄獙璇佹暟鎹槸鍚﹀凡瀛樺湪-瀵煎叆鏃堕獙璇� + /// </summary> + /// <param name="inputs"></param> + /// <returns></returns> + private async Task CheckExisitForImport(List<MesPushPaperCut> inputs) + { + if (inputs?.Count <= 0) + { + throw Oops.Oh($"瀵煎叆鏁版嵁涓嶈兘涓虹┖"); + } + //鏍规嵁缁勫悎鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + + + + + + //鏍规嵁鍗曠嫭鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + } + #endregion + +} + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherInput.cs new file mode 100644 index 0000000..f7e553e --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherInput.cs @@ -0,0 +1,293 @@ +锘縰sing Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// <summary> + /// 鍖呮暟鎹熀纭�杈撳叆鍙傛暟 + /// </summary> + public class Mes_Package_GatherBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + public virtual string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public virtual string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public virtual string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public virtual string OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public virtual Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public virtual Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public virtual float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public virtual float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public virtual float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public virtual string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public virtual string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public virtual string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public virtual string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public virtual string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public virtual string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public virtual string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public virtual string Info13 { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public virtual DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public virtual DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public virtual long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public virtual string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public virtual long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public virtual string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public virtual bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呮暟鎹垎椤垫煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class Mes_Package_GatherInput : BasePageInput + { + /// <summary> + /// 鍏抽敭瀛楁煡璇� + /// </summary> + public string? SearchKey { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string? PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string? Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string? PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string? OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public Admin.NET.Application.UpiStatusEnum? UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string? Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string? Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string? Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string? Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string? Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string? Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string? Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string? Info13 { get; set; } + + } + + /// <summary> + /// 鍖呮暟鎹鍔犺緭鍏ュ弬鏁� + /// </summary> + public class AddMes_Package_GatherInput : Mes_Package_GatherBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + [Required(ErrorMessage = "鍖呰鍙蜂笉鑳戒负绌�")] + public override string PackageCode { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [Required(ErrorMessage = "鎵规鍙蜂笉鑳戒负绌�")] + public override string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + [Required(ErrorMessage = "璁㈠崟鍙蜂笉鑳戒负绌�")] + public override string OrderId { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + [Required(ErrorMessage = "鏉挎枡鐘舵�佷笉鑳戒负绌�")] + public override Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + [Required(ErrorMessage = "杞垹闄や笉鑳戒负绌�")] + public override bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呮暟鎹垹闄よ緭鍏ュ弬鏁� + /// </summary> + public class DeleteMes_Package_GatherInput : BaseIdInput + { + } + + /// <summary> + /// 鍖呮暟鎹洿鏂拌緭鍏ュ弬鏁� + /// </summary> + public class UpdateMes_Package_GatherInput : AddMes_Package_GatherInput + { + /// <summary> + /// 涓婚敭Id + /// </summary> + [Required(ErrorMessage = "涓婚敭Id涓嶈兘涓虹┖")] + public long Id { get; set; } + + } + + /// <summary> + /// 鍖呮暟鎹富閿煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class QueryByIdMes_Package_GatherInput : DeleteMes_Package_GatherInput + { + + } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherOutput.cs new file mode 100644 index 0000000..e986f0f --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Dto/Mes_Package_GatherOutput.cs @@ -0,0 +1,135 @@ +锘縩amespace Admin.NET.Application; + +/// <summary> +/// 鍖呮暟鎹緭鍑哄弬鏁� +/// </summary> +public class Mes_Package_GatherOutput +{ + /// <summary> + /// 涓婚敭Id + /// </summary> + public long? Id { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string Info13 { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public bool IsDelete { get; set; } + + } + + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs new file mode 100644 index 0000000..51e6650 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_Gather/Mes_Package_GatherService.cs @@ -0,0 +1,207 @@ +锘縰sing Admin.NET.Core.Service; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +using System.Data; +using System.Web; +using System.Text; +namespace Admin.NET.Application; +/// <summary> +/// 鍖呮暟鎹湇鍔� +/// </summary> +[ApiDescriptionSettings(ApplicationConst.WmsOrderGroupName, Order = 100)] +public class Mes_Package_GatherService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository<Mes_Package_Gather> _rep; + public Mes_Package_GatherService(SqlSugarRepository<Mes_Package_Gather> rep) + { + _rep = rep; + } + + /// <summary> + /// 鍒嗛〉鏌ヨ鍖呮暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + [Description("Mes_Package_Gather/Page")] + public async Task<SqlSugarPagedList<Mes_Package_GatherOutput>> Page(Mes_Package_GatherInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").ToPagedListAsync(input.Page, input.PageSize); + } + + /// <summary> + /// 涓嶅垎椤垫煡璇㈠寘鏁版嵁 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + [Description("Mes_Package_Gather/List")] + public async Task<List<Mes_Package_GatherOutput>> List([FromQuery] Mes_Package_GatherInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").Select<Mes_Package_GatherOutput>().ToListAsync(); + } + + /// <summary> + /// 澧炲姞鍖呮暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + [Description("Mes_Package_Gather/Add")] + public async Task<long> Add(AddMes_Package_GatherInput input) + { + var entity = input.Adapt<Mes_Package_Gather>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity); + + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// <summary> + /// 鍒犻櫎鍖呮暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + [Description("Mes_Package_Gather/Delete")] + public async Task Delete(DeleteMes_Package_GatherInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + //await _rep.FakeDeleteAsync(entity); //鍋囧垹闄� + await _rep.DeleteAsync(entity); //鐪熷垹闄� + } + + /// <summary> + /// 鏇存柊鍖呮暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + [Description("Mes_Package_Gather/Update")] + public async Task Update(UpdateMes_Package_GatherInput input) + { + var entity = input.Adapt<Mes_Package_Gather>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity,true); + + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// <summary> + /// 鑾峰彇鍖呮暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + [Description("Mes_Package_Gather/Detail")] + public async Task<Mes_Package_Gather> Detail([FromQuery] QueryByIdMes_Package_GatherInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + + + + + + #region 绉佹湁鏂规硶 + + /// <summary> + /// 鍏叡鏌ヨ鍖呮暟鎹潯浠� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + private ISugarQueryable<Mes_Package_GatherOutput> CommonPageFilter(Mes_Package_GatherInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.PackageCode.Contains(input.SearchKey.Trim()) + || u.Info5.Contains(input.SearchKey.Trim()) + || u.PlanNo.Contains(input.SearchKey.Trim()) + || u.OrderId.Contains(input.SearchKey.Trim()) + || u.Info4.Contains(input.SearchKey.Trim()) + || u.Info6.Contains(input.SearchKey.Trim()) + || u.Info7.Contains(input.SearchKey.Trim()) + || u.Info8.Contains(input.SearchKey.Trim()) + || u.Info10.Contains(input.SearchKey.Trim()) + || u.Info11.Contains(input.SearchKey.Trim()) + || u.Info12.Contains(input.SearchKey.Trim()) + || u.Info13.Contains(input.SearchKey.Trim()) + || u.CreateUserName.Contains(input.SearchKey.Trim()) + || u.UpdateUserName.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info5), u => u.Info5.Contains(input.Info5.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.PlanNo), u => u.PlanNo.Contains(input.PlanNo.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.OrderId), u => u.OrderId.Contains(input.OrderId.Trim())) + .WhereIF(input.AreaCode.HasValue, u => u.AreaCode == input.AreaCode) + .WhereIF(input.UpiStatus.HasValue, u => u.UpiStatus == input.UpiStatus) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info4), u => u.Info4.Contains(input.Info4.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info6), u => u.Info6.Contains(input.Info6.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info7), u => u.Info7.Contains(input.Info7.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info8), u => u.Info8.Contains(input.Info8.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info10), u => u.Info10.Contains(input.Info10.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info11), u => u.Info11.Contains(input.Info11.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info12), u => u.Info12.Contains(input.Info12.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info13), u => u.Info13.Contains(input.Info13.Trim())) + .Select<Mes_Package_GatherOutput>(); + return query; + } + + /// <summary> + /// 閲嶅鎬ч獙璇� + /// </summary> + /// <param name="input">楠岃瘉瀵硅薄</param> + /// <param name="isEdit">鏄惁鏄紪杈�</param> + /// <returns></returns> + private async Task CheckExist( Mes_Package_Gather input,bool isEdit=false) + { + + + + //娌℃湁閰嶇疆缁勫悎鏍¢獙锛屼笉闇�瑕侀獙閲� + + + //娌℃湁閰嶇疆鍗曠嫭鏍¢獙锛屼笉闇�瑕侀獙閲� + } + + /// <summary> + /// 鏍规嵁缁勫悎鏍¢獙鍜屽崟鐙牎楠岄獙璇佹暟鎹槸鍚﹀凡瀛樺湪-瀵煎叆鏃堕獙璇� + /// </summary> + /// <param name="inputs"></param> + /// <returns></returns> + private async Task CheckExisitForImport(List<Mes_Package_Gather> inputs) + { + if (inputs?.Count <= 0) + { + throw Oops.Oh($"瀵煎叆鏁版嵁涓嶈兘涓虹┖"); + } + //鏍规嵁缁勫悎鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + + + + + + //鏍规嵁鍗曠嫭鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + } + #endregion + +} + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueInput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueInput.cs new file mode 100644 index 0000000..2c16947 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueInput.cs @@ -0,0 +1,293 @@ +锘縰sing Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// <summary> + /// 鍖呴槦鍒楁暟鎹熀纭�杈撳叆鍙傛暟 + /// </summary> + public class Mes_Package_LineQueueBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + public virtual string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public virtual string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public virtual string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public virtual string OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public virtual Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public virtual Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public virtual float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public virtual float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public virtual float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public virtual string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public virtual string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public virtual string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public virtual string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public virtual string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public virtual string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public virtual string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public virtual string Info13 { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public virtual DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public virtual DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public virtual long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public virtual string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public virtual long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public virtual string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public virtual bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呴槦鍒楁暟鎹垎椤垫煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class Mes_Package_LineQueueInput : BasePageInput + { + /// <summary> + /// 鍏抽敭瀛楁煡璇� + /// </summary> + public string? SearchKey { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string? PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string? Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string? PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string? OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public Admin.NET.Application.UpiStatusEnum? UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string? Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string? Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string? Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string? Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string? Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string? Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string? Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string? Info13 { get; set; } + + } + + /// <summary> + /// 鍖呴槦鍒楁暟鎹鍔犺緭鍏ュ弬鏁� + /// </summary> + public class AddMes_Package_LineQueueInput : Mes_Package_LineQueueBaseInput + { + /// <summary> + /// 鍖呰鍙� + /// </summary> + [Required(ErrorMessage = "鍖呰鍙蜂笉鑳戒负绌�")] + public override string PackageCode { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + [Required(ErrorMessage = "鎵规鍙蜂笉鑳戒负绌�")] + public override string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + [Required(ErrorMessage = "璁㈠崟鍙蜂笉鑳戒负绌�")] + public override string OrderId { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + [Required(ErrorMessage = "鏉挎枡鐘舵�佷笉鑳戒负绌�")] + public override Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + [Required(ErrorMessage = "杞垹闄や笉鑳戒负绌�")] + public override bool IsDelete { get; set; } + + } + + /// <summary> + /// 鍖呴槦鍒楁暟鎹垹闄よ緭鍏ュ弬鏁� + /// </summary> + public class DeleteMes_Package_LineQueueInput : BaseIdInput + { + } + + /// <summary> + /// 鍖呴槦鍒楁暟鎹洿鏂拌緭鍏ュ弬鏁� + /// </summary> + public class UpdateMes_Package_LineQueueInput : AddMes_Package_LineQueueInput + { + /// <summary> + /// 涓婚敭Id + /// </summary> + [Required(ErrorMessage = "涓婚敭Id涓嶈兘涓虹┖")] + public long Id { get; set; } + + } + + /// <summary> + /// 鍖呴槦鍒楁暟鎹富閿煡璇㈣緭鍏ュ弬鏁� + /// </summary> + public class QueryByIdMes_Package_LineQueueInput : DeleteMes_Package_LineQueueInput + { + + } diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueOutput.cs new file mode 100644 index 0000000..9e931e9 --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Dto/Mes_Package_LineQueueOutput.cs @@ -0,0 +1,135 @@ +锘縩amespace Admin.NET.Application; + +/// <summary> +/// 鍖呴槦鍒楁暟鎹緭鍑哄弬鏁� +/// </summary> +public class Mes_Package_LineQueueOutput +{ + /// <summary> + /// 涓婚敭Id + /// </summary> + public long? Id { get; set; } + + /// <summary> + /// 鍖呰鍙� + /// </summary> + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + public string Info5 { get; set; } + + /// <summary> + /// 鎵规鍙� + /// </summary> + public string PlanNo { get; set; } + + /// <summary> + /// 璁㈠崟鍙� + /// </summary> + public string OrderId { get; set; } + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + public Admin.NET.Application.AreaCodeEnum? AreaCode { get; set; } + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + public Admin.NET.Application.UpiStatusEnum UpiStatus { get; set; } + + /// <summary> + /// 绾哥闀� + /// </summary> + public float? Info1 { get; set; } + + /// <summary> + /// 绾哥瀹� + /// </summary> + public float? Info2 { get; set; } + + /// <summary> + /// 绾哥楂� + /// </summary> + public float? Info3 { get; set; } + + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + public string Info4 { get; set; } + + /// <summary> + /// 绗嚑鍖� + /// </summary> + public string Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + public string Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + public string Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + public string Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + public string Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + public string Info13 { get; set; } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? UpdateTime { get; set; } + + /// <summary> + /// 鍒涘缓浜篒d + /// </summary> + public long? CreateUserId { get; set; } + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string CreateUserName { get; set; } + + /// <summary> + /// 淇敼浜篒d + /// </summary> + public long? UpdateUserId { get; set; } + + /// <summary> + /// 淇敼浜� + /// </summary> + public string UpdateUserName { get; set; } + + /// <summary> + /// 杞垹闄� + /// </summary> + public bool IsDelete { get; set; } + + } + + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Mes_Package_LineQueueService.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Mes_Package_LineQueueService.cs new file mode 100644 index 0000000..8101bfc --- /dev/null +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsOrder/Mes_Package_LineQueue/Mes_Package_LineQueueService.cs @@ -0,0 +1,207 @@ +锘縰sing Admin.NET.Core.Service; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +using System.Data; +using System.Web; +using System.Text; +namespace Admin.NET.Application; +/// <summary> +/// 鍖呴槦鍒楁暟鎹湇鍔� +/// </summary> +[ApiDescriptionSettings(ApplicationConst.WmsOrderGroupName, Order = 100)] +public class Mes_Package_LineQueueService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository<Mes_Package_LineQueue> _rep; + public Mes_Package_LineQueueService(SqlSugarRepository<Mes_Package_LineQueue> rep) + { + _rep = rep; + } + + /// <summary> + /// 鍒嗛〉鏌ヨ鍖呴槦鍒楁暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + [Description("Mes_Package_LineQueue/Page")] + public async Task<SqlSugarPagedList<Mes_Package_LineQueueOutput>> Page(Mes_Package_LineQueueInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").ToPagedListAsync(input.Page, input.PageSize); + } + + /// <summary> + /// 涓嶅垎椤垫煡璇㈠寘闃熷垪鏁版嵁 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + [Description("Mes_Package_LineQueue/List")] + public async Task<List<Mes_Package_LineQueueOutput>> List([FromQuery] Mes_Package_LineQueueInput input) + { + var query = CommonPageFilter(input); + return await query.OrderBuilder(input, "", "Id").Select<Mes_Package_LineQueueOutput>().ToListAsync(); + } + + /// <summary> + /// 澧炲姞鍖呴槦鍒楁暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + [Description("Mes_Package_LineQueue/Add")] + public async Task<long> Add(AddMes_Package_LineQueueInput input) + { + var entity = input.Adapt<Mes_Package_LineQueue>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity); + + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// <summary> + /// 鍒犻櫎鍖呴槦鍒楁暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + [Description("Mes_Package_LineQueue/Delete")] + public async Task Delete(DeleteMes_Package_LineQueueInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + //await _rep.FakeDeleteAsync(entity); //鍋囧垹闄� + await _rep.DeleteAsync(entity); //鐪熷垹闄� + } + + /// <summary> + /// 鏇存柊鍖呴槦鍒楁暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + [Description("Mes_Package_LineQueue/Update")] + public async Task Update(UpdateMes_Package_LineQueueInput input) + { + var entity = input.Adapt<Mes_Package_LineQueue>(); + + //閲嶅鎬ч獙璇� + await CheckExist(entity,true); + + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// <summary> + /// 鑾峰彇鍖呴槦鍒楁暟鎹� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + [Description("Mes_Package_LineQueue/Detail")] + public async Task<Mes_Package_LineQueue> Detail([FromQuery] QueryByIdMes_Package_LineQueueInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + + + + + + #region 绉佹湁鏂规硶 + + /// <summary> + /// 鍏叡鏌ヨ鍖呴槦鍒楁暟鎹潯浠� + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + private ISugarQueryable<Mes_Package_LineQueueOutput> CommonPageFilter(Mes_Package_LineQueueInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.PackageCode.Contains(input.SearchKey.Trim()) + || u.Info5.Contains(input.SearchKey.Trim()) + || u.PlanNo.Contains(input.SearchKey.Trim()) + || u.OrderId.Contains(input.SearchKey.Trim()) + || u.Info4.Contains(input.SearchKey.Trim()) + || u.Info6.Contains(input.SearchKey.Trim()) + || u.Info7.Contains(input.SearchKey.Trim()) + || u.Info8.Contains(input.SearchKey.Trim()) + || u.Info10.Contains(input.SearchKey.Trim()) + || u.Info11.Contains(input.SearchKey.Trim()) + || u.Info12.Contains(input.SearchKey.Trim()) + || u.Info13.Contains(input.SearchKey.Trim()) + || u.CreateUserName.Contains(input.SearchKey.Trim()) + || u.UpdateUserName.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageCode), u => u.PackageCode.Contains(input.PackageCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info5), u => u.Info5.Contains(input.Info5.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.PlanNo), u => u.PlanNo.Contains(input.PlanNo.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.OrderId), u => u.OrderId.Contains(input.OrderId.Trim())) + .WhereIF(input.AreaCode.HasValue, u => u.AreaCode == input.AreaCode) + .WhereIF(input.UpiStatus.HasValue, u => u.UpiStatus == input.UpiStatus) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info4), u => u.Info4.Contains(input.Info4.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info6), u => u.Info6.Contains(input.Info6.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info7), u => u.Info7.Contains(input.Info7.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info8), u => u.Info8.Contains(input.Info8.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info10), u => u.Info10.Contains(input.Info10.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info11), u => u.Info11.Contains(input.Info11.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info12), u => u.Info12.Contains(input.Info12.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Info13), u => u.Info13.Contains(input.Info13.Trim())) + .Select<Mes_Package_LineQueueOutput>(); + return query; + } + + /// <summary> + /// 閲嶅鎬ч獙璇� + /// </summary> + /// <param name="input">楠岃瘉瀵硅薄</param> + /// <param name="isEdit">鏄惁鏄紪杈�</param> + /// <returns></returns> + private async Task CheckExist( Mes_Package_LineQueue input,bool isEdit=false) + { + + + + //娌℃湁閰嶇疆缁勫悎鏍¢獙锛屼笉闇�瑕侀獙閲� + + + //娌℃湁閰嶇疆鍗曠嫭鏍¢獙锛屼笉闇�瑕侀獙閲� + } + + /// <summary> + /// 鏍规嵁缁勫悎鏍¢獙鍜屽崟鐙牎楠岄獙璇佹暟鎹槸鍚﹀凡瀛樺湪-瀵煎叆鏃堕獙璇� + /// </summary> + /// <param name="inputs"></param> + /// <returns></returns> + private async Task CheckExisitForImport(List<Mes_Package_LineQueue> inputs) + { + if (inputs?.Count <= 0) + { + throw Oops.Oh($"瀵煎叆鏁版嵁涓嶈兘涓虹┖"); + } + //鏍规嵁缁勫悎鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + + + + + + //鏍规嵁鍗曠嫭鏍¢獙楠岃瘉琛ㄦ牸涓腑鏄惁宸插瓨鍦ㄧ浉鍚屾暟鎹� + + + + } + #endregion + +} + diff --git a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs index 44d86d6..76a9bfc 100644 --- a/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs +++ b/LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs @@ -7,7 +7,7 @@ /// <summary> /// 鍒ゆ柇榻愬杈撳嚭鍙傛暟 /// </summary> -public class ValidateQiTaoOutput: Mes_Package_Gather +public class ValidateQiTaoOutput { /// <summary> @@ -15,6 +15,106 @@ /// </summary> public virtual string QiTaoReuslt { get; set; } + + [Required] + [SugarColumn(ColumnName = "PackageCode", ColumnDescription = "鍖呰鍙�", Length = 50)] + public string PackageCode { get; set; } + + /// <summary> + /// 鐢熶骇鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "Info5", ColumnDescription = "鐢熶骇鍗曞彿", Length = 60)] + public string? Info5 { get; set; } + + [Required] + [SugarColumn(ColumnName = "PlanNo", ColumnDescription = "鎵规鍙�", Length = 50)] + public string PlanNo { get; set; } + + [Required] + [SugarColumn(ColumnName = "OrderId", ColumnDescription = "璁㈠崟鍙�", Length = 50)] + public string OrderId { get; set; } + + + + + #region wms鏂板瀛楁 銆怑ditby shaocx,2024-11-20銆� + + /// <summary> + /// 鎵�鍦ㄥ尯鍩� + /// </summary> + [SugarColumn(ColumnName = "AreaCode", ColumnDescription = "鎵�鍦ㄥ尯鍩�")] + public AreaCodeEnum? AreaCode { get; set; } = AreaCodeEnum.鏃犲尯鍩�; + + + /// <summary> + /// 鏉挎枡鐘舵�� + /// </summary> + [Required] + [SugarColumn(ColumnName = "UpiStatus", ColumnDescription = "鏉挎枡鐘舵��")] + public UpiStatusEnum UpiStatus { get; set; } = UpiStatusEnum.鍒濆; + + #endregion + + + + [SugarColumn(ColumnName = "Info1", ColumnDescription = "绾哥闀�", Length = 50)] + public float? Info1 { get; set; } + + [SugarColumn(ColumnName = "Info2", ColumnDescription = "绾哥瀹�", Length = 50)] + public float? Info2 { get; set; } + + [SugarColumn(ColumnName = "Info3", ColumnDescription = "绾哥楂�", Length = 50)] + public float? Info3 { get; set; } + /// <summary> + /// 閿�鍞悎鍚屽崟鍙� + /// </summary> + [SugarColumn(ColumnName = "Info4", ColumnDescription = "閿�鍞悎鍚屽崟鍙�", Length = 60)] + public string? Info4 { get; set; } + + + + /// <summary> + /// 绗嚑鍖� + /// </summary> + [SugarColumn(ColumnName = "Info6", ColumnDescription = "绗嚑鍖�", Length = 60)] + public string? Info6 { get; set; } + + /// <summary> + /// 缁忛攢搴楀悕绉� + /// </summary> + [SugarColumn(ColumnName = "Info7", ColumnDescription = "缁忛攢搴楀悕绉�", Length = 60)] + public string? Info7 { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + [SugarColumn(ColumnName = "Info8", ColumnDescription = "浜у搧鍚嶇О", Length = 60)] + public string? Info8 { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + [SugarColumn(ColumnName = "Info10", ColumnDescription = "瀹㈡埛鍚嶇О", Length = 60)] + public string? Info10 { get; set; } + + /// <summary> + /// 鑷彁or鍙戣揣 + /// </summary> + [SugarColumn(ColumnName = "Info11", ColumnDescription = "鑷彁or鍙戣揣", Length = 60)] + public string? Info11 { get; set; } + + /// <summary> + /// 鍖呰閮ㄤ欢鎬绘暟閲� + /// </summary> + [SugarColumn(ColumnName = "Info12", ColumnDescription = "鍖呰閮ㄤ欢鎬绘暟閲�", Length = 60)] + public string? Info12 { get; set; } + + /// <summary> + /// 鍖呰闈㈢Н + /// </summary> + [SugarColumn(ColumnName = "Info13", ColumnDescription = "鍖呰闈㈢Н", Length = 60)] + public string? Info13 { get; set; } + } -- Gitblit v1.9.3