Exemplo n.º 1
0
/* @var $form yii\widgets\ActiveForm */
?>

<div class="cmbis-kpi-result-search">

    <br>

    <?php 
$form = ActiveForm::begin(['action' => ['area'], 'method' => 'get', 'options' => ['data-pjax' => true]]);
//echo $model->pgroup->pop_group;
?>
    <div class="box box-body box-success">
        <div class="row">
            <div class="col-lg-4">
                <?php 
echo Html::activeDropDownList($model, 'kpi_id', ArrayHelper::map(app\models\CmbisKpi::find()->all(), 'kpi_id', 'kpi_name'), ['prompt' => 'เลือกตัวชี้วัด', 'class' => 'form-control']);
?>
</div>
            <div class="col-lg-4">
                <?php 
echo Html::activeDropDownList($model, 'kpi_miss', ArrayHelper::map(app\models\CmbisPopGroups::find()->all(), 'pop_group_id', 'pop_grouup_name'), ['prompt' => 'เลือกกลุ่มประชากร', 'class' => 'form-control']);
?>
</div>
            <div class="col-lg-4">
                <span class="input-group-btn">
                    <button class="btn btn-danger" type="submit"><i class="glyphicon glyphicon-search"></i> ค้นหา</button>
                    <?php 
/* if (Yii::$app->user->identity->getIsAdmin()) { 
   echo Html::a('<i class="glyphicon glyphicon-plus"></i> ' . Yii::t('app', 'เพิ่มตัวชี้วัด'), ['create'], ['class' => 'btn btn-success']);
   } */
?>
Exemplo n.º 2
0
use yii\helpers\Html;
use miloschuman\highcharts\Highcharts;
use yii\helpers\ArrayHelper;
$this->title = 'แผนภูมิแท่งเปรียบเทียบตัวชี้วัด';
?>
<div class='well'>
    <form method="GET">
        <div class='col-sm-1'>
        <span class='badge btn-success' style="padding: 5px"> เลือกตัวชี้วัด : </span>
        </div>
        <div class='row'>

            <div class='col-sm-5'>
               <?php 
$result = ArrayHelper::map(app\models\CmbisKpi::find()->where(['between', 'kpi_id', '1', '15'])->all(), 'kpi_id', 'kpi_name');
echo Html::dropDownList('kpi', $kpi, $result, ['class' => 'form-control', 'prompt' => 'เลือกตัวชี้วัด']);
$target = Yii::$app->db->createCommand('
    SELECT kpi_percent_target FROM cmbis_kpi WHERE kpi_id=:kpi_id
', [':kpi_id' => $kpi])->queryScalar();
if ($target == null) {
    $target = 60;
}
?>
            </div>
            <div class='col-sm-2'>

                <button class='btn btn-danger'>ประมวลผล</button>
            </div>
        </div>
    </form>
Exemplo n.º 3
0
<?php 
$f = ActiveForm::begin(['options' => ['class' => 'form-inline'], 'enableClientValidation' => false]);
echo $f->field($Kpi, 'kpi_id')->dropDownList($Kpilist, ['prompt' => '--เลือกตัวชี้วัดที่ต้องการแสดง--'], ['kpi_id', 'kpi_name'])->label('เลือกตัวชี้วัด');
?>
<input type="submit" value="ตกลง" class="btn btn-primary" >
<?php 
ActiveForm::end();
?>

    <?php 
if (!empty($kpi_id)) {
    ?>
    <div class="alert alert-info overlay">
        <?php 
    $sql = app\models\CmbisKpi::find()->where(['kpi_id' => $kpi_id])->all();
    ?>
        ID = <?php 
    echo $kpi_id;
    ?>
        <?php 
    foreach ($sql as $rows) {
        echo $rows->kpi_name;
        // แสดงข้อมูล field kpi_name
    }
    ?>
    </div>
    <div class="alert alert-success">
        <?php 
    /*$query=CmbisKpiResult::find()->where(['kpi_id' => $kpi_id]);
      $dataProvider = new ActiveDataProvider([