change procurement product selection, keytoggle redirect change
This commit is contained in:
@@ -12,17 +12,20 @@ use yii\helpers\ArrayHelper;
|
||||
<?php
|
||||
|
||||
$warehouseOptions = ArrayHelper::map($warehouses, 'id_warehouse', 'name') ;
|
||||
$accountsOptions = ArrayHelper::map($accounts, 'id_account', 'name') ;
|
||||
//$accountsOptions = ArrayHelper::map($accounts, 'id_account', 'name') ;
|
||||
|
||||
?>
|
||||
<div class="procurement-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'productIdentifier')->textInput()->hint(Yii::t('common/procurement', "Product name, product number or barcode"))->label('Vonalkód vagy termékszám') ?>
|
||||
<?= $form->field($model, 'productIdentifier')->textInput(['autocomplete' => 'off'])->label('Írja be a termék nevét') ?>
|
||||
|
||||
<?= $form->field($model, 'id_product')->hiddenInput()->label(false) ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'id_warehouse')->dropDownList($warehouseOptions) ?>
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountsOptions)->label('Kassza') ?>
|
||||
<?php // echo $form->field($model, 'id_account')->dropDownList($accountsOptions)->label('Kassza') ?>
|
||||
|
||||
<?= $form->field($model, 'count')->textInput() ?>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use backend\assets\ProcurementCreateAsset;
|
||||
use yii\helpers\Url;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
@@ -14,12 +15,35 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
ProcurementCreateAsset::register($this);
|
||||
|
||||
$this->registerJs(' new ProcurementCreate( { } );');
|
||||
$options = [];
|
||||
$options['products'] = $products;
|
||||
$options['url_product_find'] = Url::toRoute(['product/find']);
|
||||
|
||||
$this->registerJs(' new ProcurementCreate( '. json_encode($options) .' );');
|
||||
|
||||
?>
|
||||
<div class="procurement-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Terméknév</th>
|
||||
<td class="product-name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mennyiség</th>
|
||||
<td class="product-stock"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termék kategória</th>
|
||||
<td class="product-category"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
|
||||
Reference in New Issue
Block a user