diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs index b97de870..1b2eb0be 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs @@ -1,4 +1,5 @@ -using System; +using Magicodes.ExporterAndImporter.Core; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -13,59 +14,69 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// /// 期间 /// - public string Period { set; get; } + // public string Period { set; get; } /// /// 年份 /// + [ImporterHeader(Name = "年份")] public string SettleYear { set; get; } /// /// 年份 /// - public virtual string Year { set; get; } + //public virtual string Year { set; get; } /// /// KENEN号 /// + [ImporterHeader(Name = "KENN号")] public virtual string KENNCode { set; get; } /// /// 底盘号 /// + [ImporterHeader(Name = "底盘号")] public virtual string ChassisNumber { set; get; } /// /// 车型 /// + [ImporterHeader(Name = "车型")] public virtual string Model { set; get; } /// /// CP5A日期 /// + [ImporterHeader(Name = "CP5A日期")] public virtual DateTime CP5A { set; get; } /// /// CP7 /// - public virtual DateTime CP7 { set; get; } + [ImporterHeader(Name = "CP7日期")] + public virtual DateTime? CP7 { set; get; } /// /// 零件号 /// + [ImporterHeader(Name = "零件号",FixAllSpace =true)] public virtual string MaterialCode { get; set; } /// /// 数量 /// + [ImporterHeader(Name = "数量")] public virtual decimal Qty { get; set; } /// /// 结算标识 /// - + [ImporterHeader(Name = "结算标识")] public virtual string SettlementID { get; set; } /// /// 结算供应商 /// + [ImporterHeader(Name = "结算供应商")] public virtual string SettlementSupplier { get; set; } /// /// 未结算原因 /// + [ImporterHeader(Name = "未结算原因")] public string UnsettledReason { get; set; } } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs index f2a94aa1..f3a36da0 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs @@ -101,13 +101,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts [Route("ExcelImport")] [DisableRequestSizeLimit] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory) + public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, + string year, string period, string version, string customerCode, string factory) { List customConditionList = new List(); customConditionList.Add(new CustomCondition() { Name = "Version", Value = version }); customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode }); - customConditionList.Add(new CustomCondition() { Name = "Factory", Value = customerCode }); + customConditionList.Add(new CustomCondition() { Name = "Year", Value = year }); + customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory }); var _taskid = await _service.ImportEnqueueAsync(files, "大众FIS未结算明细", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => { }); diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs index 0e1cbd89..c2e7c21c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs @@ -201,8 +201,10 @@ namespace Win.Sfs.SettleAccount CreateMapScrapClaimsVersion(); CreateMapSparePart(); CreateMapSparePartVersion(); + CreateMapSettleAccount(); CreateMapSettleAccountVersion(); + CreateMapUnSettleAccount(); CreateMapUnSettleAccountVersion(); @@ -353,27 +355,23 @@ namespace Win.Sfs.SettleAccount /// private void CreateMapUnSettleAccount() { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - - CreateMap(); - - - - CreateMap(); - CreateMap(); + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); } /// /// 大众FIS未结算明细导入-版本 /// private void CreateMapUnSettleAccountVersion() { - CreateMap().ReverseMap(); - CreateMap(); - CreateMap(); - CreateMap(); - CreateMap(); + CreateMap().ReverseMap(); + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs index e88e0e8a..9b48cbf2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs @@ -47,9 +47,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// public DateTime CP5A { set; get; } /// - /// CP7日期 + /// CP7日期,可空 /// - public DateTime CP7 { set; get; } + public DateTime? CP7 { set; get; } /// /// 零件号 @@ -102,7 +102,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts public UnSettleAccount( Guid id, Guid branchId, - string year, string kENNCode, string chassisNumber, string model, DateTime cP5A, DateTime cP7, string materialCode, decimal qty, string settlementID, string settlementSupplier, string period,string settleYear, Guid parentId,string version , DateTime creationTime, Guid guid,string reason) :base(id) + string year, string kENNCode, string chassisNumber, string model, DateTime cP5A, DateTime? cP7, string materialCode, decimal qty, string settlementID, string settlementSupplier, string period,string settleYear, Guid parentId,string version , DateTime creationTime, Guid guid,string reason) :base(id) { BranchId = branchId; Year = year; diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs index 392ba228..4da812ae 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs @@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount { - public class UnSettleAccountVersionRepository : EfCoreRepository, ITransientDependency + public class UnSettleAccountVersionRepository : EfCoreRepository, ITransientDependency { public UnSettleAccountVersionRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) { @@ -37,19 +37,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount } return true; } - - public virtual bool Insert(string p_version,string p_customCode,string p_factory) + public virtual bool Insert(Guid guid, string p_version, string p_customCode, string p_factory) { try { DbContext.Database.SetCommandTimeout(1200); - var _first= GetQueryable().FirstOrDefault(p => p.Version == p_version); + var _first = GetQueryable().FirstOrDefault(p => p.Version == p_version); if (_first == null) { - var version = new SettleAccountVersion(GuidGenerator.Create(), GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory); - List _ls = new List(); + var version = new UnSettleAccountVersion(guid, GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory); + List _ls = new List(); _ls.Add(version); - DbContext.BulkInsert(_ls) ; + DbContext.BulkInsert(_ls); } } catch (Exception e) @@ -58,5 +57,25 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount } return true; } + //public virtual bool Insert(string p_version,string p_customCode,string p_factory) + //{ + // try + // { + // DbContext.Database.SetCommandTimeout(1200); + // var _first= GetQueryable().FirstOrDefault(p => p.Version == p_version); + // if (_first == null) + // { + // var version = new UnSettleAccountVersion(GuidGenerator.Create(), GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory); + // List _ls = new List(); + // _ls.Add(version); + // DbContext.BulkInsert(_ls) ; + // } + // } + // catch (Exception e) + // { + // throw e; + // } + // return true; + //} } } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs index 9322831d..fcc1167c 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs @@ -42,7 +42,7 @@ namespace TaskJob.Services var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value; var customerCode = customConditions.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value; var year = customConditions.Where(p => p.Name == "Year").FirstOrDefault().Value; - var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value; + //var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value; var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value; //_versionRepository.Delete(version); //_repository.Delete(version); @@ -85,7 +85,7 @@ namespace TaskJob.Services where g.Count() > 1 select g; _repository.Insert(_setls); - _versionRepository.Insert(version, customerCode, customerCode); + _versionRepository.Insert(_id, version, customerCode, customerCode); #region diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs index fe54a625..03164267 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs @@ -56,7 +56,10 @@ namespace Win.Sfs.SettleAccount { return implementationFactory.GetService(); } - + if (key.Equals(typeof(UnSettleAccountImportService).FullName)) + { + return implementationFactory.GetService(); + } if (key.Equals(typeof(InvoiceImportService).FullName)) { return implementationFactory.GetService(); diff --git a/vue/src/router/modules/vwFisData.js b/vue/src/router/modules/vwFisData.js index 213c3609..51e0a383 100644 --- a/vue/src/router/modules/vwFisData.js +++ b/vue/src/router/modules/vwFisData.js @@ -17,7 +17,7 @@ const vwFisDataRouter = { }, children: [ { - path: '/settleAccount', + path: '/unSettleAccount', component: () => import('@/views/ux/vw/dataInput/r3-open'), name: 'SettleAccount',//命名路由 meta: { diff --git a/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue b/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue index daa791cc..038670b9 100644 --- a/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue +++ b/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue @@ -41,8 +41,11 @@ style="margin-right: 15px" @change="valueselectChange" > - - + @@ -221,7 +224,7 @@ - + @@ -242,11 +245,17 @@ - + > + + @@ -428,6 +437,9 @@ export default { erpAssemblyCode: undefined, erpAssemblyName: undefined, }, + vehicleModelQuery:{ + dicTypeName:"派格车型", + }, form:{ details:[] }, @@ -444,7 +456,8 @@ export default { dialogFormVisible: false, tableHeight: document.documentElement.clientHeight - 280, detailTableHeight:250, - details:[] //修改子表数据源 + details:[], //修改子表数据源 + vehicleModelList:[],//车型list }; }, mounted() { @@ -458,6 +471,7 @@ export default { }); }, created() { + this.getvehicleModel(); this.getList(); }, computed: { @@ -548,6 +562,7 @@ export default { this.isEdit = false; this.form = {}; this.details = []; + //this.getvehicleModel(); this.dialogFormVisible = true; }, /** 修改 */ @@ -555,6 +570,7 @@ export default { this.formTitle = "修改"; this.isEdit = true; this.details = []; + //this.getvehicleModel(); if (this.multipleSelection.length != 1) { this.$message({ message: "编辑必须选择单行", @@ -661,7 +677,9 @@ export default { this.listQuery.ErpAssemblyName = ""; this.listQuery.ErpAssemblyCode = ""; this.listQuery.vehicleModelCode = ""; + this.getvehicleModel(); this.handleQuery(); + }, /** 搜索按钮操作 */ handleQuery() { @@ -690,7 +708,9 @@ export default { } }, + /*添加明细空行*/ handleAddDetails() { + this.$forceUpdate(); if (this.form.details === undefined) { this.form.details = []; //console.log(679); @@ -815,6 +835,20 @@ export default { this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.toggleRowSelection(row); }, + getvehicleModel() + { + this.$axios + .gets( + "/api/newjit/dic/list",this.vehicleModelQuery + ) + .then((response) => { + //console.log(response); + this.vehicleModelList = response.item; + //console.log() + }) + .catch(() => { + }); + }, }, }; diff --git a/vue/src/views/pg-fis/basedate/m100BIll/index.vue b/vue/src/views/pg-fis/basedate/m100BIll/index.vue index c47eaffd..6121f3e8 100644 --- a/vue/src/views/pg-fis/basedate/m100BIll/index.vue +++ b/vue/src/views/pg-fis/basedate/m100BIll/index.vue @@ -19,9 +19,11 @@ style="margin-right: 15px" @change="ptypeselectChange" > - - - + @@ -34,10 +36,10 @@ @change="valueselectChange" > + :value="item.id"/> @@ -269,10 +271,10 @@ > - + @@ -282,19 +284,25 @@ - + + > + + - + @@ -303,10 +311,10 @@ - + @@ -341,7 +349,7 @@ element-loading-text="拼命加载中..." element-loading-spinner="el-icon-loading" class="cr-table" - :data="form.details" + :data="form.leftdetails" :height="detailTableHeight" :cell-style="cellStyle" :header-cell-style="headerRowStyle" @@ -353,15 +361,15 @@ @row-click="handleRowClick" > - - + + - - + +