Exemple #1
1
<?php

\Yii::$app->getView()->registerJsFile(Yii::$app->request->baseUrl . '/js/recoverysendaktfilter.js');
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\RecoverysendaktSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Журнал восстановления материальных ценностей';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="recoverysendakt-index">
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverysendaktgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['recoverysendakt_id', ['attribute' => 'recoverysendakt_date', 'format' => 'date'], 'idOrgan.organ_name'], 'buttons' => array_merge(Yii::$app->user->can('RecoveryEdit') ? ['update' => ['Fregat/recoverysendakt/update', 'recoverysendakt_id'], 'deleteajax' => ['Fregat/recoverysendakt/delete', 'recoverysendakt_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-wrench"></i> ' . $this->title, 'before' => Yii::$app->user->can('RecoveryEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['recoverysendaktfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>
</div>
<div class="form-group">
    <div class="panel panel-default">
        <div class="panel-heading">
            
            <?php 
echo Html::button('<i class="glyphicon glyphicon-list"></i> Выгрузка', ['id' => 'DownloadExportReport', 'class' => 'btn btn-success', 'onclick' => 'ExportExcel("RecoverysendaktSearch","' . \yii\helpers\Url::toRoute('Fregat/recoverysendakt/toexcel') . '", $(this)[0].id);']);
?>
        </div>
    </div>
</div>
<?php 
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'RecoverysendaktFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
Exemple #2
0
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
$material_tip = Material::VariablesValues('material_tip');
$material_writeoff = Material::VariablesValues('material_writeoff');
$material_importdo = Material::VariablesValues('material_importdo');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'materialgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => [['attribute' => 'material_tip', 'filter' => $material_tip, 'value' => function ($model) use($material_tip) {
    return isset($material_tip[$model->material_tip]) ? $material_tip[$model->material_tip] : '';
}], 'idMatv.matvid_name', 'material_name', ['attribute' => 'material_name1c', 'visible' => false], ['attribute' => 'material_1c', 'visible' => false], 'material_inv', 'material_number', 'idIzmer.izmer_name', 'material_price', ['attribute' => 'material_serial', 'visible' => false], ['attribute' => 'material_release', 'format' => 'date', 'visible' => false], ['attribute' => 'material_writeoff', 'filter' => $material_writeoff, 'value' => function ($model) use($material_writeoff) {
    return isset($material_writeoff[$model->material_writeoff]) ? $material_writeoff[$model->material_writeoff] : '';
}], ['attribute' => 'material_username', 'visible' => false], ['attribute' => 'material_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'material_importdo', 'filter' => $material_importdo, 'value' => function ($model) use($material_importdo) {
    return isset($material_importdo[$model->material_importdo]) ? $material_importdo[$model->material_importdo] : '';
}, 'visible' => false], ['attribute' => 'mattraffics.mattraffic_username', 'value' => function ($model) {
    return $model->mattraffics[0]->mattraffic_username;
}, 'visible' => false], ['attribute' => 'mattraffics.mattraffic_lastchange', 'value' => function ($model) {
    return Yii::$app->formatter->asDatetime($model->mattraffics[0]->mattraffic_lastchange);
}, 'visible' => false], ['attribute' => 'currentMattraffic.idMol.idperson.auth_user_fullname', 'visible' => false, 'label' => 'ФИО текущего МОЛ', 'value' => function ($model) {
    return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->idperson->auth_user_fullname : '';
}], ['attribute' => 'currentMattraffic.idMol.iddolzh.dolzh_name', 'visible' => false, 'label' => 'Должность текущего МОЛ', 'value' => function ($model) {
    return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->iddolzh->dolzh_name : '';
}], ['attribute' => 'currentMattraffic.idMol.idbuild.build_name', 'visible' => false, 'label' => 'Здание текущего МОЛ', 'value' => function ($model) {
    return $model->material_tip == 1 || $model->material_tip == 3 ? $model->currentMattraffic->idMol->idbuild->build_name : '';
}], ['attribute' => 'idSchetuchet.schetuchet_kod', 'visible' => false], ['attribute' => 'idSchetuchet.schetuchet_name', 'visible' => false]], 'buttons' => array_merge(empty($foreign) ? ['karta' => function ($url, $model) {
    $customurl = Yii::$app->getUrlManager()->createUrl(['Fregat/material/update', 'id' => $model->material_id]);
    return \yii\helpers\Html::a('<i class="glyphicon glyphicon-pencil"></i>', $customurl, ['title' => 'Карта материальной ценности', 'class' => 'btn btn-xs btn-warning', 'data-pjax' => '0']);
}] : ['chooseajax' => ['Fregat/material/assign-to-select2']])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-picture"></i> ' . $this->title, 'before' => Yii::$app->user->can('MaterialEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Составить акт прихода материальнной ценности', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['materialfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . \yii\bootstrap\Html::button('<i class="glyphicon glyphicon-floppy-disk"></i>', ['id' => 'Materialexcel', 'type' => 'button', 'title' => 'Экспорт в Excel', 'class' => 'btn btn-default button_export', 'onclick' => 'ExportExcel("MaterialSearch","' . \yii\helpers\Url::toRoute('Fregat/material/toexcel') . '", $(this)[0].id);']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>


    <?php 
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'MaterialFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
Exemple #3
0
<?php

use yii\helpers\Html;
use app\func\Proc;
use kartik\dynagrid\DynaGrid;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\TrOsnovSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Установленные материальные ценности';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="tr-osnov-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'tr-osnovgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['idInstallakt.installakt_id', ['attribute' => 'idInstallakt.installakt_date', 'format' => 'date'], 'idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.idMaterial.material_serial', 'idMattraffic.idMol.idbuild.build_name', 'tr_osnov_kab', ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], 'idMattraffic.idMol.iddolzh.dolzh_name'], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/tr-osnov/assign-to-select2']])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-pushpin"></i> ' . $this->title]]]));
?>

</div>


