From 7b95dc23e4e906953b170fef0c8536864d90dec8 Mon Sep 17 00:00:00 2001 From: vladfo Date: Wed, 9 Oct 2024 12:10:41 +0300 Subject: [PATCH] =?utf8?q?=D0=92=D1=8B=D1=81=D1=82=D0=B0=D0=B2=D0=B8=D0=BB?= =?utf8?q?=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF?= =?utf8?q?=D0=BE=20=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=D0=BD=D0=B8=D1=8E?= =?utf8?q?=20=D0=B8=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8=20=D0=BD=D0=B0?= =?utf8?q?=D0=B7=D0=B0=D0=B4=20=D0=BD=D0=B0=20/store/index?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/controllers/CityStoreController.php | 2 ++ erp24/views/city_store/_form.php | 22 ++++++++++++---------- erp24/views/city_store/create.php | 2 +- erp24/views/city_store/update.php | 2 +- erp24/views/city_store/view.php | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/erp24/controllers/CityStoreController.php b/erp24/controllers/CityStoreController.php index 5ac4bdc8..61a4018f 100644 --- a/erp24/controllers/CityStoreController.php +++ b/erp24/controllers/CityStoreController.php @@ -104,6 +104,8 @@ class CityStoreController extends Controller $model->loadDefaultValues(); } + + return $this->render('/city_store/create', [ 'model' => $model, 'cities' => $cities, diff --git a/erp24/views/city_store/_form.php b/erp24/views/city_store/_form.php index 97653a58..305fb1f8 100644 --- a/erp24/views/city_store/_form.php +++ b/erp24/views/city_store/_form.php @@ -33,7 +33,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'FloraPointID магазина'])) ->widget(Select2::class, [ 'data' => $firms, - 'options' => ['placeholder' => 'Выберите ID'], + 'options' => ['placeholder' => 'Выберите ID', 'value' => $model->f_id ?? 637], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -44,7 +44,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'ID привязанного к магазину юрлица'])) ->widget(Select2::class, [ 'data' => $firms, - 'options' => ['placeholder' => 'Выберите юрлицо'], + 'options' => ['placeholder' => 'Выберите юрлицо', 'value' => $model->firma_id ?? 637], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -55,7 +55,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'Группа привязанного к магазину юрлица???'])) ->widget(Select2::class, [ 'data' => $firmsGroups, - 'options' => ['placeholder' => 'Выберите группу'], + 'options' => ['placeholder' => 'Выберите группу', 'value' => $model->firma_group_id ?? 2], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -66,7 +66,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'Группа привязанного к магазину юрлица???'])) ->widget(Select2::class, [ 'data' => $firmsGroups, - 'options' => ['placeholder' => 'Выберите группу'], + 'options' => ['placeholder' => 'Выберите группу', 'value' => $model->firma_group_id ?? 2], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -87,7 +87,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'style' => 'width: 16px; height: 16px; margin-left:7px; cursor: pointer;', 'data-toggle' => 'tooltip', 'title' => 'Выберите город из списка']))->widget(Select2::class, [ 'data' => $cities, - 'options' => ['placeholder' => 'Выберите город'], + 'options' => ['placeholder' => 'Выберите город', 'value' => $model->city_id ?? 1342], 'pluginOptions' => [ 'allowClear' => true, ], @@ -105,7 +105,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'style' => 'width: 16px; height: 16px; margin-left:7px; cursor: pointer;', 'data-toggle' => 'tooltip', 'title' => 'Позиция магазина'])) ?> - field($model, 'square_store')->textInput(['value' => null]) + field($model, 'square_store')->textInput(['value' => 0]) ->label('Площадь магазина (кв.м) ' . Html::img('@web/images/info-icon.svg', [ 'alt' => 'Info', 'style' => 'width: 16px; height: 16px; margin-left:7px; cursor: pointer;', @@ -275,7 +275,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'ID администратора'])) ->widget(Select2::class, [ 'data' => $administrators, - 'options' => ['placeholder' => 'Выберите администратора'], + 'options' => ['placeholder' => 'Выберите администратора', 'value' => $model->administrator_id ?? 3], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -286,7 +286,7 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P 'data-toggle' => 'tooltip', 'title' => 'ID куста'])) ->widget(Select2::class, [ 'data' => $clusters, - 'options' => ['placeholder' => 'Выберите куст'], + 'options' => ['placeholder' => 'Выберите куст', 'value' => $model->cluster_id ?? 1], 'pluginOptions' => ['allowClear' => true], ]) ?> @@ -305,10 +305,12 @@ $this->registerJsFile('/js/city-store/index.js', ['position' => \yii\web\View::P
'btn btn-success']) ?> - Отмена + Отмена
- + diff --git a/erp24/views/city_store/create.php b/erp24/views/city_store/create.php index 3357b413..a52635be 100644 --- a/erp24/views/city_store/create.php +++ b/erp24/views/city_store/create.php @@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = ['label' => 'City Stores', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?>
- Назад + Назад

title) ?>

render('_form', [ diff --git a/erp24/views/city_store/update.php b/erp24/views/city_store/update.php index b6f41cf2..7f0f917a 100644 --- a/erp24/views/city_store/update.php +++ b/erp24/views/city_store/update.php @@ -17,7 +17,7 @@ $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id $this->params['breadcrumbs'][] = 'Update'; ?>
- Назад + Назад

title) ?>

render('_form', [ diff --git a/erp24/views/city_store/view.php b/erp24/views/city_store/view.php index 10304bcd..8e08fac3 100644 --- a/erp24/views/city_store/view.php +++ b/erp24/views/city_store/view.php @@ -13,7 +13,7 @@ $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?>
- Назад + Назад

title) ?>

-- 2.39.5