@page "/CustomReport/Report/{id}"
@using wtmProject.Model
@using wtmProject.Shared.Pages._Admin.WTM_CUSTOM
@using wtmProject.ViewModel._Admin.WTM_BUSINESSVMs
@using wtmProject.ViewModel._Admin.WTM_CUSTOMVMs;
@using wtmProject.ViewModel._Admin.WTM_VISIT_PLANVMs
@using wtmProject.ViewModel._Admin.WTM_CONTRACTVMs;
@inherits BasePage
@**@
@**@
@* *@
@code {
private ValidateForm vform { get; set; }
private WTM_CUSTOM_Temp Model = null;
private WTM_CUSTOMSearcher SearchModel = new WTM_CUSTOMSearcher();
private List AllWTM_CUSTOMs = new List();
private List AllWTM_AREAs = new List();
private IEnumerable CustomPersons { get; set; }
private IEnumerable VisitRecords { get; set; }
private IEnumerable BusinessInfos { get; set; }
private IEnumerable ContractInfos { get; set; }
[Parameter]
public string id { get; set; }
[Inject]
private NavigationManager NavigationManager { get; set; }
[Inject]
private IJSRuntime jsRuntime { get; set; }
protected override async Task OnInitializedAsync()
{
if (!string.IsNullOrEmpty(id))
{
SearchModel.CustomAllName = id;
}
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($"/api/WTM_CUSTOM/GetCustomInfo?name={SearchModel.CustomAllName}");
Model = rv.Data;
CustomPersons = Model.CustomInfo.CustomPerson;
VisitRecords = Model.VisitRecord;
BusinessInfos = Model.BusinessInfo;
ContractInfos = Model.ContractInfo;
_ = jsRuntime.InvokeVoidAsync("setTabTitle", "客户综合信息展示");
await base.OnInitializedAsync();
}
private async Task OnDetailsClick(WTM_CONTRACT_View item)
{
await OpenDialog(WtmBlazor.Localizer["Sys.Details"], x => x.id == item.ID.ToString());
}
private async Task DoSearch()
{
var url = $"/api/WTM_CUSTOM/GetCustomInfo?name={SearchModel.CustomAllName}";
var rv = await WtmBlazor.Api.CallAPI(url);
Model = rv.Data;
CustomPersons = Model.CustomInfo.CustomPerson;
VisitRecords = Model.VisitRecord;
BusinessInfos = Model.BusinessInfo;
ContractInfos = Model.ContractInfo;
}
public void OnClose()
{
CloseDialog();
}
private async Task OnDetailsClick(WTM_BUSINESS_View item)
{
await OpenDialog(WtmBlazor.Localizer["Sys.Details"], x => x.id == item.ID.ToString());
}
}