Exemple #4
0
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\DocfilesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Загруженные файлы';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="docfiles-index">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'docFile')->widget(FileInput::classname(), ['pluginOptions' => ['uploadUrl' => Url::to(['Fregat/docfiles/create']), 'dropZoneEnabled' => false, 'previewZoomSettings' => ['image' => ['width' => 'auto', 'height' => '100%']]], 'pluginEvents' => ["fileuploaded" => 'function(event, data, previewId, index) { UploadedFiles("docfilesgrid", event, data); }']]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'docfilesgrid'], 'columns' => Proc::DGcols(['columns' => [['attribute' => 'docfiles_ext', 'format' => 'raw', 'value' => 'docfiles_iconshow', 'contentOptions' => ['style' => 'width: 40px; text-align: center;'], 'filter' => false], ['attribute' => 'docfiles_name', 'format' => 'raw', 'value' => 'docfiles_name_html'], ['attribute' => 'docfiles_hash', 'visible' => false]], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/docfiles/assign-to-select2']], Yii::$app->user->can('DocfilesEdit') ? ['deleteajax' => ['Fregat/docfiles/delete']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-file"></i> ' . $this->title]]]));
?>
</div>
Exemple #5
0
    <?php 
echo $form->field($model, 'osmotraktmat_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>

    <?php 
echo $form->field($model, 'id_master')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_master', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете пользователя', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'tr-mat-osmotrgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idMattraffic.idMaterial.idMatv.matvid_name', 'idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', ['attribute' => 'idTrMat.idMattraffic.mattraffic_number', 'label' => 'Всего количество у материально-ответственного лица', 'visible' => false], 'tr_mat_osmotr_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idTrMat.idParent.idMaterial.material_name', 'label' => 'В составе материальной ценности'], ['attribute' => 'idTrMat.idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер материальной ценности в которую укомплектовано'], 'idReason.reason_text', 'tr_mat_osmotr_comment'], 'buttons' => ['update' => ['Fregat/tr-mat-osmotr/update'], 'deleteajax' => ['Fregat/tr-mat-osmotr/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Осмотренные материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материал', ['Fregat/tr-mat-osmotr/create', 'foreignmodel' => 'TrMatOsmotr', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotraktmat', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>

    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                
                <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Osmotraktmatform']);
?>
                <?php 
if (!$model->isNewRecord) {
    echo Html::button('<i class="glyphicon glyphicon-list"></i> Скачать акт', ['id' => 'DownloadReport', 'class' => 'btn btn-info', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/osmotraktmat/osmotraktmat-report']) . '", $(this)[0].id, {id: ' . $model->primaryKey . '} )']);
}
?>
Exemple #6
0
    echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_lastmetabol')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
    ?>

                <?php 
    if ($model->isNewRecord || $dopparams['Glaukuchet']->isNewRecord) {
        ?>
                    <div class="alert alert-warning" role="alert">Для назначения лекарственных препаратов сохраните карту пациента.</div>
                <?php 
    }
    ?>

                <?php 
    if (!$model->isNewRecord && !$dopparams['Glaukuchet']->isNewRecord) {
        $glprep_rlocat = app\models\Glauk\Glprep::VariablesValues('glprep_rlocat');
        echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'glprepgrid'], 'columns' => Proc::DGcols(['columns' => ['idPreparat.preparat_name', ['attribute' => 'glprep_rlocat', 'filter' => $glprep_rlocat, 'value' => function ($model) use($glprep_rlocat) {
            return isset($glprep_rlocat[$model->glprep_rlocat]) ? $glprep_rlocat[$model->glprep_rlocat] : '';
        }]], 'buttons' => array_merge(!$dopparams['DisableElements'] ? ['deleteajax' => ['Glauk/glprep/delete', 'glprep_id']] : [])]), 'gridOptions' => ['dataProvider' => $dopparams['dataProviderglprep'], 'filterModel' => $dopparams['searchModelglprep'], 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-tint"></i> Препараты</h3>', 'before' => !$dopparams['DisableElements'] ? Html::a('<i class="glyphicon glyphicon-download"></i> Добавить препарат', ['Glauk/glprep/create', 'idglaukuchet' => $model->glaukuchets->glaukuchet_id], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
    }
    ?>

                <div class="panel panel-<?php 
    echo Yii::$app->params['panelStyle'];
    ?>
">
                    <div class="panel-heading"><?php 
    echo Html::encode('Снятие с учета');
    ?>
</div>
                    <div class="panel-body">
                        <?php 
    echo $form->field($dopparams['Glaukuchet'], 'glaukuchet_deregdate')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control', 'disabled' => $dopparams['DisableElements']]], 'saveOptions' => ['class' => 'form-control setsession', 'form' => $formname]]);
Exemple #7
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\SpisosnovaktSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Журнал списания основных средств';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="spisosnovakt-index">
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'spisosnovaktgrid'], 'columns' => Proc::DGcols(['columns' => ['spisosnovakt_id', ['attribute' => 'spisosnovakt_date', 'format' => 'date'], ['attribute' => 'idMol.idperson.auth_user_fullname', 'label' => 'ФИО МОЛ'], ['attribute' => 'idMol.iddolzh.dolzh_name', 'label' => 'Должность МОЛ'], ['attribute' => 'idMol.idpodraz.podraz_name', 'label' => 'Подразделение МОЛ'], ['attribute' => 'idEmployee.idperson.auth_user_fullname', 'label' => 'ФИО иного лица'], ['attribute' => 'idEmployee.iddolzh.dolzh_name', 'label' => 'Должность иного лица'], 'idSchetuchet.schetuchet_kod', 'idSchetuchet.schetuchet_name'], 'buttons' => array_merge(Yii::$app->user->can('SpisosnovaktEdit') ? ['downloadreport' => ['Fregat/spisosnovakt/spisosnovakt-report'], 'update' => ['Fregat/spisosnovakt/update'], 'deleteajax' => ['Fregat/spisosnovakt/delete']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-paste"></i> ' . $this->title, 'before' => Yii::$app->user->can('SpisosnovaktEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>
</div>
Exemple #8
0
echo $form->field($model, 'id_employee')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_employee', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете иное лицо', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    echo $form->field(new Mattraffic(), 'mattraffic_id')->widget(Select2::classname(), ['options' => ['placeholder' => 'Введите инвентарный номер материальной ценности', 'class' => 'form-control'], 'theme' => Select2::THEME_BOOTSTRAP, 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['Fregat/mattraffic/selectinputforspisosnovakt']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term} }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }')], 'addon' => ['append' => ['content' => Html::button('<i class="glyphicon glyphicon-arrow-down"></i>  Вставить в таблицу', ['class' => 'btn btn-success', 'id' => 'addspisosnovmaterials', 'onclick' => 'AddMattraffic(' . $_GET['id'] . ')']), 'asButton' => true]]])->label('Для быстрого добавления материальных ценностей ( при условии что количество на списание = 1 )');
}
?>

    <?php 
if (!$model->isNewRecord) {
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'spisosnovmaterialsgrid'], 'columns' => Proc::DGcols(['columns' => ['idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.idMaterial.material_serial', 'idMattraffic.idMaterial.material_release', 'spisosnovmaterials_number', 'idMattraffic.idMaterial.material_price'], 'buttons' => ['update' => ['Fregat/spisosnovmaterials/update'], 'deleteajax' => ['Fregat/spisosnovmaterials/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Списываемые материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материальную ценность', ['Fregat/spisosnovmaterials/create', 'idspisosnovakt' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>

    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Spisosnovaktform']);
?>
                <?php 
if (!$model->isNewRecord) {
    echo Html::button('<i class="glyphicon glyphicon-list"></i> Скачать акт', ['id' => 'DownloadReport', 'class' => 'btn btn-info', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/spisosnovakt/spisosnovakt-report']) . '", $(this)[0].id, {id: ' . $model->primaryKey . '} )']);
}
?>
            </div>
Exemple #9
0
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true, 'class' => 'form-control setsession', 'disabled' => !$model->isNewRecord]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord && $model->type == 1) {
    $type = \app\models\Config\Authitem::VariablesValues('type');
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'authitemchildgrid'], 'columns' => Proc::DGcols(['columns' => ['children.description', ['attribute' => 'children.type', 'filter' => $type, 'value' => function ($model) use($type) {
        return isset($type[$model->children->type]) ? $type[$model->children->type] : '';
    }], 'children.name'], 'buttons' => ['deletecustom' => function ($url, $model) use($params) {
        $customurl = Yii::$app->getUrlManager()->createUrl(['Config/authitemchild/delete', 'parent' => $model->parent, 'child' => $model->child]);
        return Html::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'button', 'title' => 'Удалить', 'class' => 'btn btn-xs btn-danger', 'onclick' => 'ConfirmDeleteDialogToAjax("Вы уверены, что хотите удалить запись?", "' . $customurl . '")']);
    }]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Дочерние авторизационные единицы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить дочернюю авторизационную единицу', ['Config/authitem/forauthitemchild', 'foreignmodel' => 'Authitemchild', 'url' => $this->context->module->requestedRoute, 'field' => 'child', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>

            <div class="panel panel-default">
                <div class="panel-heading">
                    
                    <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Authitemform']);
?>
        </div>
    </div>

</div>
Exemple #10
0
<?php

use app\func\Proc;
use kartik\dynagrid\DynaGrid;
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\SchetuchetSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Счета учета';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="schetuchet-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'schetuchetgrid'], 'columns' => Proc::DGcols(['columns' => ['schetuchet_kod', 'schetuchet_name'], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/schetuchet/assign-to-select2']], Yii::$app->user->can('SchetuchetEdit') ? ['update' => ['Fregat/schetuchet/update'], 'deleteajax' => ['Fregat/schetuchet/delete']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-folder-open"></i> ' . $this->title, 'before' => Yii::$app->user->can('SchetuchetEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>
</div>
Exemple #11
0
    <?php 
echo $form->field($model, 'id_remover')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_remover', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете демонтажника', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>

    <?php 
echo $form->field($model, 'removeakt_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']], 'pluginOptions' => ['todayBtn' => true]]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'trRmMatgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idParent.idMaterial.material_name', 'idTrMat.idParent.idMaterial.material_inv', 'idTrMat.idParent.idMaterial.material_serial', 'idTrMat.idParent.idMol.idbuild.build_name', ['attribute' => 'idTrMat.idParent.trOsnovs.tr_osnov_kab', 'value' => function ($model) {
        return $model->idTrMat->idParent->trOsnovs[0]->tr_osnov_kab;
    }], ['attribute' => 'idTrMat.idMattraffic.idMaterial.material_name', 'label' => 'Наименование комплектующего'], ['attribute' => 'idTrMat.idMattraffic.idMaterial.material_inv', 'label' => 'Инвентарный номер комплектующего'], 'idTrMat.idMattraffic.mattraffic_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО МОЛ комплектующего'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность МОЛ комплектующего']], 'buttons' => ['deleteajax' => ['Fregat/tr-rm-mat/delete']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Снятие материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материальную ценность', ['Fregat/tr-mat/fortrrmmat', 'foreignmodel' => 'TrRmMat', 'url' => $this->context->module->requestedRoute, 'field' => 'id_tr_mat', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>


    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">

                <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Removeaktform']);
?>
                <?php 
if (!$model->isNewRecord) {
    echo Html::button('<i class="glyphicon glyphicon-list"></i> Скачать акт', ['id' => 'DownloadReport', 'class' => 'btn btn-info', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/removeakt/removeakt-report']) . '", $(this)[0].id, {id: ' . $model->removeakt_id . '} )']);
<?php

use app\func\Proc;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverymatgrid'], 'columns' => Proc::DGcols(['columns' => ['idOsmotraktmat.osmotraktmat_id', ['attribute' => 'idOsmotraktmat.osmotraktmat_date', 'format' => 'date'], 'tr_mat_osmotr_number', 'idReason.reason_text', 'tr_mat_osmotr_comment', 'idOsmotraktmat.idMaster.idperson.auth_user_fullname', 'idOsmotraktmat.idMaster.iddolzh.dolzh_name'], 'buttons' => ['osmotraktmatreport' => function ($url, $model) use($params) {
    return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт осмотра материала', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/osmotraktmat/osmotraktmat-report']) . '", null, {id: ' . $model->id_osmotraktmat . '} )']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider_recoverymat, 'filterModel' => $searchModel_recoverymat, 'panel' => ['heading' => '<i class="glyphicon glyphicon-search"></i> Осмотр, как материал']]]));
Exemple #13
0
$patient_pol = Patient::VariablesValues('patient_pol');
$glaukuchet_detect = Glaukuchet::VariablesValues('glaukuchet_detect');
$glaukuchet_deregreason = Glaukuchet::VariablesValues('glaukuchet_deregreason');
$glaukuchet_stage = Glaukuchet::VariablesValues('glaukuchet_stage');
$glaukuchet_invalid = Glaukuchet::VariablesValues('glaukuchet_invalid');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'patientglaukgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['patient_fam', 'patient_im', 'patient_ot', ['attribute' => 'patient_dr', 'format' => 'date'], ['attribute' => 'patient_pol', 'filter' => $patient_pol, 'value' => function ($model) use($patient_pol) {
    return isset($patient_pol[$model->patient_pol]) ? $patient_pol[$model->patient_pol] : '';
}, 'visible' => false], ['attribute' => 'idFias.fias_city', 'visible' => false], ['attribute' => 'idFias.fias_street', 'visible' => false], ['attribute' => 'patient_dom', 'visible' => false], ['attribute' => 'patient_korp', 'visible' => false], ['attribute' => 'patient_kvartira', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_uchetbegin', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_detect', 'filter' => $glaukuchet_detect, 'value' => function ($model) use($glaukuchet_detect) {
    return isset($glaukuchet_detect[$model->glaukuchets->glaukuchet_detect]) ? $glaukuchet_detect[$model->glaukuchets->glaukuchet_detect] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_deregdate', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_deregreason', 'filter' => $glaukuchet_deregreason, 'value' => function ($model) use($glaukuchet_deregreason) {
    return isset($glaukuchet_deregreason[$model->glaukuchets->glaukuchet_deregreason]) ? $glaukuchet_deregreason[$model->glaukuchets->glaukuchet_deregreason] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_stage', 'filter' => $glaukuchet_stage, 'value' => function ($model) use($glaukuchet_stage) {
    return isset($glaukuchet_stage[$model->glaukuchets->glaukuchet_stage]) ? $glaukuchet_stage[$model->glaukuchets->glaukuchet_stage] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_operdate', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_invalid', 'filter' => $glaukuchet_invalid, 'value' => function ($model) use($glaukuchet_invalid) {
    return isset($glaukuchet_invalid[$model->glaukuchets->glaukuchet_invalid]) ? $glaukuchet_invalid[$model->glaukuchets->glaukuchet_invalid] : '';
}, 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_lastvisit', 'format' => 'date'], ['attribute' => 'glaukuchets.glaukuchet_lastmetabol', 'format' => 'date', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idperson.auth_user_fullname', 'label' => 'ФИО врача'], ['attribute' => 'glaukuchets.idEmployee.iddolzh.dolzh_name', 'label' => 'Специальность врача', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idpodraz.podraz_name', 'label' => 'Подразделение врача', 'visible' => false], ['attribute' => 'glaukuchets.idEmployee.idbuild.build_name', 'label' => 'Местонахождение врача'], ['attribute' => 'glaukuchets.idClassMkb.code', 'visible' => false], ['attribute' => 'glaukuchets.idClassMkb.name', 'visible' => false], ['attribute' => 'glaukuchets.glpreps.glaukuchet_preparats', 'filter' => false, 'value' => function ($model) {
    $a = '';
    return isset($model->glaukuchets->glpreps[0]->glaukuchet_preparats) ? $model->glaukuchets->glpreps[0]->glaukuchet_preparats : '';
}, 'headerOptions' => ['attr_fullname' => 'glaukuchets.glpreps.glaukuchet_preparats'], 'visible' => false], ['attribute' => 'patient_username', 'visible' => false], ['attribute' => 'patient_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_username', 'visible' => false], ['attribute' => 'glaukuchets.glaukuchet_lastchange', 'format' => 'datetime', 'visible' => false]], 'buttons' => array_merge(Yii::$app->user->can('GlaukUserPermission') ? ['update' => function ($url, $model, $key) {
    $customurl = Url::to(['Base/patient/update', 'id' => $model->primarykey, 'patienttype' => 'glauk']);
    if (!(isset($model->glaukuchets) || Yii::$app->user->can('GlaukOperatorPermission'))) {
        return '';
    } else {
        return \yii\helpers\Html::a(isset($model->glaukuchets) ? '<i class="glyphicon glyphicon-pencil"></i>' : '<i class="glyphicon glyphicon-plus"></i>', $customurl, ['title' => isset($model->glaukuchets) ? 'Обновить' : 'Создать карту глаукомного пациента', 'class' => isset($model->glaukuchets) ? 'btn btn-xs btn-warning' : 'btn btn-xs btn-info', 'data-pjax' => '0']);
    }
}] : [], Yii::$app->user->can('PatientRemoveRole') ? ['deleteajax' => ['Base/patient/delete', 'patient_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-search"></i> ' . $this->title, 'before' => Yii::$app->user->can('GlaukOperatorPermission') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить нового пациента', ['create', 'patienttype' => 'glauk'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::a('<i class="glyphicon glyphicon-filter"></i>', ['glaukfilter'], ['title' => 'Дополнительный фильтр', 'class' => 'btn btn-default filter_button']) . \yii\bootstrap\Html::button('<i class="glyphicon glyphicon-floppy-disk"></i>', ['id' => 'Patientglaukexcel', 'type' => 'button', 'title' => 'Экспорт в Excel', 'class' => 'btn btn-default button_export', 'onclick' => 'ExportExcel("PatientSearch","' . \yii\helpers\Url::toRoute('Base/patient/toexcel') . '", $(this)[0].id, {"PatientSearch[glaukuchets.glpreps.glaukuchet_preparats]": ""});']) . '{export}{dynagrid}']], 'afterHeader' => $filter]]));
?>

    <?php 
yii\bootstrap\Modal::begin(['header' => 'Дополнительный фильтр', 'id' => 'PatientFilter', 'options' => ['class' => 'modal_filter', 'tabindex' => false]]);
yii\bootstrap\Modal::end();
Exemple #14
0
<?php

use yii\helpers\Html;
use app\func\Proc;
use kartik\dynagrid\DynaGrid;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\ImportmaterialSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Импорт материальных ценностей';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="importmaterial-index">
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'importmaterialgrid'], 'columns' => Proc::DGcols(['columns' => ['importmaterial_combination', 'idmatvid.matvid_name'], 'buttons' => ['update' => ['Fregat/importmaterial/update', 'importmaterial_id'], 'deleteajax' => ['Fregat/importmaterial/delete', 'importmaterial_id']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-gift"></i> ' . $this->title, 'before' => Yii::$app->user->can('FregatImport') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>

</div>
Exemple #15
0
echo $form->field($model, 'id_installer')->widget(Select2::classname(), Proc::DGselect2(['model' => $model, 'resultmodel' => new Employee(), 'fields' => ['keyfield' => 'id_installer', 'resultfield' => 'idperson.auth_user_fullname'], 'placeholder' => 'Выберете установщика', 'fromgridroute' => 'Fregat/employee/index', 'resultrequest' => 'Fregat/employee/selectinputemloyee', 'thisroute' => $this->context->module->requestedRoute, 'methodquery' => 'selectinput']));
?>

    <?php 
echo $form->field($model, 'installakt_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'trOsnovgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', ['attribute' => 'idMattraffic.idMol.idbuild.build_name', 'label' => 'Здание'], 'tr_osnov_kab', ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица']], 'buttons' => ['deleteajax' => ['Fregat/tr-osnov/delete', 'tr_osnov_id', 'trOsnovgrid']]]), 'gridOptions' => ['dataProvider' => $dataProviderOsn, 'filterModel' => $searchModelOsn, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Перемещенные материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материальную ценность', ['Fregat/tr-osnov/create', 'idinstallakt' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'trMatgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => [['attribute' => 'idParent.idMaterial.material_name', 'label' => 'В составе материальной ценности'], ['attribute' => 'idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер материальной ценности, в составе которой материал'], 'idParent.idMol.idbuild.build_name', ['attribute' => 'idParent.trOsnovs.tr_osnov_kab', 'value' => function ($model) {
        return $model->idParent->trOsnovs[0]->tr_osnov_kab;
    }], 'idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица']], 'buttons' => ['deleteajax' => ['Fregat/tr-mat/delete', 'tr_mat_id', 'trMatgrid']]]), 'gridOptions' => ['dataProvider' => $dataProviderMat, 'filterModel' => $searchModelMat, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Укомплектованные материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материальную ценность', ['Fregat/tr-mat/create', 'idinstallakt' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>


    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                
                <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Installaktform']);
?>
                <?php 
if (!$model->isNewRecord) {
    echo Html::button('<i class="glyphicon glyphicon-list"></i> Скачать акт', ['id' => 'DownloadReport', 'class' => 'btn btn-info', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/installakt/installakt-report']) . '", $(this)[0].id, {id: ' . $model->installakt_id . '} )']);
Exemple #16
0
<?php

use yii\helpers\Html;
use app\func\Proc;
use kartik\dynagrid\DynaGrid;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\ImportemployeeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
//var_dump($this);
$this->title = 'Импорт сотрудников';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="importemployee-index">
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'importemployeegrid'], 'columns' => Proc::DGcols(['columns' => ['importemployee_combination', 'idpodraz.podraz_name', 'idbuild.build_name'], 'buttons' => ['update' => ['Fregat/importemployee/update', 'importemployee_id'], 'deleteajax' => ['Fregat/importemployee/delete', 'importemployee_id']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-user"></i> ' . $this->title, 'before' => Yii::$app->user->can('FregatImport') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : ''], 'toolbar' => ['base' => ['content' => \yii\bootstrap\Html::button('<i class="glyphicon glyphicon-floppy-disk"></i>', ['id' => 'Importemployeeexcel', 'type' => 'button', 'title' => 'Экспорт в Excel', 'class' => 'btn btn-default button_export', 'onclick' => 'ExportExcel("' . $searchModel->formName() . '","' . \yii\helpers\Url::toRoute('Fregat/importemployee/toexcel') . '", $(this)[0].id );']) . '{export}{dynagrid}']]]]));
?>

</div>
Exemple #17
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\OsmotraktmatSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Журнал осмотров материалов';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="osmotraktmat-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'osmotraktmatgrid'], 'columns' => Proc::DGcols(['columns' => ['osmotraktmat_id', ['attribute' => 'osmotraktmat_date', 'format' => 'date'], ['attribute' => 'idMaster.idperson.auth_user_fullname', 'label' => 'ФИО составителя акта'], ['attribute' => 'idMaster.iddolzh.dolzh_name', 'visible' => false, 'label' => 'Должность составителя акта'], ['attribute' => 'osmotraktmat_countmat']], 'buttons' => array_merge(empty($foreign) ? ['downloadreport' => ['Fregat/osmotraktmat/osmotraktmat-report']] : ['chooseajax' => ['Fregat/osmotrakt/assign-to-grid']], Yii::$app->user->can('OsmotraktEdit') ? ['update' => ['Fregat/osmotraktmat/update'], 'deleteajax' => ['Fregat/osmotraktmat/delete']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-search"></i> ' . $this->title, 'before' => Yii::$app->user->can('OsmotraktEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>
</div>
Exemple #18
0
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    echo $form->field(new app\models\Fregat\Osmotrakt(), 'osmotrakt_id')->widget(Select2::classname(), ['options' => ['placeholder' => 'Введите инвентарный номер материальной ценности', 'class' => 'form-control'], 'theme' => Select2::THEME_BOOTSTRAP, 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => \yii\helpers\Url::to(['Fregat/osmotrakt/selectinputforrecoverysendakt']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term} }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }')], 'addon' => ['append' => ['content' => Html::button('<i class="glyphicon glyphicon-arrow-down"></i>  Вставить в таблицу', ['class' => 'btn btn-success', 'id' => 'addrecoveryrecieveakt', 'onclick' => 'AddOsmotrakt(' . $_GET['id'] . ')']), 'asButton' => true]]])->label('Для быстрого добавления материальных ценностей');
    $recoveryrecieveakt_repaired = Recoveryrecieveakt::VariablesValues('recoveryrecieveakt_repaired');
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoveryrecieveaktgrid'], 'columns' => Proc::DGcols(['columns' => ['idOsmotrakt.osmotrakt_id', 'idOsmotrakt.idTrosnov.idMattraffic.idMaterial.material_inv', 'idOsmotrakt.idTrosnov.idMattraffic.idMaterial.material_name', 'idOsmotrakt.idTrosnov.idMattraffic.idMol.idbuild.build_name', 'idOsmotrakt.idTrosnov.tr_osnov_kab', 'idOsmotrakt.idReason.reason_text', 'idOsmotrakt.osmotrakt_comment', ['attribute' => 'idOsmotrakt.idMaster.idperson.auth_user_fullname', 'label' => 'ФИО составителя акта осмотра'], ['attribute' => 'idOsmotrakt.osmotrakt_date', 'format' => 'date', 'visible' => false], ['attribute' => 'idOsmotrakt.idMaster.iddolzh.dolzh_name', 'label' => 'Должность составителя акта осмотра', 'visible' => false], 'recoveryrecieveakt_result', ['attribute' => 'recoveryrecieveakt_repaired', 'filter' => $recoveryrecieveakt_repaired, 'value' => function ($model) use($recoveryrecieveakt_repaired) {
        return isset($recoveryrecieveakt_repaired[$model->recoveryrecieveakt_repaired]) ? $recoveryrecieveakt_repaired[$model->recoveryrecieveakt_repaired] : '';
    }], ['attribute' => 'recoveryrecieveakt_date', 'format' => 'date']], 'buttons' => ['update' => ['Fregat/recoveryrecieveakt/update'], 'deleteajax' => ['Fregat/recoveryrecieveakt/delete', 'recoveryrecieveakt_id', 'recoveryrecieveaktgrid']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Восстанавливаемые материальные ценности</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить акт осмотра', ['Fregat/osmotrakt/forrecoveryrecieveakt', 'foreignmodel' => 'Recoveryrecieveakt', 'url' => $this->context->module->requestedRoute, 'field' => 'id_osmotrakt', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
    $recoveryrecieveaktmat_repaired = Recoveryrecieveaktmat::VariablesValues('recoveryrecieveaktmat_repaired');
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoveryrecieveaktmatgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMatOsmotr.idOsmotraktmat.osmotraktmat_id', ['attribute' => 'idTrMatOsmotr.idOsmotraktmat.osmotraktmat_date', 'format' => 'date'], 'idTrMatOsmotr.idTrMat.idMattraffic.idMaterial.material_inv', 'idTrMatOsmotr.idTrMat.idMattraffic.idMaterial.material_name', 'idTrMatOsmotr.tr_mat_osmotr_number', ['attribute' => 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], 'idTrMatOsmotr.idTrMat.idMattraffic.idMol.idbuild.build_name', 'idTrMatOsmotr.idReason.reason_text', 'idTrMatOsmotr.tr_mat_osmotr_comment', 'recoveryrecieveaktmat_result', ['attribute' => 'recoveryrecieveaktmat_repaired', 'filter' => $recoveryrecieveaktmat_repaired, 'value' => function ($model) use($recoveryrecieveaktmat_repaired) {
        return isset($recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired]) ? $recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired] : '';
    }], ['attribute' => 'recoveryrecieveaktmat_date', 'format' => 'date']], 'buttons' => ['update' => ['Fregat/recoveryrecieveaktmat/update'], 'deleteajax' => ['Fregat/recoveryrecieveaktmat/delete', 'recoveryrecieveaktmat_id', 'recoveryrecieveaktmatgrid']]]), 'gridOptions' => ['dataProvider' => $dataProvidermat, 'filterModel' => $searchModelmat, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-compressed"></i> Восстанавливаемые материалы</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить материала для восстановления', ['Fregat/tr-mat-osmotr/forrecoveryrecieveaktmat', 'foreignmodel' => 'Recoveryrecieveaktmat', 'url' => $this->context->module->requestedRoute, 'field' => 'id_tr_mat_osmotr', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>

    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                
                <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Recoverysendaktform']);
?>
                <?php 
if (!$model->isNewRecord) {
    echo ButtonDropdown::widget(['label' => '<i class="glyphicon glyphicon-list"></i> Скачать акт', 'encodeLabel' => false, 'id' => 'DownloadReport', 'dropdown' => ['encodeLabels' => false, 'items' => [['label' => '<i class="glyphicon glyphicon-export"></i> Акт передачи материальных ценностей сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoverysendakt/recoverysendakt-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-import"></i> Акт получения материальных ценностей от сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveakt/recoveryrecieveakt-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-up"></i> Акт передачи материалов сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoverysendakt/recoverysendaktmat-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-down"></i> Акт получения материалов от сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveaktmat/recoveryrecieveaktmat-report']) . '", "DownloadReport", {id: ' . $model->recoverysendakt_id . '} ); return false;']]]], 'options' => ['class' => 'btn btn-info'], 'containerOptions' => ['style' => 'padding-right: 4px;']]);
    echo ButtonDropdown::widget(['label' => '<i class="glyphicon glyphicon-send"></i> Отправить акт по электронной почте', 'encodeLabel' => false, 'id' => 'SendReport', 'dropdown' => ['encodeLabels' => false, 'items' => [['label' => '<i class="glyphicon glyphicon-export"></i> Акт передачи материальных ценностей сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'SendReport("' . Url::to(['Fregat/recoverysendakt/recoverysendakt-reportsend']) . '", "SendReport", {id: ' . $model->recoverysendakt_id . ',emailfrom:"' . $emailfrom . '",emailto:"' . $model->idOrgan->organ_email . '",emailtheme:"' . addslashes($emailtheme) . '"} ); return false;']], ['label' => '<i class="glyphicon glyphicon-chevron-up"></i> Акт передачи материалов сторонней организации', 'url' => '#', 'linkOptions' => ['onclick' => 'SendReport("' . Url::to(['Fregat/recoverysendakt/recoverysendaktmat-reportsend']) . '", "SendReport", {id: ' . $model->recoverysendakt_id . ',emailfrom:"' . $emailfrom . '",emailto:"' . $model->idOrgan->organ_email . '",emailtheme:"' . addslashes($emailtheme) . '"} ); return false;']]]], 'options' => ['class' => 'btn btn-success'], 'containerOptions' => ['style' => 'padding-right: 4px;']]);
Exemple #19
0
$material_writeoff = Material::VariablesValues('material_writeoff');
$material_importdo = Material::VariablesValues('material_importdo');
$employee_importdo = Employee::VariablesValues('employee_importdo');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'mattrafficgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'buttons' => empty($foreign) ? [] : ['chooseajax' => ['Fregat/mattraffic/assign-to-select2']], 'buttonsfirst' => true, 'columns' => [['attribute' => 'mattraffic_date', 'format' => 'date'], ['attribute' => 'mattraffic_tip', 'filter' => $mattraffic_tip, 'value' => function ($model) use($mattraffic_tip) {
    return isset($mattraffic_tip[$model->mattraffic_tip]) ? $mattraffic_tip[$model->mattraffic_tip] : '';
}], 'mattraffic_number', ['attribute' => 'idMaterial.material_tip', 'filter' => $material_tip, 'value' => function ($model) use($material_tip) {
    return isset($material_tip[$model->idMaterial->material_tip]) ? $material_tip[$model->idMaterial->material_tip] : '';
}], ['attribute' => 'idMaterial.idMatv.matvid_name', 'visible' => false], 'idMaterial.material_name', 'idMaterial.material_inv', ['attribute' => 'idMaterial.material_serial', 'visible' => false], ['attribute' => 'idMaterial.material_release', 'format' => 'date', 'visible' => false], 'idMaterial.material_number', 'idMaterial.idIzmer.izmer_name', 'idMaterial.material_price', ['attribute' => 'idMol.employee_id', 'visible' => false], 'idMol.idperson.auth_user_fullname', 'idMol.iddolzh.dolzh_name', 'idMol.idpodraz.podraz_name', 'idMol.idbuild.build_name', ['attribute' => 'idMol.employee_dateinactive', 'format' => 'date', 'visible' => false], ['attribute' => 'idMaterial.material_writeoff', 'filter' => $material_writeoff, 'value' => function ($model) use($material_writeoff) {
    return isset($material_writeoff[$model->idMaterial->material_writeoff]) ? $material_writeoff[$model->idMaterial->material_writeoff] : '';
}, 'visible' => false], ['attribute' => 'idMaterial.material_username', 'visible' => false], ['attribute' => 'idMaterial.material_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'idMaterial.material_importdo', 'filter' => $material_importdo, 'value' => function ($model) use($material_importdo) {
    return isset($material_importdo[$model->idMaterial->material_importdo]) ? $material_importdo[$model->idMaterial->material_importdo] : '';
}, 'visible' => false], ['attribute' => 'idMol.employee_username', 'visible' => false], ['attribute' => 'idMol.employee_lastchange', 'format' => 'datetime', 'visible' => false], ['attribute' => 'idMol.employee_importdo', 'filter' => $employee_importdo, 'value' => function ($model) use($employee_importdo) {
    return isset($employee_importdo[$model->idMol->employee_importdo]) ? $employee_importdo[$model->idMol->employee_importdo] : '';
}, 'visible' => false], ['attribute' => 'mattraffic_username', 'visible' => false], ['attribute' => 'mattraffic_lastchange', 'format' => 'datetime', 'visible' => false]]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'rowOptions' => function ($model, $index, $widget, $grid) {
    $class = [];
    /*   if ($model->idMaterial->material_tip == 1) {
                                $class = ['class' => 'warning'];
                            } else
                                $class = ['class' => 'danger'];
    
                            if ($model->idMaterial->material_writeoff == 1) {
                                $class = ['class' => 'spisanie'];
                            }
    
                            if ($model->mattraffic_tip == 3) {
                                $class = ['class' => 'success'];
                            }*/
    return $class;
}, 'panel' => ['heading' => '<i class="glyphicon glyphicon-th-large"></i> ' . $this->title]]]));
?>

        </div>
