From a443f15b2736ad6faada0a486ffd240595c7bb87 Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 16 Aug 2023 11:29:33 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Dtos/PUB_SA_DTO.cs | 34 +++-- .../Entities/BQ/PUB_SA_SERVICE.cs | 36 ++++- .../Entities/BQ/BBAC_SE_DETAIL.cs | 6 + .../Entities/BQ/BBAC_SE_EDI.cs | 6 +- .../JisBBACEdiSeCompareExportService.cs | 134 +++++++++++++++--- .../SettleAccountJobAutoMapperProfile.cs | 11 ++ 6 files changed, 192 insertions(+), 35 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs index 2fcd600e..4f9c0726 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs @@ -82,7 +82,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [Display(Name = "Material")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "Material")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 生产号 @@ -126,7 +126,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [Display(Name = "零件号")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "零件号")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 生产号 @@ -170,7 +170,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [Display(Name = "零件号")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "零件号")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 生产号 @@ -205,7 +205,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos /// 结算日期 /// [Display(Name = "结算日期")] - [ImporterHeader(Name = "开票日期")] + [ImporterHeader(Name = "零件时间")] public DateTime SettleDate { set; get; } /// @@ -214,7 +214,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [Display(Name = "零件号")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "零件号")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 生产号 @@ -265,6 +265,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [ImporterHeader(Name = "发票号")] public string InvoiceNumber { set; get; } + /// + /// 开票日期 + /// + [Display(Name = "开票日期")] + [ImporterHeader(Name = "开票日期")] + public DateTime? MakeDate { set; get; } + /// /// 供应商代码 /// @@ -305,28 +312,28 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos /// [Display(Name = "价格")] [ImporterHeader(Name = "价格")] - public decimal Price { set; get; } + public decimal? Price { set; get; } /// /// 金额 /// [Display(Name = "金额")] [ImporterHeader(Name = "金额")] - public decimal Amount { set; get; } + public decimal? Amount { set; get; } /// /// 税额 /// [Display(Name = "税额")] [ImporterHeader(Name = "税额")] - public decimal Tallage { set; get; } + public decimal? Tallage { set; get; } /// /// 价税合计 /// [Display(Name = "价税合计")] [ImporterHeader(Name = "价税合计")] - public decimal Total { set; get; } + public decimal? Total { set; get; } /// /// 协议编号 @@ -368,7 +375,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [Display(Name = "Material")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "Material")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 生产号 @@ -392,6 +399,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos [ImporterHeader(Name = "External Delivery ID")] [Required(ErrorMessage = "{0}不能为空")] public string GroupNum { get; set; } + + /// + /// Supplier + /// + [Display(Name = "Supplier")] + [ImporterHeader(Name = "Supplier")] + public string Supplier { get; set; } } /// diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs index 9ff57b96..4d2d1422 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs @@ -112,9 +112,9 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase /// 导入 /// [HttpPost] - public async Task ImportByBusinessTypeAsync([FromForm] PUB_SAImportRequestDto pubSaImportRequestDto) + public async Task ImportAsync([FromForm] PUB_SAImportRequestDto pubSaImportRequestDto) { - IActionResult result = new JsonResult(null); + IActionResult result = new JsonResult(new { Code = 400 }); _version = pubSaImportRequestDto.Version; switch (pubSaImportRequestDto.BusinessType) { @@ -288,11 +288,16 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase var importPubSaDetails = ObjectMapper.Map, List>(importResults); #endregion + if (!importPubSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + #region 数据校验 var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false); if (checkList.Count > 0) { - string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); ; + string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName }); } #endregion @@ -318,6 +323,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase var importPubSaDetails = ObjectMapper.Map, List>(importResults); #endregion + if (!importPubSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + #region 数据校验 var checkList = await CheckAsync(importPubSaDetails); if (checkList.Count > 0) @@ -347,6 +357,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase var importPubSaDetails = ObjectMapper.Map, List>(importResults); #endregion + if (!importPubSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + #region 数据校验 var checkList = await CheckAsync(importPubSaDetails); if (checkList.Count > 0) @@ -370,6 +385,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase var importPubSaDetails = ObjectMapper.Map, List>(importResults); #endregion + if (!importPubSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + #region 数据校验 var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false); if (checkList.Count > 0) @@ -390,11 +410,17 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase #region 导入数据转换 ExportImporter _exportImporter = new ExportImporter(); var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService); + importResults = importResults.FindAll(t => t.Supplier == "15663496"); var importPubSaDetails = ObjectMapper.Map, List>(importResults); #endregion + if (!importPubSaDetails.Any()) + { + return new JsonResult(new { Code = 200, Message = "导入成功" }); + } + #region 数据校验 - var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false); + var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false); if (checkList.Count > 0) { string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); @@ -463,7 +489,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase //导入的零件号集合 var importPubSaLUs = pubSaDetails.Select(t => t.LU).Distinct(); - var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false); ; + var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false); var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct(); /* diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs index 3dc4d02e..2a875296 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs @@ -263,4 +263,10 @@ public class BBAC_SE_DETAIL:SE_BASE { } + + public BBAC_SE_DETAIL SetQty(decimal qty) + { + this.Qty = qty; + return this; + } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs index b152d1ad..4aa313eb 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs @@ -74,5 +74,9 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot Extend4 = extend4; } - + public BBAC_SE_EDI SetQty(decimal qty) + { + this.Qty = qty; + return this; + } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs index 1f281c73..2c158994 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; using System.Linq.Dynamic.Core; using Magicodes.ExporterAndImporter.Excel; using Microsoft.AspNetCore.SignalR; -using Microsoft.Extensions.DependencyInjection; using SettleAccount.Domain.BQ; using SettleAccount.Job.SignalR; using Shouldly; @@ -16,8 +14,6 @@ using Volo.Abp.DependencyInjection; using Volo.Abp.ObjectMapping; using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.SettleAccount; -using Win.Sfs.SettleAccount.Entities.BQ; -using Win.Sfs.SettleAccount.Enums; using Win.Sfs.SettleAccount.Reports; namespace SettleAccount.Job.Services.Report @@ -74,22 +70,122 @@ namespace SettleAccount.Job.Services.Report var seEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value; //有EDI的发运数据 - var haveEidSes = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == true); + // var haveEidSesGroup = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => + //t.First().SetQty(t.Sum(q => q.Qty))).ToList(); + var seDetailGroup = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU }).ToList(); + + // var haveEidSesGroup = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => + //t.FirstOrDefault()).ToList(); + + var dddd = new JisBBACEidSeCompareExport() + { + Category = default, + WmsBillNum = default, + CarModeCode = default, + LineStationcode = default, + SequenceNumber = default, + ParType = default, + MESConfigCode = default, + ShippingDate = default, + PN = default, + 序列号 = default, + PJIS日顺序号 = default, + MaterialNumber = default, + MaterialDes = default, + SEQty = default, + EdiQty = default, + DiffQty = default, + AssemblyDate = default, + MatchNumber = default, + InjectionCode = default, + MateType = default, + DiffDesc = default + }; + + var haveEidSesGroup = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => new JisBBACEidSeCompareExport() + { + Category = default, + WmsBillNum = default, + CarModeCode = default, + LineStationcode = default, + SequenceNumber = default, + ParType = default, + MESConfigCode = default, + ShippingDate = default, + PN = default, + 序列号 = default, + PJIS日顺序号 = default, + MaterialNumber = default, + MaterialDes = default, + SEQty = default, + EdiQty = default, + DiffQty = default, + AssemblyDate = default, + MatchNumber = default, + InjectionCode = default, + MateType = default, + DiffDesc = default + }).ToList(); + + var haveEidSesGroup22 = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == true)?.GroupBy(t => new { t.PN, t.LU }).Select(t => +t.FirstOrDefault()).ToList(); + //有发运的EDI数据 - //var haveSeEids = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == true && haveEidSes.Select(t => new { t.PN, t.LU }).Contains(new { t.PN, t.LU })); - var haveSeEids = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == true).Join(haveEidSes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (edi, se) => edi); - //无EDI的发运数据 - var notHaveEidSes = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == false); - //无发运的EDI数据 - var notHaveSeEids = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == false); - - //有EDI有发运 - var haveEdiHaveSes = haveEidSes.ToList(); - var dsdddd = haveSeEids.ToList(); - //有EDI无发运 - var haveEdiNotHaveSes = notHaveEidSes.ToList(); - //无EDI有发运 - var notHaveEdiHaveSes = notHaveSeEids.ToList(); + //var haveSeEidsGroup = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => t.First().SetQty(t.Sum(q => q.Qty))).ToList(); + //var haveSeEidsGroup = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => t.First()).ToList(); + + //var haveEidHaveSes = from se in haveEidSesGroup + // join edi in haveSeEidsGroup + // on new { se.PN, se.LU } equals new { edi.PN, edi.LU } + // select new JisBBACEidSeCompareExport() + // { + // Category = default, + // WmsBillNum = default, + // CarModeCode = default, + // LineStationcode = default, + // SequenceNumber = default, + // ParType = default, + // MESConfigCode = default, + // ShippingDate = default, + // PN = default, + // 序列号 = default, + // PJIS日顺序号 = default, + // MaterialNumber = default, + // MaterialDes = default, + // SEQty = default, + // EdiQty = default, + // DiffQty = default, + // AssemblyDate = default, + // MatchNumber = default, + // InjectionCode = default, + // MateType = default, + // DiffDesc = default + // }; + + ////无EDI的发运数据 + //var notHaveEidSes = _settleAccountDbContext.Set().Where(t => t.IsHaveEdiData == false); + ////无发运的EDI数据 + //var notHaveSeEids = _settleAccountDbContext.Set().Where(t => t.IsDeleted == false && t.IsHaveSeData == false); + + //var jisBBACEidSeCompareExports = new List(); + ////有EDI无发运 + //var haveEdiNotHaveSeCompareExports = haveEidHaveSes.ToList(); + ////无EDI有发运 + //var notHaveEdiHaveSeCompareExports = haveEidHaveSes.ToList(); + + //ExcelExporter excelExporter = new ExcelExporter(); + //excelExporter + // .Append(haveEdiNotHaveSeCompareExports, $"BBACEDI数据和发货对比") + // .SeparateBySheet() + // .Append(notHaveEdiHaveSeCompareExports, $"BBAC发货和EDI数据对比") + // .SeparateBySheet(); + + //var result = excelExporter.ExportAppendDataAsByteArray(); + //result.ShouldNotBeNull(); + ////_fileContainer.SaveAsync(filename, result.Result, true); + + //Notify(); + return id.ToString(); var ids = id.ToString(); diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs index f6349073..ac93419d 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs @@ -8,9 +8,20 @@ namespace SettleAccount.Job { public SettleAccountJobAutoMapperProfile() { + CreateMapBBACEdiSeCompare(); CreateMapPubSaSeCompare(); } + /// + /// BBAC EDI与发运对比 + /// + public void CreateMapBBACEdiSeCompare() + { + //CreateMap() + // .ForMember(x => x.ReplaceLU, y => y.MapFrom(y => y.ReplaceLU)); + + } + /// /// Pub结算与发运对比 /// From b85a671f70e565ef3867d6ef7dd6351da1cee536 Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 16 Aug 2023 13:55:01 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E7=BB=93=E7=AE=97=E6=9C=9F=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/Dtos/HBPO_SA_DTO.cs | 2 +- .../Entities/BQ/Dtos/PUB_SA_DTO.cs | 1091 ++++++++--------- .../Entities/BQ/PUB_SE_DETAIL_SERVICE.cs | 7 +- .../Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs | 8 +- .../Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs | 8 +- .../BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs | 8 +- 6 files changed, 561 insertions(+), 563 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs index bb31d34a..346f0f81 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs @@ -130,7 +130,7 @@ public class HBPO_SA_DETAIL_IMPORT_DTO [Display(Name = "PartNumber")] [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "PartNumber")] - public string PartCode { get; set; } + public string LU { get; set; } /// /// 数量 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs index 4f9c0726..9e421dba 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs @@ -1,554 +1,553 @@ -using Magicodes.ExporterAndImporter.Core; -using Microsoft.AspNetCore.Http; using System; using System.ComponentModel.DataAnnotations; +using Magicodes.ExporterAndImporter.Core; +using Microsoft.AspNetCore.Http; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Entities.Auditing; -namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos +namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos; + +/// +/// PUB结算 +/// +public class PUB_SA_DTO : EntityDto +{ + /// + /// 期间 + /// + [Display(Name = "期间")] + public string Version { get; set; } + + /// + /// 结算单据 + /// + [Display(Name = "结算单据")] + public string BillNum { get; set; } + + /// + /// 状态 + /// + [Display(Name = "状态")] + public string State { get; set; } +} + +/// +/// 查询 +/// +public class PUB_SARequestDto : RequestDto +{ + /// + /// 业务类别 + /// + public EnumBusinessType BusinessType { get; set; } +} + +/// +/// 导入请求 +/// +public class PUB_SAImportRequestDto +{ + /// + /// 文件 + /// + public IFormFileCollection Files { get; set; } + + /// + /// 业务类别 + /// + public EnumBusinessType BusinessType { get; set; } + + /// + /// 期间 + /// + [Display(Name = "期间")] + public int Version { get; set; } +} + +/// +/// 直供件BBAC导入 +/// +public class ZhiGongJianBBACImportDto +{ + /// + /// 结算日期 + /// + [Display(Name = "Pstng Date")] + [ImporterHeader(Name = "Pstng Date")] + public DateTime SettleDate { set; get; } + + /// + /// 客户零件号 + /// + [Display(Name = "Material")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "Material")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "External Delivery ID")] + [ImporterHeader(Name = "External Delivery ID")] + [Required(ErrorMessage = "{0}不能为空")] + public string PN { get; set; } + + /// + /// 数量 + /// + [Display(Name = "Quantity")] + [ImporterHeader(Name = "Quantity")] + public decimal Qty { get; set; } + + /// + /// 结算分组号 + /// + [Display(Name = "Delivery")] + [ImporterHeader(Name = "Delivery")] + [Required(ErrorMessage = "{0}不能为空")] + public string GroupNum { get; set; } +} + +/// +/// 直供件HBPO导入 +/// +public class ZhiGongJianHBPOImportDto +{ + /// + /// 结算日期 + /// + [Display(Name = "结算日期")] + [ImporterHeader(IsIgnore = true)] + public DateTime SettleDate { set; get; } + + /// + /// 客户零件号 + /// + [Display(Name = "零件号")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "零件号")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "订单编号")] + [ImporterHeader(Name = "订单编号")] + [Required(ErrorMessage = "{0}不能为空")] + public string PN { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [ImporterHeader(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 结算分组号 + /// + [Display(Name = "订单编号")] + [ImporterHeader(Name = "订单编号")] + [Required(ErrorMessage = "{0}不能为空")] + public string GroupNum { get; set; } +} + +/// +/// 买单件HBPO导入 +/// +public class MaiDanJianHBPOImportDto +{ + /// + /// 结算日期 + /// + [Display(Name = "买单日期")] + [ImporterHeader(Name = "买单日期")] + public DateTime SettleDate { set; get; } + + /// + /// 客户零件号 + /// + [Display(Name = "零件号")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "零件号")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "现产品生产号")] + [ImporterHeader(Name = "现产品生产号")] + [Required(ErrorMessage = "{0}不能为空")] + public string PN { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [ImporterHeader(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 结算分组号 + /// + [Display(Name = "五联单号")] + [ImporterHeader(Name = "五联单号")] + [Required(ErrorMessage = "{0}不能为空")] + public string GroupNum { get; set; } +} + +/// +/// 备件导入 +/// +public class BeiJianImportDto : BeiJianExtraImportDto +{ + /// + /// 结算日期 + /// + [Display(Name = "结算日期")] + [ImporterHeader(Name = "零件时间")] + public DateTime SettleDate { set; get; } + + /// + /// 客户零件号 + /// + [Display(Name = "零件号")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "零件号")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "交付识别号")] + [ImporterHeader(Name = "交付识别号")] + [Required(ErrorMessage = "{0}不能为空")] + public string PN { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [ImporterHeader(Name = "数量")] + public decimal Qty { get; set; } + + /// + /// 结算分组号 + /// + [Display(Name = "凭证号")] + [ImporterHeader(Name = "凭证号")] + [Required(ErrorMessage = "{0}不能为空")] + public string GroupNum { get; set; } + + ///// + ///// 备件扩展 + ///// + //[Display(Name = "备件扩展")] + //public BeiJianExtraImportDto beiJianExtraImportDto { get; set; } +} + +/// +/// 备件扩展 +/// +public class BeiJianExtraImportDto +{ + /// + /// 交货号 + /// + [Display(Name = "交货号")] + [ImporterHeader(Name = "交货号")] + public string DeliveryNumber { set; get; } + + /// + /// 发票号 + /// + [Display(Name = "发票号")] + [ImporterHeader(Name = "发票号")] + public string InvoiceNumber { set; get; } + + /// + /// 开票日期 + /// + [Display(Name = "开票日期")] + [ImporterHeader(Name = "开票日期")] + public DateTime? MakeDate { set; get; } + + /// + /// 供应商代码 + /// + [Display(Name = "供应商代码")] + [ImporterHeader(Name = "供应商代码")] + public string VendorCode { set; get; } + + /// + /// 供应商名称 + /// + [Display(Name = "供应商名称")] + [ImporterHeader(Name = "供应商名称")] + public string VendorName { set; get; } + + /// + /// 采购订单号 + /// + [Display(Name = "采购订单号")] + [ImporterHeader(Name = "采购订单号")] + public string PurchaseOrderNumber { set; get; } + + /// + /// 交付索引号 + /// + [Display(Name = "交付索引号")] + [ImporterHeader(Name = "交付索引号")] + public string DeliveryIndexNumber { set; get; } + + /// + /// 零件名称 + /// + [Display(Name = "零件名称")] + [ImporterHeader(Name = "零件名称")] + public string PartName { set; get; } + + /// + /// 价格 + /// + [Display(Name = "价格")] + [ImporterHeader(Name = "价格")] + public decimal? Price { set; get; } + + /// + /// 金额 + /// + [Display(Name = "金额")] + [ImporterHeader(Name = "金额")] + public decimal? Amount { set; get; } + + /// + /// 税额 + /// + [Display(Name = "税额")] + [ImporterHeader(Name = "税额")] + public decimal? Tallage { set; get; } + + /// + /// 价税合计 + /// + [Display(Name = "价税合计")] + [ImporterHeader(Name = "价税合计")] + public decimal? Total { set; get; } + + /// + /// 协议编号 + /// + [Display(Name = "协议编号")] + [ImporterHeader(Name = "协议编号")] + public string ProtocolNumber { set; get; } + + /// + /// 备注 + /// + [Display(Name = "备注")] + [ImporterHeader(Name = "备注")] + public string Remark { set; get; } + + /// + /// 商品组 + /// + [Display(Name = "商品组")] + [ImporterHeader(Name = "商品组")] + public string CommodityGroup { set; get; } +} + +/// +/// 印度件导入 +/// +public class YinDuJianImportDto +{ + /// + /// 结算日期 + /// + [Display(Name = "Delivery Date")] + [ImporterHeader(Name = "Delivery Date")] + public DateTime SettleDate { set; get; } + + /// + /// 客户零件号 + /// + [Display(Name = "Material")] + [Required(ErrorMessage = "{0}不能为空")] + [ImporterHeader(Name = "Material")] + public string LU { get; set; } + + /// + /// 生产号 + /// + [Display(Name = "External Delivery ID")] + [ImporterHeader(Name = "External Delivery ID")] + [Required(ErrorMessage = "{0}不能为空")] + public string PN { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [ImporterHeader(Name = "Item")] + public decimal Qty { get; set; } + + /// + /// 结算分组号 + /// + [Display(Name = "External Delivery ID")] + [ImporterHeader(Name = "External Delivery ID")] + [Required(ErrorMessage = "{0}不能为空")] + public string GroupNum { get; set; } + + /// + /// Supplier + /// + [Display(Name = "Supplier")] + [ImporterHeader(Name = "Supplier")] + public string Supplier { get; set; } +} + +/// +/// PUB结算明细 +/// +public class PUB_SA_DETAIL_DTO : AuditedAggregateRoot +{ + /// + /// 结算单 + /// + public string BillNum { set; get; } + /// + /// 期间 + /// + public int Version { set; get; } + /// + /// 结算分组号 + /// + public string GroupNum { get; set; } + /// + /// 生产号 + /// + public string PN { get; set; } + /// + /// 客户物料号 + /// + public string LU { get; set; } + /// + /// 数量 + /// + public string Qty { get; set; } + /// + /// 结算日期 + /// + public DateTime SettleDate { set; get; } + /// + /// 单价 + /// + public decimal Price { set; get; } + /// + /// 厂内物料号 + /// + public string PartCode { get; set; } +} + +/// +/// 结算明细导出请求 +/// +public class PUB_SA_DETAIL_EXPORT_REQUEST_DTO { /// - /// PUB结算 - /// - public class PUB_SA_DTO : EntityDto - { - /// - /// 期间 - /// - [Display(Name = "期间")] - public int Version { get; set; } - - /// - /// 结算单据 - /// - [Display(Name = "结算单据")] - public string BillNum { get; set; } - - /// - /// 状态 - /// - [Display(Name = "状态")] - public string State { get; set; } - } - - /// - /// 查询 - /// - public class PUB_SARequestDto : RequestDto - { - /// - /// 业务类别 - /// - public EnumBusinessType BusinessType { get; set; } - } - - /// - /// 导入请求 - /// - public class PUB_SAImportRequestDto - { - /// - /// 文件 - /// - public IFormFileCollection Files { get; set; } - - /// - /// 业务类别 - /// - public EnumBusinessType BusinessType { get; set; } - - /// - /// 期间 - /// - [Display(Name = "期间")] - public int Version { get; set; } - } - - /// - /// 直供件BBAC导入 - /// - public class ZhiGongJianBBACImportDto - { - /// - /// 结算日期 - /// - [Display(Name = "Pstng Date")] - [ImporterHeader(Name = "Pstng Date")] - public DateTime SettleDate { set; get; } - - /// - /// 客户零件号 - /// - [Display(Name = "Material")] - [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "Material")] - public string LU { get; set; } - - /// - /// 生产号 - /// - [Display(Name = "External Delivery ID")] - [ImporterHeader(Name = "External Delivery ID")] - [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } - - /// - /// 数量 - /// - [Display(Name = "Quantity")] - [ImporterHeader(Name = "Quantity")] - public decimal Qty { get; set; } - - /// - /// 结算分组号 - /// - [Display(Name = "Delivery")] - [ImporterHeader(Name = "Delivery")] - [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } - } - - /// - /// 直供件HBPO导入 - /// - public class ZhiGongJianHBPOImportDto - { - /// - /// 结算日期 - /// - [Display(Name = "结算日期")] - [ImporterHeader(IsIgnore = true)] - public DateTime SettleDate { set; get; } - - /// - /// 客户零件号 - /// - [Display(Name = "零件号")] - [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "零件号")] - public string LU { get; set; } - - /// - /// 生产号 - /// - [Display(Name = "订单编号")] - [ImporterHeader(Name = "订单编号")] - [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } - - /// - /// 数量 - /// - [Display(Name = "数量")] - [ImporterHeader(Name = "数量")] - public decimal Qty { get; set; } - - /// - /// 结算分组号 - /// - [Display(Name = "订单编号")] - [ImporterHeader(Name = "订单编号")] - [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } - } - - /// - /// 买单件HBPO导入 - /// - public class MaiDanJianHBPOImportDto - { - /// - /// 结算日期 - /// - [Display(Name = "买单日期")] - [ImporterHeader(Name = "买单日期")] - public DateTime SettleDate { set; get; } - - /// - /// 客户零件号 - /// - [Display(Name = "零件号")] - [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "零件号")] - public string LU { get; set; } - - /// - /// 生产号 - /// - [Display(Name = "现产品生产号")] - [ImporterHeader(Name = "现产品生产号")] - [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } - - /// - /// 数量 - /// - [Display(Name = "数量")] - [ImporterHeader(Name = "数量")] - public decimal Qty { get; set; } - - /// - /// 结算分组号 - /// - [Display(Name = "五联单号")] - [ImporterHeader(Name = "五联单号")] - [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } - } - - /// - /// 备件导入 - /// - public class BeiJianImportDto : BeiJianExtraImportDto - { - /// - /// 结算日期 - /// - [Display(Name = "结算日期")] - [ImporterHeader(Name = "零件时间")] - public DateTime SettleDate { set; get; } - - /// - /// 客户零件号 - /// - [Display(Name = "零件号")] - [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "零件号")] - public string LU { get; set; } - - /// - /// 生产号 - /// - [Display(Name = "交付识别号")] - [ImporterHeader(Name = "交付识别号")] - [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } - - /// - /// 数量 - /// - [Display(Name = "数量")] - [ImporterHeader(Name = "数量")] - public decimal Qty { get; set; } - - /// - /// 结算分组号 - /// - [Display(Name = "凭证号")] - [ImporterHeader(Name = "凭证号")] - [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } - - ///// - ///// 备件扩展 - ///// - //[Display(Name = "备件扩展")] - //public BeiJianExtraImportDto beiJianExtraImportDto { get; set; } - } - - /// - /// 备件扩展 - /// - public class BeiJianExtraImportDto - { - /// - /// 交货号 - /// - [Display(Name = "交货号")] - [ImporterHeader(Name = "交货号")] - public string DeliveryNumber { set; get; } - - /// - /// 发票号 - /// - [Display(Name = "发票号")] - [ImporterHeader(Name = "发票号")] - public string InvoiceNumber { set; get; } - - /// - /// 开票日期 - /// - [Display(Name = "开票日期")] - [ImporterHeader(Name = "开票日期")] - public DateTime? MakeDate { set; get; } - - /// - /// 供应商代码 - /// - [Display(Name = "供应商代码")] - [ImporterHeader(Name = "供应商代码")] - public string VendorCode { set; get; } - - /// - /// 供应商名称 - /// - [Display(Name = "供应商名称")] - [ImporterHeader(Name = "供应商名称")] - public string VendorName { set; get; } - - /// - /// 采购订单号 - /// - [Display(Name = "采购订单号")] - [ImporterHeader(Name = "采购订单号")] - public string PurchaseOrderNumber { set; get; } - - /// - /// 交付索引号 - /// - [Display(Name = "交付索引号")] - [ImporterHeader(Name = "交付索引号")] - public string DeliveryIndexNumber { set; get; } - - /// - /// 零件名称 - /// - [Display(Name = "零件名称")] - [ImporterHeader(Name = "零件名称")] - public string PartName { set; get; } - - /// - /// 价格 - /// - [Display(Name = "价格")] - [ImporterHeader(Name = "价格")] - public decimal? Price { set; get; } - - /// - /// 金额 - /// - [Display(Name = "金额")] - [ImporterHeader(Name = "金额")] - public decimal? Amount { set; get; } - - /// - /// 税额 - /// - [Display(Name = "税额")] - [ImporterHeader(Name = "税额")] - public decimal? Tallage { set; get; } - - /// - /// 价税合计 - /// - [Display(Name = "价税合计")] - [ImporterHeader(Name = "价税合计")] - public decimal? Total { set; get; } - - /// - /// 协议编号 - /// - [Display(Name = "协议编号")] - [ImporterHeader(Name = "协议编号")] - public string ProtocolNumber { set; get; } - - /// - /// 备注 - /// - [Display(Name = "备注")] - [ImporterHeader(Name = "备注")] - public string Remark { set; get; } - - /// - /// 商品组 - /// - [Display(Name = "商品组")] - [ImporterHeader(Name = "商品组")] - public string CommodityGroup { set; get; } - } - - /// - /// 印度件导入 - /// - public class YinDuJianImportDto - { - /// - /// 结算日期 - /// - [Display(Name = "Delivery Date")] - [ImporterHeader(Name = "Delivery Date")] - public DateTime SettleDate { set; get; } - - /// - /// 客户零件号 - /// - [Display(Name = "Material")] - [Required(ErrorMessage = "{0}不能为空")] - [ImporterHeader(Name = "Material")] - public string LU { get; set; } - - /// - /// 生产号 - /// - [Display(Name = "External Delivery ID")] - [ImporterHeader(Name = "External Delivery ID")] - [Required(ErrorMessage = "{0}不能为空")] - public string PN { get; set; } - - /// - /// 数量 - /// - [Display(Name = "数量")] - [ImporterHeader(Name = "Item")] - public decimal Qty { get; set; } - - /// - /// 结算分组号 - /// - [Display(Name = "External Delivery ID")] - [ImporterHeader(Name = "External Delivery ID")] - [Required(ErrorMessage = "{0}不能为空")] - public string GroupNum { get; set; } - - /// - /// Supplier - /// - [Display(Name = "Supplier")] - [ImporterHeader(Name = "Supplier")] - public string Supplier { get; set; } - } - - /// - /// PUB结算明细 - /// - public class PUB_SA_DETAIL_DTO : AuditedAggregateRoot - { - /// - /// 结算单 - /// - public string BillNum { set; get; } - /// - /// 期间 - /// - public int Version { set; get; } - /// - /// 结算分组号 - /// - public string GroupNum { get; set; } - /// - /// 生产号 - /// - public string PN { get; set; } - /// - /// 客户物料号 - /// - public string LU { get; set; } - /// - /// 数量 - /// - public string Qty { get; set; } - /// - /// 结算日期 - /// - public DateTime SettleDate { set; get; } - /// - /// 单价 - /// - public decimal Price { set; get; } - /// - /// 厂内物料号 - /// - public string PartCode { get; set; } - } - - /// - /// 结算明细导出请求 - /// - public class PUB_SA_DETAIL_EXPORT_REQUEST_DTO - { - /// - /// 结算单号 - /// - [Display(Name = "结算单号")] - [Required(ErrorMessage = "{0}不能为空")] - public string BillNum { set; get; } - } - - /// - /// 结算明细导出 - /// - public class PUB_SA_DETAIL_EXPORT_DTO - { - /// - /// 结算单号 - /// - [Display(Name = "结算单号")] - [ExporterHeader(DisplayName = "结算单号")] - public string BillNum { set; get; } - - /// - /// 结算日期(收货日期) - /// - [Display(Name = "结算日期(收货日期)")] - [ExporterHeader(DisplayName = "Pstng Date")] - public DateTime SettleDate { set; get; } - - /// - /// 零件号 - /// - [Display(Name = "零件号")] - [ExporterHeader(DisplayName = "Material")] - public string LU { get; set; } - - /// - /// 数量 - /// - [Display(Name = "数量")] - [ExporterHeader(DisplayName = "Quantity")] - public decimal Qty { get; set; } - - /// - /// 发货单号 - /// - [Display(Name = "发货单号")] - [ExporterHeader(DisplayName = "External Delivery ID")] - public string PN { get; set; } - - /// - /// 结算分组 - /// - [Display(Name = "结算分组")] - [ExporterHeader(DisplayName = "Delivery")] - public string GroupNum { get; set; } - } - - /// - /// Pub结算与发运对比请求 - /// - public class PubSaSeCompareRequestDto - { - /// - /// 期间 - /// - [Display(Name = "期间")] - [Required(ErrorMessage = "{0}不能为空")] - public string Version { get; set; } - - /// - /// 零件号 - /// - [Display(Name = "零件号")] - public string LU { get; set; } - - /// - /// 通用码 - /// - [Display(Name = "通用码")] - public string PN { get; set; } - - /// - /// 业务类型 - /// - public EnumBusinessType BusinessType { get; set; } - - /// - /// 发运开始时间 - /// - public DateTime? SeStartDateTime { get; set; } - - /// - /// 发运结束时间 - /// - public DateTime? SeEndDateTime { get; set; } - } + /// 结算单号 + /// + [Display(Name = "结算单号")] + [Required(ErrorMessage = "{0}不能为空")] + public string BillNum { set; get; } +} + +/// +/// 结算明细导出 +/// +public class PUB_SA_DETAIL_EXPORT_DTO +{ + /// + /// 结算单号 + /// + [Display(Name = "结算单号")] + [ExporterHeader(DisplayName = "结算单号")] + public string BillNum { set; get; } + + /// + /// 结算日期(收货日期) + /// + [Display(Name = "结算日期(收货日期)")] + [ExporterHeader(DisplayName = "Pstng Date")] + public DateTime SettleDate { set; get; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + [ExporterHeader(DisplayName = "Material")] + public string LU { get; set; } + + /// + /// 数量 + /// + [Display(Name = "数量")] + [ExporterHeader(DisplayName = "Quantity")] + public decimal Qty { get; set; } + + /// + /// 发货单号 + /// + [Display(Name = "发货单号")] + [ExporterHeader(DisplayName = "External Delivery ID")] + public string PN { get; set; } + + /// + /// 结算分组 + /// + [Display(Name = "结算分组")] + [ExporterHeader(DisplayName = "Delivery")] + public string GroupNum { get; set; } +} + +/// +/// Pub结算与发运对比请求 +/// +public class PubSaSeCompareRequestDto +{ + /// + /// 期间 + /// + [Display(Name = "期间")] + [Required(ErrorMessage = "{0}不能为空")] + public string Version { get; set; } + + /// + /// 零件号 + /// + [Display(Name = "零件号")] + public string LU { get; set; } + + /// + /// 通用码 + /// + [Display(Name = "通用码")] + public string PN { get; set; } + + /// + /// 业务类型 + /// + public EnumBusinessType BusinessType { get; set; } + + /// + /// 发运开始时间 + /// + public DateTime? SeStartDateTime { get; set; } + + /// + /// 发运结束时间 + /// + public DateTime? SeEndDateTime { get; set; } } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs index 530c4dca..77e6062e 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SE_DETAIL_SERVICE.cs @@ -74,11 +74,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ /// 获取列表 /// [HttpPost] - public async Task> GetListAsync(PUB_SE_DETAIL_RequestDto input) + public async Task> GetListAsync(RequestDto input) { - input.Filters.Add(new FilterCondition("BusinessType", input.BusinessType.ToString(), EnumFilterAction.Equal, EnumFilterLogic.And)); - var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true); - var totalCount = await _repository.GetCountByFilterAsync(input.Filters); + var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false); + var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false); var dtos = ObjectMapper.Map, List>(entities); return new PagedResultDto(totalCount, dtos); } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs index 452748c8..484e2b03 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs @@ -72,16 +72,16 @@ public class TM_BJBMPT_JIS_RECORD public string RefVinCode { get; set; } [DisplayName("单据类型")] - public EnumBillType BillType { get; set; } + public int? BillType { get; set; } [DisplayName("子单据类型")] - public EnumSubBillType SubBillType { get; set; } + public int? SubBillType { get; set; } [DisplayName("单据性质")] public string BillCharacter { get; set; } [DisplayName("事务类型")] - public EnumDelTransType TransType { get; set; } + public int? TransType { get; set; } [DisplayName("发运主类型")] public EnumDeliverBjBmpBillType DeliverBillType { get; set; } @@ -111,7 +111,7 @@ public class TM_BJBMPT_JIS_RECORD public string MatchNumber { get; set; } [DisplayName("业务类型")] - public EnumProTpe ProType { get; set; } + public int? ProType { get; set; } [DisplayName("发货条码")] public string DeliverCode { get; set; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs index 67c6d5db..86988df7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs @@ -69,13 +69,13 @@ public class TM_BJBMPT_JIT_RECORD public string ToLoc { get; set; } [DisplayName("单据类型")] - public EnumBillType BillType { get; set; } + public int? BillType { get; set; } [DisplayName("子单据类型")] - public EnumSubBillType SubBillType { get; set; } + public int? SubBillType { get; set; } [DisplayName("事务类型")] - public EnumDelTransType TransType { get; set; } + public int? TransType { get; set; } [DisplayName("发运主类型")] public EnumDeliverBjBmpBillType DeliverBillType { get; set; } @@ -93,7 +93,7 @@ public class TM_BJBMPT_JIT_RECORD public string Remark { get; set; } [DisplayName("业务类型")] - public EnumProTpe ProType { get; set; } + public int? ProType { get; set; } [DisplayName("JIS排序单号")] public string OrderNum { get; set; } diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs index aa936e84..2f4d5970 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs @@ -81,16 +81,16 @@ public class TM_BJBMPT_OTHER_RECORD public string Remark { get; set; } [DisplayName("单据类型")] - public EnumBillType BillType { get; set; } + public int? BillType { get; set; } [DisplayName("子单据类型")] - public EnumSubBillType SubBillType { get; set; } + public int? SubBillType { get; set; } [DisplayName("业务类型")] - public EnumProTpe ProType { get; set; } + public int? ProType { get; set; } [DisplayName("事务类型")] - public EnumDelTransType TransType { get; set; } + public int? TransType { get; set; } [DisplayName("发运主类型")] public EnumDeliverBjBmpBillType DeliverBillType { get; set; } From 0f9d0cfa9490618589ea239366e0d2023c46fe5f Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 16 Aug 2023 13:58:27 +0800 Subject: [PATCH 03/10] 1 --- .../Entities/BQ/Dtos/BBAC_SA_DTO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs index 9e0cfe70..b2c75d92 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs @@ -128,7 +128,7 @@ public class BBAC_SA_DETAIL_IMPORT_DTO /// 数量 /// [Display(Name = "结算数量")] - [ImporterHeader(IsIgnore = true)] + [ImporterHeader(Name = "GR Quantity")] public decimal Qty { get; set; } /// From 408b7cb4d2de4adb094b50a4f1b51ba112aa0d4f Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 16 Aug 2023 14:29:18 +0800 Subject: [PATCH 04/10] 1 --- .../Entities/BQ/Dtos/BBAC_SA_DTO.cs | 9 +++++++++ .../Entities/BQ/BBAC_SA_SERVICE.cs | 11 ++++++++++- .../Entities/BQ/Syncs/BBACSeSyncAppService.cs | 12 ++++++------ .../Entities/BQ/Syncs/HBPOSeSyncAppService.cs | 2 +- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs index b2c75d92..870438e5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs @@ -138,6 +138,15 @@ public class BBAC_SA_DETAIL_IMPORT_DTO [Required(ErrorMessage = "{0}不能为空")] [ImporterHeader(Name = "External Call Number")] public string PN { get; set; } + + /// + /// Movement Type + /// MovementType = 967,代表退货需要标记为负数 + /// MovementType = 966,代表正常发货标记正数 + /// + [Display(Name = "Movement Type")] + [ImporterHeader(Name = "Movement Type")] + public string MovementType { get; set; } } /// diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs index 22431613..e08ce6f5 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs @@ -114,7 +114,16 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase { #region 导入数据转换、数据校验 ExportImporter _exportImporter = new ExportImporter(); - var importDtos = await _exportImporter.UploadExcelImport(files, _excelImportService); + var importDtos = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false); + + importDtos.ForEach(importDto => + { + if (importDto.MovementType == "967") + { + importDto.Qty = -importDto.Qty; + } + }); + var importBBACSaDetails = ObjectMapper.Map, List>(importDtos); //数据校验 diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs index ae136f48..0f36c5da 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs @@ -67,17 +67,17 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService [ApiExplorerSettings(IgnoreApi = true)] public async Task Invoke(IServiceProvider serviceProvider) { - await this.Invoke(); + await this.Invoke().ConfigureAwait(false); } [HttpPost] public async Task Invoke() { - await SyncJitRecordAsync(); - await SyncJisRecordAsync(); + await SyncJitRecordAsync().ConfigureAwait(false); + await SyncJisRecordAsync().ConfigureAwait(false); if (_addMaterialRelationships.Any()) { - _addMaterialRelationships = _addMaterialRelationships.GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); + _addMaterialRelationships = _addMaterialRelationships.Where(t => !string.IsNullOrEmpty(t.ErpMaterialCode)).GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); await _materialRelationshipManager.AddNewMaterialRelationships(_addMaterialRelationships).ConfigureAwait(false); } } @@ -100,7 +100,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService } //WMS发运记录 - var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).ToList(); + var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).Take(10000).ToList(); var bbacSeDetails = ObjectMapper.Map, List>(wmsSeRecords); if (bbacSeDetails.Any()) @@ -150,7 +150,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService } //WMS发运数据 - var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).ToList(); + var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).Take(10000).ToList(); var bbacSeDetails = ObjectMapper.Map, List>(wmsRecords); if (bbacSeDetails.Any()) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs index 480740a9..70c6f1b7 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs @@ -88,7 +88,7 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService await SyncJisRecordAsync().ConfigureAwait(false); if (_addMaterialRelationships.Any()) { - _addMaterialRelationships = _addMaterialRelationships.GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); + _addMaterialRelationships = _addMaterialRelationships.Where(t => !string.IsNullOrEmpty(t.ErpMaterialCode)).GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList(); await _materialRelationshipManager.AddNewMaterialRelationships(_addMaterialRelationships).ConfigureAwait(false); } } From 763723bc825db6435863fb645797e25f546aea00 Mon Sep 17 00:00:00 2001 From: mahao Date: Wed, 16 Aug 2023 15:00:26 +0800 Subject: [PATCH 05/10] 1 --- .../Entities/BQ/Dtos/PUB_SA_DTO.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs index 9e421dba..e51b6c1c 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs @@ -29,6 +29,12 @@ public class PUB_SA_DTO : EntityDto /// [Display(Name = "状态")] public string State { get; set; } + + /// + /// 业务类型 + /// + [Display(Name = "业务类型")] + public BusinessType BusinessType { get; set; } } /// From 24e8df0e123cd68ed0e7c53c8afee49ce61a439a Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Wed, 16 Aug 2023 15:01:28 +0800 Subject: [PATCH 06/10] update --- .../wwwroot/components/list/index.js | 2 +- .../wwwroot/models/input/jie-suan.js | 2 +- .../wwwroot/models/settle/detail.js | 169 ++++ .../wwwroot/models/settle/unable.js | 105 +++ .../wwwroot/models/settle/usable.js | 105 +++ .../wwwroot/models/state.js | 18 +- .../tb_re-parts-relationship_service.js | 4 +- .../wwwroot/router/business.js | 876 +++--------------- .../wwwroot/views/_check.js | 17 +- .../wwwroot/views/settle/detail.js | 15 + .../wwwroot/views/settle/unable.js | 26 + .../wwwroot/views/settle/usable.js | 26 + 12 files changed, 592 insertions(+), 773 deletions(-) create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js index 3a5cf6e6..ff4ec78f 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js @@ -748,7 +748,7 @@ export default { const targetRoute = router.getRoutes().find((o) => o.path === nav); if (config.constructor === String) { const value = (await import(config)).default; - config = value.constructor === Function ? value() : value; + config = value.constructor === Function ? value(route.meta.businessType) : value; } subListQuery.value = { query: value, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js index 86c8550c..f55dec6d 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js @@ -21,7 +21,7 @@ const schema = { export default function (service, detailService) { const queryUrl = `settleaccount/${service}/get-list`; const deleteUrl = `settleaccount/${service}/delete-list`; - const importUrl = `settleaccount/pub_sa_service/import-by-business-type`; + const importUrl = `settleaccount/${service}/import`; const exportUrl = `settleaccount/${detailService}/export`; const queryMethod = "POST"; const deleteMethod = "POST"; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js new file mode 100644 index 00000000..23fa5277 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js @@ -0,0 +1,169 @@ +import version from "../version.js"; + +const schema = { + title: "通用代码", + type: "object", + properties: { + settleBillNum: { + title: "关联结算单号", + type: "string", + }, + billNum: { + title: "发票分组号", + type: "string", + }, + settleDate: { + title: "下线日期", + type: "string", + input: "datetime", + }, + invBillNum: { + title: "发票号", + type: "string", + }, + lu: { + title: "厂内零件号", + type: "string", + }, + partCode: { + title: "客户零件号", + type: "string", + }, + materialDesc: { + title: "零件描述", + type: "decimal", + }, + pn: { + title: "标识号", + type: "string", + }, + qty: { + title: "结算数量", + type: "number", + }, + price: { + title: "单价", + type: "number", + }, + groupNum: { + title: "结算分组号", + type: "decimal", + }, + site: { + title: "工厂地点", + type: "string", + }, + isReturn: { + title: "是否退货", + type: "boolean", + }, + isMaidan: { + title: "是否买单", + type: "boolean", + }, + contractDocID: { + title: "合同号", + type: "string", + }, + }, +}; + +export default function (businessType) { + let service; + if (businessType === "JisBBAC") { + service = "bbac_can_sa_service"; + } else if (businessType === "JisHBPO") { + service = "hbpo_can_sa_service"; + } else { + service = "pub_can_sa_service"; + } + if (businessType === "JisBBAC" || businessType === "JisHBPO") { + schema.properties.pn.title = "生产码"; + } + if (businessType !== "JisBBAC") { + delete schema.properties["isReturn"]; + delete schema.properties["isMaidan"]; + delete schema.properties["contractDocID"]; + } + if (businessType !== "JisHBPO") { + delete schema.properties["site"]; + } + const queryUrl = `settleaccount/${service}/detail-query`; + const queryMethod = "POST"; + + return { + query: { + url: queryUrl, + method: queryMethod, + hasFilter: true, + schema: { + title: "通用代码", + type: "object", + properties: { + filters: { + title: "筛选", + type: "array", + hidden: true, + items: { + type: "object", + properties: { + logic: { + type: "int", + }, + column: { + type: "string", + }, + action: { + type: "int", + }, + value: { + type: "string", + }, + }, + }, + default: [ + { + logic: "and", + action: "like", + column: "partCode", + value: null, + readOnly: true, + }, + { + logic: "and", + action: "like", + column: "pn", + value: null, + readOnly: true, + }, + { + logic: "and", + action: "like", + column: "groupNum", + value: null, + readOnly: true, + }, + ], + }, + skipCount: { + hidden: true, + default: 0, + }, + maxResultCount: { + hidden: true, + default: 10, + }, + sorting: { + hidden: true, + }, + }, + }, + }, + table: { + schema: schema, + }, + edit: { + schema: schema, + }, + }; +} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js new file mode 100644 index 00000000..7700a75c --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/unable.js @@ -0,0 +1,105 @@ +import version from "../version.js"; +import state from "../state.js"; + +const schema = { + title: "不可结算明细", + type: "object", + properties: { + version, + state, + billNum: { + title: "结算单据", + type: "string", + }, + settleBillNum: { + title: "关联结算单号", + type: "string", + }, + invGroupNum: { + title: "发票分组号", + type: "string", + oneToMany: "/settle/detail", + config: "/models/settle/detail.js", + }, + }, +}; + +export default function (service) { + const queryUrl = `settleaccount/${service}/detail-query`; + const exportUrl = `settleaccount/${service}/export`; + const addUrl = `settleaccount/${service}/generate-settlement-order`; + + const queryMethod = "POST"; + const exportMethod = "POST"; + const addMethod = "POST"; + + return { + query: { + url: queryUrl, + method: queryMethod, + hasFilter: true, + schema: { + title: "发票分组号", + type: "object", + properties: { + filters: { + title: "项目", + type: "array", + hidden: true, + items: { + type: "object", + properties: { + logic: { + type: "int", + }, + column: { + type: "string", + }, + action: { + type: "int", + }, + value: { + type: "string", + }, + }, + }, + default: [ + { + logic: "and", + column: "version", + action: "equal", + value: null, + readOnly: true, + }, + ], + }, + skipCount: { + hidden: true, + default: 0, + }, + maxResultCount: { + hidden: true, + default: 10, + }, + sorting: { + hidden: true, + }, + businessType: { + hidden: true, + default: 0, + }, + }, + }, + }, + table: { + schema: schema, + }, + edit: { + exportUrl, + addUrl, + exportMethod, + addMethod, + schema: schema, + }, + }; +} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js new file mode 100644 index 00000000..0f7999e2 --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/usable.js @@ -0,0 +1,105 @@ +import version from "../version.js"; +import state from "../state.js"; + +const schema = { + title: "可结算单", + type: "object", + properties: { + version, + state, + billNum: { + title: "结算单据", + type: "string", + oneToMany: "/settle/detail", + config: "/models/settle/detail.js", + }, + settleBillNum: { + title: "关联结算单号", + type: "string", + }, + invGroupNum: { + title: "发票分组号", + type: "string", + }, + }, +}; + +export default function (service) { + const queryUrl = `settleaccount/${service}/main-query`; + const exportUrl = `settleaccount/${service}/export`; + const addUrl = `settleaccount/${service}/generate-invoice`; + + const queryMethod = "POST"; + const exportMethod = "POST"; + const addMethod = "POST"; + + return { + query: { + url: queryUrl, + method: queryMethod, + hasFilter: true, + schema: { + title: "发票分组号", + type: "object", + properties: { + filters: { + title: "项目", + type: "array", + hidden: true, + items: { + type: "object", + properties: { + logic: { + type: "int", + }, + column: { + type: "string", + }, + action: { + type: "int", + }, + value: { + type: "string", + }, + }, + }, + default: [ + { + logic: "and", + column: "version", + action: "equal", + value: null, + readOnly: true, + }, + ], + }, + skipCount: { + hidden: true, + default: 0, + }, + maxResultCount: { + hidden: true, + default: 10, + }, + sorting: { + hidden: true, + }, + businessType: { + hidden: true, + default: 0, + }, + }, + }, + }, + table: { + schema: schema, + }, + edit: { + exportUrl, + addUrl, + exportMethod, + addMethod, + schema: schema, + }, + }; +} diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/state.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/state.js index f547707c..5f29a488 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/state.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/state.js @@ -1,14 +1,14 @@ const options = [ - { value: 0, label: "未结状态" }, - { value: 1, label: "已开票" }, - { value: 2, label: "商务已审核" }, - { value: 3, label: "财务已审核" }, - { value: 4, label: "客户已收票" }, - { value: 5, label: "已扣减" }, + { value: "0", label: "未结状态" }, + { value: "1", label: "已开票" }, + { value: "2", label: "商务已审核" }, + { value: "3", label: "财务已审核" }, + { value: "4", label: "客户已收票" }, + { value: "5", label: "已扣减" }, ]; const state = { title: "状态", type: "string", input: "select", options }; -const state2 = Object.assign(Object.assign({}, state), { options: options.filter((a) => a.value > 0) }); -const state3 = Object.assign(Object.assign({}, state), { options: options.filter((a) => a.value > 3) }); +const state2 = Object.assign(Object.assign({}, state), { options: options.filter((a) => parseInt(a.value) > 0) }); +const state3 = Object.assign(Object.assign({}, state), { options: options.filter((a) => parseInt(a.value) > 3) }); export default state; -export { state2, state3 }; \ No newline at end of file +export { state2, state3 }; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js index 59a15307..642b351e 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js @@ -1,4 +1,4 @@ -import options from "./business-type.js"; +import businessType from "./business-type.js"; const schema = { title: "客户替换件关系", @@ -12,7 +12,7 @@ const schema = { title: "替换厂内物料号", type: "string", }, - options, + businessType, }, }; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js index a4a2268f..cb228010 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js @@ -1,5 +1,6 @@ import createRoute, { createPage, createButton } from "./utils.js"; +// #region 数据输入 function createInputJieSuanShuju(path, business, client, title = "结算数据") { return { ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), @@ -35,7 +36,9 @@ function createInputEdiShuJu(path, business, client, title = "EDI数据") { ], }; } +// #endregion +// #region 数据比对 function createCompareFaYun(path, business, client, title = "EDI与发运对比") { return { ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), @@ -62,10 +65,80 @@ function createCompareJieSuan(path, business, client, title = "EDI、发运与 ], }; } +// #endregion + +// #region 结算开票 +function createUsableSettleList(path, business, client, title = "可结算单") { + return { + ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), + component: "/settle/usable", + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("add", "title=创建发票"), //行级按钮 + createButton("export", "title=导出&isTop=true&pattern=paged"), + ], + }; +} +function createUnableSettleList(path, business, client, title = "不可结算明细") { + return { + ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), + component: "/settle/unable", + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("compare", "title=生成可结算单&isTop=true"), + createButton("export", "title=导出&isTop=true&pattern=paged"), + ], + }; +} +function createCommerceCheck(path, business, client, title = "商务审批") { + return { + ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), + component: "/settle/commerce ", + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("compare", "title=商务审核通过&isTop=true"), + createButton("reject", "title=退回&isTop=true"), + createButton("export", "title=导出&isTop=true&pattern=paged"), + createButton("????", "title=客户已收票&isTop=true"), + ], + }; +} +function createVmiCheck(path, business, client, title = "寄售库库存扣减审批") { + return { + ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), + component: "/settle/finance", + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("compare", "title=扣减审核通过&isTop=true"), + createButton("export", "title=导出&pattern=paged"), + ], + }; +} + +// #endregion + +function createFinanceCheck(path, business, client, title = "财务审核") { + return { + ...createPage(path, `title=${title}&businessType=${business}&client=${client}`), + component: "/settle/finance", + children: [ + createButton("query", "title=查询&isTop=true"), + createButton("import", "title=导入开票文件&isTop=true"), + createButton("compare", "title=财务审核通过&isTop=true"), + createButton("export", "title=导出&pattern=paged"), + createButton("reject", "title=退回&isTop=true"), + createButton("reject", "title=同步到QAD&isTop=true"), + ], + }; +} export default [ { - ...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"), + ...createPage("input/jie-suan/detail", "title=数据输入结算数据明细&isHidden=true"), + children: [createButton("query", "title=查询&isTop=true")], + }, + { + ...createPage("settle/detail", "title=结算单结算数据明细&isHidden=true"), children: [createButton("query", "title=查询&isTop=true")], }, { @@ -74,124 +147,23 @@ export default [ { ...createRoute("input", "title=数据输入"), children: [ - createInputJieSuanShuju("bbac_sa_service", "JisBBAC", "bbac"), - createInputFaYunShuJu("bbac_se_detail_service", "JisBBAC", "bbac"), - createInputEdiShuJu("bbac_se_edi_service", "JisBBAC", "bbac"), + createInputJieSuanShuju("bbac_sa_service", "JisBBAC", "bbac", "JIS-BBAC 结算数据"), + createInputFaYunShuJu("bbac_se_detail_service", "JisBBAC", "bbac", "JIS-BBAC 发运数据"), + createInputEdiShuJu("bbac_se_edi_service", "JisBBAC", "bbac", "JIS-BBAC EDI数据"), ], }, { ...createRoute("contrast", "title=数据比对"), children: [ - createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac"), + createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac", "JIS-BBAC EDI与发运对比"), createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac"), ], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "bbac_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "invoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "bbac_can_sa_detail_service", - meta: { - type: "page", - title: "BBAC发票分组号明细", - icon: "file", - isHidden: true, - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - ], - }, - { - path: "bbac_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "settlement", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("bbac_can_sa_service", "JisBBAC", "bbac"), + createUnableSettleList("bbac_not_sa_service", "JisBBAC", "bbac"), { path: "bbac_ba_service", meta: { @@ -364,124 +336,23 @@ export default [ icon: "folder", }, children: [ - createInputJieSuanShuju("hbpo_sa_service", "JisHBPO", "hbpo"), - createInputFaYunShuJu("hbpo_se_detail_service", "JisHBPO", "hbpo"), - createInputEdiShuJu("hbpo_se_edi_service", "JisHBPO", "hbpo"), + createInputJieSuanShuju("hbpo_sa_service", "JisHBPO", "hbpo", "JIS-HBPO 结算数据"), + createInputFaYunShuJu("hbpo_se_detail_service", "JisHBPO", "hbpo", "JIS-HBPO 发运数据"), + createInputEdiShuJu("hbpo_se_edi_service", "JisHBPO", "hbpo", "JIS-HBPO EDI数据"), ], }, { ...createRoute("contrast", "title=数据比对"), children: [ - createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo"), + createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo", "JIS-HBPO EDI与发运对比"), createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo"), ], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "hbpo_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "hbpo_can_sa_detail_service", - meta: { - type: "page", - title: "HBPO可结算单明细", - icon: "file", - isHidden: true, - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - ], - }, - { - path: "hbpo_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "settlement", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("hbpo_can_sa_service", "JisHBPO", "hbpo"), + createUnableSettleList("hbpo_not_sa_service", "JisHBPO", "hbpo"), { path: "hbpo_ba_service", meta: { @@ -662,8 +533,13 @@ export default [ icon: "folder", }, children: [ - createInputJieSuanShuju("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"), - createInputFaYunShuJu("bbac_jit_pub_se_detail_service", "ZhiGongJianBBAC", "bbac"), + createInputJieSuanShuju("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac", "直供件-BBAC 结算数据"), + createInputFaYunShuJu( + "bbac_jit_pub_se_detail_service", + "ZhiGongJianBBAC", + "bbac", + "直供件-BBAC 发运数据" + ), ], }, { @@ -671,121 +547,10 @@ export default [ children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac")], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "bbac_jit_pub_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "bbac_jit_pub_can_sa_detail_service", - meta: { - type: "page", - title: "可结算单明细", - icon: "file", - isHidden: true, - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "bbac_jit_pub_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateSettlementOrder", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("bbac_jit_pub_can_sa_service", "ZhiGongJianBBAC", "bbac"), + createUnableSettleList("bbac_jit_pub_not_sa_service", "ZhiGongJianBBAC", "bbac"), { path: "bbac_jit_pub_ba_service", meta: { @@ -958,130 +723,24 @@ export default [ icon: "folder", }, children: [ - createInputJieSuanShuju("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"), - createInputFaYunShuJu("hbpo_jit_pub_se_detail_service", "ZhiGongJianHBPO", "hbpo"), + createInputJieSuanShuju("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo", "直供件-HBPO 结算数据"), + createInputFaYunShuJu( + "hbpo_jit_pub_se_detail_service", + "ZhiGongJianHBPO", + "hbpo", + "直供件-HBPO 发运数据" + ), ], }, - { - ...createRoute("contrast", "title=数据比对"), - children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo")], - }, - { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, - children: [ - { - path: "hbpo_jit_pub_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "hbpo_jit_pub_can_sa_detail_service", - meta: { - type: "page", - title: "可结算单明细", - icon: "file", - isHidden: true, - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "hbpo_jit_pub_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateSettlementOrder", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + { + ...createRoute("contrast", "title=数据比对"), + children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo")], + }, + { + ...createRoute("settlement", "title=结算开票"), + children: [ + createUsableSettleList("hbpo_jit_pub_can_sa_service", "ZhiGongJianBBAC", "hbpo"), + createUnableSettleList("hbpo_jit_pub_not_sa_service", "ZhiGongJianBBAC", "hbpo"), { path: "hbpo_jit_pub_ba_service", meta: { @@ -1264,8 +923,8 @@ export default [ icon: "file", }, children: [ - createInputJieSuanShuju("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"), - createInputFaYunShuJu("bbac_md_pub_se_detail_service", "MaiDanJianBBAC", "bbac"), + createInputJieSuanShuju("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac", "买单件-BBAC 结算数据"), + createInputFaYunShuJu("bbac_md_pub_se_detail_service", "MaiDanJianBBAC", "bbac", "买单件-BBAC 发运数据"), ], }, { @@ -1290,8 +949,8 @@ export default [ icon: "file", }, children: [ - createInputJieSuanShuju("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"), - createInputFaYunShuJu("hbpo_md_pub_se_detail_service", "MaiDanJianHBPO", "hbpo"), + createInputJieSuanShuju("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 结算数据"), + createInputFaYunShuJu("hbpo_md_pub_se_detail_service", "MaiDanJianHBPO", "hbpo", "买单件-HBPO 发运数据"), ], }, { @@ -1299,121 +958,10 @@ export default [ children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo")], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "hbpo_md_pub_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "hbpo_md_pub_can_sa_detail_service", - meta: { - type: "page", - title: "可结算单明细", - icon: "file", - isHidden: true, - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "hbpo_md_pub_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateSettlementOrder", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("hbpo_md_pub_can_sa_service", "MaiDanJianHBPO", "hbpo"), + createUnableSettleList("hbpo_md_pub_not_sa_service", "MaiDanJianHBPO", "hbpo"), { path: "hbpo_md_pub_ba_service", meta: { @@ -1588,8 +1136,8 @@ export default [ icon: "folder", }, children: [ - createInputJieSuanShuju("bj_pub_sa_service", "BeiJian", "bbac"), - createInputFaYunShuJu("bj_pub_se_detail_service", "BeiJian", "bbac"), + createInputJieSuanShuju("bj_pub_sa_service", "BeiJian", "bbac", "备件-BBAC 结算数据"), + createInputFaYunShuJu("bj_pub_se_detail_service", "BeiJian", "bbac", "备件-BBAC 发运数据"), ], }, { @@ -1597,91 +1145,10 @@ export default [ children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac")], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "bj_pub_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "bj_pub_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "bj_generateSettlementOrder", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("bj_pub_can_sa_service", "BeiJian", "bbac"), + createUnableSettleList("bj_pub_not_sa_service", "BeiJian", "bbac"), { path: "bj_pub_ba_service", meta: { @@ -1854,8 +1321,8 @@ export default [ icon: "folder", }, children: [ - createInputJieSuanShuju("in_pub_sa_service", "YinDuJian", "bbac"), - createInputFaYunShuJu("in_pub_se_detail_service", "YinDuJian", "bbac"), + createInputJieSuanShuju("in_pub_sa_service", "YinDuJian", "bbac", "印度件-BBAC 结算数据"), + createInputFaYunShuJu("in_pub_se_detail_service", "YinDuJian", "bbac", "印度件-BBAC 发运数据"), ], }, { @@ -1863,91 +1330,10 @@ export default [ children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac")], }, { - path: "settlement", - meta: { - type: "group", - title: "结算开票", - icon: "folder", - }, + ...createRoute("settlement", "title=结算开票"), children: [ - { - path: "in_pub_can_sa_service", - meta: { - type: "page", - title: "可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateInvoice", - meta: { - type: "button", - title: "生成发票数据", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, - { - path: "in_pub_not_sa_service", - meta: { - type: "page", - title: "不可结算单", - icon: "file", - }, - children: [ - { - path: "query", - meta: { - type: "button", - title: "查询", - icon: "file", - isTop: true, - }, - }, - { - path: "export", - meta: { - type: "button", - title: "导出", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - { - path: "generateSettlementOrder", - meta: { - type: "button", - title: "生成可结算单", - icon: "file", - isTop: true, - pattern: "paged", - }, - }, - ], - }, + createUsableSettleList("in_pub_can_sa_service", "YinDuJian", "bbac"), + createUnableSettleList("in_pub_not_sa_service", "YinDuJian", "bbac"), { path: "in_pub_ba_service", meta: { diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js index 25463e64..a0813229 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js @@ -20,12 +20,12 @@ export default { - + - + @@ -187,10 +187,6 @@ export default { }); // const columns1 = [ - { - dataKey: "version", - title: "期间", - }, { dataKey: "invbillNum", title: "发票号", @@ -209,11 +205,6 @@ export default { }, ]; const columns2 = [ - { - key: "version", - dataKey: "version", - title: "期间", - }, { dataKey: "invbillNum", title: "发票号", @@ -244,10 +235,6 @@ export default { }, ]; const columns3 = [ - { - dataKey: "version", - title: "期间", - }, { dataKey: "invGroupNum", title: "发票分组号", diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js new file mode 100644 index 00000000..8e8ef40d --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/detail.js @@ -0,0 +1,15 @@ +import AppList from "../../components/list/index.js"; +import html from "html"; +import useConfig from "../../models/settle/detail.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + config = useConfig("pub_can_sa_service"); + const onCommand = async (item, rows) => { + console.log(item.path, item, rows); + }; + return { config, onCommand }; + }, +}; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js new file mode 100644 index 00000000..720089ca --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js @@ -0,0 +1,26 @@ +import AppList from "../../components/list/index.js"; +import html from "html"; +import { useRoute } from "vue-router"; +import useConfig from "../../models/settle/unable.js"; +import request from "../../request/index.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const route = useRoute(); + const businessType = route.meta.businessType; + let config = null; + if (businessType === "JisBBAC") { + config = useConfig("bbac_not_sa_service"); + } else if (businessType === "JisHBPO") { + config = useConfig("hbpo_not_sa_service"); + } else { + config = useConfig("pub_not_sa_service"); + } + const onCommand = async (item, rows) => { + console.log(item.path, item, rows); + }; + return { config, onCommand }; + }, +}; diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js new file mode 100644 index 00000000..2d8e983e --- /dev/null +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js @@ -0,0 +1,26 @@ +import AppList from "../../components/list/index.js"; +import html from "html"; +import { useRoute } from "vue-router"; +import useConfig from "../../models/settle/usable.js"; +import request from "../../request/index.js"; + +export default { + components: { AppList }, + template: html``, + setup() { + const route = useRoute(); + const businessType = route.meta.businessType; + let config = null; + if (businessType === "JisBBAC") { + config = useConfig("bbac_can_sa_service"); + } else if (businessType === "JisHBPO") { + config = useConfig("hbpo_can_sa_service"); + } else { + config = useConfig("pub_can_sa_service"); + } + const onCommand = async (item, rows) => { + console.log(item.path, item, rows); + }; + return { config, onCommand }; + }, +}; From 85f0efb58808a4ede24988e2d27c019cc032b5af Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Wed, 16 Aug 2023 15:17:23 +0800 Subject: [PATCH 07/10] update --- .../wwwroot/.prettierrc.json | 2 +- .../wwwroot/components/form/form-input.js | 40 +++--------- .../wwwroot/components/form/index.js | 9 +-- .../wwwroot/components/list/index.js | 62 +++---------------- .../wwwroot/components/table/index.js | 8 +-- .../wwwroot/router/business.js | 47 ++++---------- 6 files changed, 33 insertions(+), 135 deletions(-) diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json index 328d820c..a0ce0761 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/.prettierrc.json @@ -1,5 +1,5 @@ { - "printWidth": 120, + "printWidth": 180, "tabWidth": 2, "useTabs": false, "semi": true, diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js index 3c5b9547..95673dc6 100644 --- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js +++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js @@ -14,18 +14,13 @@ export default { - + -