From 76107d8a5368ea2c02bfa2c78583db87edbc9aba Mon Sep 17 00:00:00 2001 From: xuli Date: Tue, 13 Aug 2024 14:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E6=9D=A8-=E6=95=A3=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IcsSanJBarCodeAppService.cs | 20 ++++++++++++++++++- .../ics-san-j-bar-code/ics-san-j-bar-code.vue | 5 ++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs b/src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs index ab599b28..cfc3ce41 100644 --- a/src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs +++ b/src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs @@ -56,6 +56,7 @@ namespace ICS.Application.Business.Service /// 出入库记录表的基础操作方法 /// private readonly IIcsWareHouseLotInfoLogManager _icsWareHouseLotInfoLogManager; + private readonly IRepository _lotOnWipItemRepository;//上料 public IcsSanJBarCodeAppService( IRepository Repository , IExtensionAppService extensionService @@ -65,6 +66,7 @@ namespace ICS.Application.Business.Service , ISystemAppService sysAppService , IRepository wareHouseLrepository , IIcsWareHouseLotInfoLogManager icsWareHouseLotInfoLogManager + , IRepository lotOnWipItemRepository ) { _repository = Repository; @@ -75,6 +77,7 @@ namespace ICS.Application.Business.Service _sysAppService = sysAppService; _wareHouseLrepository = wareHouseLrepository; _icsWareHouseLotInfoLogManager = icsWareHouseLotInfoLogManager; + _lotOnWipItemRepository = lotOnWipItemRepository; } @@ -711,8 +714,13 @@ namespace ICS.Application.Business.Service if (entity == null) { throw new UserFriendlyException(L("NoExistsCurrentCode", input.Id)); + } + + var lotwips = _lotOnWipItemRepository.GetAllList(a => a.MLotNo == entity.BarCode); + if (lotwips != null && lotwips.Count > 0) + { + throw new UserFriendlyException("当前条码:"+ entity.BarCode + "已上过料,不能删除发料"); } - var log = _wareHouseLrepository.GetAllList(a => a.LotNo == entity.BarCode && a.BusinessCode == "散料发料"); if (log != null && log.Count() > 0) @@ -734,7 +742,17 @@ namespace ICS.Application.Business.Service { throw new UserFriendlyException(L("NoExistsCurrentCode", string.Join(",", input.ToArray()))); } + List ListBar = entitys.Select(a => a.BarCode).ToList(); + + + var lotwips = _lotOnWipItemRepository.GetAllList(a => ListBar.Contains( a.MLotNo )); + if (lotwips != null && lotwips.Count > 0) + { + List ListBar_SL = lotwips.Select(a => a.MLotNo).ToList(); + throw new UserFriendlyException("以下条码已上过料,不能删除发料:" + string.Join(",", ListBar_SL.ToArray())); + } + var log = _wareHouseLrepository.GetAllList(a => ListBar.Contains(a.LotNo) && a.BusinessCode == "散料发料"); if (log != null && log.Count > 0) { diff --git a/src/vue/src/app/ics-san-j-bar-code/ics-san-j-bar-code.vue b/src/vue/src/app/ics-san-j-bar-code/ics-san-j-bar-code.vue index 5cd558fb..ac2ca8b8 100644 --- a/src/vue/src/app/ics-san-j-bar-code/ics-san-j-bar-code.vue +++ b/src/vue/src/app/ics-san-j-bar-code/ics-san-j-bar-code.vue @@ -245,6 +245,9 @@ import luruIcsSanJBarCode from './create-or-edit-ics-san-j-bar-code/luru-ics-san case EVENT_BTN_ENUM.Enter: this.BulkLuRu(); break; + case EVENT_BTN_ENUM.PRINT: + this.printModal(); + break; default: break; } @@ -312,7 +315,7 @@ import luruIcsSanJBarCode from './create-or-edit-ics-san-j-bar-code/luru-ics-san if (arr.length < 1) { return this.notify.warn(this.l('PleaseSelectAtLeastOneItem')); } - var printPara = arr.map(q => q.id).join(','); + var printPara = arr.map(q => q.barCode).join('\',\''); this.modalHelper .create(PrintTemplateSelect, { printParas: printPara }) .subscribe((res) => {