コード例 #1
0
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Soheader('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Soheader'])) {
         $model->attributes = $_GET['Soheader'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'sodetail' => $this->sodetail));
 }
コード例 #2
0
?>
	</div>
		</td>
				         <td>
		  <div class="row">
		<?php 
echo $form->labelEx($model, 'soheaderid');
?>
    <?php 
echo $form->hiddenField($model, 'soheaderid');
?>
    <input type="text" name="stat_name" id="sono" readonly >
    <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'so_dialog', 'options' => array('title' => Yii::t('app', 'Sales Order'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$soheader = new Soheader('searchwstatus');
$soheader->unsetAttributes();
// clear any default values
if (isset($_GET['Soheader'])) {
    $soheader->attributes = $_GET['Soheader'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'so-grid', 'dataProvider' => $soheader->searchwfqtystatus(), 'filter' => $soheader, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("+",
          array("name" => "send_absstatus",
          "id" => "send_absstatus",
          "onClick" => "$(\\"#so_dialog\\").dialog(\\"close\\"); $(\\"#sono\\").val(\\"$data->sono\\");
          $(\\"#Giheader_soheaderid\\").val(\\"$data->soheaderid\\");
          $(\\"#Giheader_gidate\\").val(\\"$data->sodate\\");
          generatedataso();
                "))'), array('name' => 'soheaderid', 'visible' => false, 'value' => '$data->soheaderid:""'), 'sono', array('name' => 'addressbookid', 'value' => '($data->customer!==null)?$data->customer->fullname:""'), 'headernote', array('name' => 'sodate', 'type' => 'raw', 'value' => 'date(Yii::app()->params["dateviewfromdb"], strtotime($data->sodate))'))));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$.fn.yiiGridView.update("so-grid");$("#so_dialog").dialog("open"); return false;'));
?>