60 changed files with 1296 additions and 164 deletions
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class AuthDepartmentDto : AuditedEntityDto<Guid> |
||||
|
{ |
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
public string? Description { get; set; } |
||||
|
|
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
public bool? IsActive { get; set; } |
||||
|
|
||||
|
public string? Name { get; set; } |
||||
|
|
||||
|
public string? Remark { get; set; } |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class AuthDepartmentGetListInput : PagedAndSortedResultRequestDto |
||||
|
{ |
||||
|
public string? Code { get; set; } |
||||
|
|
||||
|
public string? Description { get; set; } |
||||
|
|
||||
|
public Guid? Id { get; set; } |
||||
|
|
||||
|
public bool? IsActive { get; set; } |
||||
|
|
||||
|
public string? Name { get; set; } |
||||
|
|
||||
|
public string? Remark { get; set; } |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class CreateUpdateAuthDepartmentDto |
||||
|
{ |
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
public string? Description { get; set; } |
||||
|
|
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
public bool? IsActive { get; set; } |
||||
|
|
||||
|
public string? Name { get; set; } |
||||
|
|
||||
|
public string? Remark { get; set; } |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
|
||||
|
|
||||
|
public interface IAuthDepartmentAppService : |
||||
|
ICrudAppService< |
||||
|
AuthDepartmentDto, |
||||
|
Guid, |
||||
|
AuthDepartmentGetListInput, |
||||
|
CreateUpdateAuthDepartmentDto, |
||||
|
CreateUpdateAuthDepartmentDto> |
||||
|
{ |
||||
|
|
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using WinIn.FasterZ.Wms.Permissions; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
|
||||
|
|
||||
|
public class AuthDepartmentAppService : CrudAppService<AuthDepartment, AuthDepartmentDto, Guid, AuthDepartmentGetListInput, CreateUpdateAuthDepartmentDto, CreateUpdateAuthDepartmentDto>, |
||||
|
IAuthDepartmentAppService |
||||
|
{ |
||||
|
protected override string GetPolicyName { get; set; } = WmsPermissions.AuthDepartment.Default; |
||||
|
protected override string GetListPolicyName { get; set; } = WmsPermissions.AuthDepartment.Default; |
||||
|
protected override string CreatePolicyName { get; set; } = WmsPermissions.AuthDepartment.Create; |
||||
|
protected override string UpdatePolicyName { get; set; } = WmsPermissions.AuthDepartment.Update; |
||||
|
protected override string DeletePolicyName { get; set; } = WmsPermissions.AuthDepartment.Delete; |
||||
|
|
||||
|
private readonly IAuthDepartmentRepository _repository; |
||||
|
|
||||
|
public AuthDepartmentAppService(IAuthDepartmentRepository repository) : base(repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
|
||||
|
protected override async Task<IQueryable<AuthDepartment>> CreateFilteredQueryAsync(AuthDepartmentGetListInput input) |
||||
|
{ |
||||
|
// TODO: AbpHelper generated
|
||||
|
return (await base.CreateFilteredQueryAsync(input)) |
||||
|
.WhereIf(!input.Code.IsNullOrWhiteSpace(), x => x.Code.Contains(input.Code)) |
||||
|
.WhereIf(input.Description != null, x => x.Description == input.Description) |
||||
|
.WhereIf(input.Id != null, x => x.Id == input.Id) |
||||
|
.WhereIf(input.IsActive != null, x => x.IsActive == input.IsActive) |
||||
|
.WhereIf(input.Name != null, x => x.Name == input.Name) |
||||
|
.WhereIf(input.Remark != null, x => x.Remark == input.Remark) |
||||
|
; |
||||
|
} |
||||
|
} |
@ -1,8 +1,30 @@ |
|||||
{ |
{ |
||||
"culture": "ar", |
"culture": "ar", |
||||
"texts": { |
"texts": { |
||||
"Menu:Home": "الرئيسية", |
|
||||
"Menu:Home": "الصفحة الرئيسية", |
"Menu:Home": "الصفحة الرئيسية", |
||||
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io." |
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io.", |
||||
|
"Permission:AuthDepartment": "AuthDepartment", |
||||
|
"Permission:Create": "Create", |
||||
|
"Permission:Update": "Update", |
||||
|
"Permission:Delete": "Delete", |
||||
|
"Menu:AuthDepartment": "MenuAuthDepartment", |
||||
|
"AuthDepartment": "AuthDepartment", |
||||
|
"AuthDepartmentCode": "AuthDepartmentCode", |
||||
|
"AuthDepartmentConcurrencyStamp": "AuthDepartmentConcurrencyStamp", |
||||
|
"AuthDepartmentCreationTime": "AuthDepartmentCreationTime", |
||||
|
"AuthDepartmentCreatorId": "AuthDepartmentCreatorId", |
||||
|
"AuthDepartmentDescription": "AuthDepartmentDescription", |
||||
|
"AuthDepartmentExtraProperties": "AuthDepartmentExtraProperties", |
||||
|
"AuthDepartmentId": "AuthDepartmentId", |
||||
|
"AuthDepartmentIsActive": "AuthDepartmentIsActive", |
||||
|
"AuthDepartmentLastModificationTime": "AuthDepartmentLastModificationTime", |
||||
|
"AuthDepartmentLastModifierId": "AuthDepartmentLastModifierId", |
||||
|
"AuthDepartmentName": "AuthDepartmentName", |
||||
|
"AuthDepartmentRemark": "AuthDepartmentRemark", |
||||
|
"CreateAuthDepartment": "CreateAuthDepartment", |
||||
|
"EditAuthDepartment": "EditAuthDepartment", |
||||
|
"AuthDepartmentDeletionConfirmationMessage": "Are you sure to delete the authDepartment {0}?", |
||||
|
"SuccessfullyDeleted": "Successfully deleted", |
||||
|
"TableFilter": "TableFilter" |
||||
} |
} |
||||
} |
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
|
||||
|
public interface IAuthDepartmentRepository : IRepository<AuthDepartment, Guid> |
||||
|
{ |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
using System.Linq; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
|
||||
|
public static class AuthDepartmentEfCoreQueryableExtensions |
||||
|
{ |
||||
|
public static IQueryable<AuthDepartment> IncludeDetails(this IQueryable<AuthDepartment> queryable, bool include = true) |
||||
|
{ |
||||
|
if (!include) |
||||
|
{ |
||||
|
return queryable; |
||||
|
} |
||||
|
|
||||
|
return queryable |
||||
|
// .Include(x => x.xxx) // TODO: AbpHelper generated
|
||||
|
; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using WinIn.FasterZ.Wms.EntityFrameworkCore; |
||||
|
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
|
||||
|
public class AuthDepartmentRepository : EfCoreRepository<WmsDbContext, AuthDepartment, Guid>, IAuthDepartmentRepository |
||||
|
{ |
||||
|
public AuthDepartmentRepository(IDbContextProvider<WmsDbContext> dbContextProvider) : base(dbContextProvider) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public override async Task<IQueryable<AuthDepartment>> WithDetailsAsync() |
||||
|
{ |
||||
|
return (await GetQueryableAsync()).IncludeDetails(); |
||||
|
} |
||||
|
} |
@ -1,27 +1,26 @@ |
|||||
{ |
{ |
||||
"iisSettings": { |
//"iisSettings": { |
||||
"windowsAuthentication": false, |
// "windowsAuthentication": false, |
||||
"anonymousAuthentication": true, |
// "anonymousAuthentication": true, |
||||
"iisExpress": { |
// "iisExpress": { |
||||
"applicationUrl": "https://localhost:44355", |
// "applicationUrl": "https://localhost:44355", |
||||
"sslPort": 44355 |
// "sslPort": 44355 |
||||
} |
// } |
||||
}, |
//}, |
||||
"profiles": { |
//"profiles": { |
||||
"IIS Express": { |
// "IIS Express": { |
||||
"commandName": "IISExpress", |
// "commandName": "IISExpress", |
||||
"launchBrowser": true, |
// "launchBrowser": true, |
||||
"environmentVariables": { |
// "environmentVariables": { |
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
// "ASPNETCORE_ENVIRONMENT": "Development" |
||||
} |
// } |
||||
}, |
// }, |
||||
"WinIn.FasterZ.Wms.HttpApi.Host": { |
"WinIn.FasterZ.Wms.HttpApi.Host": { |
||||
"commandName": "Project", |
"commandName": "Project", |
||||
"launchBrowser": true, |
"launchBrowser": true, |
||||
"applicationUrl": "https://localhost:44355", |
"applicationUrl": "http://localhost:60011", |
||||
"environmentVariables": { |
"environmentVariables": { |
||||
"ASPNETCORE_ENVIRONMENT": "Development" |
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
} |
} |
||||
} |
} |
||||
} |
|
||||
} |
} |
@ -1,20 +1,27 @@ |
|||||
{ |
{ |
||||
"App": { |
"App": { |
||||
"CorsOrigins": "https://*.Wms.com" |
"CorsOrigins": "https://*.Wms.com", |
||||
|
"Audit": { |
||||
|
"IsEnabled": false // 禁用审计功能 |
||||
|
// 其他审计相关设置项 |
||||
|
} |
||||
}, |
}, |
||||
"ConnectionStrings": { |
"ConnectionStrings": { |
||||
"Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;Encrypt=False;" |
"Default": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Faster_AuthSiteCenter;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;Encrypt=False;", |
||||
|
"Wms": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;Encrypt=False;" |
||||
}, |
}, |
||||
"Redis": { |
"Redis": { |
||||
"Configuration": "127.0.0.1" |
"Configuration": "127.0.0.1" |
||||
}, |
}, |
||||
"AuthServer": { |
"AuthServer": { |
||||
"Authority": "https://localhost:44381", |
"Authority": "http://localhost:60100", |
||||
"RequireHttpsMetadata": "true", |
"RequireHttpsMetadata": "false", |
||||
"SwaggerClientId": "Wms_Swagger" |
"SwaggerClientId": "Wms_Swagger" |
||||
}, |
}, |
||||
"StringEncryption": { |
"StringEncryption": { |
||||
"DefaultPassPhrase": "4jjXQgqwh6PRrjn4" |
"DefaultPassPhrase": "4jjXQgqwh6PRrjn4" |
||||
} |
}, |
||||
|
"AlwaysAllowAuthorization": "false", |
||||
|
"urls": "http://localhost:60011" |
||||
} |
} |
||||
|
|
||||
|
@ -0,0 +1,18 @@ |
|||||
|
@page |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
||||
|
@using WinIn.FasterZ.Wms.Localization |
||||
|
@inject IHtmlLocalizer<WmsResource> L |
||||
|
@model WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment.CreateModalModel |
||||
|
@{ |
||||
|
Layout = null; |
||||
|
} |
||||
|
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="CreateModal"> |
||||
|
<abp-modal> |
||||
|
<abp-modal-header title="@L["CreateAuthDepartment"].Value"></abp-modal-header> |
||||
|
<abp-modal-body> |
||||
|
<abp-form-content /> |
||||
|
</abp-modal-body> |
||||
|
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
||||
|
</abp-modal> |
||||
|
</abp-dynamic-form> |
@ -0,0 +1,27 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
using WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment.ViewModels; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment; |
||||
|
|
||||
|
public class CreateModalModel : WmsPageModel |
||||
|
{ |
||||
|
[BindProperty] |
||||
|
public CreateEditAuthDepartmentViewModel ViewModel { get; set; } |
||||
|
|
||||
|
private readonly IAuthDepartmentAppService _service; |
||||
|
|
||||
|
public CreateModalModel(IAuthDepartmentAppService service) |
||||
|
{ |
||||
|
_service = service; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<IActionResult> OnPostAsync() |
||||
|
{ |
||||
|
var dto = ObjectMapper.Map<CreateEditAuthDepartmentViewModel, CreateUpdateAuthDepartmentDto>(ViewModel); |
||||
|
await _service.CreateAsync(dto); |
||||
|
return NoContent(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
@page |
||||
|
@using WinIn.FasterZ.Wms.Localization |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal; |
||||
|
@inject IHtmlLocalizer<WmsResource> L |
||||
|
@model WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment.EditModalModel |
||||
|
@{ |
||||
|
Layout = null; |
||||
|
} |
||||
|
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="EditModal"> |
||||
|
<abp-modal> |
||||
|
<abp-modal-header title="@L["EditAuthDepartment"].Value"></abp-modal-header> |
||||
|
<abp-modal-body> |
||||
|
<abp-input asp-for="Id" /> |
||||
|
<abp-form-content /> |
||||
|
</abp-modal-body> |
||||
|
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer> |
||||
|
</abp-modal> |
||||
|
</abp-dynamic-form> |
@ -0,0 +1,38 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
||||
|
using WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
||||
|
using WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment.ViewModels; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment; |
||||
|
|
||||
|
public class EditModalModel : WmsPageModel |
||||
|
{ |
||||
|
[HiddenInput] |
||||
|
[BindProperty(SupportsGet = true)] |
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
[BindProperty] |
||||
|
public CreateEditAuthDepartmentViewModel ViewModel { get; set; } |
||||
|
|
||||
|
private readonly IAuthDepartmentAppService _service; |
||||
|
|
||||
|
public EditModalModel(IAuthDepartmentAppService service) |
||||
|
{ |
||||
|
_service = service; |
||||
|
} |
||||
|
|
||||
|
public virtual async Task OnGetAsync() |
||||
|
{ |
||||
|
var dto = await _service.GetAsync(Id); |
||||
|
ViewModel = ObjectMapper.Map<AuthDepartmentDto, CreateEditAuthDepartmentViewModel>(dto); |
||||
|
} |
||||
|
|
||||
|
public virtual async Task<IActionResult> OnPostAsync() |
||||
|
{ |
||||
|
var dto = ObjectMapper.Map<CreateEditAuthDepartmentViewModel, CreateUpdateAuthDepartmentDto>(ViewModel); |
||||
|
await _service.UpdateAsync(Id, dto); |
||||
|
return NoContent(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
@page |
||||
|
@using WinIn.FasterZ.Wms.Permissions |
||||
|
@using Microsoft.AspNetCore.Authorization |
||||
|
@using Microsoft.AspNetCore.Mvc.Localization |
||||
|
@using Volo.Abp.AspNetCore.Mvc.UI.Layout |
||||
|
@using WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment |
||||
|
@using WinIn.FasterZ.Wms.Localization |
||||
|
@using WinIn.FasterZ.Wms.Web.Menus |
||||
|
@model IndexModel |
||||
|
@inject IPageLayout PageLayout |
||||
|
@inject IHtmlLocalizer<WmsResource> L |
||||
|
@inject IAuthorizationService Authorization |
||||
|
@{ |
||||
|
PageLayout.Content.Title = L["AuthDepartment"].Value; |
||||
|
PageLayout.Content.BreadCrumb.Add(L["Menu:AuthDepartment"].Value); |
||||
|
PageLayout.Content.MenuItemName = WmsMenus.AuthDepartment; |
||||
|
} |
||||
|
|
||||
|
@section scripts |
||||
|
{ |
||||
|
<abp-script src="/Pages/Z_Business/AuthDepartment/AuthDepartment/index.js" /> |
||||
|
} |
||||
|
@section styles |
||||
|
{ |
||||
|
<abp-style src="/Pages/Z_Business/AuthDepartment/AuthDepartment/index.css"/> |
||||
|
} |
||||
|
|
||||
|
<abp-card> |
||||
|
<abp-card-header> |
||||
|
<abp-row> |
||||
|
<abp-column size-md="_6"> |
||||
|
<abp-card-title>@L["AuthDepartment"]</abp-card-title> |
||||
|
</abp-column> |
||||
|
<abp-column size-md="_6" class="text-end"> |
||||
|
@if (await Authorization.IsGrantedAsync(WmsPermissions.AuthDepartment.Create)) |
||||
|
{ |
||||
|
<abp-button id="NewAuthDepartmentButton" |
||||
|
text="@L["CreateAuthDepartment"].Value" |
||||
|
icon="plus" |
||||
|
button-type="Primary" /> |
||||
|
} |
||||
|
</abp-column> |
||||
|
</abp-row> |
||||
|
</abp-card-header> |
||||
|
<abp-card-body> |
||||
|
<abp-row class="mb-3"> |
||||
|
<a abp-collapse-id="AuthDepartmentCollapse" class="text-secondary">@L["TableFilter"] </a> |
||||
|
</abp-row> |
||||
|
<abp-dynamic-form abp-model="AuthDepartmentFilter" id="AuthDepartmentFilter" required-symbols="false" column-size="_3"> |
||||
|
<abp-collapse-body id="AuthDepartmentCollapse"> |
||||
|
<abp-form-content /> |
||||
|
</abp-collapse-body> |
||||
|
</abp-dynamic-form> |
||||
|
<hr /> |
||||
|
<abp-table striped-rows="true" id="AuthDepartmentTable" class="nowrap"/> |
||||
|
</abp-card-body> |
||||
|
</abp-card> |
@ -0,0 +1,43 @@ |
|||||
|
using System; |
||||
|
using System.Threading.Tasks; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment; |
||||
|
|
||||
|
public class IndexModel : WmsPageModel |
||||
|
{ |
||||
|
public AuthDepartmentFilterInput AuthDepartmentFilter { get; set; } |
||||
|
|
||||
|
public virtual async Task OnGetAsync() |
||||
|
{ |
||||
|
await Task.CompletedTask; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public class AuthDepartmentFilterInput |
||||
|
{ |
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentCode")] |
||||
|
public string? Code { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentDescription")] |
||||
|
public string? Description { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentId")] |
||||
|
public Guid? Id { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentIsActive")] |
||||
|
public bool? IsActive { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentName")] |
||||
|
public string? Name { get; set; } |
||||
|
|
||||
|
[FormControlSize(AbpFormControlSize.Small)] |
||||
|
[Display(Name = "AuthDepartmentRemark")] |
||||
|
public string? Remark { get; set; } |
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.Web.Pages.Z_Business.AuthDepartment.AuthDepartment.ViewModels; |
||||
|
|
||||
|
public class CreateEditAuthDepartmentViewModel |
||||
|
{ |
||||
|
[Display(Name = "AuthDepartmentCode")] |
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
[Display(Name = "AuthDepartmentDescription")] |
||||
|
public string? Description { get; set; } |
||||
|
|
||||
|
[Display(Name = "AuthDepartmentId")] |
||||
|
public Guid Id { get; set; } |
||||
|
|
||||
|
[Display(Name = "AuthDepartmentIsActive")] |
||||
|
public bool? IsActive { get; set; } |
||||
|
|
||||
|
[Display(Name = "AuthDepartmentName")] |
||||
|
public string? Name { get; set; } |
||||
|
|
||||
|
[Display(Name = "AuthDepartmentRemark")] |
||||
|
public string? Remark { get; set; } |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
$(function () { |
||||
|
|
||||
|
$("#AuthDepartmentFilter :input").on('input', function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
//After abp v7.2 use dynamicForm 'column-size' instead of the following settings
|
||||
|
//$('#AuthDepartmentCollapse div').addClass('col-sm-3').parent().addClass('row');
|
||||
|
|
||||
|
var getFilter = function () { |
||||
|
var input = {}; |
||||
|
$("#AuthDepartmentFilter") |
||||
|
.serializeArray() |
||||
|
.forEach(function (data) { |
||||
|
if (data.value != '') { |
||||
|
input[abp.utils.toCamelCase(data.name.replace(/AuthDepartmentFilter./g, ''))] = data.value; |
||||
|
} |
||||
|
}) |
||||
|
return input; |
||||
|
}; |
||||
|
|
||||
|
var l = abp.localization.getResource('Wms'); |
||||
|
|
||||
|
var service = winIn.fasterZ.wms.z_Business.authDepartment.authDepartment; |
||||
|
var createModal = new abp.ModalManager(abp.appPath + 'Z_Business/AuthDepartment/AuthDepartment/CreateModal'); |
||||
|
var editModal = new abp.ModalManager(abp.appPath + 'Z_Business/AuthDepartment/AuthDepartment/EditModal'); |
||||
|
|
||||
|
var dataTable = $('#AuthDepartmentTable').DataTable(abp.libs.datatables.normalizeConfiguration({ |
||||
|
processing: true, |
||||
|
serverSide: true, |
||||
|
paging: true, |
||||
|
searching: false,//disable default searchbox
|
||||
|
autoWidth: false, |
||||
|
scrollCollapse: true, |
||||
|
order: [[0, "asc"]], |
||||
|
ajax: abp.libs.datatables.createAjax(service.getList,getFilter), |
||||
|
columnDefs: [ |
||||
|
{ |
||||
|
rowAction: { |
||||
|
items: |
||||
|
[ |
||||
|
{ |
||||
|
text: l('Edit'), |
||||
|
visible: abp.auth.isGranted('Wms.AuthDepartment.Update'), |
||||
|
action: function (data) { |
||||
|
editModal.open({ id: data.record.id }); |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
text: l('Delete'), |
||||
|
visible: abp.auth.isGranted('Wms.AuthDepartment.Delete'), |
||||
|
confirmMessage: function (data) { |
||||
|
return l('AuthDepartmentDeletionConfirmationMessage', data.record.id); |
||||
|
}, |
||||
|
action: function (data) { |
||||
|
service.delete(data.record.id) |
||||
|
.then(function () { |
||||
|
abp.notify.info(l('SuccessfullyDeleted')); |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentCode'), |
||||
|
data: "code" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentDescription'), |
||||
|
data: "description" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentId'), |
||||
|
data: "id" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentIsActive'), |
||||
|
data: "isActive" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentName'), |
||||
|
data: "name" |
||||
|
}, |
||||
|
{ |
||||
|
title: l('AuthDepartmentRemark'), |
||||
|
data: "remark" |
||||
|
}, |
||||
|
] |
||||
|
})); |
||||
|
|
||||
|
createModal.onResult(function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
editModal.onResult(function () { |
||||
|
dataTable.ajax.reload(); |
||||
|
}); |
||||
|
|
||||
|
$('#NewAuthDepartmentButton').click(function (e) { |
||||
|
e.preventDefault(); |
||||
|
createModal.open(); |
||||
|
}); |
||||
|
}); |
Loading…
Reference in new issue