Exemple #20
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\TrMatOsmotrSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Материалы требующие восстановления';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="tr-mat-osmotr-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'trmatosmotrgrid'], 'columns' => Proc::DGcols(['columns' => ['idTrMat.idMattraffic.idMaterial.material_name', 'idTrMat.idMattraffic.idMaterial.material_inv', 'tr_mat_osmotr_number', ['attribute' => 'idTrMat.idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idTrMat.idMattraffic.idMol.idbuild.build_name', 'label' => 'Здание материально-ответственного лица'], ['attribute' => 'idTrMat.idParent.idMaterial.material_name', 'label' => 'Укомплектовано в матер-ую цен-ть'], ['attribute' => 'idTrMat.idParent.idMaterial.material_inv', 'label' => 'Инвентаный номер мат-ой цен-ти в которую укомплектован материал'], 'idOsmotraktmat.osmotraktmat_id', ['attribute' => 'idOsmotraktmat.osmotraktmat_date', 'format' => 'date'], ['attribute' => 'idOsmotraktmat.idMaster.idperson.auth_user_fullname', 'label' => 'ФИО мастера'], ['attribute' => 'idOsmotraktmat.idMaster.iddolzh.dolzh_name', 'label' => 'Должность мастера'], 'idReason.reason_text', 'tr_mat_osmotr_comment'], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/tr-mat-osmotr/assign-to-grid']])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-align-paste"></i> ' . $this->title]]]));
?>

