Yerleşim Kuralları tanımlamaları
This commit is contained in:
parent
b503b74e02
commit
3ba59ee870
22 changed files with 1283 additions and 764 deletions
|
|
@ -228,5 +228,16 @@ public static class LookupQueryValues
|
||||||
$"WHERE " +
|
$"WHERE " +
|
||||||
$"(\"WarehouseId\" = @param0 OR @param0 IS NULL) " +
|
$"(\"WarehouseId\" = @param0 OR @param0 IS NULL) " +
|
||||||
$"AND \"IsDeleted\" = 'false' " +
|
$"AND \"IsDeleted\" = 'false' " +
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
|
|
||||||
|
public static string LocationValues =
|
||||||
|
$"SELECT " +
|
||||||
|
$"\"Id\" AS \"Key\", " +
|
||||||
|
$"\"Name\" AS \"Name\" " +
|
||||||
|
$"FROM \"{FullNameTable(TableNameEnum.Location)}\" " +
|
||||||
|
$"WHERE " +
|
||||||
|
$"(\"WarehouseId\" = @param0 OR @param0 IS NULL) " +
|
||||||
|
$"AND (\"ZoneId\" = @param1 OR @param1 IS NULL) " +
|
||||||
|
$"AND \"IsDeleted\" = 'false' " +
|
||||||
|
$"ORDER BY \"Name\";";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ using Volo.Abp.PermissionManagement;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Volo.Abp;
|
using Volo.Abp;
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace Erp.Platform.PermissionManagement;
|
namespace Erp.Platform.PermissionManagement;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9537,15 +9537,15 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Store.Tracking",
|
"key": "App.Store.Putaway",
|
||||||
"tr": "Lokasyon Takibi",
|
"tr": "Yerleştirme Kuralları",
|
||||||
"en": "Location Tracking"
|
"en": "Putaway Rules"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Store.Putaway",
|
"key": "App.Store.PutawayCondition",
|
||||||
"tr": "Yerleştirme",
|
"tr": "Yerleştirme Kuralı Koşulları",
|
||||||
"en": "Putaway"
|
"en": "Putaway Rule Conditions"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -9577,12 +9577,6 @@
|
||||||
"tr": "Stok Hareketleri",
|
"tr": "Stok Hareketleri",
|
||||||
"en": "Stock Movements"
|
"en": "Stock Movements"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"resourceName": "Platform",
|
|
||||||
"key": "App.Store.Stocklevel",
|
|
||||||
"tr": "Lot ve Seri No Takibi",
|
|
||||||
"en": "Lot and Serial Number Tracking"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Projects.List",
|
"key": "App.Projects.List",
|
||||||
|
|
|
||||||
|
|
@ -344,9 +344,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key=1,Name="Tenant" },
|
new () { Key=1, Name="Tenant" },
|
||||||
new () { Key=2,Name="Host" },
|
new () { Key=2, Name="Host" },
|
||||||
new () { Key=3,Name="Both" },
|
new () { Key=3, Name="Both" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -496,10 +496,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key=0,Name="String" },
|
new () { Key=0, Name="String" },
|
||||||
new () { Key=1,Name="Number" },
|
new () { Key=1, Name="Number" },
|
||||||
new () { Key=2,Name="Boolean" },
|
new () { Key=2, Name="Boolean" },
|
||||||
new () { Key=3,Name="DateTime" },
|
new () { Key=3, Name="DateTime" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -1011,9 +1011,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="User",Name="User" },
|
new () { Key="User", Name="User" },
|
||||||
new () { Key="Role",Name="Role" },
|
new () { Key="Role", Name="Role" },
|
||||||
new () { Key="Global",Name="Global" },
|
new () { Key="Global", Name="Global" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
@ -1395,8 +1395,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="GET",Name="GET" },
|
new () { Key="GET", Name="GET" },
|
||||||
new () { Key="POSt",Name="POST" },
|
new () { Key="POSt", Name="POST" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
@ -1855,8 +1855,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="service",Name="Service" },
|
new () { Key="service", Name="Service" },
|
||||||
new () { Key="support",Name="Support" },
|
new () { Key="support", Name="Support" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -4600,9 +4600,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Reference",Name="Reference" },
|
new () { Key="Reference", Name="Referans" },
|
||||||
new () { Key="SmallerThanReference",Name="Smaller Than Reference" },
|
new () { Key="SmallerThanReference", Name="Referanstan Küçük" },
|
||||||
new () { Key="BiggerThanReference",Name="Bigger Than Reference" },
|
new () { Key="BiggerThanReference", Name="Referanstan Büyük" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
@ -5405,8 +5405,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -5582,8 +5582,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -5835,8 +5835,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -312,8 +312,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -690,8 +690,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -864,8 +864,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -1073,8 +1073,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -1247,8 +1247,8 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Aktif", Name="Aktif" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Pasif", Name="Pasif" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
|
|
||||||
public async Task SeedAsync(DataSeedContext context)
|
public async Task SeedAsync(DataSeedContext context)
|
||||||
{
|
{
|
||||||
|
using var utils = new SeederUtils();
|
||||||
var listFormName = String.Empty;
|
var listFormName = String.Empty;
|
||||||
|
|
||||||
#region Warehouse Type
|
#region Warehouse Type
|
||||||
|
|
@ -1152,7 +1153,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Name",
|
FieldName = "Name",
|
||||||
Width = 150,
|
Width = 200,
|
||||||
ListOrderNo = 3,
|
ListOrderNo = 3,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
@ -1170,7 +1171,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Description",
|
FieldName = "Description",
|
||||||
Width = 250,
|
Width = 350,
|
||||||
ListOrderNo = 4,
|
ListOrderNo = 4,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
@ -1262,13 +1263,60 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Int32,
|
||||||
|
FieldName = "Kind",
|
||||||
|
Alignment = "right",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "UomId",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 9,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Id", "Name"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.DateTime,
|
||||||
|
FieldName = "LastModificationTime",
|
||||||
|
Width = 130,
|
||||||
|
ListOrderNo = 10,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
new() {
|
new() {
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.Boolean,
|
SourceDbType = DbType.Boolean,
|
||||||
FieldName = "IsActive",
|
FieldName = "IsActive",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 8,
|
ListOrderNo = 11,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -1280,6 +1328,481 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Putaway
|
||||||
|
listFormName = AppCodes.Store.Putaway;
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
{
|
||||||
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm()
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
IsSubForm = false,
|
||||||
|
ShowNote = true,
|
||||||
|
LayoutJson = DefaultLayoutJson,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = listFormName,
|
||||||
|
Name = listFormName,
|
||||||
|
Title = listFormName,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = listFormName,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Putaway)),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
PermissionJson = DefaultPermissionJson(listFormName),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Putaway)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= [
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "Priority", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField = "Strategy", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
|
||||||
|
]},
|
||||||
|
new() {
|
||||||
|
Order=2, ColCount=2, ColSpan=1, Caption="Target", ItemType="group", Items= [
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "WarehouseId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "MaterialTypeId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "MaterialGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||||
|
new EditingFormItemDto { Order = 5, DataField = "TargetZoneId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 6, DataField = "TargetLocationId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
]},
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "Priority", FieldDbType = DbType.Int32, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "Strategy", FieldDbType = DbType.String, Value = "FIFO", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||||
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||||
|
new() {
|
||||||
|
Hint = "Conditions",
|
||||||
|
Text = "Conditions",
|
||||||
|
UrlTarget = "_blank",
|
||||||
|
AuthName = listFormName,
|
||||||
|
Url = $"/admin/form/{utils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||||
|
IsVisible = true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Putaway Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Code",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Name",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
SortIndex = 1,
|
||||||
|
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||||
|
AllowSearch = true,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Description",
|
||||||
|
Width = 300,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Int32,
|
||||||
|
FieldName = "Priority",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Strategy",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 5,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
|
new () { Key="FIFO",Name="First In First Out" },
|
||||||
|
new () { Key="LIFO",Name="Last In First Out" },
|
||||||
|
new () { Key="NEAREST_LOCATION",Name="En Yakın Lokasyon" },
|
||||||
|
new () { Key="EMPTY_LOCATION",Name="Boş Lokasyon" },
|
||||||
|
new () { Key="SAME_PRODUCT",Name="Aynı Ürün" },
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsActive",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 6,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "WarehouseId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 7,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.WarehouseValues,
|
||||||
|
CascadeEmptyFields = "TargetZoneId,TargetLocationId"
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "MaterialTypeId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.MaterialType), "Id", "Name"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "MaterialGroupId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 9,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.MaterialGroup), "Id", "Name"),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "TargetZoneId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 10,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.ZoneValues,
|
||||||
|
CascadeRelationField = "WarehouseId",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "WarehouseId",
|
||||||
|
CascadeEmptyFields = "TargetLocationId"
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "TargetLocationId",
|
||||||
|
Width = 150,
|
||||||
|
ListOrderNo = 11,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||||
|
{
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
|
DisplayExpr = "Name",
|
||||||
|
ValueExpr = "Key",
|
||||||
|
LookupQuery = LookupQueryValues.LocationValues,
|
||||||
|
CascadeRelationField = "ZoneId",
|
||||||
|
CascadeFilterOperator="=",
|
||||||
|
CascadeParentFields = "WarehouseId,TargetZoneId",
|
||||||
|
}),
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
], autoSave: true);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Putaway Condition
|
||||||
|
listFormName = AppCodes.Store.PutawayCondition;
|
||||||
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
|
{
|
||||||
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
new ListForm()
|
||||||
|
{
|
||||||
|
ListFormType = ListFormTypeEnum.List,
|
||||||
|
IsSubForm = false,
|
||||||
|
ShowNote = true,
|
||||||
|
LayoutJson = DefaultLayoutJson,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
ListFormCode = listFormName,
|
||||||
|
Name = listFormName,
|
||||||
|
Title = listFormName,
|
||||||
|
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||||
|
IsTenant = true,
|
||||||
|
IsBranch = false,
|
||||||
|
IsOrganizationUnit = false,
|
||||||
|
Description = listFormName,
|
||||||
|
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||||
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PutawayCondition)),
|
||||||
|
KeyFieldName = "Id",
|
||||||
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
|
DefaultFilter = DefaultFilterJson,
|
||||||
|
SortMode = GridOptions.SortModeSingle,
|
||||||
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
SearchPanelJson = DefaultSearchPanelJson,
|
||||||
|
GroupPanelJson = DefaultGroupPanelJson,
|
||||||
|
SelectionJson = DefaultSelectionSingleJson,
|
||||||
|
ColumnOptionJson = DefaultColumnOptionJson,
|
||||||
|
PermissionJson = DefaultPermissionJson(listFormName),
|
||||||
|
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PutawayCondition)),
|
||||||
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
|
||||||
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
|
new() {
|
||||||
|
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||||
|
new EditingFormItemDto { Order = 1, DataField = "ConditionType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 2, DataField = "Operator", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||||
|
new EditingFormItemDto { Order = 3, DataField = "Value", ColSpan = 1, EditorType2=EditorTypes.dxTextBox },
|
||||||
|
]}
|
||||||
|
}),
|
||||||
|
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||||
|
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||||
|
}),
|
||||||
|
}, autoSave: true
|
||||||
|
);
|
||||||
|
|
||||||
|
#region Putaway Condition Fields
|
||||||
|
await _listFormFieldRepository.InsertManyAsync([
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Guid,
|
||||||
|
FieldName = "Id",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 1,
|
||||||
|
Visible = false,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "ConditionType",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 2,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
|
new () { Key="Quantity",Name="Miktar" },
|
||||||
|
new () { Key="Weight",Name="Ağırlık" },
|
||||||
|
new () { Key="Volume",Name="Hacim" },
|
||||||
|
new () { Key="MaterialType",Name="Malzeme Türü" },
|
||||||
|
new () { Key="MaterialGroup",Name="Material Grup" },
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Operator",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 3,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||||
|
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||||
|
DisplayExpr = "name",
|
||||||
|
ValueExpr = "key",
|
||||||
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
|
new () { Key="Equals",Name="Eşittir" },
|
||||||
|
new () { Key="NotEquals",Name="Eşit Değildir" },
|
||||||
|
new () { Key="GreaterThan",Name="Daha Büyüktür" },
|
||||||
|
new () { Key="LessThan",Name="Daha Küçüktür" },
|
||||||
|
new () { Key="Contains",Name="İçerir" },
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.String,
|
||||||
|
FieldName = "Value",
|
||||||
|
Width = 200,
|
||||||
|
ListOrderNo = 4,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
}
|
||||||
|
], autoSave: true);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Putaway ve Putaway Condition Sub Forms ilişkisinin kurulması
|
||||||
|
await utils.CloneListFormWithFieldsAsync(
|
||||||
|
_listFormRepository,
|
||||||
|
_listFormFieldRepository,
|
||||||
|
AppCodes.Store.Putaway,
|
||||||
|
JsonSerializer.Serialize(new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
TabTitle = AppCodes.Store.PutawayCondition,
|
||||||
|
TabType = ListFormTabTypeEnum.List,
|
||||||
|
Code = AppCodes.Store.PutawayCondition,
|
||||||
|
Relation = new List<dynamic>() {
|
||||||
|
new {
|
||||||
|
ParentFieldName = "Id",
|
||||||
|
DbType = DbType.Guid,
|
||||||
|
ChildFieldName = "RuleId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -694,13 +694,6 @@
|
||||||
"routeType": "protected",
|
"routeType": "protected",
|
||||||
"authority": null
|
"authority": null
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"key": "admin.warehouse.tracking",
|
|
||||||
"path": "/admin/warehouse/tracking",
|
|
||||||
"componentPath": "@/views/warehouse/components/LocationTracking",
|
|
||||||
"routeType": "protected",
|
|
||||||
"authority": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"key": "admin.warehouse.putaway",
|
"key": "admin.warehouse.putaway",
|
||||||
"path": "/admin/warehouse/putaway",
|
"path": "/admin/warehouse/putaway",
|
||||||
|
|
@ -2575,22 +2568,12 @@
|
||||||
"RequiredPermissionName": "App.Store.Location",
|
"RequiredPermissionName": "App.Store.Location",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"ParentCode": "App.Store",
|
|
||||||
"Code": "App.Store.Tracking",
|
|
||||||
"DisplayName": "App.Store.Tracking",
|
|
||||||
"Order": 8,
|
|
||||||
"Url": "/admin/warehouse/tracking",
|
|
||||||
"Icon": "FcSearch",
|
|
||||||
"RequiredPermissionName": "App.Store.Tracking",
|
|
||||||
"IsDisabled": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Store",
|
"ParentCode": "App.Store",
|
||||||
"Code": "App.Store.Putaway",
|
"Code": "App.Store.Putaway",
|
||||||
"DisplayName": "App.Store.Putaway",
|
"DisplayName": "App.Store.Putaway",
|
||||||
"Order": 9,
|
"Order": 9,
|
||||||
"Url": "/admin/warehouse/putaway",
|
"Url": "/admin/list/App.Store.Putaway",
|
||||||
"Icon": "FcCompactCamera",
|
"Icon": "FcCompactCamera",
|
||||||
"RequiredPermissionName": "App.Store.Putaway",
|
"RequiredPermissionName": "App.Store.Putaway",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
|
|
@ -2645,16 +2628,6 @@
|
||||||
"RequiredPermissionName": "App.Store.Movements",
|
"RequiredPermissionName": "App.Store.Movements",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"ParentCode": "App.Store",
|
|
||||||
"Code": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "App.Store.Stocklevel",
|
|
||||||
"Order": 15,
|
|
||||||
"Url": "/admin/warehouse/stocklevel",
|
|
||||||
"Icon": "FcViewDetails",
|
|
||||||
"RequiredPermissionName": "App.Store.Stocklevel",
|
|
||||||
"IsDisabled": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ParentCode": null,
|
"ParentCode": null,
|
||||||
"Code": "App.Projects",
|
"Code": "App.Projects",
|
||||||
|
|
|
||||||
|
|
@ -7573,132 +7573,6 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions",
|
|
||||||
"ParentName": null,
|
|
||||||
"DisplayName": "App.Store.Definitions",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Create",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Create",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Update",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Update",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Delete",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Delete",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Export",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Export",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Import",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Import",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Definitions.Note",
|
|
||||||
"ParentName": "App.Store.Definitions",
|
|
||||||
"DisplayName": "Note",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking",
|
|
||||||
"ParentName": null,
|
|
||||||
"DisplayName": "App.Store.Tracking",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Create",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Create",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Update",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Update",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Delete",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Delete",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Export",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Export",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Import",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Import",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Tracking.Note",
|
|
||||||
"ParentName": "App.Store.Tracking",
|
|
||||||
"DisplayName": "Note",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.Store",
|
"GroupName": "App.Store",
|
||||||
"Name": "App.Store.Putaway",
|
"Name": "App.Store.Putaway",
|
||||||
|
|
@ -7762,6 +7636,71 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "App.Store.PutawayCondition",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Create",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Create",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Update",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Update",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Delete",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Delete",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Export",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Export",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Import",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Import",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "App.Store",
|
||||||
|
"Name": "App.Store.PutawayCondition.Note",
|
||||||
|
"ParentName": "App.Store.PutawayCondition",
|
||||||
|
"DisplayName": "Note",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3,
|
||||||
|
"MenuGroup": "Erp"
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.Store",
|
"GroupName": "App.Store",
|
||||||
"Name": "App.Store.Receipt",
|
"Name": "App.Store.Receipt",
|
||||||
|
|
@ -8077,69 +8016,6 @@
|
||||||
"MultiTenancySide": 3,
|
"MultiTenancySide": 3,
|
||||||
"MenuGroup": "Erp"
|
"MenuGroup": "Erp"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel",
|
|
||||||
"ParentName": null,
|
|
||||||
"DisplayName": "App.Store.Stocklevel",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Create",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Create",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Update",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Update",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Delete",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Delete",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Export",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Export",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Import",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Import",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"GroupName": "App.Store",
|
|
||||||
"Name": "App.Store.Stocklevel.Note",
|
|
||||||
"ParentName": "App.Store.Stocklevel",
|
|
||||||
"DisplayName": "Note",
|
|
||||||
"IsEnabled": true,
|
|
||||||
"MultiTenancySide": 3,
|
|
||||||
"MenuGroup": "Erp"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"GroupName": "App.Projects",
|
"GroupName": "App.Projects",
|
||||||
"Name": "App.Projects.List",
|
"Name": "App.Projects.List",
|
||||||
|
|
|
||||||
|
|
@ -177,4 +177,6 @@ public enum TableNameEnum
|
||||||
Zone,
|
Zone,
|
||||||
LocationType,
|
LocationType,
|
||||||
Location,
|
Location,
|
||||||
|
Putaway,
|
||||||
|
PutawayCondition,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -212,6 +212,8 @@ public static class TableNameResolver
|
||||||
{ nameof(TableNameEnum.Zone), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
{ nameof(TableNameEnum.Zone), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||||
{ nameof(TableNameEnum.LocationType), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
{ nameof(TableNameEnum.LocationType), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||||
{ nameof(TableNameEnum.Location), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
{ nameof(TableNameEnum.Location), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||||
|
{ nameof(TableNameEnum.Putaway), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||||
|
{ nameof(TableNameEnum.PutawayCondition), (TablePrefix.TenantByName, MenuPrefix.Store) },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -553,6 +553,8 @@ public static class SeedConsts
|
||||||
public const string Zone = Default + ".Zone";
|
public const string Zone = Default + ".Zone";
|
||||||
public const string LocationType = Default + ".LocationType";
|
public const string LocationType = Default + ".LocationType";
|
||||||
public const string Location = Default + ".Location";
|
public const string Location = Default + ".Location";
|
||||||
|
public const string Putaway = Default + ".Putaway";
|
||||||
|
public const string PutawayCondition = Default + ".PutawayCondition";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@ public class Location : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
|
||||||
public decimal Capacity { get; set; }
|
public decimal Capacity { get; set; }
|
||||||
public decimal CurrentStock { get; set; }
|
public decimal CurrentStock { get; set; }
|
||||||
|
public int Kind { get; set; }
|
||||||
|
|
||||||
|
public Guid? UomId { get; set; }
|
||||||
|
public Uom? Uom { get; set; }
|
||||||
|
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs
Normal file
26
api/src/Erp.Platform.Domain/Entities/Tenant/Store/Putaway.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
|
public class Putaway : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public string Code { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public int Priority { get; set; }
|
||||||
|
public string Strategy { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
|
||||||
|
public Guid? WarehouseId { get; set; }
|
||||||
|
public Guid? MaterialTypeId { get; set; }
|
||||||
|
public Guid? MaterialGroupId { get; set; }
|
||||||
|
public Guid? TargetZoneId { get; set; }
|
||||||
|
public Guid? TargetLocationId { get; set; }
|
||||||
|
|
||||||
|
public ICollection<PutawayCondition> Conditions { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using System;
|
||||||
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
|
public class PutawayCondition : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
|
{
|
||||||
|
public Guid? TenantId { get; set; }
|
||||||
|
|
||||||
|
public Guid RuleId { get; set; }
|
||||||
|
public Putaway Rule { get; set; }
|
||||||
|
|
||||||
|
public string ConditionType { get; set; }
|
||||||
|
public string Operator { get; set; }
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
|
|
@ -237,6 +237,8 @@ public class PlatformDbContext :
|
||||||
public DbSet<Zone> Zones { get; set; }
|
public DbSet<Zone> Zones { get; set; }
|
||||||
public DbSet<LocationType> LocationTypes { get; set; }
|
public DbSet<LocationType> LocationTypes { get; set; }
|
||||||
public DbSet<Location> Locations { get; set; }
|
public DbSet<Location> Locations { get; set; }
|
||||||
|
public DbSet<Putaway> Putaways { get; set; }
|
||||||
|
public DbSet<PutawayCondition> PutawayConditions { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Maintenance
|
#region Maintenance
|
||||||
|
|
@ -3000,5 +3002,35 @@ public class PlatformDbContext :
|
||||||
.HasForeignKey(x => x.ZoneId)
|
.HasForeignKey(x => x.ZoneId)
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.OnDelete(DeleteBehavior.Restrict);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
builder.Entity<Putaway>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Putaway)), Prefix.DbSchema);
|
||||||
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
|
b.Property(x => x.Code).IsRequired().HasMaxLength(100);
|
||||||
|
b.Property(x => x.Name).IsRequired().HasMaxLength(200);
|
||||||
|
b.Property(x => x.Description).HasMaxLength(500);
|
||||||
|
b.Property(x => x.WarehouseId).IsRequired();
|
||||||
|
b.Property(x => x.Priority).IsRequired().HasDefaultValue(1);
|
||||||
|
b.Property(x => x.Strategy).IsRequired();
|
||||||
|
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||||
|
|
||||||
|
b.HasMany(x => x.Conditions)
|
||||||
|
.WithOne(x => x.Rule)
|
||||||
|
.HasForeignKey(x => x.RuleId)
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Entity<PutawayCondition>(b =>
|
||||||
|
{
|
||||||
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PutawayCondition)), Prefix.DbSchema);
|
||||||
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
|
b.Property(x => x.RuleId).IsRequired();
|
||||||
|
b.Property(x => x.ConditionType).IsRequired().HasMaxLength(50);
|
||||||
|
b.Property(x => x.Operator).IsRequired().HasMaxLength(20);
|
||||||
|
b.Property(x => x.Value).HasMaxLength(200);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Erp.Platform.Migrations
|
namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251125092407_Initial")]
|
[Migration("20251125115039_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -6128,6 +6128,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<int>("Kind")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("LastModificationTime");
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
@ -6148,6 +6151,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasColumnName("TenantId");
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UomId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid>("WarehouseId")
|
b.Property<Guid>("WarehouseId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
|
@ -6158,6 +6164,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.HasIndex("LocationTypeId");
|
b.HasIndex("LocationTypeId");
|
||||||
|
|
||||||
|
b.HasIndex("UomId");
|
||||||
|
|
||||||
b.HasIndex("WarehouseId");
|
b.HasIndex("WarehouseId");
|
||||||
|
|
||||||
b.HasIndex("ZoneId");
|
b.HasIndex("ZoneId");
|
||||||
|
|
@ -9029,6 +9037,156 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_Psychologist", (string)null);
|
b.ToTable("Adm_T_Psychologist", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("nvarchar(100)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsActive")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(true);
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MaterialGroupId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MaterialTypeId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<int>("Priority")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(1);
|
||||||
|
|
||||||
|
b.Property<string>("Strategy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TargetLocationId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TargetZoneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<Guid>("WarehouseId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Str_T_Putaway", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ConditionType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Operator")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
|
b.Property<Guid>("RuleId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RuleId");
|
||||||
|
|
||||||
|
b.ToTable("Str_T_PutawayCondition", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -15482,6 +15640,10 @@ namespace Erp.Platform.Migrations
|
||||||
.OnDelete(DeleteBehavior.Restrict)
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UomId");
|
||||||
|
|
||||||
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
|
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
|
||||||
.WithMany("Locations")
|
.WithMany("Locations")
|
||||||
.HasForeignKey("WarehouseId")
|
.HasForeignKey("WarehouseId")
|
||||||
|
|
@ -15496,6 +15658,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Navigation("LocationType");
|
b.Navigation("LocationType");
|
||||||
|
|
||||||
|
b.Navigation("Uom");
|
||||||
|
|
||||||
b.Navigation("Warehouse");
|
b.Navigation("Warehouse");
|
||||||
|
|
||||||
b.Navigation("Zone");
|
b.Navigation("Zone");
|
||||||
|
|
@ -15820,6 +15984,17 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Template");
|
b.Navigation("Template");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
||||||
|
.WithMany("Conditions")
|
||||||
|
.HasForeignKey("RuleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Rule");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Erp.Platform.Entities.QuestionPool", "QuestionPool")
|
b.HasOne("Erp.Platform.Entities.QuestionPool", "QuestionPool")
|
||||||
|
|
@ -16662,6 +16837,11 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Conditions");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Options");
|
b.Navigation("Options");
|
||||||
|
|
@ -2592,6 +2592,36 @@ namespace Erp.Platform.Migrations
|
||||||
table.PrimaryKey("PK_Str_T_LocationType", x => x.Id);
|
table.PrimaryKey("PK_Str_T_LocationType", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Str_T_Putaway",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||||||
|
Name = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||||||
|
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||||
|
Priority = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
||||||
|
Strategy = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||||
|
WarehouseId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TargetZoneId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
TargetLocationId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MaterialTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
MaterialGroupId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Str_T_Putaway", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Str_T_WarehouseType",
|
name: "Str_T_WarehouseType",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -3781,6 +3811,35 @@ namespace Erp.Platform.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Str_T_PutawayCondition",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
RuleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
ConditionType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||||
|
Operator = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||||
|
Value = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Str_T_PutawayCondition", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Str_T_PutawayCondition_Str_T_Putaway_RuleId",
|
||||||
|
column: x => x.RuleId,
|
||||||
|
principalTable: "Str_T_Putaway",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "AbpEntityPropertyChanges",
|
name: "AbpEntityPropertyChanges",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -6227,6 +6286,8 @@ namespace Erp.Platform.Migrations
|
||||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||||
Capacity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
Capacity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
CurrentStock = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
CurrentStock = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||||
|
Kind = table.Column<int>(type: "int", nullable: false),
|
||||||
|
UomId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
|
@ -6239,6 +6300,11 @@ namespace Erp.Platform.Migrations
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
table.PrimaryKey("PK_Str_T_Location", x => x.Id);
|
table.PrimaryKey("PK_Str_T_Location", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Str_T_Location_Adm_T_Uom_UomId",
|
||||||
|
column: x => x.UomId,
|
||||||
|
principalTable: "Adm_T_Uom",
|
||||||
|
principalColumn: "Id");
|
||||||
table.ForeignKey(
|
table.ForeignKey(
|
||||||
name: "FK_Str_T_Location_Str_T_LocationType_LocationTypeId",
|
name: "FK_Str_T_Location_Str_T_LocationType_LocationTypeId",
|
||||||
column: x => x.LocationTypeId,
|
column: x => x.LocationTypeId,
|
||||||
|
|
@ -7320,6 +7386,11 @@ namespace Erp.Platform.Migrations
|
||||||
table: "Str_T_Location",
|
table: "Str_T_Location",
|
||||||
column: "LocationTypeId");
|
column: "LocationTypeId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Str_T_Location_UomId",
|
||||||
|
table: "Str_T_Location",
|
||||||
|
column: "UomId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Str_T_Location_WarehouseId",
|
name: "IX_Str_T_Location_WarehouseId",
|
||||||
table: "Str_T_Location",
|
table: "Str_T_Location",
|
||||||
|
|
@ -7330,6 +7401,11 @@ namespace Erp.Platform.Migrations
|
||||||
table: "Str_T_Location",
|
table: "Str_T_Location",
|
||||||
column: "ZoneId");
|
column: "ZoneId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Str_T_PutawayCondition_RuleId",
|
||||||
|
table: "Str_T_PutawayCondition",
|
||||||
|
column: "RuleId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Str_T_Warehouse_EmployeeId",
|
name: "IX_Str_T_Warehouse_EmployeeId",
|
||||||
table: "Str_T_Warehouse",
|
table: "Str_T_Warehouse",
|
||||||
|
|
@ -7850,6 +7926,9 @@ namespace Erp.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Str_T_Location");
|
name: "Str_T_Location");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Str_T_PutawayCondition");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpEntityChanges");
|
name: "AbpEntityChanges");
|
||||||
|
|
||||||
|
|
@ -7964,6 +8043,9 @@ namespace Erp.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Str_T_Zone");
|
name: "Str_T_Zone");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Str_T_Putaway");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "AbpAuditLogs");
|
name: "AbpAuditLogs");
|
||||||
|
|
||||||
|
|
@ -6125,6 +6125,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<int>("Kind")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("LastModificationTime");
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
@ -6145,6 +6148,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasColumnName("TenantId");
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UomId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid>("WarehouseId")
|
b.Property<Guid>("WarehouseId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
|
@ -6155,6 +6161,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.HasIndex("LocationTypeId");
|
b.HasIndex("LocationTypeId");
|
||||||
|
|
||||||
|
b.HasIndex("UomId");
|
||||||
|
|
||||||
b.HasIndex("WarehouseId");
|
b.HasIndex("WarehouseId");
|
||||||
|
|
||||||
b.HasIndex("ZoneId");
|
b.HasIndex("ZoneId");
|
||||||
|
|
@ -9026,6 +9034,156 @@ namespace Erp.Platform.Migrations
|
||||||
b.ToTable("Adm_T_Psychologist", (string)null);
|
b.ToTable("Adm_T_Psychologist", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Code")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(100)
|
||||||
|
.HasColumnType("nvarchar(100)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasMaxLength(500)
|
||||||
|
.HasColumnType("nvarchar(500)");
|
||||||
|
|
||||||
|
b.Property<bool>("IsActive")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(true);
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MaterialGroupId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("MaterialTypeId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<int>("Priority")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("int")
|
||||||
|
.HasDefaultValue(1);
|
||||||
|
|
||||||
|
b.Property<string>("Strategy")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TargetLocationId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TargetZoneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<Guid>("WarehouseId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Str_T_Putaway", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ConditionType")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(50)
|
||||||
|
.HasColumnType("nvarchar(50)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("CreationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("CreationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CreatorId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("CreatorId");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DeleterId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("DeleterId");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DeletionTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("DeletionTime");
|
||||||
|
|
||||||
|
b.Property<bool>("IsDeleted")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
|
.HasColumnType("datetime2")
|
||||||
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
||||||
|
b.Property<Guid?>("LastModifierId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<string>("Operator")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("nvarchar(20)");
|
||||||
|
|
||||||
|
b.Property<Guid>("RuleId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TenantId")
|
||||||
|
.HasColumnType("uniqueidentifier")
|
||||||
|
.HasColumnName("TenantId");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasMaxLength(200)
|
||||||
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RuleId");
|
||||||
|
|
||||||
|
b.ToTable("Str_T_PutawayCondition", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -15479,6 +15637,10 @@ namespace Erp.Platform.Migrations
|
||||||
.OnDelete(DeleteBehavior.Restrict)
|
.OnDelete(DeleteBehavior.Restrict)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Erp.Platform.Entities.Uom", "Uom")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UomId");
|
||||||
|
|
||||||
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
|
b.HasOne("Erp.Platform.Entities.Warehouse", "Warehouse")
|
||||||
.WithMany("Locations")
|
.WithMany("Locations")
|
||||||
.HasForeignKey("WarehouseId")
|
.HasForeignKey("WarehouseId")
|
||||||
|
|
@ -15493,6 +15655,8 @@ namespace Erp.Platform.Migrations
|
||||||
|
|
||||||
b.Navigation("LocationType");
|
b.Navigation("LocationType");
|
||||||
|
|
||||||
|
b.Navigation("Uom");
|
||||||
|
|
||||||
b.Navigation("Warehouse");
|
b.Navigation("Warehouse");
|
||||||
|
|
||||||
b.Navigation("Zone");
|
b.Navigation("Zone");
|
||||||
|
|
@ -15817,6 +15981,17 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Template");
|
b.Navigation("Template");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.PutawayCondition", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("Erp.Platform.Entities.Putaway", "Rule")
|
||||||
|
.WithMany("Conditions")
|
||||||
|
.HasForeignKey("RuleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Rule");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Erp.Platform.Entities.QuestionPool", "QuestionPool")
|
b.HasOne("Erp.Platform.Entities.QuestionPool", "QuestionPool")
|
||||||
|
|
@ -16659,6 +16834,11 @@ namespace Erp.Platform.Migrations
|
||||||
b.Navigation("Items");
|
b.Navigation("Items");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Erp.Platform.Entities.Putaway", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Conditions");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
modelBuilder.Entity("Erp.Platform.Entities.Question", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Options");
|
b.Navigation("Options");
|
||||||
|
|
|
||||||
|
|
@ -5378,6 +5378,8 @@
|
||||||
"description": "Yüksek raf - Ağır malzemeler",
|
"description": "Yüksek raf - Ağır malzemeler",
|
||||||
"capacity": 100,
|
"capacity": 100,
|
||||||
"currentStock": 75,
|
"currentStock": 75,
|
||||||
|
"kind": 2,
|
||||||
|
"uomName": "Kg",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -5389,6 +5391,8 @@
|
||||||
"description": "Orta raf - Orta ağırlık malzemeler",
|
"description": "Orta raf - Orta ağırlık malzemeler",
|
||||||
"capacity": 50,
|
"capacity": 50,
|
||||||
"currentStock": 30,
|
"currentStock": 30,
|
||||||
|
"kind": 10,
|
||||||
|
"uomName": "Kg",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -5400,6 +5404,8 @@
|
||||||
"description": "Küçük parçalar rafı",
|
"description": "Küçük parçalar rafı",
|
||||||
"capacity": 200,
|
"capacity": 200,
|
||||||
"currentStock": 180,
|
"currentStock": 180,
|
||||||
|
"kind": 3,
|
||||||
|
"uomName": "Kg",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -5411,6 +5417,8 @@
|
||||||
"description": "Küçük parçalar rafı",
|
"description": "Küçük parçalar rafı",
|
||||||
"capacity": 200,
|
"capacity": 200,
|
||||||
"currentStock": 180,
|
"currentStock": 180,
|
||||||
|
"kind": 1,
|
||||||
|
"uomName": "Kg",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -5422,6 +5430,49 @@
|
||||||
"description": "Büyük parçalar rafı",
|
"description": "Büyük parçalar rafı",
|
||||||
"capacity": 200,
|
"capacity": 200,
|
||||||
"currentStock": 180,
|
"currentStock": 180,
|
||||||
|
"kind": 8,
|
||||||
|
"uomName": "Adet",
|
||||||
|
"isActive": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Putaways": [
|
||||||
|
{
|
||||||
|
"code": "RULE001",
|
||||||
|
"name": "Ağır Malzemeler",
|
||||||
|
"description": "Ağır malzemeler için zemin seviye yerleştirme kuralı",
|
||||||
|
"priority": 1,
|
||||||
|
"strategy": "FIFO",
|
||||||
|
"isActive": true,
|
||||||
|
"warehouseCode": "WH-001",
|
||||||
|
"materialTypeCode": "RAW",
|
||||||
|
"materialGroupCode": "MAMUL",
|
||||||
|
"targetZoneCode": "Z002",
|
||||||
|
"targetLocationCode": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "RULE002",
|
||||||
|
"name": "Hızlı Hareket Eden Malzemeler",
|
||||||
|
"description": "A sınıfı malzemeler için kolay erişim bölgesi",
|
||||||
|
"warehouseCode": "WH-001",
|
||||||
|
"materialTypeCode": "SERVICE",
|
||||||
|
"materialGroupCode": "MOTOR",
|
||||||
|
"priority": 2,
|
||||||
|
"targetZoneCode": "Z002",
|
||||||
|
"targetLocationCode": null,
|
||||||
|
"strategy": "NEAREST_LOCATION",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "RULE003",
|
||||||
|
"name": "FIFO Kuralı",
|
||||||
|
"description": "Son kullanma tarihi olan malzemeler için FIFO",
|
||||||
|
"warehouseCode": "WH-001",
|
||||||
|
"materialTypeCode": "FINISHED",
|
||||||
|
"materialGroupCode": "METAL",
|
||||||
|
"priority": 3,
|
||||||
|
"targetZoneCode": "Z002",
|
||||||
|
"targetLocationCode": null,
|
||||||
|
"strategy": "FIFO",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Zone, Guid> _zoneRepository;
|
private readonly IRepository<Zone, Guid> _zoneRepository;
|
||||||
private readonly IRepository<LocationType, Guid> _locationTypeRepository;
|
private readonly IRepository<LocationType, Guid> _locationTypeRepository;
|
||||||
private readonly IRepository<Location, Guid> _locationRepository;
|
private readonly IRepository<Location, Guid> _locationRepository;
|
||||||
|
private readonly IRepository<Putaway, Guid> _putawayRepository;
|
||||||
|
|
||||||
public TenantDataSeeder(
|
public TenantDataSeeder(
|
||||||
IClock clock,
|
IClock clock,
|
||||||
|
|
@ -224,7 +225,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<ZoneType, Guid> zoneTypeRepository,
|
IRepository<ZoneType, Guid> zoneTypeRepository,
|
||||||
IRepository<Zone, Guid> zoneRepository,
|
IRepository<Zone, Guid> zoneRepository,
|
||||||
IRepository<LocationType, Guid> locationTypeRepository,
|
IRepository<LocationType, Guid> locationTypeRepository,
|
||||||
IRepository<Location, Guid> locationRepository
|
IRepository<Location, Guid> locationRepository,
|
||||||
|
IRepository<Putaway, Guid> putawayRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_clock = clock;
|
_clock = clock;
|
||||||
|
|
@ -330,6 +332,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
_zoneRepository = zoneRepository;
|
_zoneRepository = zoneRepository;
|
||||||
_locationTypeRepository = locationTypeRepository;
|
_locationTypeRepository = locationTypeRepository;
|
||||||
_locationRepository = locationRepository;
|
_locationRepository = locationRepository;
|
||||||
|
_putawayRepository = putawayRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IConfigurationRoot BuildConfiguration()
|
private static IConfigurationRoot BuildConfiguration()
|
||||||
|
|
@ -2226,6 +2229,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode);
|
var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode);
|
||||||
var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode);
|
var zone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.ZoneCode);
|
||||||
var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.LocationTypeCode);
|
var locationtype = await _locationTypeRepository.FirstOrDefaultAsync(x => x.Code == item.LocationTypeCode);
|
||||||
|
var uom = await _uomRepository.FirstOrDefaultAsync(x => x.Name == item.UomName);
|
||||||
|
|
||||||
await _locationRepository.InsertAsync(new Location
|
await _locationRepository.InsertAsync(new Location
|
||||||
{
|
{
|
||||||
|
|
@ -2235,7 +2239,40 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
Code = item.Code,
|
Code = item.Code,
|
||||||
Name = item.Name,
|
Name = item.Name,
|
||||||
Description = item.Description,
|
Description = item.Description,
|
||||||
IsActive = item.IsActive
|
IsActive = item.IsActive,
|
||||||
|
Capacity = item.Capacity,
|
||||||
|
Kind = item.Kind,
|
||||||
|
UomId = uom?.Id,
|
||||||
|
CurrentStock = item.CurrentStock
|
||||||
|
}, autoSave: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in items.Putaways)
|
||||||
|
{
|
||||||
|
var exists = await _putawayRepository.AnyAsync(x => x.Code == item.Code);
|
||||||
|
if (exists)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var warehouse = await _warehouseRepository.FirstOrDefaultAsync(x => x.Code == item.WarehouseCode);
|
||||||
|
var materialtype = await _materialTypeRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialTypeCode);
|
||||||
|
var materialgroup = await _materialGroupRepository.FirstOrDefaultAsync(x => x.Code == item.MaterialGroupCode);
|
||||||
|
var targetzone = await _zoneRepository.FirstOrDefaultAsync(x => x.Code == item.TargetZoneCode);
|
||||||
|
var targetlocation = await _locationRepository.FirstOrDefaultAsync(x => x.Code == item.TargetLocationCode);
|
||||||
|
|
||||||
|
await _putawayRepository.InsertAsync(new Putaway
|
||||||
|
{
|
||||||
|
Code = item.Code,
|
||||||
|
Name = item.Name,
|
||||||
|
Description = item.Description,
|
||||||
|
Priority = item.Priority,
|
||||||
|
Strategy = item.Strategy,
|
||||||
|
IsActive = item.IsActive,
|
||||||
|
WarehouseId = warehouse?.Id,
|
||||||
|
MaterialTypeId = materialtype?.Id,
|
||||||
|
MaterialGroupId = materialgroup?.Id,
|
||||||
|
TargetZoneId = targetzone?.Id,
|
||||||
|
TargetLocationId = targetlocation?.Id,
|
||||||
|
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,23 @@ public class TenantSeederDto
|
||||||
public List<ZoneSeedDto> Zones { get; set; }
|
public List<ZoneSeedDto> Zones { get; set; }
|
||||||
public List<LocationTypeSeedDto> LocationTypes { get; set; }
|
public List<LocationTypeSeedDto> LocationTypes { get; set; }
|
||||||
public List<LocationSeedDto> Locations { get; set; }
|
public List<LocationSeedDto> Locations { get; set; }
|
||||||
|
public List<PutawaySeedDto> Putaways { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PutawaySeedDto
|
||||||
|
{
|
||||||
|
public string Code { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public int Priority { get; set; }
|
||||||
|
public string Strategy { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
|
||||||
|
public string WarehouseCode { get; set; }
|
||||||
|
public string MaterialTypeCode { get; set; }
|
||||||
|
public string MaterialGroupCode { get; set; }
|
||||||
|
public string TargetZoneCode { get; set; }
|
||||||
|
public string TargetLocationCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class LocationSeedDto
|
public class LocationSeedDto
|
||||||
|
|
@ -128,6 +145,8 @@ public class LocationSeedDto
|
||||||
|
|
||||||
public decimal Capacity { get; set; }
|
public decimal Capacity { get; set; }
|
||||||
public decimal CurrentStock { get; set; }
|
public decimal CurrentStock { get; set; }
|
||||||
|
public int Kind { get; set; }
|
||||||
|
public string UomName { get; set; }
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,491 +0,0 @@
|
||||||
import React, { useState } from 'react'
|
|
||||||
import {
|
|
||||||
FaSearch,
|
|
||||||
FaMapMarkerAlt,
|
|
||||||
FaExclamationTriangle,
|
|
||||||
FaCheckCircle,
|
|
||||||
FaEye,
|
|
||||||
FaTh,
|
|
||||||
FaList,
|
|
||||||
} from 'react-icons/fa'
|
|
||||||
import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
|
||||||
import { mockLocations } from '../../../mocks/mockLocations'
|
|
||||||
import { mockStockItems } from '../../../mocks/mockStockItems'
|
|
||||||
import { getStockStatusColor, getStockStatusText } from '../../../utils/erp'
|
|
||||||
import { Container } from '@/components/shared'
|
|
||||||
|
|
||||||
const LocationTracking: React.FC = () => {
|
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
|
||||||
const [selectedWarehouse, setSelectedWarehouse] = useState<string>('')
|
|
||||||
const [selectedLocation, setSelectedLocation] = useState<string>('')
|
|
||||||
const [viewMode, setViewMode] = useState<'grid' | 'list'>('grid')
|
|
||||||
|
|
||||||
const getLocationUtilization = (locationId: string) => {
|
|
||||||
const location = mockLocations.find((l) => l.id === locationId)
|
|
||||||
if (!location) return 0
|
|
||||||
return (location.currentStock / location.capacity) * 100
|
|
||||||
}
|
|
||||||
|
|
||||||
const getLocationStockItems = (locationId: string) => {
|
|
||||||
return mockStockItems.filter((item) => item.locationId === locationId)
|
|
||||||
}
|
|
||||||
|
|
||||||
const filteredLocations = mockLocations.filter((location) => {
|
|
||||||
const matchesSearch =
|
|
||||||
location.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
|
||||||
location.locationCode.toLowerCase().includes(searchTerm.toLowerCase())
|
|
||||||
const matchesWarehouse = selectedWarehouse === '' || location.warehouseId === selectedWarehouse
|
|
||||||
return matchesSearch && matchesWarehouse
|
|
||||||
})
|
|
||||||
|
|
||||||
const GridView = () => (
|
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
||||||
{filteredLocations.map((location) => {
|
|
||||||
const warehouse = mockWarehouses.find((w) => w.id === location.warehouseId)
|
|
||||||
const locationStockItems = getLocationStockItems(location.id)
|
|
||||||
const utilization = getLocationUtilization(location.id)
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
key={location.id}
|
|
||||||
className="bg-white rounded-lg shadow-sm border border-gray-200 p-3"
|
|
||||||
>
|
|
||||||
<div className="flex items-start justify-between mb-3">
|
|
||||||
<div className="flex items-center gap-3">
|
|
||||||
<div className="p-2 bg-blue-100 rounded-lg">
|
|
||||||
<FaMapMarkerAlt className="w-5 h-5 text-blue-600" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<h3 className="font-medium text-gray-900">{location.name}</h3>
|
|
||||||
<p className="text-sm text-gray-500">{location.locationCode}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
onClick={() => setSelectedLocation(location.id)}
|
|
||||||
className="text-blue-600 hover:text-blue-700"
|
|
||||||
>
|
|
||||||
<FaEye className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="space-y-3 pt-2">
|
|
||||||
<div className="text-sm text-gray-600">
|
|
||||||
<p>
|
|
||||||
<strong>Depo:</strong> {warehouse?.name}
|
|
||||||
</p>
|
|
||||||
<p>{location.description}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Utilization */}
|
|
||||||
<div className="space-y-1">
|
|
||||||
<div className="flex justify-between text-sm">
|
|
||||||
<span className="text-gray-600">Doluluk Oranı</span>
|
|
||||||
<span className="font-medium">%{Math.round(utilization)}</span>
|
|
||||||
</div>
|
|
||||||
<div className="w-full bg-gray-200 rounded-full h-2">
|
|
||||||
<div
|
|
||||||
className={`h-2 rounded-full ${
|
|
||||||
utilization > 90
|
|
||||||
? 'bg-red-500'
|
|
||||||
: utilization > 70
|
|
||||||
? 'bg-yellow-500'
|
|
||||||
: 'bg-green-500'
|
|
||||||
}`}
|
|
||||||
style={{ width: `${utilization}%` }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-gray-500">
|
|
||||||
{location.currentStock} / {location.capacity} birim
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Stock Items Summary */}
|
|
||||||
<div className="bg-gray-50 rounded-lg p-2">
|
|
||||||
<div className="flex items-center justify-between mb-2">
|
|
||||||
<h4 className="text-sm font-medium text-gray-900">Malzemeler</h4>
|
|
||||||
<span className="text-xs text-gray-500">{locationStockItems.length} çeşit</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{locationStockItems.length > 0 ? (
|
|
||||||
<div className="space-y-1">
|
|
||||||
{locationStockItems.slice(0, 3).map((item) => (
|
|
||||||
<div key={item.id} className="flex justify-between items-center text-xs">
|
|
||||||
<span className="text-gray-700 truncate">
|
|
||||||
{item.material?.code || 'N/A'}
|
|
||||||
</span>
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<span className="font-medium">{item.quantity}</span>
|
|
||||||
<span
|
|
||||||
className={`px-1.5 py-0.5 rounded-full text-xs ${getStockStatusColor(
|
|
||||||
item.status,
|
|
||||||
)}`}
|
|
||||||
>
|
|
||||||
{getStockStatusText(item.status)}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
{locationStockItems.length > 3 && (
|
|
||||||
<div className="text-xs text-gray-500 text-center pt-1">
|
|
||||||
+{locationStockItems.length - 3} malzeme daha
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div className="text-xs text-gray-500 text-center py-2">Malzeme bulunmuyor</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Restrictions */}
|
|
||||||
{location.restrictions && location.restrictions.length > 0 && (
|
|
||||||
<div>
|
|
||||||
<h4 className="text-sm font-medium text-gray-900 mb-1">Kısıtlamalar</h4>
|
|
||||||
<div className="flex flex-wrap gap-1">
|
|
||||||
{location.restrictions.slice(0, 2).map((restriction, index) => (
|
|
||||||
<span
|
|
||||||
key={index}
|
|
||||||
className="inline-flex px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded"
|
|
||||||
>
|
|
||||||
{restriction}
|
|
||||||
</span>
|
|
||||||
))}
|
|
||||||
{location.restrictions.length > 2 && (
|
|
||||||
<span className="inline-flex px-2 py-1 text-xs bg-gray-100 text-gray-600 rounded">
|
|
||||||
+{location.restrictions.length - 2}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center justify-between pt-3 mt-3 border-t border-gray-100">
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
{location.isActive ? (
|
|
||||||
<>
|
|
||||||
<FaCheckCircle className="w-4 h-4 text-green-500" />
|
|
||||||
<span className="text-sm text-green-600">Aktif</span>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<FaExclamationTriangle className="w-4 h-4 text-red-500" />
|
|
||||||
<span className="text-sm text-red-600">Pasif</span>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-gray-500">
|
|
||||||
Son hareket:{' '}
|
|
||||||
{locationStockItems.length > 0
|
|
||||||
? new Date(
|
|
||||||
Math.max(
|
|
||||||
...locationStockItems.map((item) => item.lastMovementDate.getTime()),
|
|
||||||
),
|
|
||||||
).toLocaleDateString('tr-TR')
|
|
||||||
: 'N/A'}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
const ListView = () => (
|
|
||||||
<div className="bg-white rounded-lg shadow-sm border border-gray-200">
|
|
||||||
<div className="overflow-x-auto">
|
|
||||||
<table className="min-w-full divide-y divide-gray-200">
|
|
||||||
<thead className="bg-gray-50">
|
|
||||||
<tr>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Lokasyon
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Depo
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Doluluk
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Malzeme Çeşidi
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Son Hareket
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
Durum
|
|
||||||
</th>
|
|
||||||
<th className="px-3 py-2 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
|
|
||||||
İşlemler
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody className="bg-white divide-y divide-gray-200">
|
|
||||||
{filteredLocations.map((location) => {
|
|
||||||
const warehouse = mockWarehouses.find((w) => w.id === location.warehouseId)
|
|
||||||
const locationStockItems = getLocationStockItems(location.id)
|
|
||||||
const utilization = getLocationUtilization(location.id)
|
|
||||||
|
|
||||||
return (
|
|
||||||
<tr key={location.id} className="hover:bg-gray-50">
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<div className="p-2 bg-blue-100 rounded-lg mr-3">
|
|
||||||
<FaMapMarkerAlt className="w-4 h-4 text-blue-600" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className="text-sm font-medium text-gray-900">{location.name}</div>
|
|
||||||
<div className="text-sm text-gray-500">{location.locationCode}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap">
|
|
||||||
<div className="text-sm text-gray-900">{warehouse?.name}</div>
|
|
||||||
<div className="text-sm text-gray-500">{warehouse?.code}</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<div className="w-16 bg-gray-200 rounded-full h-2 mr-2">
|
|
||||||
<div
|
|
||||||
className={`h-2 rounded-full ${
|
|
||||||
utilization > 90
|
|
||||||
? 'bg-red-500'
|
|
||||||
: utilization > 70
|
|
||||||
? 'bg-yellow-500'
|
|
||||||
: 'bg-green-500'
|
|
||||||
}`}
|
|
||||||
style={{ width: `${utilization}%` }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<span className="text-sm text-gray-900">%{Math.round(utilization)}</span>
|
|
||||||
</div>
|
|
||||||
<div className="text-xs text-gray-500">
|
|
||||||
{location.currentStock} / {location.capacity}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap text-sm text-gray-900">
|
|
||||||
{locationStockItems.length} çeşit
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap text-sm text-gray-900">
|
|
||||||
{locationStockItems.length > 0
|
|
||||||
? new Date(
|
|
||||||
Math.max(
|
|
||||||
...locationStockItems.map((item) => item.lastMovementDate.getTime()),
|
|
||||||
),
|
|
||||||
).toLocaleDateString('tr-TR')
|
|
||||||
: 'N/A'}
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap">
|
|
||||||
{location.isActive ? (
|
|
||||||
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
|
|
||||||
<FaCheckCircle className="w-3 h-3 mr-1" />
|
|
||||||
Aktif
|
|
||||||
</span>
|
|
||||||
) : (
|
|
||||||
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 text-red-800">
|
|
||||||
<FaExclamationTriangle className="w-3 h-3 mr-1" />
|
|
||||||
Pasif
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 whitespace-nowrap text-right text-sm font-medium">
|
|
||||||
<button
|
|
||||||
onClick={() => setSelectedLocation(location.id)}
|
|
||||||
className="text-blue-600 hover:text-blue-900"
|
|
||||||
>
|
|
||||||
<FaEye className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
const LocationDetailModal = () => {
|
|
||||||
const location = mockLocations.find((l) => l.id === selectedLocation)
|
|
||||||
const locationStockItems = getLocationStockItems(selectedLocation)
|
|
||||||
|
|
||||||
if (!selectedLocation || !location) return null
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="fixed inset-0 z-50 overflow-y-auto">
|
|
||||||
<div className="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
|
||||||
<div
|
|
||||||
className="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
|
||||||
onClick={() => setSelectedLocation('')}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<div className="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full">
|
|
||||||
<div className="bg-white px-4 pt-4 pb-4 sm:p-4">
|
|
||||||
<div className="flex items-center justify-between mb-4">
|
|
||||||
<h3 className="text-lg font-medium text-gray-900">{location.name} - Detaylar</h3>
|
|
||||||
<button
|
|
||||||
onClick={() => setSelectedLocation('')}
|
|
||||||
className="text-gray-400 hover:text-gray-600"
|
|
||||||
>
|
|
||||||
<svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
||||||
<path
|
|
||||||
strokeLinecap="round"
|
|
||||||
strokeLinejoin="round"
|
|
||||||
strokeWidth={2}
|
|
||||||
d="M6 18L18 6M6 6l12 12"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
||||||
{/* Location Info */}
|
|
||||||
<div className="bg-gray-50 rounded-lg p-3">
|
|
||||||
<h4 className="font-medium text-gray-900 mb-3">Lokasyon Bilgileri</h4>
|
|
||||||
<div className="space-y-2 text-sm">
|
|
||||||
<div>
|
|
||||||
<strong>Kod:</strong> {location.locationCode}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Açıklama:</strong> {location.description}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Tip:</strong> {location.locationType}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Kapasite:</strong> {location.capacity} birim
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>Mevcut Stok:</strong> {location.currentStock} birim
|
|
||||||
</div>
|
|
||||||
{location.dimensions && (
|
|
||||||
<div>
|
|
||||||
<strong>Boyutlar:</strong> {location.dimensions.length}x
|
|
||||||
{location.dimensions.width}x{location.dimensions.height}m
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Stock Items */}
|
|
||||||
<div className="bg-gray-50 rounded-lg p-3">
|
|
||||||
<h4 className="font-medium text-gray-900 mb-3">
|
|
||||||
Stok Malzemeleri ({locationStockItems.length})
|
|
||||||
</h4>
|
|
||||||
<div className="space-y-2 max-h-64 overflow-y-auto">
|
|
||||||
{locationStockItems.map((item) => (
|
|
||||||
<div key={item.id} className="bg-white rounded p-3 border">
|
|
||||||
<div className="flex justify-between items-start mb-2">
|
|
||||||
<div>
|
|
||||||
<div className="font-medium text-sm">{item.material?.code}</div>
|
|
||||||
<div className="text-xs text-gray-500">{item.material?.code}</div>
|
|
||||||
</div>
|
|
||||||
<span
|
|
||||||
className={`px-2 py-1 rounded-full text-xs ${getStockStatusColor(
|
|
||||||
item.status,
|
|
||||||
)}`}
|
|
||||||
>
|
|
||||||
{getStockStatusText(item.status)}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className="grid grid-cols-2 gap-2 text-xs text-gray-600">
|
|
||||||
<div>
|
|
||||||
Miktar: {item.quantity} {item.unitId}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Mevcut: {item.availableQuantity} {item.unitId}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
Rezerve: {item.reservedQuantity} {item.unitId}
|
|
||||||
</div>
|
|
||||||
<div>Lot: {item.lotNumber || 'N/A'}</div>
|
|
||||||
</div>
|
|
||||||
<div className="mt-2 text-xs text-gray-500">
|
|
||||||
Son hareket: {item.lastMovementDate.toLocaleDateString('tr-TR')}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
{locationStockItems.length === 0 && (
|
|
||||||
<div className="text-sm text-gray-500 text-center py-4">
|
|
||||||
Bu lokasyonda malzeme bulunmuyor
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Container>
|
|
||||||
<div className="space-y-2">
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900">Raf/Lokasyon Bazlı Takip</h2>
|
|
||||||
<p className="text-gray-600">Lokasyonlardaki stok durumunu takip edin</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<button
|
|
||||||
onClick={() => setViewMode('grid')}
|
|
||||||
className={`p-1.5 rounded-lg ${
|
|
||||||
viewMode === 'grid'
|
|
||||||
? 'bg-blue-100 text-blue-600'
|
|
||||||
: 'text-gray-400 hover:text-gray-600'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<FaTh className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={() => setViewMode('list')}
|
|
||||||
className={`p-1.5 rounded-lg ${
|
|
||||||
viewMode === 'list'
|
|
||||||
? 'bg-blue-100 text-blue-600'
|
|
||||||
: 'text-gray-400 hover:text-gray-600'
|
|
||||||
}`}
|
|
||||||
>
|
|
||||||
<FaList className="w-4 h-4" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Filters */}
|
|
||||||
<div className="flex flex-col sm:flex-row gap-4">
|
|
||||||
<div className="relative flex-1">
|
|
||||||
<FaSearch className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="Lokasyon ara..."
|
|
||||||
value={searchTerm}
|
|
||||||
onChange={(e) => setSearchTerm(e.target.value)}
|
|
||||||
className="pl-10 pr-4 py-1.5 text-sm w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<select
|
|
||||||
value={selectedWarehouse}
|
|
||||||
onChange={(e) => setSelectedWarehouse(e.target.value)}
|
|
||||||
className="px-4 py-1.5 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
>
|
|
||||||
<option value="">Tüm Depolar</option>
|
|
||||||
{mockWarehouses.map((warehouse) => (
|
|
||||||
<option key={warehouse.id} value={warehouse.id}>
|
|
||||||
{warehouse.name} ({warehouse.code})
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Content */}
|
|
||||||
{viewMode === 'grid' ? <GridView /> : <ListView />}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Location Detail Modal */}
|
|
||||||
<LocationDetailModal />
|
|
||||||
</Container>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default LocationTracking
|
|
||||||
Loading…
Reference in a new issue