...
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> کالا
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -10,6 +10,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> مشتری
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -12,6 +12,9 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها /</span> صورتحساب
|
||||
</h4>
|
||||
<div class="col-md-12">
|
||||
<div class="card mb-2">
|
||||
<div class="row">
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
|
||||
<PageTitle>جزئیات صورتحساب</PageTitle>
|
||||
|
||||
|
||||
@if (invoice.IsDeleted)
|
||||
@@ -22,6 +22,20 @@
|
||||
<hr class="hr" />
|
||||
}
|
||||
<form>
|
||||
@if (InvoiceID.HasValue)
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> @invoice?.Title
|
||||
</h4>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4 class="fw-bold py-3 mb-4">
|
||||
<span class="text-muted fw-light">سرویس ها / صورتحساب /</span> جدید
|
||||
</h4>
|
||||
}
|
||||
|
||||
|
||||
@* alert *@
|
||||
<div class="row">
|
||||
<Alert hidden="@Hidealert" Color="@alertColor" Dismissable="false">
|
||||
@@ -241,7 +255,7 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="row g-3">
|
||||
<div class="form-group col-md-6">
|
||||
<div class="form-group col-md-4">
|
||||
<label class="col-form-label" for="inputdes">توضیحات</label>
|
||||
<InputText @bind-Value="invoice.Des" type="text" class="form-control" id="inputdes" placeholder="توضیحات" />
|
||||
</div>
|
||||
@@ -270,13 +284,24 @@
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
@* <Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
چاپ
|
||||
</Button>
|
||||
</Button> *@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
@if (invoice.invoiceType != InvoiceType.Bidding)
|
||||
{
|
||||
<div class="form-group col-md-2">
|
||||
<br />
|
||||
<Button class="mt-3" Color="ButtonColor.Dark" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
ارسال به سامانه مودیان
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row g-3">
|
||||
@@ -409,7 +434,9 @@
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
invoice = await rsp.Content.ReadFromJsonAsync<InvoiceDTO>();
|
||||
|
||||
}
|
||||
|
||||
else if(rsp.StatusCode==System.Net.HttpStatusCode.BadRequest)
|
||||
{
|
||||
ShowDangerAlert("صورتحساب مرجع یافت نشد");
|
||||
|
8
TaxPayerFull/Pages/UserPanel/TaxPayer.razor
Normal file
8
TaxPayerFull/Pages/UserPanel/TaxPayer.razor
Normal file
@@ -0,0 +1,8 @@
|
||||
<PageTitle>سامانه مودیان</PageTitle>
|
||||
@inject HttpClientController hc;
|
||||
@layout PanelLayout
|
||||
@page "/TaxPayer"
|
||||
@using Front.Services
|
||||
@code {
|
||||
|
||||
}
|
60
TaxPayerFull/Pages/UserPanel/TaxPayerInvoiceItem.razor
Normal file
60
TaxPayerFull/Pages/UserPanel/TaxPayerInvoiceItem.razor
Normal file
@@ -0,0 +1,60 @@
|
||||
@page "/TaxPayerInvoiceItem/{InvoiceID:int}"
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@layout PanelLayout
|
||||
@inject HttpClientController hc;
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
<ConfirmDialog @ref="dialog" />
|
||||
<Toasts AutoHide="true" Delay="6000" class="p-3" Messages="messages" Placement="ToastsPlacement.TopRight" />
|
||||
<PageTitle>آماده سازی صورتحساب</PageTitle>
|
||||
|
||||
@code {
|
||||
private ConfirmDialog dialog = default!;
|
||||
[Parameter] public int? InvoiceID { get; set; }
|
||||
List<ToastMessage> messages = new List<ToastMessage>();
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
public InvoiceDTO? invoice { get; set; }
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
IconName alertIconName = IconName.CheckCircleFill;
|
||||
bool Hidealert = true;
|
||||
string alertMessage = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await LoadData();
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
@functions{
|
||||
private void ShowSuccessAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
alertColor = AlertColor.Success;
|
||||
alertIconName = IconName.CheckCircleFill;
|
||||
alertMessage = msg;
|
||||
}
|
||||
private void ShowDangerAlert(string msg)
|
||||
{
|
||||
Hidealert = false;
|
||||
alertColor = AlertColor.Danger;
|
||||
alertIconName = IconName.ExclamationTriangleFill;
|
||||
alertMessage = msg;
|
||||
}
|
||||
private async Task LoadData()
|
||||
{
|
||||
PreloadService.Show(SpinnerColor.Dark);
|
||||
var rsp = await hc.Get($"Invoice/Get/{InvoiceID}/{true}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
invoice = await rsp.Content.ReadFromJsonAsync<InvoiceDTO>();
|
||||
}
|
||||
else
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(request[0]);
|
||||
}
|
||||
PreloadService.Hide();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user