mh_custom/wtmProject.Shared/Pages/_Admin/WTM_BUSINESS/Details.razor
2024-05-17 13:43:36 +08:00

82 lines
3.4 KiB
Plaintext

@page "/_Admin/WTM_BUSINESS/Details/{id}"
@using wtmProject.ViewModel._Admin.WTM_BUSINESSVMs;
@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.VisitObjectId" Lookup="@AllWTM_CUSTOM_PERSONs" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.ProjectId" Lookup="@AllWTM_PROJECTs" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.BusinessStatus" ShowLabel="true"/>
<Display @bind-Value="@Model.Entity.BusinessName" ShowLabel="true"/>
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Normal">
<Textarea @bind-Value="@Model.Entity.Requirement" IsDisabled="true" rows="4" />
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Normal">
<Textarea @bind-Value="@Model.Entity.Proposal" IsDisabled="true" rows="4" />
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Normal">
<Textarea @bind-Value="@Model.Entity.BusinessProject" IsDisabled="true" rows="4" />
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Normal">
<Textarea @bind-Value="@Model.Entity.Follow" IsDisabled="true" rows="4" />
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.One" RowType="RowType.Normal">
<Textarea @bind-Value="@Model.Entity.Negotiation" IsDisabled="true" rows="4" />
</Row>
<br />
<Row ItemsPerRow="ItemsPerRow.Three" RowType="RowType.Normal">
<Display @bind-Value="@Model.Entity.MarkManageId" Lookup="@AllFrameworkUsers" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.CreateTime" FormatString="yyyy-MM-dd" ShowLabel="true" />
<Display @bind-Value="@Model.Entity.UpdateTime" FormatString="yyyy-MM-dd" 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_BUSINESSVM 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> AllWTM_PROJECTs = new List<SelectedItem>();
private List<SelectedItem> AllFrameworkUsers = new List<SelectedItem>();
protected override async Task OnInitializedAsync()
{
AllWTM_CUSTOMs = await WtmBlazor.Api.CallItemsApi("/api/WTM_BUSINESS/GetWTM_CUSTOMs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllWTM_CUSTOM_PERSONs = await WtmBlazor.Api.CallItemsApi("/api/WTM_BUSINESS/GetWTM_CUSTOM_PERSONs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllWTM_PROJECTs = await WtmBlazor.Api.CallItemsApi("/api/WTM_BUSINESS/GetWTM_PROJECTs", placeholder: WtmBlazor.Localizer["Sys.All"]);
AllFrameworkUsers = await WtmBlazor.Api.CallItemsApi("/api/WTM_VISIT_PLAN/GetFrameworkUsersTemp");
var rv = await WtmBlazor.Api.CallAPI<WTM_BUSINESSVM>($"/api/WTM_BUSINESS/{id}");
Model = rv.Data;
}
public void OnClose()
{
CloseDialog();
}
}