mh_custom/wtmProject.Shared/Pages/_Admin/WTM_CONTRACT/Details.razor

65 lines
3.0 KiB
Plaintext
Raw Normal View History

2024-05-16 17:30:33 +08:00
@page "/_Admin/WTM_CONTRACT/Details/{id}"
@using wtmProject.ViewModel._Admin.WTM_CONTRACTVMs;
@inherits BasePage
<ValidateForm @ref="vform" Model="@Model" >
<Row ItemsPerRow="ItemsPerRow.Three" RowType="RowType.Normal">
<Display @bind-Value="@Model.Entity.CustomId" Lookup="@AllWTM_CUSTOMs" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.CustomClass" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.VisitObjectId" Lookup="@AllWTM_CUSTOM_PERSONs" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.MarkManageId" Lookup="@AllFrameworkUsers" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ProjectId" Lookup="@AllWTM_PROJECTs" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ContractName" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ContractCode" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.SignDate" FormatString="yyyy-MM-dd" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.ContractAmount" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.CostAmount" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ContractCycle" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ProjectManageId" Lookup="@AllFrameworkUsers" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.GrossProfitMargin" ShowLabel="true"/>
<WTUploadFile @bind-Value="@Model.Entity.Files" IsDisabled="true" ShowLabel="true" />
</Row>
<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_CONTRACTVM Model = null;
private ValidateForm vform { get; set; }
[Parameter]
public string id { get; set; }
private List<SelectedItem> AllWTM_CUSTOMs = new List<SelectedItem>();
private List<SelectedItem> AllWTM_CUSTOM_PERSONs = new List<SelectedItem>();
private List<SelectedItem> AllFrameworkUsers = new List<SelectedItem>();
private List<SelectedItem> AllWTM_PROJECTs = new List<SelectedItem>();
protected override async Task OnInitializedAsync()
{
AllWTM_CUSTOMs = await WtmBlazor.Api.CallItemsApi("/api/WTM_CONTRACT/GetWTM_CUSTOMs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllWTM_CUSTOM_PERSONs = await WtmBlazor.Api.CallItemsApi("/api/WTM_CONTRACT/GetWTM_CUSTOM_PERSONs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllFrameworkUsers = await WtmBlazor.Api.CallItemsApi("/api/WTM_CONTRACT/GetFrameworkUsers", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllWTM_PROJECTs = await WtmBlazor.Api.CallItemsApi("/api/WTM_CONTRACT/GetWTM_PROJECTs", placeholder: WtmBlazor.Localizer["Sys.All"]);
var rv = await WtmBlazor.Api.CallAPI<WTM_CONTRACTVM>($"/api/WTM_CONTRACT/{id}");
Model = rv.Data;
}
public void OnClose()
{
CloseDialog();
}
}