From 3976c54e3467d6038d0785b005935fbb55752f8d Mon Sep 17 00:00:00 2001 From: ljh Date: Tue, 9 Jul 2024 01:33:59 +0900 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8D=95=E4=BD=8D=E7=89=A9?= =?UTF-8?q?=E6=96=99=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReportTable/ReportTableService.cs | 35 +++++- Web/src/api/main/invoice.ts | 10 ++ .../invoice/component/editDialog.vue | 111 ++++++++++++------ .../inventoryManagement/invoice/index.vue | 51 ++++++-- 4 files changed, 162 insertions(+), 45 deletions(-) diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs index 0eec95f..b74b26e 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs @@ -261,7 +261,7 @@ public class ReportTableService : IDynamicApiController, ITransient if (unit == null) throw new ArgumentNullException(nameof(unitGroup)); - var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 1 }; + var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0 }; var addReport = await Add(newReport); var others = units.FindAll(a => a.Rate < unit.Rate); @@ -436,5 +436,38 @@ public class ReportTableService : IDynamicApiController, ITransient } return result; } + + /// + /// 更新状态 + /// + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "UpdateState")] + public async Task UpdateState(AddReportContext input) + { + var unitGroup = await _repUnitGroup.Detail(new QueryByIdSysUnitGroupInput() { Id = input.UnitGroupId }); + if (unitGroup == null) + { + throw new ArgumentNullException(nameof(unitGroup)); + } + var units = await _repUnit.ListByGroupId(unitGroup.Id); + if (units == null || units.Count < 1) + { + throw new ArgumentNullException(nameof(unitGroup)); + } + var unit = units.Find(a => a.Name == input.Name); + if (unit == null) + throw new ArgumentNullException(nameof(unitGroup)); + + var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0 }; + var addReport = await Add(newReport); + + var others = units.FindAll(a => a.Rate < unit.Rate); + + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } } diff --git a/Web/src/api/main/invoice.ts b/Web/src/api/main/invoice.ts index b734a01..58197f8 100644 --- a/Web/src/api/main/invoice.ts +++ b/Web/src/api/main/invoice.ts @@ -5,6 +5,7 @@ enum Api { UpdateInvoice = '/api/invoice/update', PageInvoice = '/api/invoice/page', DetailInvoice = '/api/invoice/detail', + UpdateAuditStateInvoice = '/api/invoice/UpdateAuditState', } // 增加发货通知单 @@ -47,4 +48,13 @@ export const detailInvoice = (id: any) => data: { id }, }); +// 审核汇报单 +export const updateAuditStateInvoice = (params?: any) => + request({ + url: Api.UpdateAuditStateInvoice, + method: 'post', + data: params, + }); + + diff --git a/Web/src/views/inventoryManagement/invoice/component/editDialog.vue b/Web/src/views/inventoryManagement/invoice/component/editDialog.vue index 56c85d9..b1bd6b3 100644 --- a/Web/src/views/inventoryManagement/invoice/component/editDialog.vue +++ b/Web/src/views/inventoryManagement/invoice/component/editDialog.vue @@ -1,6 +1,6 @@  + + + + + + - - - + + + + + + + + +