Модели

pull/3/head
Rustem 2025-01-19 23:33:22 +05:00
parent 354eeed739
commit 1edbd3ac9d
8 changed files with 312 additions and 962 deletions

View File

@ -27,9 +27,9 @@ class PipiCarInstallCommands extends InstallCommand
'auto_brands', // Бренд авто
'auto_colors', // Цвета авто
'auto_types', // Типы авто
'auto_tariffs', // Тарифы авто
'brand_models', // Модель авто
'auto_classes', // Класс авто
'auto_tariffs', // Тарифы авто
'owner_contracts', // Договор Владельца
'owners', // Владелец авто
'auto' // авто

View File

@ -2,6 +2,9 @@
namespace App\Install;
use A7kz\Platform\Modules\Platform\Navigation\Facades\Nav;
use A7kz\Platform\Modules\Platform\Navigation\Models\NavItem;
class Seed
{
static function init(): void
@ -11,7 +14,17 @@ class Seed
}
private static function apps(): void
{}
{
Nav::add(new NavItem('pipicar', '/app/main', 1, 'Главная', ["admin","director","coworker","observer","moderator"], 'star'));
Nav::add(new NavItem('pipicar-nav-auto', null, 1, 'Автомобили', ["admin"], 'car-front'));
Nav::add(new NavItem('auto', '/app/pipicar.auto', 1, 'Машины', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('marks', '/app/pipicar.auto_brands', 1, 'Марки', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('classes', '/app/pipicar.auto_classes', 1, 'Классы', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('colors', '/app/pipicar.auto_colors', 1, 'Цвета', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('tariffs', '/app/pipicar.auto_tariffs', 1, 'Тарифы', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('types', '/app/pipicar.auto_types', 1, 'Типы', ["admin"], 'car-front'), 'pipicar-nav-auto');
Nav::add(new NavItem('models', '/app/pipicar.brand_models', 1, 'Модели', ["admin"], 'car-front'), 'pipicar-nav-auto');
}
private static function nav(): void
{}
}

76
composer.lock generated
View File

@ -8,11 +8,11 @@
"packages": [
{
"name": "a7kz/platform",
"version": "1.3.192",
"version": "1.3.194",
"source": {
"type": "git",
"url": "ssh://git@git.a7.kz:22022/A7/package.platform.git",
"reference": "fbc47be788014d8782b1a65c082e5306c3dba752"
"reference": "4d10c99f97e77d8e5b741168dfe1d6bcb0746e5a"
},
"require": {
"doctrine/dbal": "^3.5",
@ -41,7 +41,7 @@
}
],
"description": "LowCode platform",
"time": "2025-01-09T10:40:50+00:00"
"time": "2025-01-19T13:59:38+00:00"
},
{
"name": "brick/math",
@ -342,16 +342,16 @@
},
{
"name": "doctrine/dbal",
"version": "3.9.3",
"version": "3.9.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
"reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba"
"reference": "ec16c82f20be1a7224e65ac67144a29199f87959"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/61446f07fcb522414d6cfd8b1c3e5f9e18c579ba",
"reference": "61446f07fcb522414d6cfd8b1c3e5f9e18c579ba",
"url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959",
"reference": "ec16c82f20be1a7224e65ac67144a29199f87959",
"shasum": ""
},
"require": {
@ -367,15 +367,13 @@
"doctrine/coding-standard": "12.0.0",
"fig/log-test": "^1",
"jetbrains/phpstorm-stubs": "2023.1",
"phpstan/phpstan": "1.12.6",
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "9.6.20",
"psalm/plugin-phpunit": "0.18.4",
"phpstan/phpstan": "2.1.1",
"phpstan/phpstan-strict-rules": "^2",
"phpunit/phpunit": "9.6.22",
"slevomat/coding-standard": "8.13.1",
"squizlabs/php_codesniffer": "3.10.2",
"symfony/cache": "^5.4|^6.0|^7.0",
"symfony/console": "^4.4|^5.4|^6.0|^7.0",
"vimeo/psalm": "4.30.0"
"symfony/console": "^4.4|^5.4|^6.0|^7.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@ -435,7 +433,7 @@
],
"support": {
"issues": "https://github.com/doctrine/dbal/issues",
"source": "https://github.com/doctrine/dbal/tree/3.9.3"
"source": "https://github.com/doctrine/dbal/tree/3.9.4"
},
"funding": [
{
@ -451,7 +449,7 @@
"type": "tidelift"
}
],
"time": "2024-10-10T17:56:43+00:00"
"time": "2025-01-16T08:28:55+00:00"
},
{
"name": "doctrine/deprecations",
@ -3633,16 +3631,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
"version": "1.29.7",
"version": "1.29.8",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "02c8625411dcb96e1f63d58c47460284e15b2e80"
"reference": "089ffdfc04b5fcf25a3503d81a4e589f247e20e3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/02c8625411dcb96e1f63d58c47460284e15b2e80",
"reference": "02c8625411dcb96e1f63d58c47460284e15b2e80",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/089ffdfc04b5fcf25a3503d81a4e589f247e20e3",
"reference": "089ffdfc04b5fcf25a3503d81a4e589f247e20e3",
"shasum": ""
},
"require": {
@ -3732,9 +3730,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.7"
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.8"
},
"time": "2024-12-27T05:10:37+00:00"
"time": "2025-01-12T03:16:27+00:00"
},
{
"name": "phpoffice/phpword",
@ -7441,16 +7439,16 @@
},
{
"name": "laravel/pint",
"version": "v1.19.0",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/pint.git",
"reference": "8169513746e1bac70c85d6ea1524d9225d4886f0"
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0",
"reference": "8169513746e1bac70c85d6ea1524d9225d4886f0",
"url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
"reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b",
"shasum": ""
},
"require": {
@ -7503,20 +7501,20 @@
"issues": "https://github.com/laravel/pint/issues",
"source": "https://github.com/laravel/pint"
},
"time": "2024-12-30T16:20:10+00:00"
"time": "2025-01-14T16:20:53+00:00"
},
{
"name": "laravel/sail",
"version": "v1.39.1",
"version": "v1.40.0",
"source": {
"type": "git",
"url": "https://github.com/laravel/sail.git",
"reference": "1a3c7291bc88de983b66688919a4d298d68ddec7"
"reference": "237e70656d8eface4839de51d101284bd5d0cf71"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/sail/zipball/1a3c7291bc88de983b66688919a4d298d68ddec7",
"reference": "1a3c7291bc88de983b66688919a4d298d68ddec7",
"url": "https://api.github.com/repos/laravel/sail/zipball/237e70656d8eface4839de51d101284bd5d0cf71",
"reference": "237e70656d8eface4839de51d101284bd5d0cf71",
"shasum": ""
},
"require": {
@ -7566,7 +7564,7 @@
"issues": "https://github.com/laravel/sail/issues",
"source": "https://github.com/laravel/sail"
},
"time": "2024-11-27T15:42:28+00:00"
"time": "2025-01-13T16:57:11+00:00"
},
{
"name": "mockery/mockery",
@ -8188,16 +8186,16 @@
},
{
"name": "phpunit/phpunit",
"version": "10.5.40",
"version": "10.5.41",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c"
"reference": "e76586fa3d49714f230221734b44892e384109d7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e6ddda95af52f69c1e0c7b4f977cccb58048798c",
"reference": "e6ddda95af52f69c1e0c7b4f977cccb58048798c",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e76586fa3d49714f230221734b44892e384109d7",
"reference": "e76586fa3d49714f230221734b44892e384109d7",
"shasum": ""
},
"require": {
@ -8269,7 +8267,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.40"
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.41"
},
"funding": [
{
@ -8285,7 +8283,7 @@
"type": "tidelift"
}
],
"time": "2024-12-21T05:49:06+00:00"
"time": "2025-01-13T09:33:05+00:00"
},
{
"name": "sebastian/cli-parser",
@ -9708,12 +9706,12 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"stability-flags": {},
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.1"
},
"platform-dev": [],
"platform-dev": {},
"plugin-api-version": "2.6.0"
}

