From c347d7eed89a44d1a7a1ce5c8e14ed62809ef64c Mon Sep 17 00:00:00 2001 From: liangzongpeng <532365025@qq.com> Date: Sat, 11 May 2024 18:11:42 +0800 Subject: [PATCH] 0510 --- .../Configuration/Swagger.json | 4 +- .../Admin.NET.Application/Entity/Materials.cs | 2 +- .../Admin.NET.Application/Entity/UrlInfo.cs | 46 ++ .../Admin.NET.Application/Entity/UrlType.cs | 22 + .../Service/Materials/Dto/MaterialsOutput.cs | 74 ++- .../Service/UrlInfo/Dto/UrlInfoDto.cs | 78 ++++ .../Service/UrlInfo/Dto/UrlInfoInput.cs | 144 ++++++ .../Service/UrlInfo/Dto/UrlInfoOutput.cs | 80 ++++ .../Service/UrlInfo/UrlInfoService.cs | 111 +++++ .../Service/UrlType/Dto/UrlTypeDto.cs | 58 +++ .../Service/UrlType/Dto/UrlTypeInput.cs | 114 +++++ .../Service/UrlType/Dto/UrlTypeOutput.cs | 60 +++ .../Service/UrlType/UrlTypeService.cs | 107 +++++ Web/.env.development | 4 +- Web/index.html | 2 +- .../models/add-materials-input.ts | 8 + .../api-services/models/materials-output.ts | 123 ++++- Web/src/layout/footer/index.vue | 4 +- .../matter/component/editOpenAccess.vue | 437 ++++++++++++++++++ Web/src/views/basics-date/matter/index.vue | 372 ++++----------- .../views/basics-date/packageinfo/index.vue | 22 + .../materialPrinting/editAccess.vue | 207 +++++++++ .../labelPrinting/materialPrinting/index.vue | 127 +++-- .../system/print/component/hiprint/index.vue | 12 +- 24 files changed, 1888 insertions(+), 330 deletions(-) create mode 100644 Admin.NET/Admin.NET.Application/Entity/UrlInfo.cs create mode 100644 Admin.NET/Admin.NET.Application/Entity/UrlType.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoDto.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoInput.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoOutput.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlInfo/UrlInfoService.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeDto.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeInput.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeOutput.cs create mode 100644 Admin.NET/Admin.NET.Application/Service/UrlType/UrlTypeService.cs create mode 100644 Web/src/views/basics-date/matter/component/editOpenAccess.vue create mode 100644 Web/src/views/basics-date/packageinfo/index.vue create mode 100644 Web/src/views/labelPrinting/materialPrinting/editAccess.vue diff --git a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json index 4d15b23..4832e20 100644 --- a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json +++ b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json @@ -7,7 +7,7 @@ { "Group": "Default", "Title": "Admin.NET 通用权限开发平台", - "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。
https://gitee.com/zuohuaijun/Admin.NET", + "Description": "让 .NET 开发更简单、更通用、更流行。", "Version": "1.0.0" //"TermsOfService": "https://dotnetchina.gitee.io/furion/", //"Contact": { @@ -19,7 +19,7 @@ { "Group": "All Groups", "Title": "所有接口", - "Description": "让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。
https://gitee.com/zuohuaijun/Admin.NET", + "Description": "让 .NET 开发更简单、更通用、更流行。", "Version": "1.0.0" //"TermsOfService": "https://dotnetchina.gitee.io/furion/", //"Contact": { diff --git a/Admin.NET/Admin.NET.Application/Entity/Materials.cs b/Admin.NET/Admin.NET.Application/Entity/Materials.cs index e2977ac..256f819 100644 --- a/Admin.NET/Admin.NET.Application/Entity/Materials.cs +++ b/Admin.NET/Admin.NET.Application/Entity/Materials.cs @@ -132,7 +132,7 @@ public class Materials : EntityTenant [Navigate(NavigateType.OneToOne, nameof(Id))] [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public List PackageInfos { get; set; } + public List? PackageInfos { get; set; } /// /// 推广ID diff --git a/Admin.NET/Admin.NET.Application/Entity/UrlInfo.cs b/Admin.NET/Admin.NET.Application/Entity/UrlInfo.cs new file mode 100644 index 0000000..6f6e8f9 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Entity/UrlInfo.cs @@ -0,0 +1,46 @@ +using Admin.NET.Core; +namespace Admin.NET.Application.Entity; + +/// +/// 网址信息 +/// +[SugarTable("UrlInfo","网址信息")] +public class UrlInfo : EntityBase +{ + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)] + public string? Name { get; set; } + + /// + /// 网址 + /// + [SugarColumn(ColumnName = "Url", ColumnDescription = "网址", Length = 128)] + public string? Url { get; set; } + + /// + /// 网址类型ID + /// + [SugarColumn(ColumnName = "UrlTypeId", ColumnDescription = "网址类型ID")] + public long? UrlTypeId { get; set; } + + /// + /// 网址类型 + /// + [SugarColumn(ColumnName = "UrlType", ColumnDescription = "网址类型", Length = 32)] + public string? UrlType { get; set; } + + /// + /// 是否启用 + /// + [SugarColumn(ColumnName = "IsEnable", ColumnDescription = "是否启用")] + public bool? IsEnable { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] + public string? Remarks { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Entity/UrlType.cs b/Admin.NET/Admin.NET.Application/Entity/UrlType.cs new file mode 100644 index 0000000..88c3843 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Entity/UrlType.cs @@ -0,0 +1,22 @@ +using Admin.NET.Core; +namespace Admin.NET.Application.Entity; + +/// +/// 地址类型 +/// +[SugarTable("UrlType","地址类型")] +public class UrlType : EntityBase +{ + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)] + public string? Name { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 64)] + public string? Remarks { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Service/Materials/Dto/MaterialsOutput.cs b/Admin.NET/Admin.NET.Application/Service/Materials/Dto/MaterialsOutput.cs index 739485d..753c0c6 100644 --- a/Admin.NET/Admin.NET.Application/Service/Materials/Dto/MaterialsOutput.cs +++ b/Admin.NET/Admin.NET.Application/Service/Materials/Dto/MaterialsOutput.cs @@ -44,7 +44,79 @@ public class MaterialsOutput /// 可用状态 /// public bool IsEnable { get; set; } - + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 保质期 + /// + public int? ShelfLife { get; set; } + + /// + /// 保质期单位 + /// + public string? ShelfLifeUnit { get; set; } + + /// + /// 统一零售价 + /// + public decimal? Price { get; set; } + + /// + /// 条形码 + /// + public string? BarCode { get; set; } + + /// + /// 单位组ID + /// + public long? UnitGroupId { get; set; } + + /// + /// 基本单位 + /// + public string? Unit { get; set; } + + /// + /// 生产单位 + /// + public string? ProductUnit { get; set; } + + /// + /// 采购单位 + /// + public string? ProcureUnit { get; set; } + + /// + /// 库存单位 + /// + public string? InventoryUnit { get; set; } + + /// + /// 销售单位 + /// + public string? SaleUnit { get; set; } + + /// + /// 分销单位 + /// + public string? RetailStoreUnit { get; set; } + + /// + /// 包装关系ID + /// + public long? PackagId { get; set; } + + public List? PackageInfos { get; set; } + + /// + /// 推广ID + /// + public long? PromotionId { get; set; } + /// /// 备注 /// diff --git a/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoDto.cs b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoDto.cs new file mode 100644 index 0000000..326444a --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoDto.cs @@ -0,0 +1,78 @@ +namespace Admin.NET.Application; + + /// + /// 网址信息输出参数 + /// + public class UrlInfoDto + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 网址 + /// + public string? Url { get; set; } + + /// + /// 网址类型ID + /// + public long? UrlTypeId { get; set; } + + /// + /// 网址类型 + /// + public string? UrlType { get; set; } + + /// + /// 是否启用 + /// + public bool? IsEnable { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } diff --git a/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoInput.cs b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoInput.cs new file mode 100644 index 0000000..8bc676c --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoInput.cs @@ -0,0 +1,144 @@ +using Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// + /// 网址信息基础输入参数 + /// + public class UrlInfoBaseInput + { + /// + /// 名称 + /// + public virtual string? Name { get; set; } + + /// + /// 网址 + /// + public virtual string? Url { get; set; } + + /// + /// 网址类型ID + /// + public virtual long? UrlTypeId { get; set; } + + /// + /// 网址类型 + /// + public virtual string? UrlType { get; set; } + + /// + /// 是否启用 + /// + public virtual bool? IsEnable { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + + } + + /// + /// 网址信息分页查询输入参数 + /// + public class UrlInfoInput : BasePageInput + { + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 网址 + /// + public string? Url { get; set; } + + /// + /// 网址类型 + /// + public string? UrlType { get; set; } + + } + + /// + /// 网址信息增加输入参数 + /// + public class AddUrlInfoInput : UrlInfoBaseInput + { + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + + } + + /// + /// 网址信息删除输入参数 + /// + public class DeleteUrlInfoInput : BaseIdInput + { + } + + /// + /// 网址信息更新输入参数 + /// + public class UpdateUrlInfoInput : UrlInfoBaseInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 网址信息主键查询输入参数 + /// + public class QueryByIdUrlInfoInput : DeleteUrlInfoInput + { + + } diff --git a/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoOutput.cs b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoOutput.cs new file mode 100644 index 0000000..6507d1b --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlInfo/Dto/UrlInfoOutput.cs @@ -0,0 +1,80 @@ +namespace Admin.NET.Application; + +/// +/// 网址信息输出参数 +/// +public class UrlInfoOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 网址 + /// + public string? Url { get; set; } + + /// + /// 网址类型ID + /// + public long? UrlTypeId { get; set; } + + /// + /// 网址类型 + /// + public string? UrlType { get; set; } + + /// + /// 是否启用 + /// + public bool? IsEnable { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } + + diff --git a/Admin.NET/Admin.NET.Application/Service/UrlInfo/UrlInfoService.cs b/Admin.NET/Admin.NET.Application/Service/UrlInfo/UrlInfoService.cs new file mode 100644 index 0000000..2edb204 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlInfo/UrlInfoService.cs @@ -0,0 +1,111 @@ +using Admin.NET.Core.Service; +using Admin.NET.Application.Const; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +namespace Admin.NET.Application; +/// +/// 网址信息服务 +/// +[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] +[AllowAnonymous] +public class UrlInfoService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + public UrlInfoService(SqlSugarRepository rep) + { + _rep = rep; + } + + /// + /// 分页查询网址信息 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + public async Task> Page(UrlInfoInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.Name.Contains(input.SearchKey.Trim()) + || u.Url.Contains(input.SearchKey.Trim()) + || u.UrlType.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Url), u => u.Url.Contains(input.Url.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.UrlType), u => u.UrlType.Contains(input.UrlType.Trim())) + .Select(); + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加网址信息 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + public async Task Add(AddUrlInfoInput input) + { + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// + /// 删除网址信息 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + public async Task Delete(DeleteUrlInfoInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _rep.FakeDeleteAsync(entity); //假删除 + //await _rep.DeleteAsync(entity); //真删除 + } + + /// + /// 更新网址信息 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + public async Task Update(UpdateUrlInfoInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// + /// 获取网址信息 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + public async Task Detail([FromQuery] QueryByIdUrlInfoInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 获取网址信息列表 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + public async Task> List() + { + return await _rep.AsQueryable().Select().ToListAsync(); + } + + + + + +} + diff --git a/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeDto.cs b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeDto.cs new file mode 100644 index 0000000..aeaa03f --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeDto.cs @@ -0,0 +1,58 @@ +namespace Admin.NET.Application; + + /// + /// 地址类型输出参数 + /// + public class UrlTypeDto + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } diff --git a/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeInput.cs b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeInput.cs new file mode 100644 index 0000000..00f98a7 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeInput.cs @@ -0,0 +1,114 @@ +using Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// + /// 地址类型基础输入参数 + /// + public class UrlTypeBaseInput + { + /// + /// 名称 + /// + public virtual string? Name { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + + } + + /// + /// 地址类型分页查询输入参数 + /// + public class UrlTypeInput : BasePageInput + { + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + } + + /// + /// 地址类型增加输入参数 + /// + public class AddUrlTypeInput : UrlTypeBaseInput + { + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + + } + + /// + /// 地址类型删除输入参数 + /// + public class DeleteUrlTypeInput : BaseIdInput + { + } + + /// + /// 地址类型更新输入参数 + /// + public class UpdateUrlTypeInput : UrlTypeBaseInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 地址类型主键查询输入参数 + /// + public class QueryByIdUrlTypeInput : DeleteUrlTypeInput + { + + } diff --git a/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeOutput.cs b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeOutput.cs new file mode 100644 index 0000000..9ecf216 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlType/Dto/UrlTypeOutput.cs @@ -0,0 +1,60 @@ +namespace Admin.NET.Application; + +/// +/// 地址类型输出参数 +/// +public class UrlTypeOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } + + diff --git a/Admin.NET/Admin.NET.Application/Service/UrlType/UrlTypeService.cs b/Admin.NET/Admin.NET.Application/Service/UrlType/UrlTypeService.cs new file mode 100644 index 0000000..7626b4c --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/UrlType/UrlTypeService.cs @@ -0,0 +1,107 @@ +using Admin.NET.Core.Service; +using Admin.NET.Application.Const; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +namespace Admin.NET.Application; +/// +/// 地址类型服务 +/// +[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] +[AllowAnonymous] +public class UrlTypeService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + public UrlTypeService(SqlSugarRepository rep) + { + _rep = rep; + } + + /// + /// 分页查询地址类型 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + public async Task> Page(UrlTypeInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.Name.Contains(input.SearchKey.Trim()) + || u.Remarks.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .Select(); + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加地址类型 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + public async Task Add(AddUrlTypeInput input) + { + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// + /// 删除地址类型 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + public async Task Delete(DeleteUrlTypeInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _rep.FakeDeleteAsync(entity); //假删除 + //await _rep.DeleteAsync(entity); //真删除 + } + + /// + /// 更新地址类型 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + public async Task Update(UpdateUrlTypeInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// + /// 获取地址类型 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + public async Task Detail([FromQuery] QueryByIdUrlTypeInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 获取地址类型列表 + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + public async Task> List() + { + return await _rep.AsQueryable().Select().ToListAsync(); + } + + + + + +} + diff --git a/Web/.env.development b/Web/.env.development index ff6ad00..8f85313 100644 --- a/Web/.env.development +++ b/Web/.env.development @@ -1,5 +1,5 @@ # 本地环境 ENV = development -# 本地环境接口地址 -VITE_API_URL = http://localhost:5005 \ No newline at end of file +# 本地环境接口地址http://localhost:5005 +VITE_API_URL = http://139.199.191.197:9005 \ No newline at end of file diff --git a/Web/index.html b/Web/index.html index 482423a..b533dc5 100644 --- a/Web/index.html +++ b/Web/index.html @@ -14,7 +14,7 @@ /> - 冠威科技 + 广东海方程
diff --git a/Web/src/api-services/models/add-materials-input.ts b/Web/src/api-services/models/add-materials-input.ts index 2844dcf..552de5c 100644 --- a/Web/src/api-services/models/add-materials-input.ts +++ b/Web/src/api-services/models/add-materials-input.ts @@ -20,6 +20,14 @@ */ export interface AddMaterialsInput { + /** + * 雪花Id + * + * @type {number} + * @memberof AddDictDataInput + */ + id?: number; + /** * 名称 * diff --git a/Web/src/api-services/models/materials-output.ts b/Web/src/api-services/models/materials-output.ts index a52a041..dcba20f 100644 --- a/Web/src/api-services/models/materials-output.ts +++ b/Web/src/api-services/models/materials-output.ts @@ -1,3 +1,4 @@ +import { PackageInfo } from './package-info'; /* tslint:disable */ /* eslint-disable */ /** @@ -84,13 +85,133 @@ export interface MaterialsOutput { */ isEnable?: boolean; + /** + * 品牌 + * + * @type {string} + * @memberof MaterialsOutput + */ + brand?: string | null; + + /** + * 保质期 + * + * @type {number} + * @memberof MaterialsOutput + */ + shelflife?: number | null; + /** + * 保质期单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + shelflifeunit?: string | null; + + /** + * 备注 + * + * @type {number} + * @memberof MaterialsOutput + */ + price?: number | null; + + /** + * 条形码 + * + * @type {string} + * @memberof MaterialsOutput + */ + barcode?: string | null; + + /** + * 单位组ID + * + * @type {number} + * @memberof MaterialsOutput + */ + unitGroupId?: number | null; + + /** + * 基本单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + unit?: string | null; + + /** + * 生产单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + productunit?: string | null; + + /** + * 采购单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + procureunit?: string | null; + + /** + * 库存单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + inventoryunit?: string | null; + + /** + * 销售单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + saleunit?: string | null; + + /** + * 分销单位 + * + * @type {string} + * @memberof MaterialsOutput + */ + retailstoreunit?: string | null; + + /** + * 包装关系ID + * + * @type {number} + * @memberof MaterialsOutput + */ + packagid?: number | null; + + /** + * 包装关系 + * + * @type {PackageInfo[]} + * @memberof MaterialsOutput + */ + packageinfos?: PackageInfo[] | null; + + /** + * 推广id + * + * @type {number} + * @memberof MaterialsOutput + */ + promotionid?: number | null; + + /** * 备注 * * @type {string} * @memberof MaterialsOutput */ - remarks?: string | null; + remarks?: string | null; /** * 租户Id diff --git a/Web/src/layout/footer/index.vue b/Web/src/layout/footer/index.vue index d14e249..e32fdd2 100644 --- a/Web/src/layout/footer/index.vue +++ b/Web/src/layout/footer/index.vue @@ -1,8 +1,8 @@ diff --git a/Web/src/views/basics-date/matter/component/editOpenAccess.vue b/Web/src/views/basics-date/matter/component/editOpenAccess.vue new file mode 100644 index 0000000..cfb0613 --- /dev/null +++ b/Web/src/views/basics-date/matter/component/editOpenAccess.vue @@ -0,0 +1,437 @@ + + + + + + \ No newline at end of file diff --git a/Web/src/views/basics-date/matter/index.vue b/Web/src/views/basics-date/matter/index.vue index ffba48d..448398b 100644 --- a/Web/src/views/basics-date/matter/index.vue +++ b/Web/src/views/basics-date/matter/index.vue @@ -1,3 +1,4 @@ + - + @@ -124,211 +125,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 提交 - 取消 - - + \ No newline at end of file diff --git a/Web/src/views/labelPrinting/materialPrinting/editAccess.vue b/Web/src/views/labelPrinting/materialPrinting/editAccess.vue new file mode 100644 index 0000000..1f85b3d --- /dev/null +++ b/Web/src/views/labelPrinting/materialPrinting/editAccess.vue @@ -0,0 +1,207 @@ + + + + + \ No newline at end of file diff --git a/Web/src/views/labelPrinting/materialPrinting/index.vue b/Web/src/views/labelPrinting/materialPrinting/index.vue index ed15e11..8089074 100644 --- a/Web/src/views/labelPrinting/materialPrinting/index.vue +++ b/Web/src/views/labelPrinting/materialPrinting/index.vue @@ -44,12 +44,12 @@ - - - + + + @@ -62,11 +62,77 @@ +