This commit is contained in:
mmrbnjd
2025-01-22 13:02:53 +03:30
parent 83d7514581
commit 88d4b63394
5 changed files with 382 additions and 54 deletions

View File

@@ -1,5 +1,6 @@
<PageTitle>انبارداری</PageTitle>
@page "/Warehouse"
@using Front.CUSComponent
@using Front.Services
@using Shared.DTOs
@using Shared.DTOs.Warehouse
@@ -20,7 +21,7 @@
<ul class="list-group fa-padding" style="border: 2px solid #0d6efd">
<li class="list-group-item" data-toggle="modal" data-target="#issue">
<div class="row g-3">
=
=
<div class="col-md-2">
<input @bind-value="date" placeholder="تاریخ" style="text-align:center" dir="ltr" class="form-control" type="number">
</div>
@@ -157,7 +158,15 @@
string query = "";
if (!string.IsNullOrEmpty(date))
query = $"date={date}&";
{
if (date.Replace("/","").Length==10)
query = $"date={date}&";
else
{
ShowDangerAlert("تاریخ صحیح نمی باشد");
return;
}
}
if (CODID != null && CODID != 0)
query += $"CODID={CODID}&";
@@ -183,44 +192,41 @@
}
public async Task CallBackItem(ActionInResultComponent result)
{
if (result.Status == ComponentStatus.success && result.Action==ComponentAction.delete)
ShowSuccessAlert("حذف با موفقیت انجام شد");
if (result.Status == ComponentStatus.success && result.Action == ComponentAction.update)
ShowSuccessAlert("ویرایش با موفقیت انجام شد");
if (result.Status == ComponentStatus.success && result.Action == ComponentAction.add)
ShowSuccessAlert("سند جدید اضافه شد");
if (result.Status==ComponentStatus.success)
{
await Load(1);
}
}
public async Task Item(CirculationDto circulationDto)
{
//رسید
string title = "";
//رسید
if (circulationDto.Type == TypeCirculation.Receipt)
{
//جدید
if (circulationDto.CODID==0)
{
}
else
{
}
}
//حواله
title = "رسید";
//حواله
if (circulationDto.Type == TypeCirculation.Remittance)
{
//جدید
if (circulationDto.CODID == 0)
{
title = "حواله";
}
else
{
}
}
// var parameters = new Dictionary<string, object>();
if (circulationDto.CODID == 0)
title += " جدید";
else title = "اطلاعات " + title;
var parameters = new Dictionary<string, object>();
// if (ID == 0) parameters.Add("Cus", new RCustomer() { ID = 0 });
// else parameters.Add("Cus", request.list.Where(w => w.ID == ID).First().Clone());
// parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<ActionInResultComponent>(this, CallBackCustomerItem));
// await modal.ShowAsync<CustomerItem>(title: ID == 0 ? "مشتری جدید" : "ویرایش اطلاعات", parameters: parameters);
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<ActionInResultComponent>(this, CallBackItem));
parameters.Add("model", circulationDto);
parameters.Add("NewItem", circulationDto.CODID == 0);
parameters.Add("CODrequest", CODrequest);
await modal.ShowAsync<WarehouseItem>(title: title, parameters: parameters);
}