mh_custom/wtmProject.Shared/Pages/_Admin/WTM_CUSTOM/Details.razor
2026-01-06 10:55:05 +08:00

64 lines
2.8 KiB
Plaintext

@page "/_Admin/WTM_CUSTOM/Details/{id}"
@using wtmProject.Model
@using wtmProject.ViewModel._Admin.WTM_CUSTOMVMs;
@inherits BasePage
<ValidateForm @ref="vform" Model="@Model" >
<Row ItemsPerRow="ItemsPerRow.Three" RowType="RowType.Normal">
<Display @bind-Value="@Model.Entity.CustomAllName" ShowLabel="true"/>
@* <Display @bind-Value="@Model.Entity.CustomShortName" ShowLabel="true"/> *@
<Display @bind-Value="@Model.Entity.CustomClass" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.AreaId" Lookup="@AllWTM_AREAs" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.CustomId" Lookup="@AllWTM_CUSTOMs" ShowLabel="true" />
@* <Display @bind-Value="@Model.Entity.IndustryType" ShowLabel="true" />*@
<Display @bind-Value="@Model.Entity.EnterprisesType" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.CreditLevel" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.CustomCity" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.CustomType" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.BillingFile" ShowLabel="true" />
</Row>
<br />
<Table TItem="WTM_CUSTOM_PERSON"
IsPagination="false"
IsStriped="true" IsBordered="true" IsMultipleSelect="false" @bind-Items="@list"
ShowToolbar="false" ShowExtendButtons="false" ShowSkeleton="true">
<TableColumns>
<TableColumn @bind-Field="@context.PersonName" />
<TableColumn @bind-Field="@context.PersonPhone" />
<TableColumn @bind-Field="@context.PersonPost" />
</TableColumns>
</Table>
<br />
<div class="modal-footer table-modal-footer">
<Button Color="Color.Primary" Icon="fa fa-save" Text="@WtmBlazor.Localizer["Sys.Close"]" OnClick="OnClose" />
</div>
</ValidateForm>
@code {
private WTM_CUSTOMVM Model = null;
private ValidateForm vform { get; set; }
private IEnumerable<WTM_CUSTOM_PERSON> list { get; set; }
[Parameter]
public string id { get; set; }
private List<SelectedItem> AllWTM_AREAs = new List<SelectedItem>();
private List<SelectedItem> AllWTM_CUSTOMs = new List<SelectedItem>();
protected override async Task OnInitializedAsync()
{
AllWTM_AREAs = await WtmBlazor.Api.CallItemsApi("/api/WTM_CUSTOM/GetWTM_AREAs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllWTM_CUSTOMs = await WtmBlazor.Api.CallItemsApi("/api/WTM_VISIT_PLAN/GetWTM_CUSTOMs", placeholder: WtmBlazor.Localizer["Sys.All"]);
var rv = await WtmBlazor.Api.CallAPI<WTM_CUSTOMVM>($"/api/WTM_CUSTOM/{id}");
Model = rv.Data;
list = Model.Entity.CustomPerson;
}
public void OnClose()
{
CloseDialog();
}
}