Test modifica componente XZing
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.0.2111.2515</Version>
|
||||
<Version>1.0.2111.2516</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
@@ -38,7 +38,7 @@
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="5.0.1" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="5.0.1" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="5.0.1" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.5" />
|
||||
<PackageReference Include="BlazorBarcodeScanner.ZXing.JS" Version="0.2.4" />
|
||||
<PackageReference Include="Blazorise" Version="0.9.4.4" />
|
||||
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.4.4" />
|
||||
<PackageReference Include="Blazorise.Charts" Version="0.9.4.4" />
|
||||
@@ -54,6 +54,7 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" ExcludeAssets="All" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="ZXingBlazor" Version="0.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
@page "/CodeProcess"
|
||||
@page "/CodeProcess/{CurrCode}"
|
||||
|
||||
@using GWMS.UI.Data
|
||||
|
||||
@inject MessageService AMServ
|
||||
|
||||
<h3>CodeProcess</h3>
|
||||
|
||||
<b>@CurrCode</b>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string CurrCode { get; set; } = "";
|
||||
|
||||
}
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
@using Blazorise.Components
|
||||
@using GWMS.UI.Components
|
||||
@using BlazorBarcodeScanner.ZXing.JS
|
||||
@*@using BlazorBarcodeScanner.ZXing.JS*@
|
||||
@using ZXingBlazor.Components
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header table-primary mb-0">
|
||||
@@ -66,14 +67,24 @@
|
||||
{
|
||||
@if (string.IsNullOrEmpty(OrderCode))
|
||||
{
|
||||
<BlazorBarcodeScanner.ZXing.JS.BarcodeReader Title=""
|
||||
StartCameraAutomatically="true"
|
||||
ShowStart="false"
|
||||
ShowReset="false"
|
||||
ShowToggleTorch="false"
|
||||
ShowVideoDeviceList="@showCamera"
|
||||
ShowResult="false"
|
||||
OnBarcodeReceived="LocalReceivedBarcodeText" />
|
||||
@*<BlazorBarcodeScanner.ZXing.JS.BarcodeReader Title=""
|
||||
StartCameraAutomatically="true"
|
||||
ShowStart="false"
|
||||
ShowReset="false"
|
||||
ShowToggleTorch="false"
|
||||
ShowVideoDeviceList="@showCamera"
|
||||
ShowResult="false"
|
||||
OnBarcodeReceived="LocalReceivedBarcodeText" />*@
|
||||
|
||||
/* ((e) => { BarCode = e; ShowScanBarcode = !ShowScanBarcode; }) */
|
||||
|
||||
<BarcodeReader ScanResult="(e) => ScanDoneHandler(e)"
|
||||
ShowScanBarcode="ShowScanBarcode"
|
||||
Close="() => ShowScanBarcode=!ShowScanBarcode"
|
||||
ScanBtnTitle="Scan"
|
||||
ResetBtnTitle="Reset"
|
||||
CloseBtnTitle="Close"
|
||||
SelectDeviceBtnTitle="Select Device"></BarcodeReader>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -186,57 +186,87 @@ namespace GWMS.UI.Pages
|
||||
if (adesso.Subtract(vetoScan).TotalMinutes > 0)
|
||||
{
|
||||
vetoScan = adesso.AddSeconds(4);
|
||||
if (doProcess(ordCode))
|
||||
//NavManager.NavigateTo($"CodeProcess/{ordCode}");
|
||||
OrderCode = ordCode;
|
||||
var result = ProcessBarcode(ordCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//[Parameter]
|
||||
//public EventCallback<string> ScanDone { get; set; }
|
||||
|
||||
protected void ScanDoneHandler(string value)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
// non nullo
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
// non veto...
|
||||
if (adesso.Subtract(vetoScan).TotalMinutes > 0)
|
||||
{
|
||||
vetoScan = adesso.AddSeconds(4);
|
||||
//NavManager.NavigateTo($"CodeProcess/{value}");
|
||||
OrderCode = value;
|
||||
var result = ProcessBarcode(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool ShowScanBarcode { get; set; } = false;
|
||||
|
||||
public string? BarCode { get; set; }
|
||||
|
||||
private async Task ProcessBarcode(string Barcode)
|
||||
{
|
||||
if (doProcess(Barcode))
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
OrderCode = Barcode;
|
||||
});
|
||||
var ordine = await DataService.OrderGetByCode(Barcode);
|
||||
if (ordine != null)
|
||||
{
|
||||
if (ordine.DtExecEnd > ordine.DtOrder)
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
OrderCode = ordCode;
|
||||
errorDescription = "Errore: ordine già completato";
|
||||
});
|
||||
var ordine = await DataService.OrderGetByCode(ordCode);
|
||||
if (ordine != null)
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (ordine.DtExecEnd > ordine.DtOrder)
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
errorDescription = "Errore: ordine già completato";
|
||||
});
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(3000);
|
||||
forceReset();
|
||||
});
|
||||
}
|
||||
else if (ordine.PlantId != SelPlantId)
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
errorDescription = "Errore: ordine destinato ad altro impianto";
|
||||
});
|
||||
Thread.Sleep(3000);
|
||||
forceReset();
|
||||
});
|
||||
}
|
||||
else if (ordine.PlantId != SelPlantId)
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
{
|
||||
errorDescription = "Errore: ordine destinato ad altro impianto";
|
||||
});
|
||||
|
||||
await Task.Run(() =>
|
||||
{
|
||||
Thread.Sleep(3000);
|
||||
forceReset();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo...
|
||||
MessageService.SelPlantId = $"{SelPlantId}";
|
||||
MessageService.SelOrderCode = args.BarcodeText;
|
||||
// rimando a pagina load....
|
||||
NavManager.NavigateTo($"GasStationLoad");
|
||||
}
|
||||
}
|
||||
else
|
||||
await Task.Run(() =>
|
||||
{
|
||||
errorDescription = "Errore: ordine non trovato";
|
||||
}
|
||||
Thread.Sleep(3000);
|
||||
forceReset();
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// salvo...
|
||||
MessageService.SelPlantId = $"{SelPlantId}";
|
||||
MessageService.SelOrderCode = Barcode;
|
||||
// rimando a pagina load....
|
||||
NavManager.NavigateTo($"GasStationLoad");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorDescription = "Errore: ordine non trovato";
|
||||
}
|
||||
}
|
||||
// verifico ordine e stazione siano coerenti...
|
||||
}
|
||||
|
||||
private async Task ReloadAllData()
|
||||
|
||||
@@ -59,8 +59,11 @@
|
||||
<script src="_content/Blazorise.Bootstrap/blazorise.bootstrap.js"></script>
|
||||
<script src="_content/Blazorise.Charts/blazorise.charts.js"></script>
|
||||
|
||||
<script src="_content/BlazorBarcodeScanner.ZXing.JS/zxingjs.index.min.js"></script>
|
||||
<script src="_content/BlazorBarcodeScanner.ZXing.JS/BlazorBarcodeScanner.js"></script>
|
||||
@*<script src="_content/BlazorBarcodeScanner.ZXing.JS/zxingjs.index.min.js"></script>
|
||||
<script src="_content/BlazorBarcodeScanner.ZXing.JS/BlazorBarcodeScanner.js"></script>*@
|
||||
|
||||
<script src="_content/ZXingBlazor/lib/barcodereader/zxing.js"></script>
|
||||
<script src="_content/ZXingBlazor/lib/barcodereader/barcode.js"></script>
|
||||
|
||||
<script src="font-awesome/js/all.min.js"></script>
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.0.2111.2515</h4>
|
||||
<h4>Versione: 1.0.2111.2516</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2111.2515
|
||||
1.0.2111.2516
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2111.2515</version>
|
||||
<version>1.0.2111.2516</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user