</div>

Exemple #21
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
use yii\bootstrap\ButtonDropdown;
use yii\bootstrap\ButtonGroup;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\InstallaktSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Журнал перемещений материальных ценностей';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="installakt-index">
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'installaktgrid'], 'columns' => Proc::DGcols(['columns' => ['installakt_id', ['attribute' => 'installakt_date', 'format' => 'date'], ['attribute' => 'idInstaller.idperson.auth_user_fullname', 'label' => 'ФИО мастера'], ['attribute' => 'idInstaller.iddolzh.dolzh_name', 'label' => 'Должность мастера']], 'buttons' => array_merge(Yii::$app->user->can('InstallEdit') ? ['update' => ['Fregat/installakt/update', 'installakt_id'], 'deleteajax' => ['Fregat/installakt/delete', 'installakt_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-random"></i> ' . $this->title, 'before' => Yii::$app->user->can('InstallEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>
</div>
Exemple #22
0
?>

    <?php 
echo $form->field($model, 'recoveryrecieveakt_repaired')->widget(Select2::classname(), ['hideSearch' => true, 'data' => $model::VariablesValues('recoveryrecieveakt_repaired'), 'pluginOptions' => ['allowClear' => true], 'options' => ['placeholder' => 'Выберете статус восстановления', 'class' => 'form-control setsession'], 'theme' => Select2::THEME_BOOTSTRAP]);
?>

    <?php 
echo $form->field($model, 'recoveryrecieveakt_date')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'options' => ['options' => ['placeholder' => 'Выберите дату ...', 'class' => 'form-control setsession']]]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'rraDocfilesgrid'], 'columns' => Proc::DGcols(['columns' => [['attribute' => 'idDocfiles.docfiles_ext', 'format' => 'raw', 'value' => 'idDocfiles.docfiles_iconshow', 'contentOptions' => ['style' => 'width: 40px; text-align: center;'], 'filter' => false], ['attribute' => 'idDocfiles.docfiles_name', 'format' => 'raw', 'value' => 'idDocfiles.docfiles_name_html'], ['attribute' => 'idDocfiles.docfiles_hash', 'visible' => false]], 'buttons' => array_merge(Yii::$app->user->can('DocfilesEdit') ? ['deleteajax' => ['Fregat/rra-docfiles/delete', 'rra_docfiles_id', 'rraDocfilesgrid']] : [])]), 'gridOptions' => ['dataProvider' => $dataProviderrra, 'filterModel' => $searchModelrra, 'panel' => ['heading' => '<i class="glyphicon glyphicon-file"></i> Прикрепленные файлы']]]));
?>

    <?php 
$form2 = ActiveForm::begin(['id' => 'UploadDocform']);
?>

    <?php 
echo $form2->field($UploadFile, 'docFile')->widget(FileInput::classname(), ['pluginOptions' => ['uploadUrl' => Url::to(['Fregat/rra-docfiles/create']), 'uploadExtraData' => ['id_recoveryrecieveakt' => $_GET['id']], 'dropZoneEnabled' => false, 'previewZoomSettings' => ['image' => ['width' => 'auto', 'height' => '100%']]], 'pluginEvents' => ["fileuploaded" => 'function(event, data, previewId, index) { UploadedFiles("rraDocfilesgrid", event, data); }']]);
?>

    <?php 
ActiveForm::end();
?>

    <div class="form-group">
<?php

use app\func\Proc;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'mattraffic_contain_grid'], 'columns' => Proc::DGcols(['columns' => ['id_installakt', ['attribute' => 'idInstallakt.installakt_date', 'format' => 'date'], 'idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'Материально-ответственное лицо'], ['attribute' => 'idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица'], ['attribute' => 'idMattraffic.idMol.idbuild.build_name', 'label' => 'Здание материально-ответственного лица'], ['attribute' => 'idMattraffic.mattraffic_username', 'visible' => false], ['attribute' => 'idMattraffic.mattraffic_lastchange', 'format' => 'datetime', 'visible' => false]], 'buttons' => array_merge(['installaktmatreport' => function ($url, $model) {
    return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт перемещения матер-ой цен-ти', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/installakt/installakt-report']) . '", null, {id: ' . $model->id_installakt . '} )']);
}])]), 'gridOptions' => ['dataProvider' => $dataProvider_mattraffic_contain, 'filterModel' => $searchModel_mattraffic_contain, 'panel' => ['heading' => '<i class="glyphicon glyphicon-th-list"></i> Состав материальной ценности']]]));
Exemple #24
0
echo Html::encode('Настройки');
?>
</div>
        <div class="panel-body">
            <?php 
