...
This commit is contained in:
@@ -28,7 +28,6 @@ namespace Back.Services.Warehouse
|
|||||||
var RequestRemittance = _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
var RequestRemittance = _RemittanceRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||||
.Select(s=>new CirculationDto
|
.Select(s=>new CirculationDto
|
||||||
{
|
{
|
||||||
ID= s.ID,
|
|
||||||
CODID=s.CODID,
|
CODID=s.CODID,
|
||||||
CODTitle=s.cODItem.Title,
|
CODTitle=s.cODItem.Title,
|
||||||
Date=s.Date,
|
Date=s.Date,
|
||||||
@@ -46,7 +45,6 @@ namespace Back.Services.Warehouse
|
|||||||
var RequestReceipt = _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
var RequestReceipt = _ReceiptRepo.Get(w => w.cODItem.CompanyID == CompanyID && !w.Deleted)
|
||||||
.Select(s => new CirculationDto
|
.Select(s => new CirculationDto
|
||||||
{
|
{
|
||||||
ID = s.ID,
|
|
||||||
CODID = s.CODID,
|
CODID = s.CODID,
|
||||||
CODTitle = s.cODItem.Title,
|
CODTitle = s.cODItem.Title,
|
||||||
Date = s.Date,
|
Date = s.Date,
|
||||||
|
@@ -18,7 +18,6 @@ namespace Shared.DTOs.Warehouse
|
|||||||
}
|
}
|
||||||
public class CirculationDto
|
public class CirculationDto
|
||||||
{
|
{
|
||||||
public int ID { get; set; }
|
|
||||||
public int CODID { get; set; }
|
public int CODID { get; set; }
|
||||||
[Display(Name = "کالا")]
|
[Display(Name = "کالا")]
|
||||||
public string? CODTitle { get; set; }
|
public string? CODTitle { get; set; }
|
||||||
|
@@ -54,7 +54,14 @@
|
|||||||
{
|
{
|
||||||
if (id > 0)
|
if (id > 0)
|
||||||
{
|
{
|
||||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
if (OnMultipleOfThree.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||||
|
}
|
||||||
|
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">@property.GetValue(item, null)</button></td>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -67,7 +74,7 @@
|
|||||||
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
||||||
switch (convertmodel.SentStatus)
|
switch (convertmodel.SentStatus)
|
||||||
{
|
{
|
||||||
case SentStatus.Send:
|
case SentStatus.Send:
|
||||||
<td style="background-color:#6495ED">@property.GetValue(item, null)</td>
|
<td style="background-color:#6495ED">@property.GetValue(item, null)</td>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -75,15 +82,15 @@
|
|||||||
<td style="background-color:#2AD51B">@property.GetValue(item, null)</td>
|
<td style="background-color:#2AD51B">@property.GetValue(item, null)</td>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SentStatus.Unsuccessful:
|
case SentStatus.Unsuccessful:
|
||||||
<td style="background-color:#C70000">@property.GetValue(item, null)</td>
|
<td style="background-color:#C70000">@property.GetValue(item, null)</td>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SentStatus.pending :
|
case SentStatus.pending:
|
||||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SentStatus.IN_PROGRESS :
|
case SentStatus.IN_PROGRESS:
|
||||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -115,11 +122,29 @@
|
|||||||
|| convertmodel.SentStatus == SentStatus.pending
|
|| convertmodel.SentStatus == SentStatus.pending
|
||||||
|| convertmodel.SentStatus == SentStatus.IN_PROGRESS)
|
|| convertmodel.SentStatus == SentStatus.IN_PROGRESS)
|
||||||
{
|
{
|
||||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
if (OnMultipleOfThree.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (convertmodel.SentStatus == SentStatus.Unsuccessful)
|
else if (convertmodel.SentStatus == SentStatus.Unsuccessful)
|
||||||
{
|
{
|
||||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
|
if (OnMultipleOfThree.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -128,9 +153,18 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (id > 0)
|
if (id > 0 /* || item.ToString() == "Shared.DTOs.Warehouse.CirculationDto" */)
|
||||||
{
|
{
|
||||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
if (OnMultipleOfThree.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThree.Value.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (OnMultipleOfThreeGeneric.HasValue)
|
||||||
|
{
|
||||||
|
<td><button @onclick="()=>OnMultipleOfThreeGeneric.Value.InvokeAsync(item)" type="button" class="btn btn-link">ویرایش</button></td>
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -159,5 +193,7 @@
|
|||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public List<T> ModelinComponent { get; set; } = new List<T>();
|
public List<T> ModelinComponent { get; set; } = new List<T>();
|
||||||
[Parameter] public EventCallback<int> OnMultipleOfThree { get; set; }
|
[Parameter] public EventCallback<int>? OnMultipleOfThree { get; set; }
|
||||||
|
[Parameter] public EventCallback<T>? OnMultipleOfThreeGeneric { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -59,10 +59,10 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(-1)">رسید جدید</Button>
|
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(new CirculationDto(){Type=TypeCirculation.Receipt})">رسید جدید</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(-2)">حواله جدید</Button>
|
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary" @onclick="()=>Item(new CirculationDto(){Type=TypeCirculation.Remittance})">حواله جدید</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
@* data *@
|
@* data *@
|
||||||
@if (request != null)
|
@if (request != null)
|
||||||
{
|
{
|
||||||
<LTable ModelinComponent="request?.list" OnMultipleOfThree="EventCallback.Factory.Create<int>(this,Item)" />
|
<LTable ModelinComponent="request?.list" OnMultipleOfThreeGeneric="EventCallback.Factory.Create<CirculationDto>(this,Item)" />
|
||||||
@* pagination *@
|
@* pagination *@
|
||||||
<p style="color:red">@request?.RowCount آیتم یافت شد</p>
|
<p style="color:red">@request?.RowCount آیتم یافت شد</p>
|
||||||
<nav aria-label="Page navigation">
|
<nav aria-label="Page navigation">
|
||||||
@@ -185,22 +185,35 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
public async Task Item(int ID)
|
public async Task Item(CirculationDto circulationDto)
|
||||||
{
|
{
|
||||||
//رسید جدید
|
//رسید
|
||||||
if (ID == -1)
|
if (circulationDto.Type == TypeCirculation.Receipt)
|
||||||
{
|
{
|
||||||
|
//جدید
|
||||||
|
if (circulationDto.CODID==0)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
//حواله جدید
|
else
|
||||||
if (ID == -2)
|
{
|
||||||
{
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ID >0)
|
//حواله
|
||||||
|
if (circulationDto.Type == TypeCirculation.Remittance)
|
||||||
{
|
{
|
||||||
request.list.Where(w=>w.i)
|
//جدید
|
||||||
|
if (circulationDto.CODID == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// var parameters = new Dictionary<string, object>();
|
// var parameters = new Dictionary<string, object>();
|
||||||
|
|
||||||
// if (ID == 0) parameters.Add("Cus", new RCustomer() { ID = 0 });
|
// if (ID == 0) parameters.Add("Cus", new RCustomer() { ID = 0 });
|
||||||
|
Reference in New Issue
Block a user