View File

@ -2,7 +2,7 @@
"module": "pipicar",
"name": "pipicar.auto_brands",
"type": "crud",
"title": "Бренды Автомобилей",
"title": "Марки Автомобилей",
"data": {
"table": "pipi_auto_brands",
"pk": "id",
@ -20,12 +20,12 @@
},
"ui": {
"grid": {
"title": "Бренды Автомобилей",
"title": "Марки Автомобилей",
"template": "app.base.crud.grid",
"cols": [
{
"name": "name",
"caption": "Название бренда"
"caption": "Название марки"
}
],
"action": {
@ -46,7 +46,7 @@
"size": 6,
"input": {
"name": "name",
"label": "Название бренда"
"label": "Название марки"
}
}
]
@ -56,7 +56,7 @@
},
"forms": {
"add": {
"title": "Добавление бренда",
"title": "Добавление марки",
"template": "app.base.crud.form",
"form": {
"submits": "struct:crud.form.edit.submits",
@ -67,7 +67,7 @@
"size": 12,
"input": {
"name": "name",
"label": "Название бренда"
"label": "Название марки"
}
}
]
@ -76,7 +76,7 @@
}
},
"edit": {
"title": "Редактирование бренда",
"title": "Редактирование марки",
"template": "app.base.crud.form",
"form": {
"rows": [
@ -86,7 +86,7 @@
"size": 12,
"input": {
"name": "name",
"label": "Название бренда"
"label": "Название марки"
}
}
]

View File

@ -1,258 +1,52 @@
{
"module": "pipicar",
"name": "pipicar.auto",
"name": "pipicar.auto_colors",
"type": "crud",
"title": "Автомобили",
"title": "Цвета Автомобилей",
"data": {
"table": "auto",
"table": "pipi_auto_colors",
"pk": "id",
"limit": 25,
"sort_order": "asc",
"sort_field": "code",
"segment": true,
"timestamp": false,
"fields": {
"id": {
"type": "pk"
},
"code": {
"type": "string",
"validation": "required"
},
"name_ru": {
"type": "text"
},
"name_kz": {
"type": "text"
},
"account_type": {
"type": "foreign",
"table": "ref_base_group",
"foreign": "id",
"display": [
"data_name_{lk}"
],
"where": "data_type = 'T01'"
},
"article_source": {
"type": "string",
"validation": "nullable"
},
"element_source": {
"type": "string",
"validation": "nullable"
},
"mo_num": {
"type": "int",
"validation": "nullable|integer"
},
"used_by_documents": {
"type": "bool",
"validation": "nullable"
},
"used_by_system": {
"type": "bool",
"validation": "nullable"
},
"type_of_organization": {
"type": "foreign",
"table": "ref_property_types",
"foreign": "id",
"display": [
"value",
"name"
],
"validation": "nullable|int",
"label": "Тип собственности"
},
"accounts_plan_part": {
"type": "foreign",
"table": "ref_accounts_plan_part",
"foreign": "id",
"display": [
"code",
"name_{lk}"
],
"validation": "nullable|string",
"label": "Раздел плана счетов"
},
"accounts_plan_particle": {
"type": "foreign",
"table": "ref_accounts_plan_particle",
"foreign": "id",
"display": [
"code",
"name_{lk}"
],
"validation": "required|string",
"label": "Подраздел плана счетов"
},
"started_at": {
"type": "date",
"validation": "required|date"
},
"ended_at": {
"type": "date",
"validation": "nullable|date"
},
"whitespace": {
"type": "virtual"
"name": {
"type": "string"
}
}
},
"ui": {
"grid": {
"title": "План счетов",
"title": "Цвета Автомобилей",
"template": "app.base.crud.grid",
"cols": [
{
"name": "code",
"caption": "Счёт"
},
{
"name": "name_kz",
"caption": "Наименование на казахском"
},
{
"name": "name_ru",
"caption": "Наименование на русском"
},
{
"name": "account_type",
"caption": "Тип счёта"
},
{
"name": "used_by_documents",
"caption": "Исп. в первич. док-тах"
},
{
"name": "used_by_system",
"caption": "Исп. системой"
},
{
"name": "accounts_plan_particle",
"caption": "Подраздел плана счетов"
},
{
"name": "type_of_organization",
"caption": "Тип плана счетов"
},
{
"name": "started_at",
"caption": "Дата начала действия"
},
{
"name": "ended_at",
"caption": "Дата окончания действия"
},
{
"name": "id",
"caption": "ИД"
"name": "name",
"caption": "Название цвета"
}
],
"action": {
"head": [
"add"
],
"row": [
"edit",
"delete"
]
},
"filter": {
"template": "app.base.crud.filter",
"rows": [
{
"cols": [
{
"size": 1,
"input": {
"name": "code",
"label": "Cчёт"
}
},
{
"size": 3,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 1,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 1,
"input": {
"name": "id",
"label": "ИД"
}
},
{
"size": 3,
"input": {
"name": "used_by_documents",
"label": "Исп. только в первич. документах"
}
},
{
"size": 3,
"input": {
"name": "used_by_system",
"label": "Исп. только системой"
}
}
]
},
{
"cols": [
{
"size": 6,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 6,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
},
{
"size": 4,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов"
}
},
{
"size": 4,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов"
}
},
{
"size": 4,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
"name": "name",
"label": "Название цвета"
}
}
]
@ -262,137 +56,18 @@
},
"forms": {
"add": {
"title": "Добавление записи в справочник \"План счетов\"",
"title": "Добавление цвета",
"template": "app.base.crud.form",
"form": {
"inject_component": [
"Js.Refs.AccountsPlan"
],
"submits": "struct:accounting.form.edit.submits",
"submits": "struct:crud.form.edit.submits",
"rows": [
{
"cols": [
{
"size": 2,
"input": {
"name": "code",
"label": "Cчёт"
}
},
{
"size": 2,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов",
"js_event": {
"onchange": "accountPlanParticleChange"
}
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 12,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
}
]
},
{
"cols": [
{
"size": 4,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 12,
"input": {
"name": "article_source",
"label": "Источник статьи"
}
},
{
"size": 12,
"input": {
"name": "element_source",
"label": "Источник элемента"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_documents",
"label": "Используется только в первичных документах"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_system",
"label": "Используется только системой"
"name": "name",
"label": "Название"
}
}
]
@ -401,142 +76,23 @@
}
},
"edit": {
"title": "Редактирование записи в справочнике \"План счетов\"",
"title": "Редактирование цвета",
"template": "app.base.crud.form",
"form": {
"inject_component": [
"Js.Refs.AccountsPlan"
],
"rows": [
{
"cols": [
{
"size": 2,
"input": {
"name": "code",
"label": "Cчёт"
}
},
{
"size": 2,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов",
"js_event": {
"onchange": "accountPlanParticleChange"
}
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 12,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
}
]
},
{
"cols": [
{
"size": 4,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 12,
"input": {
"name": "article_source",
"label": "Источник статьи"
}
},
{
"size": 12,
"input": {
"name": "element_source",
"label": "Источник элемента"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_documents",
"label": "Используется только в первичных документах"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_system",
"label": "Используется только системой"
"name": "name",
"label": "Название"
}
}
]
}
],
"submits": "struct:accounting.form.edit.submits"
"submits": "struct:crud.form.edit.submits"
}
}
}

View File

@ -28,9 +28,17 @@ return new class extends \A7kz\Platform\Commands\InstallScript {
if (!Schema::connection($segment->connector)->hasTable('pipi_auto_tariffs')) {
Schema::connection($segment->connector)->create('pipi_auto_tariffs', static function (Blueprint $table) {
$table->id();
$table->string('name')->nullable()->comment('Наименование');
$table->string('name');
$table->string('type');
$table->integer('day_range_start');
$table->integer('day_range_end');
$table->integer('base_rate');
$table->integer('deposit');
$table->timestamps();
$table->softDeletes();
$table->unsignedBigInteger('model_id')->nullable()->comment('Тариф');
$table->foreign('model_id')->references('id')->on('pipi_brand_models');
});
}
}

View File

@ -1,258 +1,248 @@
{
"module": "pipicar",
"name": "pipicar.auto",
"name": "pipicar.brand_models",
"type": "crud",
"title": "Автомобили",
"title": "Модели автомобилей",
"data": {
"table": "auto",
"table": "pipi_brand_models",
"pk": "id",
"limit": 25,
"sort_order": "asc",
"sort_field": "code",
"segment": true,
"timestamp": false,
"fields": {
"id": {
"type": "pk"
},
"code": {
"type": "string",
"validation": "required"
"name": {
"type": "string"
},
"name_ru": {
"type": "text"
},
"name_kz": {
"type": "text"
},
"account_type": {
"brand_id": {
"type": "foreign",
"table": "ref_base_group",
"table": "pipi_auto_brands",
"foreign": "id",
"display": [
"data_name_{lk}"
],
"where": "data_type = 'T01'"
},
"article_source": {
"type": "string",
"validation": "nullable"
},
"element_source": {
"type": "string",
"validation": "nullable"
},
"mo_num": {
"type": "int",
"validation": "nullable|integer"
},
"used_by_documents": {
"type": "bool",
"validation": "nullable"
},
"used_by_system": {
"type": "bool",
"validation": "nullable"
},
"type_of_organization": {
"type": "foreign",
"table": "ref_property_types",
"foreign": "id",
"display": [
"value",
"name"
],
"validation": "nullable|int",
"label": "Тип собственности"
"validation": "required|integer"
},
"accounts_plan_part": {
"type": "foreign",
"table": "ref_accounts_plan_part",
"foreign": "id",
"display": [
"code",
"name_{lk}"
],
"validation": "nullable|string",
"label": "Раздел плана счетов"
},
"accounts_plan_particle": {
"type": "foreign",
"table": "ref_accounts_plan_particle",
"foreign": "id",
"display": [
"code",
"name_{lk}"
],
"validation": "required|string",
"label": "Подраздел плана счетов"
},
"started_at": {
"type": "date",
"validation": "required|date"
},
"ended_at": {
"type": "date",
"validation": "nullable|date"
},
"whitespace": {
"type": "virtual"
"pipi_tariffs": {
"type": "subcrud",
"module": "pipicar",
"data": {
"table": "pipi_auto_tariffs",
"pk": "id",
"limit": 10,
"sort_order": "desc",
"sort_field": "id",
"left": "id",
"right": "model_id",
"fields": {
"id": {
"type": "pk"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"day_range_start": {
"type": "int"
},
"day_range_end": {
"type": "int"
},
"base_rate": {
"type": "int"
},
"deposit": {
"type": "int"
}
}
},
"ui": {
"grid": {
"title": "Тарифы",
"cols": [
{
"name": "id",
"caption": "ИД"
},
{
"name": "name",
"caption": "Название"
},
{
"name": "type",
"caption": "Тип"
},
{
"name": "base_rate",
"caption": "Цена"
}
],
"action": {
"head": [
"add"
],
"row": [
"edit",
"delete"
]
}
},
"forms": {
"add": {
"title": "Добавить тариф",
"form": {
"rows": [
{
"cols": [
{
"size": 4,
"input": {
"name": "name",
"label": "Название тарифа"
}
},
{
"size": 4,
"input": {
"name": "type",
"label": "Тип тарифа"
}
},
{
"size": 4,
"input": {
"name": "base_rate",
"label": "Базовая стоймость"
}
}
]
},
{
"cols": [
{
"size": 2,
"input": {
"name": "day_range_start",
"label": "от скольки дней"
}
},
{
"size": 2,
"input": {
"name": "day_range_end",
"label": "до скольки дней"
}
},
{
"size": 4,
"input": {
"name": "deposit",
"label": "Депозит"
}
}
]
}
],
"submits": "struct:crud.form.edit.submits"
}
},
"edit": {
"title": "Редактировать тариф",
"form": {
"rows": [
{
"cols": [
{
"size": 4,
"input": {
"name": "name",
"label": "Название тарифа"
}
},
{
"size": 4,
"input": {
"name": "type",
"label": "Тип тарифа"
}
},
{
"size": 4,
"input": {
"name": "base_rate",
"label": "Базовая стоймость"
}
}
]
},
{
"cols": [
{
"size": 2,
"input": {
"name": "day_range_start",
"label": "от скольки дней"
}
},
{
"size": 2,
"input": {
"name": "day_range_end",
"label": "до скольки дней"
}
},
{
"size": 4,
"input": {
"name": "deposit",
"label": "Депозит"
}
}
]
}
],
"submits": "struct:crud.form.edit.submits"
}
}
}
},
"actions": "struct:crud.actions"
}
}
},
"ui": {
"grid": {
"title": "План счетов",
"title": "Модели автомобилей",
"template": "app.base.crud.grid",
"cols": [
{
"name": "code",
"caption": "Счёт"
},
{
"name": "name_kz",
"caption": "Наименование на казахском"
},
{
"name": "name_ru",
"caption": "Наименование на русском"
},
{
"name": "account_type",
"caption": "Тип счёта"
},
{
"name": "used_by_documents",
"caption": "Исп. в первич. док-тах"
},
{
"name": "used_by_system",
"caption": "Исп. системой"
},
{
"name": "accounts_plan_particle",
"caption": "Подраздел плана счетов"
},
{
"name": "type_of_organization",
"caption": "Тип плана счетов"
},
{
"name": "started_at",
"caption": "Дата начала действия"
},
{
"name": "ended_at",
"caption": "Дата окончания действия"
},
{
"name": "id",
"caption": "ИД"
"name": "name",
"caption": "Название цвета"
}
],
"action": {
"head": [
"add"
],
"row": [
"edit",
"delete"
]
},
"filter": {
"template": "app.base.crud.filter",
"rows": [
{
"cols": [
{
"size": 1,
"input": {
"name": "code",
"label": "Cчёт"
}
},
{
"size": 3,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 1,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 1,
"input": {
"name": "id",
"label": "ИД"
}
},
{
"size": 3,
"input": {
"name": "used_by_documents",
"label": "Исп. только в первич. документах"
}
},
{
"size": 3,
"input": {
"name": "used_by_system",
"label": "Исп. только системой"
}
}
]
},
{
"cols": [
{
"size": 6,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 6,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
},
{
"size": 4,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов"
}
},
{
"size": 4,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов"
}
},
{
"size": 4,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
"name": "name",
"label": "Название марки"
}
}
]
@ -262,137 +252,25 @@
},
"forms": {
"add": {
"title": "Добавление записи в справочник \"План счетов\"",
"title": "Добавление модели",
"template": "app.base.crud.form",
"form": {
"inject_component": [
"Js.Refs.AccountsPlan"
],
"submits": "struct:accounting.form.edit.submits",
"submits": "struct:crud.form.edit.submits",
"rows": [
{
"cols": [
{
"size": 2,
"size": 6,
"input": {
"name": "code",
"label": "Cчёт"
"name": "name",
"label": "Название"
}
},
{
"size": 2,
"size": 6,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов",
"js_event": {
"onchange": "accountPlanParticleChange"
}
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 12,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
}
]
},
{
"cols": [
{
"size": 4,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 12,
"input": {
"name": "article_source",
"label": "Источник статьи"
}
},
{
"size": 12,
"input": {
"name": "element_source",
"label": "Источник элемента"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_documents",
"label": "Используется только в первичных документах"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_system",
"label": "Используется только системой"
"name": "brand_id",
"label": "Марка"
}
}
]
@ -401,41 +279,24 @@
}
},
"edit": {
"title": "Редактирование записи в справочнике \"План счетов\"",
"title": "Редактирование модель",
"template": "app.base.crud.form",
"form": {
"inject_component": [
"Js.Refs.AccountsPlan"
],
"rows": [
{
"cols": [
{
"size": 2,
"size": 6,
"input": {
"name": "code",
"label": "Cчёт"
"name": "name",
"label": "Название"
}
},
{
"size": 2,
"size": 6,
"input": {
"name": "mo_num",
"label": "МО №"
}
},
{
"size": 4,
"input": {
"name": "started_at",
"label": "Дата начала действия"
}
},
{
"size": 4,
"input": {
"name": "ended_at",
"label": "Дата окончания действия"
"name": "brand_id",
"label": "Марка"
}
}
]
@ -445,98 +306,14 @@
{
"size": 12,
"input": {
"name": "type_of_organization",
"label": "Тип плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_part",
"label": "Раздел плана счетов",
"readonly": true
}
},
{
"size": 12,
"input": {
"name": "accounts_plan_particle",
"label": "Подраздел плана счетов",
"js_event": {
"onchange": "accountPlanParticleChange"
}
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "name_kz",
"label": "Наименование на казахском"
}
},
{
"size": 12,
"input": {
"name": "name_ru",
"label": "Наименование на русском"
}
}
]
},
{
"cols": [
{
"size": 4,
"input": {
"name": "account_type",
"label": "Тип счёта"
}
},
{
"size": 12,
"input": {
"name": "article_source",
"label": "Источник статьи"
}
},
{
"size": 12,
"input": {
"name": "element_source",
"label": "Источник элемента"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_documents",
"label": "Используется только в первичных документах"
}
}
]
},
{
"cols": [
{
"size": 12,
"input": {
"name": "used_by_system",
"label": "Используется только системой"
"name": "pipi_tariffs",
"label": ""
}
}
]
}
],
"submits": "struct:accounting.form.edit.submits"
"submits": "struct:crud.form.edit.submits"
}
}
}

View File

@ -21,8 +21,6 @@ return new class extends Migration
$table->unsignedBigInteger('brand_id')->nullable()->comment('Марка');
$table->foreign('brand_id')->references('id')->on('pipi_auto_brands');
$table->unsignedBigInteger('tariff_id')->nullable()->comment('Тариф');
$table->foreign('tariff_id')->references('id')->on('pipi_auto_tariffs');
});
}
}