HeReport - columns order changed, new filter property bool
This commit is contained in:
@@ -85,6 +85,27 @@
|
||||
return firstOrDefaultResult;
|
||||
}
|
||||
|
||||
public int ExecuteNonQuery(string query, Action<ParameterCollection> parameters)
|
||||
{
|
||||
var rowsAffected = 0;
|
||||
|
||||
using (var sqlConnection = new SqlConnection(this.connectionString))
|
||||
{
|
||||
sqlConnection.OpenWithErrorHandling();
|
||||
|
||||
using (var sqlCommand = sqlConnection.CreateCommand())
|
||||
{
|
||||
sqlCommand.CommandText = query;
|
||||
|
||||
parameters(sqlCommand.Parameters);
|
||||
|
||||
rowsAffected = sqlCommand.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
|
||||
return rowsAffected;
|
||||
}
|
||||
|
||||
public T ScalarTransaction<T>(string query, Action<ParameterCollection> parameters)
|
||||
{
|
||||
var scalarResult = default(T);
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
using LaaProductionWeb.Data.Interfaces;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using System;
|
||||
|
||||
using System.Data.SqlClient;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
IEnumerable<T> AsEnumerable<T>(string query, Func<ISqlReader, T> reader);
|
||||
|
||||
int ExecuteNonQuery(string query, Action<ParameterCollection> parameters);
|
||||
|
||||
T FirstOrDefault<T>(string query, Action<ParameterCollection> parameters, Func<ISqlReader, T> reader);
|
||||
|
||||
T ScalarTransaction<T>(string query, Action<ParameterCollection> parameters);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{
|
||||
using LaaProductionWeb.Data.Interfaces;
|
||||
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
@@ -14,17 +15,23 @@
|
||||
|
||||
public IParameterCollection Add(string name, object value)
|
||||
{
|
||||
this.parameters.Add(new SqlParameter(name, value));
|
||||
this.parameters.Add(new SqlParameter(name, value ?? DBNull.Value));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public IParameterCollection AddFile(string name, byte[] fileContent)
|
||||
{
|
||||
var sqlParameter = new SqlParameter(name, SqlDbType.VarBinary)
|
||||
var sqlParameter = new SqlParameter(name, SqlDbType.VarBinary);
|
||||
|
||||
if (fileContent is null)
|
||||
{
|
||||
Value = fileContent
|
||||
};
|
||||
sqlParameter.Value = DBNull.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
sqlParameter.Value = fileContent;
|
||||
}
|
||||
|
||||
this.parameters.Add(sqlParameter);
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<Compile Include="Models\HeliumReportItem.cs" />
|
||||
<Compile Include="Models\HeliumReportModel.cs" />
|
||||
<Compile Include="Models\HeliumReportModelExtensions.cs" />
|
||||
<Compile Include="Models\OrderIdentity.cs" />
|
||||
<Compile Include="Models\PalletPosition.cs" />
|
||||
<Compile Include="Models\RoleModel.cs" />
|
||||
<Compile Include="Models\UserRole.cs" />
|
||||
|
||||
@@ -11,25 +11,25 @@
|
||||
{
|
||||
var model = default(HeliumReportItem);
|
||||
|
||||
this.Add(model.Property(x => x.FertigungNr, this.Count));
|
||||
this.Add(model.Property(x => x.AuftragNr, this.Count));
|
||||
this.Add(model.Property(x => x.PositionNr, this.Count));
|
||||
this.Add(model.Property(x => x.SerialNr, this.Count));
|
||||
this.Add(model.Property(x => x.IdentNr, this.Count));
|
||||
this.Add(model.Property(x => x.HeId, this.Count));
|
||||
this.Add(model.Property(x => x.HeTestId, this.Count));
|
||||
this.Add(model.Property(x => x.PcbId, this.Count));
|
||||
this.Add(model.Property(x => x.Nennweite, this.Count));
|
||||
this.Add(model.Property(x => x.Baulaenge, this.Count));
|
||||
this.Add(model.Property(x => x.Typ, this.Count));
|
||||
this.Add(model.Property(x => x.Druck, this.Count));
|
||||
this.Add(model.Property(x => x.Temperatur, this.Count));
|
||||
this.Add(model.Property(x => x.HeLakeRate, this.Count));
|
||||
this.Add(model.Property(x => x.HeTestPressure, this.Count));
|
||||
this.Add(model.Property(x => x.IsValid, this.Count));
|
||||
this.Add(model.Text(x => x.FertigungNr, this.Count));
|
||||
this.Add(model.Text(x => x.AuftragNr, this.Count));
|
||||
this.Add(model.Text(x => x.PositionNr, this.Count));
|
||||
this.Add(model.Text(x => x.SerialNr, this.Count));
|
||||
this.Add(model.Text(x => x.IdentNr, this.Count));
|
||||
this.Add(model.Text(x => x.HeId, this.Count));
|
||||
this.Add(model.Text(x => x.HeTestId, this.Count));
|
||||
this.Add(model.Text(x => x.PcbId, this.Count));
|
||||
this.Add(model.Text(x => x.Nennweite, this.Count));
|
||||
this.Add(model.Text(x => x.Baulaenge, this.Count));
|
||||
this.Add(model.Text(x => x.Typ, this.Count));
|
||||
this.Add(model.Text(x => x.Druck, this.Count));
|
||||
this.Add(model.Text(x => x.Temperatur, this.Count));
|
||||
this.Add(model.Text(x => x.HeLakeRate, this.Count));
|
||||
this.Add(model.Text(x => x.HeTestPressure, this.Count));
|
||||
this.Add(model.Boolean(x => x.IsValid, this.Count));
|
||||
this.Add(model.Text(x => x.Text, this.Count));
|
||||
this.Add(model.DateTime(x => x.TestDate, this.Count, -1));
|
||||
this.Add(model.Property(x => x.Tester, this.Count));
|
||||
this.Add(model.Property(x => x.Text, this.Count));
|
||||
this.Add(model.Text(x => x.Tester, this.Count));
|
||||
}
|
||||
|
||||
internal SqlExpression OrderBy()
|
||||
@@ -57,7 +57,12 @@
|
||||
|
||||
foreach (var property in this)
|
||||
{
|
||||
if (property.Type == "date")
|
||||
if (string.IsNullOrWhiteSpace(property.Like))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (property.Type == PropertyType.Date)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(property.Like))
|
||||
{
|
||||
@@ -98,9 +103,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (string.IsNullOrWhiteSpace(property.Like))
|
||||
else if (property.Type == PropertyType.Bool)
|
||||
{
|
||||
continue;
|
||||
var propertyName = $"{property.Property}_{property.Index}";
|
||||
var propertyValue = int.TryParse(property.Like, out int bit) ? bit : 0;
|
||||
|
||||
sqlExpression.Add($"{property.Column} = @{propertyName}", propertyName, property.Like);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
public int Index { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public PropertyType Type { get; set; }
|
||||
|
||||
public string Property { get; set; }
|
||||
|
||||
|
||||
@@ -5,31 +5,31 @@
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
public enum PropertyType
|
||||
{
|
||||
Text,
|
||||
Date,
|
||||
Bool
|
||||
}
|
||||
|
||||
public static class HeliumReportModelExtensions
|
||||
{
|
||||
public static HeliumReportFilterProperty Property(this HeliumReportItem model, Expression<Func<HeliumReportItem, object>> expression, int index, int orderBy = 0)
|
||||
{
|
||||
var memberInfo = default(MemberInfo);
|
||||
|
||||
if (expression.Body is MemberExpression memberExpression)
|
||||
{
|
||||
memberInfo = memberExpression.Member;
|
||||
}
|
||||
else if (expression.Body is UnaryExpression unaryExpression && unaryExpression.Operand is MemberExpression operandExpression)
|
||||
{
|
||||
memberInfo = operandExpression.Member;
|
||||
}
|
||||
public static HeliumReportFilterProperty Text(this HeliumReportItem model, Expression<Func<HeliumReportItem, object>> expression, int index, int orderBy = 0)
|
||||
=> model.Property(expression, index, PropertyType.Text, orderBy);
|
||||
|
||||
return new HeliumReportFilterProperty
|
||||
{
|
||||
Column = memberInfo?.GetCustomAttribute<ColumnAttribute>()?.Name,
|
||||
Property = memberInfo?.Name,
|
||||
OrderBy = orderBy,
|
||||
Index = index,
|
||||
Type = "text"
|
||||
};
|
||||
}
|
||||
public static HeliumReportFilterProperty DateTime(this HeliumReportItem model, Expression<Func<HeliumReportItem, object>> expression, int index, int orderBy = 0)
|
||||
=> model.Property(expression, index, PropertyType.Date, orderBy);
|
||||
|
||||
public static HeliumReportFilterProperty Boolean(this HeliumReportItem model, Expression<Func<HeliumReportItem, object>> expression, int index, int orderBy = 0)
|
||||
=> model.Property(expression, index, PropertyType.Bool, orderBy);
|
||||
|
||||
public static HeliumReportFilterProperty Property(
|
||||
this HeliumReportItem model
|
||||
, Expression<Func<HeliumReportItem, object>> expression
|
||||
, int index
|
||||
, PropertyType propertyType
|
||||
, int orderBy)
|
||||
{
|
||||
var memberInfo = default(MemberInfo);
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
Property = memberInfo?.Name,
|
||||
OrderBy = orderBy,
|
||||
Index = index,
|
||||
Type = "date"
|
||||
Type = propertyType
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace LaaProductionWeb.Services.Models
|
||||
{
|
||||
public class OrderIdentity
|
||||
{
|
||||
public int OrderNr { get; set; }
|
||||
|
||||
public int PositionNr { get; set; }
|
||||
|
||||
public int SerialNr { get; set; }
|
||||
|
||||
public string ClientSerialNr { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
[Required]
|
||||
public int? OrderNr { get; set; }
|
||||
|
||||
[Required]
|
||||
|
||||
public int? PositionNr { get; set; }
|
||||
|
||||
[Required]
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
[Required(ErrorMessage = "Auftrags-Nr. ist erforderlich!")]
|
||||
[Display(Name = "Auftrags-Nr. scanen oder eingeben")]
|
||||
public int? OrderNr { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Positions-Nr. ist erforderlich!")]
|
||||
|
||||
[Display(Name = "Positions-Nr. auswählen")]
|
||||
public int? PositionNr { get; set; }
|
||||
|
||||
|
||||
@@ -33,11 +33,12 @@
|
||||
var palletsCount = this.dbContext.FirstOrDefault(
|
||||
query: $@"
|
||||
SELECT COUNT(1)
|
||||
FROM (SELECT [PalettenNr] AS [PalletNr]
|
||||
, COUNT([SerienNr]) AS [Count]
|
||||
FROM (SELECT [PalettenNr] AS [PalletNr]
|
||||
, COUNT([SerienNr]) AS [Count]
|
||||
FROM [PalettenScan]
|
||||
WHERE [AuftragNr] = @{nameof(model.OrderNr)}
|
||||
AND [PositionNr] = @{nameof(model.PositionNr)}
|
||||
WHERE [AuftragNr] = @{nameof(model.OrderNr)}
|
||||
AND (@{nameof(model.PositionNr)} IS NULL
|
||||
OR [PositionNr] = @{nameof(model.PositionNr)})
|
||||
GROUP BY [PalettenNr])
|
||||
AS [Paletten]
|
||||
WHERE [Count] > 0",
|
||||
@@ -90,10 +91,13 @@
|
||||
AND [PalettenScan].[PositionNr] = [AuftragPositionSerienNr].[PositionNr]
|
||||
AND [PalettenScan].[SerienNr] = REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')
|
||||
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(model.OrderNr)}
|
||||
AND (@{nameof(model.PositionNr)} IS NULL
|
||||
OR [AuftragPositionSerienNr].[PositionNr] = @{nameof(model.PositionNr)})
|
||||
AND ([PalettenScan].[PalettenNr] = @{nameof(model.PalletNr)}
|
||||
OR [PalettenScan].[PalettenNr] IS NULL)",
|
||||
parameters: parameters => parameters
|
||||
.Add(nameof(model.OrderNr), model.OrderNr)
|
||||
.Add(nameof(model.PositionNr), model.PositionNr)
|
||||
.Add(nameof(model.PalletNr), model.PalletNr),
|
||||
reader: reader => new SerialNr
|
||||
{
|
||||
@@ -111,22 +115,24 @@
|
||||
public PalletsBatchModel LoadBatchModel(OrderScanModel model)
|
||||
{
|
||||
const string orderNr = nameof(model.OrderNr);
|
||||
const string posNr = nameof(model.PositionNr);
|
||||
const string palNr = nameof(model.PalletNr);
|
||||
|
||||
var batchModel = this.dbContext.FirstOrDefault(
|
||||
query: $@"
|
||||
SELECT TOP 1
|
||||
[Auftrag].[AuftragNr] -- 0
|
||||
, [Auftrag].[FertigungsauftragNr] -- 1
|
||||
, [Auftrag].[Menge] -- 2
|
||||
, [Kunde].[Name] -- 3
|
||||
, [Auftrag].[ZusatzText] -- 4
|
||||
[Auftrag].[AuftragNr] -- 0
|
||||
, [Auftrag].[FertigungsauftragNr] -- 1
|
||||
, (SELECT SUM([AAP].[Menge])
|
||||
FROM [AlleAuftragPositionen] AS [AAP]
|
||||
WHERE [AAP].[AuftragNr] = [Auftrag].[AuftragNr]) -- 2
|
||||
, [Kunde].[Name] -- 3
|
||||
, [Auftrag].[ZusatzText] -- 4
|
||||
FROM [AlleAuftragPositionen] AS [Auftrag]
|
||||
JOIN [Kunde] ON [Kunde].[KundenNr] = [Auftrag].[KundenNr]
|
||||
WHERE [Auftrag].[AuftragNr] = @{orderNr}
|
||||
AND [Auftrag].[PositionNr] = @{posNr}
|
||||
ORDER BY [Auftrag].[FertigungsauftragNr] DESC",
|
||||
WHERE [Auftrag].[AuftragNr] = @{nameof(model.OrderNr)}
|
||||
AND (@{nameof(model.PositionNr)} IS NULL
|
||||
OR [Auftrag].[PositionNr] = @{nameof(model.PositionNr)})
|
||||
ORDER BY [Auftrag].[FertigungsauftragNr] DESC",
|
||||
parameters: parameters => parameters
|
||||
.Add(nameof(model.OrderNr), model.OrderNr)
|
||||
.Add(nameof(model.PositionNr), model.PositionNr),
|
||||
@@ -196,16 +202,16 @@
|
||||
return $"Der Packet mit Serien-Nr: {model.SerialNr} wurde bereits hinzugefügt.";
|
||||
}
|
||||
|
||||
var orderKVP = this.GetOrderKVP(model.OrderNr, model.PositionNr, model.SerialNr);
|
||||
var orderIdentity = this.UpdateOrderIdentifiers(model.OrderNr, model.PositionNr, model.SerialNr);
|
||||
|
||||
if (orderKVP.Key <= 0)
|
||||
if (orderIdentity is null)
|
||||
{
|
||||
return $"Der Packet mit Serien-Nr: {model.SerialNr} ist nicht dem Auftrag/Position: {model.OrderNr}/{model.PositionNr} zugewiesen.";
|
||||
}
|
||||
else
|
||||
{
|
||||
model.SerialNr = orderKVP.Value;
|
||||
model.PalletNr = this.GetPalletNr(model);
|
||||
model.SerialNr = orderIdentity.ClientSerialNr;
|
||||
model.PositionNr = orderIdentity.PositionNr;
|
||||
}
|
||||
|
||||
var rowsAffected = this.InsertPalletEntry(model);
|
||||
@@ -216,18 +222,6 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
private int GetPalletNr(OrderScanModel model)
|
||||
=> this.dbContext.FirstOrDefault(
|
||||
query: $@"
|
||||
SELECT MAX([PalettenNr]) + 1
|
||||
FROM [PalettenScan]
|
||||
WHERE [AuftragNr] = @{nameof(model.OrderNr)}
|
||||
AND [PositionNr] = @{nameof(model.PositionNr)}",
|
||||
parameters: parameters => parameters
|
||||
.Add(nameof(model.OrderNr), model.OrderNr)
|
||||
.Add(nameof(model.PositionNr), model.PositionNr),
|
||||
reader: reader => Math.Min(reader.GetValue<int>(0), model.PalletNr));
|
||||
|
||||
private OrderScanModel DeletePalletEntryById(int id)
|
||||
=> this.dbContext.FirstOrDefault(
|
||||
query: $@"
|
||||
@@ -245,26 +239,31 @@
|
||||
PalletNr = reader.GetValue<short>(2)
|
||||
});
|
||||
|
||||
private KeyValuePair<int, string> GetOrderKVP(int? orderNr, int? positionNr, string serialNr)
|
||||
private OrderIdentity UpdateOrderIdentifiers(int? orderNr, int? positionNr, string serialNr)
|
||||
=> this.dbContext.FirstOrDefault(
|
||||
query: $@"
|
||||
SELECT DISTINCT TOP 1
|
||||
[AuftragPositionSerienNr].[SerienNr] -- 0
|
||||
, REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 1
|
||||
[AuftragPositionSerienNr].[PositionNr] -- 0
|
||||
, [AuftragPositionSerienNr].[SerienNr] -- 1
|
||||
, REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 2
|
||||
FROM [AuftragPositionSerienNr]
|
||||
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)}
|
||||
AND [AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)}
|
||||
AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'",
|
||||
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)}
|
||||
AND ([AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)} OR @{nameof(positionNr)} IS NULL)
|
||||
AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'",
|
||||
parameters: parameters => parameters
|
||||
.Add(nameof(orderNr), orderNr)
|
||||
.Add(nameof(positionNr), positionNr)
|
||||
.Add(nameof(serialNr), serialNr),
|
||||
reader: reader => new KeyValuePair<int, string>(
|
||||
key: reader.GetValue<int>(0),
|
||||
value: reader.GetValue<string>(1)));
|
||||
reader: reader => new OrderIdentity
|
||||
{
|
||||
OrderNr = orderNr ?? -1,
|
||||
PositionNr = reader.GetValue<short>(0),
|
||||
SerialNr = reader.GetValue<int>(1),
|
||||
ClientSerialNr = reader.GetValue<string>(2),
|
||||
});
|
||||
|
||||
private int InsertPalletEntry(OrderScanModel model)
|
||||
=> this.dbContext.ScalarTransaction<int>($@"
|
||||
=> this.dbContext.ExecuteNonQuery($@"
|
||||
INSERT
|
||||
INTO [PalettenScan] (
|
||||
[PalettenNr]
|
||||
@@ -294,11 +293,9 @@
|
||||
SELECT CAST(CASE WHEN [PalettenScan].[ID] IS NULL THEN 0 ELSE 1 END AS BIT)
|
||||
FROM [PalettenScan]
|
||||
WHERE [PalettenScan].[AuftragNr] = @{nameof(orderNr)}
|
||||
AND [PalettenScan].[PositionNr] = @{nameof(positionNr)}
|
||||
AND [PalettenScan].[SerienNr] = @{nameof(serialNr)}",
|
||||
parameters => parameters
|
||||
.Add(nameof(orderNr), orderNr)
|
||||
.Add(nameof(positionNr), positionNr)
|
||||
.Add(nameof(serialNr), serialNr),
|
||||
reader => reader.GetValue<bool>(0));
|
||||
|
||||
|
||||
@@ -32,44 +32,47 @@
|
||||
[HttpPost]
|
||||
public ActionResult Index(OrderClientModel model)
|
||||
{
|
||||
var files = this.Request.Files;
|
||||
|
||||
if (model.OrderId is null || model.OrderId <= 0)
|
||||
if (model.OrderId > 0 && model.ClientId > 0)
|
||||
{
|
||||
this.TempData[FilePDF] = $"Bitte Auftrag auswählen.";
|
||||
}
|
||||
else if (files.Count > 0)
|
||||
{
|
||||
var file = this.Request.Files.Get(0);
|
||||
var files = this.Request.Files;
|
||||
|
||||
if (file.ContentType == "application/pdf" && model.ClientId > 0 && model.OrderId > 0)
|
||||
if (files.Count > 0)
|
||||
{
|
||||
if (!this.protocolService.OrderCompleted(model.OrderId.Value))
|
||||
{
|
||||
this.TempData[FilePDF] = $"Auftrag enthält nicht bestandene Prüfungen.";
|
||||
}
|
||||
else
|
||||
{
|
||||
model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value);
|
||||
var file = files.Get(0);
|
||||
|
||||
if (model.FileId > 0)
|
||||
if (file.ContentType == "application/pdf")
|
||||
{
|
||||
if (this.protocolService.OrderCompleted(model.OrderId.Value))
|
||||
{
|
||||
return this.RedirectToAction(nameof(this.Document), model);
|
||||
model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value);
|
||||
|
||||
if (model.FileId > 0)
|
||||
{
|
||||
return this.RedirectToAction(nameof(this.Document), model);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TempData[FilePDF] = $"Der PDF Datei wurde nicht hochgeladen.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TempData[FilePDF] = $"Der PDF Datei wurde nicht hochgeladen.";
|
||||
this.TempData[FilePDF] = $"Auftrag enthält nicht bestandene Prüfungen.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen.";
|
||||
this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt.";
|
||||
this.TempData[FilePDF] = $"Bitte Auftrag auswählen.";
|
||||
}
|
||||
|
||||
return this.View(model);
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
|
||||
if (result)
|
||||
{
|
||||
model.PositionNr = null;
|
||||
model.SerialNr = default(string);
|
||||
}
|
||||
else
|
||||
@@ -78,6 +79,7 @@
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
var orderScanModel = this.shipmentsService.DeletePalletEntry(id);
|
||||
orderScanModel.PositionNr = null;
|
||||
|
||||
return this.View(nameof(this.Index), new ShipmentModel(orderScanModel));
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
clientMenu.classList.add(show);
|
||||
})
|
||||
} else {
|
||||
clientMenu.classList.remove(show);
|
||||
orderMenu.classList.remove(show);
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
Func<bool, string> bgColor = x => !x ? "bg-light" : string.Empty;
|
||||
}
|
||||
|
||||
<input type="hidden" name="@this.Model.TypeName" value="@this.Model.Type" />
|
||||
<input type="hidden" name="@this.Model.IndexName" value="@this.Model.Index" />
|
||||
<input type="hidden" name="@this.Model.ColumnName" value="@this.Model.Column" />
|
||||
<input type="hidden" name="@this.Model.PropertyName" value="@this.Model.Property" />
|
||||
<input type="hidden" name="@this.Model.TypeName" value="@this.Model.Type" />
|
||||
<input name="@this.Model.LikeName" class="form-control form-control-sm mb-1" autocomplete="off" value="@this.Model.Like" />
|
||||
|
||||
<div class="input-group flex-nowrap justify-content-center">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@model LaaProductionWeb.Services.Models.HeliumReportModel
|
||||
|
||||
<form action="/Report" method="post" autocomplete="off" class="h-100" id="he_report">
|
||||
<div class="table-responsive mh-100">
|
||||
<div class="table-responsive h-100 mh-100">
|
||||
<table class="table table-sm table-bordered mb-0">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
@@ -21,14 +21,14 @@
|
||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.HeLakeRate)</th>
|
||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.HeTestPressure)</th>
|
||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.IsValid)</th>
|
||||
<th class="p-2" style="min-width: 200px">@this.Model.Display(x => x.Text)</th>
|
||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.TestDate)</th>
|
||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.Tester)</th>
|
||||
<th class="p-2">@this.Model.Display(x => x.Text)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
@foreach (var filter in this.Model.Filter)
|
||||
{
|
||||
if (filter.Type == "date")
|
||||
if (filter.Type == LaaProductionWeb.Services.Models.PropertyType.Date)
|
||||
{
|
||||
<td>@this.Html.Partial("DateFilter", filter)</td>
|
||||
}
|
||||
@@ -42,31 +42,31 @@
|
||||
<tbody>
|
||||
@foreach (var item in this.Model.Items)
|
||||
{
|
||||
<tr>
|
||||
<td class="text-nowrap p-2">@item.FertigungNr</td>
|
||||
<td class="text-nowrap p-2">@item.AuftragNr</td>
|
||||
<td class="text-nowrap p-2">@item.PositionNr</td>
|
||||
<td class="text-nowrap p-2">@item.SerialNr</td>
|
||||
<td class="text-nowrap p-2">@item.IdentNr</td>
|
||||
<td class="text-nowrap p-2">@item.HeId</td>
|
||||
<td class="text-nowrap p-2">
|
||||
<a class="text-decoration-none cursor-pointer" href="#@item.HeTestId">
|
||||
@item.HeTestId
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-nowrap p-2">@item.PcbId</td>
|
||||
<td class="text-nowrap p-2">@item.Nennweite</td>
|
||||
<td class="text-nowrap p-2">@item.Baulaenge</td>
|
||||
<td class="text-nowrap p-2">@item.Typ</td>
|
||||
<td class="text-nowrap p-2">@item.Druck</td>
|
||||
<td class="text-nowrap p-2">@item.Temperatur</td>
|
||||
<td class="text-nowrap p-2">@item.HeLakeRate</td>
|
||||
<td class="text-nowrap p-2">@item.HeTestPressure</td>
|
||||
<td class="text-nowrap p-2"><i class="bi bi-bold @(item.IsValid ? "bi-check text-success" : "bi-x text-danger")"></i></td>
|
||||
<td class="text-nowrap p-2">@($"{item.TestDate:dd.MM.yyyy}")</td>
|
||||
<td class="text-nowrap p-2">@item.Tester</td>
|
||||
<td class="p-2">@item.Text</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap p-2">@item.FertigungNr</td>
|
||||
<td class="text-nowrap p-2">@item.AuftragNr</td>
|
||||
<td class="text-nowrap p-2">@item.PositionNr</td>
|
||||
<td class="text-nowrap p-2">@item.SerialNr</td>
|
||||
<td class="text-nowrap p-2">@item.IdentNr</td>
|
||||
<td class="text-nowrap p-2">@item.HeId</td>
|
||||
<td class="text-nowrap p-2">
|
||||
<a class="text-decoration-none cursor-pointer" href="#@item.HeTestId">
|
||||
@item.HeTestId
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-nowrap p-2">@item.PcbId</td>
|
||||
<td class="text-nowrap p-2">@item.Nennweite</td>
|
||||
<td class="text-nowrap p-2">@item.Baulaenge</td>
|
||||
<td class="text-nowrap p-2">@item.Typ</td>
|
||||
<td class="text-nowrap p-2">@item.Druck</td>
|
||||
<td class="text-nowrap p-2">@item.Temperatur</td>
|
||||
<td class="text-nowrap p-2">@item.HeLakeRate</td>
|
||||
<td class="text-nowrap p-2">@item.HeTestPressure</td>
|
||||
<td class="text-nowrap p-2"><i class="bi bi-bold @(item.IsValid ? "bi-check text-success" : "bi-x text-danger")"></i></td>
|
||||
<td class="p-2">@item.Text</td>
|
||||
<td class="text-nowrap p-2">@($"{item.TestDate:dd.MM.yyyy}")</td>
|
||||
<td class="text-nowrap p-2">@item.Tester</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@model LaaProductionWeb.Services.Models.OrderPositions
|
||||
|
||||
<li><span class="dropdown-item">Alle</span></li>
|
||||
|
||||
@foreach (var position in this.Model)
|
||||
{
|
||||
<li><span class="dropdown-item">@position</span></li>
|
||||
|
||||
@@ -17,10 +17,9 @@
|
||||
<ul id="order_nr_menu" class="dropdown-menu w-100 mt-1"></ul>
|
||||
</div>
|
||||
<div class="form-floating mb-3 dropdown">
|
||||
@this.Html.TextBoxFor(x => x.PositionNr, new { id = "pos_nr", @class = "form-control", placeholder = "0000000000" })
|
||||
@this.Html.TextBoxFor(x => x.PositionNr, new { id = "pos_nr", @class = "form-control bg-white cursor-pointer", placeholder = "0000000000", @readonly = "readonly" })
|
||||
@this.Html.LabelFor(x => x.PositionNr, new { @for = "pos_nr", @class = "text-smallcaps" })
|
||||
@this.Html.ValidationMessageFor(x => x.PositionNr, string.Empty, new { @class = "small text-danger m-0 p-0" })
|
||||
<i class="bi bi-chevron-down" style="position: absolute;right: 3.5%;top: 35%;"></i>
|
||||
<i class="bi bi-chevron-down" style="position: absolute;right: 3.5%;top: 35%;" data-bs-toggle="dropdown"></i>
|
||||
<ul id="pos_nr_menu" class="dropdown-menu w-100 mt-1">
|
||||
<li class="dropdown-item disabled white-space-break">Keine Positionen vorhanden.</li>
|
||||
</ul>
|
||||
@@ -95,15 +94,6 @@
|
||||
.submit();
|
||||
});
|
||||
orderNrMenu.classList.remove(show);
|
||||
if (orderChanged) {
|
||||
orderChanged = false;
|
||||
positionNrInput.value = positionNrMenu
|
||||
.querySelector(dropdownItemSelector)
|
||||
.innerHTML;
|
||||
document
|
||||
.getElementById('order_form')
|
||||
.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function getPositions(orderNr) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@model LaaProductionWeb.Services.Models.OrderScanModel
|
||||
|
||||
@if (this.Model.PositionNr != null)
|
||||
@if (this.Model.OrderNr > 0)
|
||||
{
|
||||
<div>
|
||||
<h5 class="text-smallcaps">@this.Model.ScanTitle</h5>
|
||||
@@ -32,7 +32,6 @@
|
||||
<div class="form-floating w-auto">
|
||||
@this.Html.TextBoxFor(x => x.SerialNr, new { id = "serial_nr", @class = "form-control form-control-success text-center", placeholder = "0000000000" })
|
||||
@this.Html.LabelFor(x => x.SerialNr, new { @for = "serial_nr", @class = "text-smallcaps" })
|
||||
|
||||
</div>
|
||||
<div class="form-floating">
|
||||
@this.Html.TextBoxFor(x => x.PalletNr, new { id = "pallet_nr", @class = "form-control form-control-success text-center", placeholder = "0" })
|
||||
|
||||
Reference in New Issue
Block a user