Browse Source

金杨-散件

Branch_PaiNaWeiS
徐莉 1 month ago
parent
commit
76107d8a53
  1. 20
      src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs
  2. 5
      src/vue/src/app/ics-san-j-bar-code/ics-san-j-bar-code.vue

20
src/aspnet-core/ICS.Application/Business/Service/条码管理/散件条码打印/IcsSanJBarCodeAppService.cs

@ -56,6 +56,7 @@ namespace ICS.Application.Business.Service
/// 出入库记录表的基础操作方法
/// </summary>
private readonly IIcsWareHouseLotInfoLogManager _icsWareHouseLotInfoLogManager;
private readonly IRepository<IcsLotOnWipItem, long> _lotOnWipItemRepository;//上料
public IcsSanJBarCodeAppService(
IRepository<IcsItemLot, long> Repository
, IExtensionAppService extensionService
@ -65,6 +66,7 @@ namespace ICS.Application.Business.Service
, ISystemAppService sysAppService
, IRepository<IcsWareHouseLotInfoLog, long> wareHouseLrepository
, IIcsWareHouseLotInfoLogManager icsWareHouseLotInfoLogManager
, IRepository<IcsLotOnWipItem, long> 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<string> ListBar = entitys.Select(a => a.BarCode).ToList();
var lotwips = _lotOnWipItemRepository.GetAllList(a => ListBar.Contains( a.MLotNo ));
if (lotwips != null && lotwips.Count > 0)
{
List<string> 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)
{

5
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) => {

Loading…
Cancel
Save