echo $form->field($Importconfig, 'importconfig_do')->checkbox()->label(null, ['class' => 'control-label']);
?>
        </div>
    </div>
    <?php 
ActiveForm::end();
?>
    <?php 
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'logreportgrid'], 'columns' => Proc::DGcols(['columns' => ['logreport_id', ['attribute' => 'logreport_executetime', 'format' => 'time'], ['attribute' => 'logreport_memoryused', 'value' => function ($model, $key, $index, $column) {
    Yii::$app->formatter->sizeFormatBase = 1000;
    return Yii::$app->formatter->asShortSize($model->logreport_memoryused);
}], ['attribute' => 'logreport_date', 'format' => 'date'], 'logreport_errors', 'logreport_updates', 'logreport_additions', 'logreport_amount', 'logreport_missed'], 'buttons' => ['download' => function ($url, $model) {
    return Html::a('<i class="glyphicon glyphicon-download-alt"></i>', 'importreports/Отчет импорта в систему Фрегат N' . $model['logreport_id'] . '.xlsx', ['title' => 'Скачать отчет', 'class' => 'btn btn-xs btn-info', 'data-pjax' => '0']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-inbox"></i> ' . $this->title, 'before' => Html::button('<i class="glyphicon glyphicon-trash"></i> Очистить отчеты', ['type' => 'button', 'title' => 'Удалить', 'class' => 'btn btn-danger', 'onclick' => 'ConfirmDeleteDialogToAjax("Вы уверены, что хотите очистить все отчеты?", "' . Yii::$app->getUrlManager()->createUrl(['Fregat/logreport/clear']) . '")'])]]]));
?>

    <div class="form-group">
        <div class="panel panel-default">
            <div class="panel-heading">
                <?php 
echo Html::submitButton('<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => 'btn btn-primary', 'form' => 'configinpmort']);
?>
            </div>
        </div>
    </div>
</div>
        
<?php

use app\func\Proc;
use app\models\Fregat\Recoveryrecieveaktmat;
use kartik\dynagrid\DynaGrid;
use yii\bootstrap\Html;
use yii\helpers\Url;
$recoveryrecieveaktmat_repaired = Recoveryrecieveaktmat::VariablesValues('recoveryrecieveaktmat_repaired');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'recoverysendmat_grid'], 'columns' => Proc::DGcols(['columns' => ['id_recoverysendakt', ['attribute' => 'idRecoverysendakt.recoverysendakt_date', 'format' => 'date'], ['attribute' => 'recoveryrecieveaktmat_date', 'format' => 'date'], 'recoveryrecieveaktmat_result', ['attribute' => 'recoveryrecieveaktmat_repaired', 'filter' => $recoveryrecieveaktmat_repaired, 'value' => function ($model) use($recoveryrecieveaktmat_repaired) {
    return isset($recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired]) ? $recoveryrecieveaktmat_repaired[$model->recoveryrecieveaktmat_repaired] : '';
}], 'idTrMatOsmotr.id_osmotraktmat'], 'buttons' => ['recoveryrecieveaktmatreport' => function ($url, $model) use($params) {
    return Html::button('<i class="glyphicon glyphicon-list"></i>', ['type' => 'button', 'title' => 'Скачать акт получения материалов от сторонней организации', 'class' => 'btn btn-xs btn-default', 'onclick' => 'DownloadReport("' . Url::to(['Fregat/recoveryrecieveaktmat/recoveryrecieveaktmat-report']) . '", null, {id: ' . $model->id_recoverysendakt . '} )']);
}]]), 'gridOptions' => ['dataProvider' => $dataProvider_recoverysendmat, 'filterModel' => $searchModel_recoverysendmat, 'panel' => ['heading' => '<i class="glyphicon glyphicon-wrench"></i> Восстановление, как материал']]]));
Exemple #26
0
?>

    <?php 
echo $form->field($model, 'grupa_name')->textInput(['maxlength' => true, 'class' => 'form-control setsession inputuppercase', 'autofocus' => true]);
?>

    <?php 
ActiveForm::end();
?>

    <?php 
if (!$model->isNewRecord) {
    $grupavid_main = app\models\Fregat\Grupavid::VariablesValues('grupavid_main');
    echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'grupavidgrid'], 'columns' => Proc::DGcols(['columns' => ['idmatvid.matvid_name', ['attribute' => 'grupavid_main', 'filter' => $grupavid_main, 'value' => function ($model) use($grupavid_main) {
        return isset($grupavid_main[$model->grupavid_main]) ? $grupavid_main[$model->grupavid_main] : '';
    }]], 'buttons' => ['createmain' => function ($url, $model) {
        $customurl = Yii::$app->getUrlManager()->createUrl(['Fregat/grupavid/createmain', 'grupavid_id' => $model->grupavid_id, 'id_grupa' => $model->id_grupa]);
        return Html::button('<i class="glyphicon glyphicon-magnet"></i>', ['type' => 'button', 'title' => 'Сделать главной', 'class' => 'btn btn-xs btn-info', 'onclick' => 'ConfirmDeleteDialogToAjax("Сделать вид материальной ценности основным?", "' . $customurl . '")']);
    }, 'deleteajax' => ['Fregat/grupavid/delete', 'grupavid_id']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<h3 class="panel-title"><i class="glyphicon glyphicon-paperclip"></i> Привязать к группе</h3>', 'before' => Html::a('<i class="glyphicon glyphicon-download"></i> Добавить вид материальной ценности', ['Fregat/matvid/forgrupavid', 'foreignmodel' => 'Grupavid', 'url' => $this->context->module->requestedRoute, 'field' => 'id_matvid', 'id' => $model->primaryKey], ['class' => 'btn btn-success', 'data-pjax' => '0'])]]]));
}
?>



            <div class="form-group">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        
                        <?php 
echo Html::submitButton($model->isNewRecord ? '<i class="glyphicon glyphicon-plus"></i> Создать' : '<i class="glyphicon glyphicon-edit"></i> Обновить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary', 'form' => 'Grupavidform']);
?>
            </div>
Exemple #27
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\ReasonSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Шаблоны актов осмотра материальной ценности';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="reason-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'reasongrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['reason_text'], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/reason/assign-to-select2']], Yii::$app->user->can('ReasonEdit') ? ['update' => ['Fregat/reason/update', 'reason_id'], 'deleteajax' => ['Fregat/reason/delete', 'reason_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-briefcase"></i> ' . $this->title, 'before' => Yii::$app->user->can('ReasonEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>

</div>
Exemple #28
0
<?php

use app\models\Config\Profile;
use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\BuildSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = $emp ? 'Сотрудники' : 'Пользователи';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="authuser-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
$profile_pol = Profile::VariablesValues('profile_pol');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'authusergrid'], 'columns' => Proc::DGcols(['columns' => array_merge(['auth_user_id', 'auth_user_fullname'], $emp ? [] : ['auth_user_login'], Yii::$app->user->can('Administrator') ? [['attribute' => 'profile.profile_pol', 'filter' => $profile_pol, 'value' => function ($model) use($profile_pol) {
    return isset($profile_pol[$model->profile->profile_pol]) ? $profile_pol[$model->profile->profile_pol] : '';
}, 'visible' => false], ['attribute' => 'profile.profile_dr', 'format' => 'date', 'visible' => false], ['attribute' => 'profile.profile_address', 'visible' => false], ['attribute' => 'profile.profile_inn', 'visible' => false], ['attribute' => 'profile.profile_snils', 'visible' => false]] : []), 'buttons' => array_merge(Yii::$app->user->can('UserEdit') && !$emp ? ['changepassword' => function ($url, $model, $key) {
    $customurl = Url::to(['Config/authuser/changepassword', 'id' => $model['auth_user_id']]);
    return \yii\helpers\Html::a('<i class="glyphicon glyphicon-lock"></i>', $customurl, ['title' => 'Изменить пароль', 'class' => 'btn btn-xs btn-info', 'data-pjax' => '0']);
}] : [], Yii::$app->user->can('UserEdit') || Yii::$app->user->can('EmployeeEdit') || Yii::$app->user->can('EmployeeSpecEdit') ? ['update' => function ($url, $model) use($emp) {
    $customurl = Yii::$app->getUrlManager()->createUrl(['Config/authuser/update', 'id' => $model['auth_user_id'], 'emp' => $emp]);
    return \yii\helpers\Html::a('<i class="glyphicon glyphicon-pencil"></i>', $customurl, ['title' => 'Обновить', 'class' => 'btn btn-xs btn-warning', 'data-pjax' => '0']);
}] : [], Yii::$app->user->can('UserEdit') ? ['deleteajax' => ['Config/authuser/delete', 'auth_user_id']] : [])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-user"></i> ' . $this->title, 'before' => Yii::$app->user->can('UserEdit') ? Html::a('<i class="glyphicon glyphicon-plus"></i> Добавить', ['create'], ['class' => 'btn btn-success', 'data-pjax' => '0']) : '']]]));
?>

</div>
Exemple #29
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Fregat\TrMatSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Установленные комплектующие';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="tr-mat-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'trmatgrid'], 'columns' => Proc::DGcols(['columns' => ['idMattraffic.idMaterial.material_name', 'idMattraffic.idMaterial.material_inv', 'idMattraffic.mattraffic_number', ['attribute' => 'idParent.idMaterial.material_name', 'label' => 'Укомплекторано в мат-ую цен-ть'], ['attribute' => 'idParent.idMaterial.material_inv', 'label' => 'Инвентарный номер мат-ой цен-ти, в которую укомплектован материал'], ['attribute' => 'idParent.idMol.idbuild.build_name', 'label' => 'Здание, где установлено'], ['attribute' => 'idParent.trOsnovs.tr_osnov_kab', 'label' => 'Кабинет, где установлено', 'value' => function ($model) {
    return $model->idParent->trOsnovs[0]->tr_osnov_kab;
}], ['attribute' => 'idMattraffic.idMol.idperson.auth_user_fullname', 'label' => 'ФИО материально-ответственного лица'], ['attribute' => 'idMattraffic.idMol.iddolzh.dolzh_name', 'label' => 'Должность материально-ответственного лица']], 'buttons' => array_merge(empty($foreign) ? [] : ['chooseajax' => ['Fregat/tr-mat/assign-to-grid']])]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-align-paste"></i> ' . $this->title]]]));
?>

</div>
Exemple #30
0
<?php

use yii\helpers\Html;
use kartik\dynagrid\DynaGrid;
use app\func\Proc;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\Base\ClassmkbSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'МКБ-10';
$this->params['breadcrumbs'] = Proc::Breadcrumbs($this);
?>
<div class="classmkb-index">
    <?php 
$result = Proc::GetLastBreadcrumbsFromSession();
$foreign = isset($result['dopparams']['foreign']) ? $result['dopparams']['foreign'] : '';
$patienttype = filter_input(INPUT_GET, 'patienttype');
echo DynaGrid::widget(Proc::DGopts(['options' => ['id' => 'classmkbgrid'], 'columns' => Proc::DGcols(['buttonsfirst' => true, 'columns' => ['code', 'name'], 'buttons' => empty($foreign) ? [] : ['chooseajax' => ['Base/classmkb/assign-to-select2']]]), 'gridOptions' => ['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'panel' => ['heading' => '<i class="glyphicon glyphicon-heart-empty"></i> ' . $this->title]]]));
?>

</div>