Merge branch 'main' of https://slm.sms-esaap.com/la_operations/laa_production
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
public class DbContext : IDbContext
|
public class DbContext : IDbContext
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
|
|
||||||
parameters(sqlCommand.Parameters);
|
parameters(sqlCommand.Parameters);
|
||||||
|
|
||||||
using (SqlReader sqlReader = sqlCommand.ExecuteReader())
|
using (SqlReader sqlReader = sqlCommand.ExecuteReader(CommandBehavior.SequentialAccess))
|
||||||
{
|
{
|
||||||
while (sqlReader.Read())
|
while (sqlReader.Read())
|
||||||
{
|
{
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
{
|
{
|
||||||
sqlCommand.CommandText = query;
|
sqlCommand.CommandText = query;
|
||||||
|
|
||||||
using (SqlReader sqlReader = sqlCommand.ExecuteReader())
|
using (SqlReader sqlReader = sqlCommand.ExecuteReader(CommandBehavior.SequentialAccess))
|
||||||
{
|
{
|
||||||
while (sqlReader.Read())
|
while (sqlReader.Read())
|
||||||
{
|
{
|
||||||
@@ -71,7 +72,7 @@
|
|||||||
|
|
||||||
parameters(sqlCommand.Parameters);
|
parameters(sqlCommand.Parameters);
|
||||||
|
|
||||||
using (SqlReader sqlReader = sqlCommand.ExecuteReader())
|
using (SqlReader sqlReader = sqlCommand.ExecuteReader(CommandBehavior.SequentialAccess))
|
||||||
{
|
{
|
||||||
if (sqlReader.Read())
|
if (sqlReader.Read())
|
||||||
{
|
{
|
||||||
@@ -84,6 +85,27 @@
|
|||||||
return firstOrDefaultResult;
|
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)
|
public T ScalarTransaction<T>(string query, Action<ParameterCollection> parameters)
|
||||||
{
|
{
|
||||||
var scalarResult = default(T);
|
var scalarResult = default(T);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
IEnumerable<T> AsEnumerable<T>(string query, Func<ISqlReader, T> reader);
|
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 FirstOrDefault<T>(string query, Action<ParameterCollection> parameters, Func<ISqlReader, T> reader);
|
||||||
|
|
||||||
T ScalarTransaction<T>(string query, Action<ParameterCollection> parameters);
|
T ScalarTransaction<T>(string query, Action<ParameterCollection> parameters);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
using LaaProductionWeb.Data.Interfaces;
|
using LaaProductionWeb.Data.Interfaces;
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
@@ -14,17 +15,23 @@
|
|||||||
|
|
||||||
public IParameterCollection Add(string name, object value)
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IParameterCollection AddFile(string name, byte[] fileContent)
|
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);
|
this.parameters.Add(sqlParameter);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
IEnumerable<TestStatus> LoadTestStatus(int orderId);
|
IEnumerable<TestStatus> LoadTestStatus(int orderId);
|
||||||
|
|
||||||
|
bool OrderCompleted(int orderNr);
|
||||||
|
|
||||||
int SaveFile(Stream fileStream, int clientId, int orderId);
|
int SaveFile(Stream fileStream, int clientId, int orderId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<Compile Include="Models\HeliumReportItem.cs" />
|
<Compile Include="Models\HeliumReportItem.cs" />
|
||||||
<Compile Include="Models\HeliumReportModel.cs" />
|
<Compile Include="Models\HeliumReportModel.cs" />
|
||||||
<Compile Include="Models\HeliumReportModelExtensions.cs" />
|
<Compile Include="Models\HeliumReportModelExtensions.cs" />
|
||||||
|
<Compile Include="Models\OrderIdentity.cs" />
|
||||||
<Compile Include="Models\PalletPosition.cs" />
|
<Compile Include="Models\PalletPosition.cs" />
|
||||||
<Compile Include="Models\RoleModel.cs" />
|
<Compile Include="Models\RoleModel.cs" />
|
||||||
<Compile Include="Models\UserRole.cs" />
|
<Compile Include="Models\UserRole.cs" />
|
||||||
|
|||||||
@@ -11,25 +11,25 @@
|
|||||||
{
|
{
|
||||||
var model = default(HeliumReportItem);
|
var model = default(HeliumReportItem);
|
||||||
|
|
||||||
this.Add(model.Property(x => x.FertigungNr, this.Count));
|
this.Add(model.Text(x => x.FertigungNr, this.Count));
|
||||||
this.Add(model.Property(x => x.AuftragNr, this.Count));
|
this.Add(model.Text(x => x.AuftragNr, this.Count));
|
||||||
this.Add(model.Property(x => x.PositionNr, this.Count));
|
this.Add(model.Text(x => x.PositionNr, this.Count));
|
||||||
this.Add(model.Property(x => x.SerialNr, this.Count));
|
this.Add(model.Text(x => x.SerialNr, this.Count));
|
||||||
this.Add(model.Property(x => x.IdentNr, this.Count));
|
this.Add(model.Text(x => x.IdentNr, this.Count));
|
||||||
this.Add(model.Property(x => x.HeId, this.Count));
|
this.Add(model.Text(x => x.HeId, this.Count));
|
||||||
this.Add(model.Property(x => x.HeTestId, this.Count));
|
this.Add(model.Text(x => x.HeTestId, this.Count));
|
||||||
this.Add(model.Property(x => x.PcbId, this.Count));
|
this.Add(model.Text(x => x.PcbId, this.Count));
|
||||||
this.Add(model.Property(x => x.Nennweite, this.Count));
|
this.Add(model.Text(x => x.Nennweite, this.Count));
|
||||||
this.Add(model.Property(x => x.Baulaenge, this.Count));
|
this.Add(model.Text(x => x.Baulaenge, this.Count));
|
||||||
this.Add(model.Property(x => x.Typ, this.Count));
|
this.Add(model.Text(x => x.Typ, this.Count));
|
||||||
this.Add(model.Property(x => x.Druck, this.Count));
|
this.Add(model.Text(x => x.Druck, this.Count));
|
||||||
this.Add(model.Property(x => x.Temperatur, this.Count));
|
this.Add(model.Text(x => x.Temperatur, this.Count));
|
||||||
this.Add(model.Property(x => x.HeLakeRate, this.Count));
|
this.Add(model.Text(x => x.HeLakeRate, this.Count));
|
||||||
this.Add(model.Property(x => x.HeTestPressure, this.Count));
|
this.Add(model.Text(x => x.HeTestPressure, this.Count));
|
||||||
this.Add(model.Property(x => x.IsValid, 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.DateTime(x => x.TestDate, this.Count, -1));
|
||||||
this.Add(model.Property(x => x.Tester, this.Count));
|
this.Add(model.Text(x => x.Tester, this.Count));
|
||||||
this.Add(model.Property(x => x.Text, this.Count));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal SqlExpression OrderBy()
|
internal SqlExpression OrderBy()
|
||||||
@@ -57,25 +57,32 @@
|
|||||||
|
|
||||||
foreach (var property in this)
|
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))
|
if (!string.IsNullOrWhiteSpace(property.Like))
|
||||||
{
|
{
|
||||||
var dateTokens = property
|
var dateTokens = property
|
||||||
.Like
|
.Like
|
||||||
.Split(new[] { ' ', '-' }, StringSplitOptions.RemoveEmptyEntries)
|
.Split(new[] { '-' })
|
||||||
.Select(x => DateTimeOffset.TryParse($"{x}", new CultureInfo("de"), DateTimeStyles.None, out DateTimeOffset date)
|
.Select(x => DateTimeOffset.TryParse($"{x}".Trim(), new CultureInfo("de"), DateTimeStyles.None, out DateTimeOffset date)
|
||||||
? (DateTimeOffset?)date.AddHours(-date.Hour)
|
? (DateTimeOffset?)date
|
||||||
: null)
|
: null)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
if (dateTokens.Length >= 1)
|
if (dateTokens.Length >= 1)
|
||||||
{
|
{
|
||||||
var propertyValue = dateTokens[0];
|
var date1 = dateTokens.FirstOrDefault();
|
||||||
|
|
||||||
if (propertyValue != null)
|
if (date1 != null)
|
||||||
{
|
{
|
||||||
|
var date = date1.Value;
|
||||||
var propertyName = $"{property.Property}_{property.Index}_From";
|
var propertyName = $"{property.Property}_{property.Index}_From";
|
||||||
|
var propertyValue = new DateTime(date.Year, date.Month, date.Day, 0, 0, 0);
|
||||||
|
|
||||||
sqlExpression.Add($"{property.Column} >= @{propertyName}", propertyName, propertyValue);
|
sqlExpression.Add($"{property.Column} >= @{propertyName}", propertyName, propertyValue);
|
||||||
}
|
}
|
||||||
@@ -83,20 +90,25 @@
|
|||||||
|
|
||||||
if (dateTokens.Length >= 2)
|
if (dateTokens.Length >= 2)
|
||||||
{
|
{
|
||||||
var propertyValue = dateTokens[1];
|
var date2 = dateTokens.LastOrDefault();
|
||||||
|
|
||||||
if (propertyValue != null)
|
if (date2 != null)
|
||||||
{
|
{
|
||||||
|
var date = date2.Value.AddDays(1);
|
||||||
var propertyName = $"{property.Property}_{property.Index}_To";
|
var propertyName = $"{property.Property}_{property.Index}_To";
|
||||||
|
var propertyValue = new DateTime(date.Year, date.Month, date.Day, 0, 0, 0);
|
||||||
|
|
||||||
sqlExpression.Add($"{property.Column} <= @{propertyName}", propertyName, propertyValue);
|
sqlExpression.Add($"{property.Column} <= @{propertyName}", propertyName, propertyValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
public int Index { get; set; }
|
public int Index { get; set; }
|
||||||
|
|
||||||
public string Type { get; set; }
|
public PropertyType Type { get; set; }
|
||||||
|
|
||||||
public string Property { get; set; }
|
public string Property { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -5,31 +5,31 @@
|
|||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
|
public enum PropertyType
|
||||||
|
{
|
||||||
|
Text,
|
||||||
|
Date,
|
||||||
|
Bool
|
||||||
|
}
|
||||||
|
|
||||||
public static class HeliumReportModelExtensions
|
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)
|
public static HeliumReportFilterProperty Text(this HeliumReportItem model, Expression<Func<HeliumReportItem, object>> expression, int index, int orderBy = 0)
|
||||||
{
|
=> model.Property(expression, index, PropertyType.Text, orderBy);
|
||||||
memberInfo = memberExpression.Member;
|
|
||||||
}
|
|
||||||
else if (expression.Body is UnaryExpression unaryExpression && unaryExpression.Operand is MemberExpression operandExpression)
|
|
||||||
{
|
|
||||||
memberInfo = operandExpression.Member;
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
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);
|
var memberInfo = default(MemberInfo);
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
Property = memberInfo?.Name,
|
Property = memberInfo?.Name,
|
||||||
OrderBy = orderBy,
|
OrderBy = orderBy,
|
||||||
Index = index,
|
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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
[Required]
|
[Required]
|
||||||
public int? OrderNr { get; set; }
|
public int? OrderNr { get; set; }
|
||||||
|
|
||||||
[Required]
|
|
||||||
public int? PositionNr { get; set; }
|
public int? PositionNr { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
[Display(Name = "Auftrags-Nr. scanen oder eingeben")]
|
[Display(Name = "Auftrags-Nr. scanen oder eingeben")]
|
||||||
public int? OrderNr { get; set; }
|
public int? OrderNr { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Positions-Nr. ist erforderlich!")]
|
|
||||||
[Display(Name = "Positions-Nr. auswählen")]
|
[Display(Name = "Positions-Nr. auswählen")]
|
||||||
public int? PositionNr { get; set; }
|
public int? PositionNr { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public class ProtocolService : IProtocolService
|
public class ProtocolService : IProtocolService
|
||||||
{
|
{
|
||||||
@@ -162,6 +163,37 @@
|
|||||||
RadioTest = reader.GetValue<bool?>(5),
|
RadioTest = reader.GetValue<bool?>(5),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
public bool OrderCompleted(int orderId)
|
||||||
|
{
|
||||||
|
var sumResults = this.dbContext.AsEnumerable($@"
|
||||||
|
SELECT CAST(CASE WHEN ISNULL([CPT].[CordonelPressureTest_Valid], 1) = 1 THEN 0 ELSE 1 END AS INT)
|
||||||
|
+ CAST(CASE WHEN ISNULL([DP].[Dicht], 1) = 1 THEN 0 ELSE 1 END AS INT)
|
||||||
|
+ ISNULL(MAX([APS].[StatusFertigung]) - 30, 0)
|
||||||
|
+ CAST(CASE WHEN ISNULL([CRRH].[Result], 1) = 1 THEN 0 ELSE 1 END AS INT)
|
||||||
|
FROM [AuftragPositionSerienNr] AS [APS]
|
||||||
|
LEFT JOIN [Genesis_Meter] AS [GM] ON [GM].[Seriennummer] = [APS].[SerienNr]
|
||||||
|
LEFT JOIN [MapPcbIdToSerialNumber] AS [PCB] ON [PCB].[MapPcbIdToSerialNumber_SerialNumber] = [GM].[Seriennummer]
|
||||||
|
LEFT JOIN [Cordonel_Radio_RSSI_History] AS [CRRH] ON [CRRH].[RadioAdress] = [GM].[Adresse] - 10000000000
|
||||||
|
AND [CRRH].[IsLast] = 1
|
||||||
|
AND [CRRH].[Result] = 1
|
||||||
|
LEFT JOIN [Druckpruefung] AS [DP] ON [DP].[FabNr] = [PCB].[MapPcbIdToSerialNumber_PcbId]
|
||||||
|
AND [DP].[Dicht] = 1
|
||||||
|
LEFT JOIN [Cordonel_PressureTest] AS [CPT] ON [CPT].[CordonelPressureTest_PcbId] = [PCB].[MapPcbIdToSerialNumber_PcbId]
|
||||||
|
AND [CPT].[CordonelPressureTest_Valid] = 1
|
||||||
|
WHERE [APS].[AuftragNr] = @{nameof(orderId)}
|
||||||
|
GROUP BY [APS].[PositionNr]
|
||||||
|
, [APS].[SerienNr]
|
||||||
|
, [APS].[KundeneigeneSerienNr]
|
||||||
|
, [CPT].[CordonelPressureTest_Valid]
|
||||||
|
, [DP].[Dicht]
|
||||||
|
, [CRRH].[Result]",
|
||||||
|
parameters => parameters.Add(nameof(orderId), orderId),
|
||||||
|
reader => reader.GetValue<int>(0))
|
||||||
|
.Sum(x => x);
|
||||||
|
|
||||||
|
return sumResults == 0;
|
||||||
|
}
|
||||||
|
|
||||||
public int SaveFile(Stream fileStream, int clientId, int orderId)
|
public int SaveFile(Stream fileStream, int clientId, int orderId)
|
||||||
{
|
{
|
||||||
var fileName = $"{clientId}_{orderId}.pdf";
|
var fileName = $"{clientId}_{orderId}.pdf";
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
, COUNT([SerienNr]) AS [Count]
|
, COUNT([SerienNr]) AS [Count]
|
||||||
FROM [PalettenScan]
|
FROM [PalettenScan]
|
||||||
WHERE [AuftragNr] = @{nameof(model.OrderNr)}
|
WHERE [AuftragNr] = @{nameof(model.OrderNr)}
|
||||||
AND [PositionNr] = @{nameof(model.PositionNr)}
|
AND (@{nameof(model.PositionNr)} IS NULL
|
||||||
|
OR [PositionNr] = @{nameof(model.PositionNr)})
|
||||||
GROUP BY [PalettenNr])
|
GROUP BY [PalettenNr])
|
||||||
AS [Paletten]
|
AS [Paletten]
|
||||||
WHERE [Count] > 0",
|
WHERE [Count] > 0",
|
||||||
@@ -90,10 +91,13 @@
|
|||||||
AND [PalettenScan].[PositionNr] = [AuftragPositionSerienNr].[PositionNr]
|
AND [PalettenScan].[PositionNr] = [AuftragPositionSerienNr].[PositionNr]
|
||||||
AND [PalettenScan].[SerienNr] = REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')
|
AND [PalettenScan].[SerienNr] = REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')
|
||||||
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(model.OrderNr)}
|
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(model.OrderNr)}
|
||||||
|
AND (@{nameof(model.PositionNr)} IS NULL
|
||||||
|
OR [AuftragPositionSerienNr].[PositionNr] = @{nameof(model.PositionNr)})
|
||||||
AND ([PalettenScan].[PalettenNr] = @{nameof(model.PalletNr)}
|
AND ([PalettenScan].[PalettenNr] = @{nameof(model.PalletNr)}
|
||||||
OR [PalettenScan].[PalettenNr] IS NULL)",
|
OR [PalettenScan].[PalettenNr] IS NULL)",
|
||||||
parameters: parameters => parameters
|
parameters: parameters => parameters
|
||||||
.Add(nameof(model.OrderNr), model.OrderNr)
|
.Add(nameof(model.OrderNr), model.OrderNr)
|
||||||
|
.Add(nameof(model.PositionNr), model.PositionNr)
|
||||||
.Add(nameof(model.PalletNr), model.PalletNr),
|
.Add(nameof(model.PalletNr), model.PalletNr),
|
||||||
reader: reader => new SerialNr
|
reader: reader => new SerialNr
|
||||||
{
|
{
|
||||||
@@ -111,7 +115,6 @@
|
|||||||
public PalletsBatchModel LoadBatchModel(OrderScanModel model)
|
public PalletsBatchModel LoadBatchModel(OrderScanModel model)
|
||||||
{
|
{
|
||||||
const string orderNr = nameof(model.OrderNr);
|
const string orderNr = nameof(model.OrderNr);
|
||||||
const string posNr = nameof(model.PositionNr);
|
|
||||||
const string palNr = nameof(model.PalletNr);
|
const string palNr = nameof(model.PalletNr);
|
||||||
|
|
||||||
var batchModel = this.dbContext.FirstOrDefault(
|
var batchModel = this.dbContext.FirstOrDefault(
|
||||||
@@ -119,13 +122,16 @@
|
|||||||
SELECT TOP 1
|
SELECT TOP 1
|
||||||
[Auftrag].[AuftragNr] -- 0
|
[Auftrag].[AuftragNr] -- 0
|
||||||
, [Auftrag].[FertigungsauftragNr] -- 1
|
, [Auftrag].[FertigungsauftragNr] -- 1
|
||||||
, [Auftrag].[Menge] -- 2
|
, (SELECT SUM([AAP].[Menge])
|
||||||
|
FROM [AlleAuftragPositionen] AS [AAP]
|
||||||
|
WHERE [AAP].[AuftragNr] = [Auftrag].[AuftragNr]) -- 2
|
||||||
, [Kunde].[Name] -- 3
|
, [Kunde].[Name] -- 3
|
||||||
, [Auftrag].[ZusatzText] -- 4
|
, [Auftrag].[ZusatzText] -- 4
|
||||||
FROM [AlleAuftragPositionen] AS [Auftrag]
|
FROM [AlleAuftragPositionen] AS [Auftrag]
|
||||||
JOIN [Kunde] ON [Kunde].[KundenNr] = [Auftrag].[KundenNr]
|
JOIN [Kunde] ON [Kunde].[KundenNr] = [Auftrag].[KundenNr]
|
||||||
WHERE [Auftrag].[AuftragNr] = @{orderNr}
|
WHERE [Auftrag].[AuftragNr] = @{nameof(model.OrderNr)}
|
||||||
AND [Auftrag].[PositionNr] = @{posNr}
|
AND (@{nameof(model.PositionNr)} IS NULL
|
||||||
|
OR [Auftrag].[PositionNr] = @{nameof(model.PositionNr)})
|
||||||
ORDER BY [Auftrag].[FertigungsauftragNr] DESC",
|
ORDER BY [Auftrag].[FertigungsauftragNr] DESC",
|
||||||
parameters: parameters => parameters
|
parameters: parameters => parameters
|
||||||
.Add(nameof(model.OrderNr), model.OrderNr)
|
.Add(nameof(model.OrderNr), model.OrderNr)
|
||||||
@@ -196,16 +202,16 @@
|
|||||||
return $"Der Packet mit Serien-Nr: {model.SerialNr} wurde bereits hinzugefügt.";
|
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.";
|
return $"Der Packet mit Serien-Nr: {model.SerialNr} ist nicht dem Auftrag/Position: {model.OrderNr}/{model.PositionNr} zugewiesen.";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
model.SerialNr = orderKVP.Value;
|
model.SerialNr = orderIdentity.ClientSerialNr;
|
||||||
model.PalletNr = this.GetPalletNr(model);
|
model.PositionNr = orderIdentity.PositionNr;
|
||||||
}
|
}
|
||||||
|
|
||||||
var rowsAffected = this.InsertPalletEntry(model);
|
var rowsAffected = this.InsertPalletEntry(model);
|
||||||
@@ -216,18 +222,6 @@
|
|||||||
return false;
|
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)
|
private OrderScanModel DeletePalletEntryById(int id)
|
||||||
=> this.dbContext.FirstOrDefault(
|
=> this.dbContext.FirstOrDefault(
|
||||||
query: $@"
|
query: $@"
|
||||||
@@ -245,26 +239,31 @@
|
|||||||
PalletNr = reader.GetValue<short>(2)
|
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(
|
=> this.dbContext.FirstOrDefault(
|
||||||
query: $@"
|
query: $@"
|
||||||
SELECT DISTINCT TOP 1
|
SELECT DISTINCT TOP 1
|
||||||
[AuftragPositionSerienNr].[SerienNr] -- 0
|
[AuftragPositionSerienNr].[PositionNr] -- 0
|
||||||
, REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 1
|
, [AuftragPositionSerienNr].[SerienNr] -- 1
|
||||||
|
, REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '') -- 2
|
||||||
FROM [AuftragPositionSerienNr]
|
FROM [AuftragPositionSerienNr]
|
||||||
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)}
|
WHERE [AuftragPositionSerienNr].[AuftragNr] = @{nameof(orderNr)}
|
||||||
AND [AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)}
|
AND ([AuftragPositionSerienNr].[PositionNr] = @{nameof(positionNr)} OR @{nameof(positionNr)} IS NULL)
|
||||||
AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'",
|
AND @{nameof(serialNr)} LIKE '%' + (REPLACE(RTRIM(LTRIM([AuftragPositionSerienNr].[KundeneigeneSerienNr])), ' ', '')) + '%'",
|
||||||
parameters: parameters => parameters
|
parameters: parameters => parameters
|
||||||
.Add(nameof(orderNr), orderNr)
|
.Add(nameof(orderNr), orderNr)
|
||||||
.Add(nameof(positionNr), positionNr)
|
.Add(nameof(positionNr), positionNr)
|
||||||
.Add(nameof(serialNr), serialNr),
|
.Add(nameof(serialNr), serialNr),
|
||||||
reader: reader => new KeyValuePair<int, string>(
|
reader: reader => new OrderIdentity
|
||||||
key: reader.GetValue<int>(0),
|
{
|
||||||
value: reader.GetValue<string>(1)));
|
OrderNr = orderNr ?? -1,
|
||||||
|
PositionNr = reader.GetValue<short>(0),
|
||||||
|
SerialNr = reader.GetValue<int>(1),
|
||||||
|
ClientSerialNr = reader.GetValue<string>(2),
|
||||||
|
});
|
||||||
|
|
||||||
private int InsertPalletEntry(OrderScanModel model)
|
private int InsertPalletEntry(OrderScanModel model)
|
||||||
=> this.dbContext.ScalarTransaction<int>($@"
|
=> this.dbContext.ExecuteNonQuery($@"
|
||||||
INSERT
|
INSERT
|
||||||
INTO [PalettenScan] (
|
INTO [PalettenScan] (
|
||||||
[PalettenNr]
|
[PalettenNr]
|
||||||
@@ -294,11 +293,9 @@
|
|||||||
SELECT CAST(CASE WHEN [PalettenScan].[ID] IS NULL THEN 0 ELSE 1 END AS BIT)
|
SELECT CAST(CASE WHEN [PalettenScan].[ID] IS NULL THEN 0 ELSE 1 END AS BIT)
|
||||||
FROM [PalettenScan]
|
FROM [PalettenScan]
|
||||||
WHERE [PalettenScan].[AuftragNr] = @{nameof(orderNr)}
|
WHERE [PalettenScan].[AuftragNr] = @{nameof(orderNr)}
|
||||||
AND [PalettenScan].[PositionNr] = @{nameof(positionNr)}
|
|
||||||
AND [PalettenScan].[SerienNr] = @{nameof(serialNr)}",
|
AND [PalettenScan].[SerienNr] = @{nameof(serialNr)}",
|
||||||
parameters => parameters
|
parameters => parameters
|
||||||
.Add(nameof(orderNr), orderNr)
|
.Add(nameof(orderNr), orderNr)
|
||||||
.Add(nameof(positionNr), positionNr)
|
|
||||||
.Add(nameof(serialNr), serialNr),
|
.Add(nameof(serialNr), serialNr),
|
||||||
reader => reader.GetValue<bool>(0));
|
reader => reader.GetValue<bool>(0));
|
||||||
|
|
||||||
|
|||||||
@@ -31,18 +31,18 @@
|
|||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult Index(OrderClientModel model)
|
public ActionResult Index(OrderClientModel model)
|
||||||
|
{
|
||||||
|
if (model.OrderId > 0 && model.ClientId > 0)
|
||||||
{
|
{
|
||||||
var files = this.Request.Files;
|
var files = this.Request.Files;
|
||||||
|
|
||||||
if (model.OrderId is null || model.OrderId <= 0)
|
if (files.Count > 0)
|
||||||
{
|
{
|
||||||
this.TempData[FilePDF] = $"Bitte Auftrag auswählen.";
|
var file = files.Get(0);
|
||||||
}
|
|
||||||
else if (files.Count > 0)
|
|
||||||
{
|
|
||||||
var file = this.Request.Files.Get(0);
|
|
||||||
|
|
||||||
if (file.ContentType == "application/pdf" && model.ClientId > 0 && model.OrderId > 0)
|
if (file.ContentType == "application/pdf")
|
||||||
|
{
|
||||||
|
if (this.protocolService.OrderCompleted(model.OrderId.Value))
|
||||||
{
|
{
|
||||||
model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value);
|
model.FileId = this.protocolService.SaveFile(file.InputStream, model.ClientId.Value, model.OrderId.Value);
|
||||||
|
|
||||||
@@ -56,6 +56,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
this.TempData[FilePDF] = $"Auftrag enthält nicht bestandene Prüfungen.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen.";
|
this.TempData[FilePDF] = $"Bitte, PDF Datei hochladen.";
|
||||||
}
|
}
|
||||||
@@ -64,6 +69,11 @@
|
|||||||
{
|
{
|
||||||
this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt.";
|
this.TempData[FilePDF] = "Kein PDF Datei wurde ausgewählt.";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.TempData[FilePDF] = $"Bitte Auftrag auswählen.";
|
||||||
|
}
|
||||||
|
|
||||||
return this.View(model);
|
return this.View(model);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
|
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
|
model.PositionNr = null;
|
||||||
model.SerialNr = default(string);
|
model.SerialNr = default(string);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
public ActionResult Delete(int id)
|
public ActionResult Delete(int id)
|
||||||
{
|
{
|
||||||
var orderScanModel = this.shipmentsService.DeletePalletEntry(id);
|
var orderScanModel = this.shipmentsService.DeletePalletEntry(id);
|
||||||
|
orderScanModel.PositionNr = null;
|
||||||
|
|
||||||
return this.View(nameof(this.Index), new ShipmentModel(orderScanModel));
|
return this.View(nameof(this.Index), new ShipmentModel(orderScanModel));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
else if (testStatus is null)
|
else if (testStatus is null)
|
||||||
{
|
{
|
||||||
return new MvcHtmlString("<td class=\"text-center text-secondary small\">NULL</td>");
|
return new MvcHtmlString("<td class=\"text-center text-secondary small\">n/a</td>");
|
||||||
}
|
}
|
||||||
else if (testStatus == false)
|
else if (testStatus == false)
|
||||||
{
|
{
|
||||||
@@ -123,6 +123,10 @@
|
|||||||
<td class="va-middle py-0">Packaging of meter</td>
|
<td class="va-middle py-0">Packaging of meter</td>
|
||||||
<td class="va-middle py-0">SENSUS-1-924</td>
|
<td class="va-middle py-0">SENSUS-1-924</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="va-middle py-0">n/a</th>
|
||||||
|
<td class="va-middle py-0" colspan="3">Not applicable</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="va-middle py-0">Ok</th>
|
<th class="va-middle py-0">Ok</th>
|
||||||
<td class="va-middle py-0" colspan="3">Test passed</td>
|
<td class="va-middle py-0" colspan="3">Test passed</td>
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
clientMenu.classList.add(show);
|
clientMenu.classList.add(show);
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
clientMenu.classList.remove(show);
|
orderMenu.classList.remove(show);
|
||||||
}
|
}
|
||||||
}, 50);
|
}, 50);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
style="min-width: 200px"
|
style="min-width: 200px"
|
||||||
class="form-control form-control-sm mb-1"
|
class="form-control form-control-sm mb-1"
|
||||||
name="@this.Model.LikeName"
|
name="@this.Model.LikeName"
|
||||||
value="@(!string.IsNullOrWhiteSpace(this.Model.Like) ? this.Model.Like : "dd.MM.yyyy - dd.MM.yyyy")" />
|
value="@this.Model.Like"
|
||||||
|
placeholder="dd.MM.yyyy-dd.MM.yyyy"/>
|
||||||
|
|
||||||
<div class="input-group flex-nowrap justify-content-center">
|
<div class="input-group flex-nowrap justify-content-center">
|
||||||
<input id="@(this.Model.OrderById)_1" name="@this.Model.OrderByName" type="radio" value="1" @isChecked(this.Model.OrderBy == 1) class="d-none" />
|
<input id="@(this.Model.OrderById)_1" name="@this.Model.OrderByName" type="radio" value="1" @isChecked(this.Model.OrderBy == 1) class="d-none" />
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
Func<bool, string> bgColor = x => !x ? "bg-light" : string.Empty;
|
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.IndexName" value="@this.Model.Index" />
|
||||||
<input type="hidden" name="@this.Model.ColumnName" value="@this.Model.Column" />
|
<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.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" />
|
<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">
|
<div class="input-group flex-nowrap justify-content-center">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@model LaaProductionWeb.Services.Models.HeliumReportModel
|
@model LaaProductionWeb.Services.Models.HeliumReportModel
|
||||||
|
|
||||||
<form action="/Report" method="post" autocomplete="off" class="h-100" id="he_report">
|
<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">
|
<table class="table table-sm table-bordered mb-0">
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<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.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.HeTestPressure)</th>
|
||||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.IsValid)</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.TestDate)</th>
|
||||||
<th class="text-nowrap p-2">@this.Model.Display(x => x.Tester)</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>
|
||||||
<tr>
|
<tr>
|
||||||
@foreach (var filter in this.Model.Filter)
|
@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>
|
<td>@this.Html.Partial("DateFilter", filter)</td>
|
||||||
}
|
}
|
||||||
@@ -63,9 +63,9 @@
|
|||||||
<td class="text-nowrap p-2">@item.HeLakeRate</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">@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"><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.TestDate:dd.MM.yyyy}")</td>
|
||||||
<td class="text-nowrap p-2">@item.Tester</td>
|
<td class="text-nowrap p-2">@item.Tester</td>
|
||||||
<td class="p-2">@item.Text</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
@model LaaProductionWeb.Services.Models.OrderPositions
|
@model LaaProductionWeb.Services.Models.OrderPositions
|
||||||
|
|
||||||
|
<li><span class="dropdown-item">Alle</span></li>
|
||||||
|
|
||||||
@foreach (var position in this.Model)
|
@foreach (var position in this.Model)
|
||||||
{
|
{
|
||||||
<li><span class="dropdown-item">@position</span></li>
|
<li><span class="dropdown-item">@position</span></li>
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
@model PalletsBatchModel
|
@model PalletsBatchModel
|
||||||
|
|
||||||
|
@if (!string.IsNullOrWhiteSpace(this.Model.ClientName))
|
||||||
|
{
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<div id="batch" class="print-page border rounded shadow-sm mt-5 p-5">
|
<div id="batch" class="print-page border rounded shadow-sm mt-5 p-5">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@@ -85,3 +86,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,10 +17,9 @@
|
|||||||
<ul id="order_nr_menu" class="dropdown-menu w-100 mt-1"></ul>
|
<ul id="order_nr_menu" class="dropdown-menu w-100 mt-1"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating mb-3 dropdown">
|
<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.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%;" data-bs-toggle="dropdown"></i>
|
||||||
<i class="bi bi-chevron-down" style="position: absolute;right: 3.5%;top: 35%;"></i>
|
|
||||||
<ul id="pos_nr_menu" class="dropdown-menu w-100 mt-1">
|
<ul id="pos_nr_menu" class="dropdown-menu w-100 mt-1">
|
||||||
<li class="dropdown-item disabled white-space-break">Keine Positionen vorhanden.</li>
|
<li class="dropdown-item disabled white-space-break">Keine Positionen vorhanden.</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -95,15 +94,6 @@
|
|||||||
.submit();
|
.submit();
|
||||||
});
|
});
|
||||||
orderNrMenu.classList.remove(show);
|
orderNrMenu.classList.remove(show);
|
||||||
if (orderChanged) {
|
|
||||||
orderChanged = false;
|
|
||||||
positionNrInput.value = positionNrMenu
|
|
||||||
.querySelector(dropdownItemSelector)
|
|
||||||
.innerHTML;
|
|
||||||
document
|
|
||||||
.getElementById('order_form')
|
|
||||||
.submit();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPositions(orderNr) {
|
function getPositions(orderNr) {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
@model LaaProductionWeb.Services.Models.OrderScanModel
|
@model LaaProductionWeb.Services.Models.OrderScanModel
|
||||||
|
|
||||||
|
@if (this.Model.OrderNr > 0)
|
||||||
|
{
|
||||||
<div>
|
<div>
|
||||||
<h5 class="text-smallcaps">@this.Model.ScanTitle</h5>
|
<h5 class="text-smallcaps">@this.Model.ScanTitle</h5>
|
||||||
<hr />
|
<hr />
|
||||||
@@ -30,7 +32,6 @@
|
|||||||
<div class="form-floating w-auto">
|
<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.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" })
|
@this.Html.LabelFor(x => x.SerialNr, new { @for = "serial_nr", @class = "text-smallcaps" })
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-floating">
|
<div class="form-floating">
|
||||||
@this.Html.TextBoxFor(x => x.PalletNr, new { id = "pallet_nr", @class = "form-control form-control-success text-center", placeholder = "0" })
|
@this.Html.TextBoxFor(x => x.PalletNr, new { id = "pallet_nr", @class = "form-control form-control-success text-center", placeholder = "0" })
|
||||||
@@ -49,3 +50,4 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user