feat: единый файл Лист1+СПРАВКА, фильтры, сортировка, живой п/п
- Загрузка одного .xlsx (СПРАВКА + Лист1 в одном файле) - Рег. номера берутся из СПРАВКА автоматически, группируются по (ТН ВЭД, Страна) - Отдельный опциональный справочник кодов (CodesImportService) - Фильтры: Все / Авто / Проверить / Нет кода / Без нетто - Таблица сразу отсортирована по ТН ВЭД с живым обновлением п/п - Начальный п/п: поле в UI, автоинкремент после экспорта - Лист2: рамки, жёлтая строка при >1 рег. номере, итого по кол-ву - Лист3: ТН ВЭД в колонке B вместо константы 09035 - Красный ErrorMessage под кнопкой загрузки, удалён SpravkaFileEntry
This commit is contained in:
@@ -3,9 +3,11 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace DeclarationAutomatization.Models;
|
||||
|
||||
public record RegEntry(string Number, string Date);
|
||||
|
||||
public partial class DeclarationItem : ObservableObject
|
||||
{
|
||||
public int SequentialNumber { get; init; }
|
||||
public int SequentialNumber { get; set; }
|
||||
public string Description { get; init; } = "";
|
||||
public string TnVed { get; init; } = "";
|
||||
public string CountryId { get; init; } = "";
|
||||
@@ -13,8 +15,9 @@ public partial class DeclarationItem : ObservableObject
|
||||
public decimal AmountWithVat { get; init; }
|
||||
public decimal GrossWeight { get; init; }
|
||||
public decimal NetWeight { get; init; }
|
||||
public string RegNumber { get; init; } = "";
|
||||
public string RegDate { get; init; } = "";
|
||||
|
||||
// Все рег. номера из СПРАВКИ для данного ТН ВЭД
|
||||
public List<RegEntry> RegEntries { get; set; } = new();
|
||||
|
||||
[ObservableProperty]
|
||||
private string _declarationCode = "";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DeclarationAutomatization.Models;
|
||||
|
||||
// Одна группа из Листа1: строка ИТОГО + все рег. номера из строк группы
|
||||
// Одна группа из Листа1: строка ИТОГО (рег. номера берём из СПРАВКИ)
|
||||
public class Sheet1Group
|
||||
{
|
||||
public int SequentialNumber { get; set; }
|
||||
@@ -13,7 +11,4 @@ public class Sheet1Group
|
||||
public decimal AmountWithVat { get; set; }
|
||||
public decimal GrossWeight { get; set; }
|
||||
public decimal NetWeight { get; set; }
|
||||
|
||||
// Все уникальные рег. номера из всех строк группы (включая строку ИТОГО)
|
||||
public List<string> RegNumbers { get; set; } = new();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace DeclarationAutomatization.Models;
|
||||
public class Sheet3Row
|
||||
{
|
||||
public int SequentialNumber { get; init; }
|
||||
public string ClassifierCode { get; init; } = "09035";
|
||||
public string TnVed { get; init; } = "";
|
||||
public string RegNumber { get; init; } = "";
|
||||
public string RegDate { get; init; } = "";
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace DeclarationAutomatization.Models;
|
||||
|
||||
// Запись о загруженном файле СПРАВКИ с настройкой начального п/п
|
||||
public partial class SpravkaFileEntry : ObservableObject
|
||||
{
|
||||
[ObservableProperty]
|
||||
private string _filePath = "";
|
||||
|
||||
[ObservableProperty]
|
||||
private int _startingNumber = 1;
|
||||
|
||||
public string FileName => System.IO.Path.GetFileName(FilePath);
|
||||
}
|
||||
Reference in New Issue
Block a user