示例#1
0
function buscar($b)
{
    // $con = mysql_connect('localhost','root', 'root');
    // mysql_select_db('base_de_datos', $con);
    // $sql = mysql_query("SELECT * FROM anuncios WHERE nombre LIKE '%".$b."%'",$con);
    // $contar = mysql_num_rows($sql);
    $elprecio = LineaServicio::model()->find("id={$b}");
    echo $elprecio->precio;
}
 public function actionFiltroContrato()
 {
     if ($_POST['elContrato'] == NULL) {
         //$data=;
         $data = CHtml::listData(LineaServicio::model()->findAll("estado = 'Activo' "), 'id', 'nombre');
     } else {
         $numeroContrato = $_POST['elContrato'];
         //$data=ContratoDetalle::model()->findAll('contrato_id=:id', array(':id'=>(int) $_POST['elContrato']));
         $data = ContratoDetalle::model()->findAll("(contrato_id={$numeroContrato} and estado = 'Activo' and realizadas < cantidad) or (contrato_id={$numeroContrato} and estado = 'Programada' and (realizadas < cantidad))");
         $data = CHtml::listData($data, 'linea_servicio_id', 'lineaServicio.nombre');
     }
     foreach ($data as $value => $name) {
         echo CHtml::tag('option', array('value' => $value), CHtml::encode($name), true);
     }
 }
<?php

/* @var $this PresupuestoController */
/* @var $model Presupuesto */
/* @var $form CActiveForm */
?>

<?php 
$elPaciente = $model->paciente_id;
$paciente = Paciente::model()->find("id={$elPaciente}");
$lineasdeservicio = LineaServicio::model()->findAll(array("condition" => "estado = 'activo'", 'order' => 'nombre asc'));
$registros = PresupuestoDetalle::model()->findAll("presupuesto_id = {$model->id}");
$numPresupuesto = PresupuestoDetalle::model()->count("presupuesto_id = {$model->id}");
?>

<div class="row">
	<div class="span5">
	<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $paciente, 'attributes' => array('nombreCompleto')));
?>
	<a class="btn btn-warning" href='index.php?r=paciente/view&id=<?php 
echo $paciente->id;
?>
'><i class="icon-search icon-white"></i> Ficha de Paciente</a>
	</div>

	<div class='span5'>
		<h2>Total:</h2>

		<input type='text' id='total' name='total' class="input-medium" readonly='readonly' value=<?php 
echo $model->total;
示例#4
0
/* @var $model Citas */
$this->menu = array(array('label' => 'Listar Citas', 'url' => array('index')), array('label' => 'Agenda de Cita', 'url' => array('citas')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#citas-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Buscar Cita - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<DIV style='width:175%; overflow:scroll;'>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'citas-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePicker', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'cedula_paciente', 'value' => '$data->paciente->n_identificacion', 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('header' => 'Celular', 'value' => '$data[\'paciente\'][\'celular\']', 'htmlOptions' => array('width' => '100')), array('header' => 'Personal', 'name' => 'personal_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'personal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), array('name' => 'linea_servicio_id', 'htmlOptions' => array('width' => '180'), 'filter' => CHtml::listData(LineaServicio::model()->findAll(array('order' => 'nombre ASC', 'condition' => "estado = 'activo'")), 'id', 'nombre'), 'value' => '$data[\'lineaServicio\'][\'nombre\']'), array('header' => 'Contrato', 'name' => 'contrato_id', 'value' => '$data->contrato_id', 'htmlOptions' => array('width' => '30')), array('name' => 'estado', 'filter' => array('Cancelada' => 'Cancelada', 'Completada' => 'Completada', 'Fallida' => 'Fallida', 'Programada' => 'Programada', 'Vencida' => 'Vencida', 'Reservado' => 'Reservado'), 'value' => '$data->estado'), array('header' => 'Fecha', 'name' => 'fecha_cita', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha_cita', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_cita', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha_cita\']);', 'htmlOptions' => array('width' => '80')), array('name' => 'hora_inicio', 'filter' => CHtml::listData(HorasServicio::model()->findAll(), 'id', 'hora'), 'value' => '$data[\'horaInicio\'][\'hora\']', 'htmlOptions' => array('width' => '85')), array('name' => 'hora_fin_mostrar', 'filter' => CHtml::listData(HorasServicio::model()->findAll(), 'id', 'hora'), 'value' => '$data[\'horaFinMostrar\'][\'hora\']', 'htmlOptions' => array('width' => '85')), array('header' => 'Registrada por:', 'name' => 'usuario_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'usuario\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), array('name' => 'fecha_creacion', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha_creacion', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_creacion', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha_creacion\']);', 'htmlOptions' => array('width' => '80')), array('header' => 'Confirmación', 'name' => 'confirmacion', 'value' => '$data[\'confirmacion\']'), array('header' => 'Comentario de Seguimiento', 'name' => 'comentario_cierre', 'value' => '$data[\'comentario_cierre\']', 'htmlOptions' => array('width' => '500')), array('header' => 'Comentario', 'name' => 'comentario', 'value' => '$data[\'comentario\']', 'htmlOptions' => array('width' => '500')), array('class' => 'CButtonColumn', 'template' => '{view}'))));
Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePicker(id, data) {\n        //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n    \$('#datepicker_for_fecha_cita').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n    \$('#datepicker_for_fecha_creacion').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n    //\$('#datepicker_for_fecha_cita').datepicker(\$.datepicker.regional[ 'es' ]);\n  //\$('#datepicker_for_fecha_cita').datepicker({dateFormat: 'dd-mm-yy'});\n}\n");
?>
</div>

 <div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Exportar a un archivo de Excel </h3>
  </div>
  <div class="modal-body">
  	<p>Seleccione las opciones de Exportar</p>
 	<form id="frmExportar" name="frmExportar" action="index.php?r=Citas/exportar&tipo=<?php 
$elTipo;
?>
" method = "post">
示例#5
0
/* @var $this CitasEquipoController */
/* @var $model CitasEquipo */
$this->menu = array();
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#citas-equipo-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Agenda de Equipos</h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'citas-equipo-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePicker', 'filter' => $model, 'columns' => array(array('header' => 'Cita', 'name' => 'cita_id', 'value' => '$data->cita_id', 'htmlOptions' => array('width' => '50')), array('header' => 'Fecha', 'name' => 'fecha', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha_cita', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha\']);', 'htmlOptions' => array('width' => '80')), array('name' => 'hora_inicio', 'filter' => CHtml::listData(HorasServicio::model()->findAll(), 'id', 'hora'), 'value' => '$data[\'horaInicio\'][\'hora\']', 'htmlOptions' => array('width' => '85')), array('name' => 'hora_fin_mostrar', 'filter' => CHtml::listData(HorasServicio::model()->findAll(), 'id', 'hora'), 'value' => '$data[\'horaFinMostrar\'][\'hora\']', 'htmlOptions' => array('width' => '85')), array('name' => 'equipo_id', 'filter' => CHtml::listData(Equipos::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombre'), 'value' => '$data[\'equipo\'][\'nombre\']', 'htmlOptions' => array('width' => '210')), 'equipo.numero', array('name' => 'linea_servicio_id', 'filter' => CHtml::listData(LineaServicio::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombre'), 'value' => '$data[\'lineaServicio\'][\'nombre\']', 'htmlOptions' => array('width' => '210')), array('name' => 'nombre_paciente', 'filter' => CHtml::listData(Paciente::model()->findAll(array('order' => 'nombre ASC')), 'id', 'nombreCompleto'), 'value' => '$data->cita->paciente->nombreCompleto', 'htmlOptions' => array('width' => '210')), array('name' => 'nombre_asistente', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC')), 'id', 'nombreCompleto'), 'value' => '$data->cita->personal->nombreCompleto', 'htmlOptions' => array('width' => '210')), array('class' => 'CButtonColumn', 'template' => '{view}'))));
Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePicker(id, data) {\n        //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n    \$('#datepicker_for_fecha_cita').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n}\n");
?>

<script>
    $(document).ready(function()
    {
        $('body').on('dblclick', '#citas-equipo-grid tbody tr', function(event)
        {
            var
                rowNum = $(this).index(),
                keys = $('#citas-equipo-grid > div.keys > span'),
                rowId = keys.eq(rowNum).text();

            location.href = '<?php 
echo Yii::app()->createUrl('citasEquipo/view');
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return LineaServicio the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = LineaServicio::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
/* @var $this CuentasXcController */
/* @var $model CuentasXc */
$this->menu = array(array('label' => 'Cuentas por Paciente', 'url' => "index.php?r=cuentasXc/admin"), array('label' => 'Cuentas por Contrato', 'url' => "index.php?r=cuentasXcDetalle/contratos"), array('label' => 'Cuentas por Servicio', 'url' => "index.php?r=cuentasXcDetalle/servicio"));
?>

<h1>Cuentas por Cobrar por Linea de Servicio sin Contrato</h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'cuentas-xc-grid', 'dataProvider' => $model->search2(), 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('header' => 'Paciente', 'name' => 'paciente_id', 'filter' => CHtml::listData(Paciente::model()->findAll(), 'id', 'nombreCompleto'), 'value' => '$data[\'paciente\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), 'n_identificacion', array('header' => 'Linea de Servicio', 'name' => 'linea_servicio_id', 'filter' => CHtml::listData(LineaServicio::model()->findAll(), 'id', 'nombre'), 'value' => '$data[\'linea\'][\'nombre\']'), 'cita_id', array('name' => 'saldo', 'value' => 'number_format($data->saldo,2)', 'htmlOptions' => array('width' => '120'), 'footer' => "<h5>\$ " . number_format($model->search()->itemCount === 0 ? '' : $model->getTotal2($model->search2()), 2) . '</h5>'), array('class' => 'CButtonColumn', 'template' => ''))));
?>


<script>
$(document).ready(function()
    {
        $('body').on('dblclick', '#cuentas-xc-grid tbody tr', function(event)
        {
                var citaID= $(this).find('td:nth-child(5)').text();
                
            location.href = '<?php 
echo Yii::app()->createUrl('citas/view');
?>
&id=' + citaID;
        });
示例#8
0
/* @var $this PagoCosmetologasController */
/* @var $model PagoCosmetologas */
$this->menu = array();
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#pago-cosmetologas-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Pago a Asistenciales - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<DIV style='width:150%; overflow:scroll;'>
<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pago-cosmetologas-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerPagoCosmetologa', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '20')), array('header' => '<small>Nombre Paciente</small>', 'name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('header' => '<small>Apellido Paciente</small>', 'name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), 'n_identificacion', array('header' => '<small>Asistencial</small>', 'name' => 'personal_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'personal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), array('header' => '<small>Tratamiento Realizado</small>', 'name' => 'linea_servicio_id', 'filter' => CHtml::listData(LineaServicio::model()->findAll(array('order' => 'nombre ASC', 'condition' => "estado = 'activo'")), 'id', 'nombre'), 'value' => '$data[\'lineaServicio\'][\'nombre\']', 'htmlOptions' => array('width' => '220')), 'sesion', array('header' => '<small>Fecha de acción</small>', 'name' => 'fecha', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha\']);', 'htmlOptions' => array('width' => '120')), 'contrato_id', array('name' => 'valor_tratamiento', 'value' => 'number_format($data->valor_tratamiento,2)', 'htmlOptions' => array('width' => '120'), 'footer' => "<h6>\$ " . number_format($model->getTotal($model->searchSuma()), 2) . '</h6>'), array('header' => '<small>Tratamiento con Descuento</small>', 'name' => 'valor_tratamiento_desc', 'value' => 'number_format($data->valor_tratamiento_desc,2)', 'htmlOptions' => array('width' => '120'), 'footer' => "<h6>\$ " . number_format($model->getTotal5($model->searchSuma()), 2) . '</h6>'), array('name' => 'valor_comision', 'value' => 'number_format($data->valor_comision,2)', 'htmlOptions' => array('width' => '120'), 'footer' => "<h6>\$ " . number_format($model->getTotal2($model->searchSuma()), 2) . '</h6>'), array('header' => 'Vendedor', 'name' => 'vendedor_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'vendedor\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), array('header' => 'Establecio estado', 'name' => 'aprobo_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'aprobo\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '220')), array('header' => 'Total de Pago', 'name' => 'total_pago', 'value' => 'number_format($data->total_pago,2)', 'htmlOptions' => array('width' => '120'), 'footer' => "<h6>\$ " . number_format($model->getTotal4($model->searchSuma()), 2) . '</h6>'), array('header' => 'Saldo a Favor', 'name' => 'saldo', 'value' => 'number_format($data->saldo,2)', 'htmlOptions' => array('width' => '120')))));
Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerPagoCosmetologa(id, data) {\n        //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n    \$('#datepicker_for_fecha').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n    //\$('#datepicker_for_fecha').datepicker(\$.datepicker.regional[ 'es' ]);\n  //\$('#datepicker_for_fecha').datepicker({dateFormat: 'dd-mm-yy'});\n}\n");
?>
</div>
<div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Exportar a un archivo de Excel </h3>
  </div>
  <div class="modal-body">
  	<p>Seleccione las opciones de Exportar</p>
 	<form id="frmExportar" name="frmExportar" action="index.php?r=PagoCosmetologas/exportar&tipo=<?php 
$elTipo;
?>
" method = "post">
  		<div class="span5">
示例#9
0
	<?php 
//echo CHtml::beginForm(CHtml::normalizeUrl(array('Responsables/create&id='.$model->id_correspondencia)), 'post');
//Yii::app()->clientScript->registerCoreScript('jquery');
$equiposlineaservicio = new EquiposLineaServicio();
$form = $this->beginWidget('CActiveForm', array('id' => 'equiposlineaservicio-form', 'action' => Yii::app()->createUrl('//equipos/lineaServicio&idEquipo=' . $model->id), 'enableAjaxValidation' => false));
?>

	<?php 
echo $form->errorSummary($equiposlineaservicio);
?>
	<div class="form"> 
	<div>
		<div class="span4">
			
			<?php 
echo $form->dropDownList($equiposlineaservicio, 'linea_servicio_id', CHtml::listData(LineaServicio::model()->findAll("estado = 'activo'"), 'id', 'nombre', 'tipo.nombre'), array('class' => 'input-xlarge', 'id' => 'id', 'empty' => ''));
?>
			<?php 
echo $form->error($equiposlineaservicio, 'linea_servicio_id');
?>
	
		</div>
	</div>
  </div>
  	<div class="span10">
		<?php 
echo CHtml::submitButton($equiposlineaservicio->isNewRecord ? 'Asignar' : 'Asignar', array('class' => 'btn btn-small btn-danger'));
?>
	</div>
  <?php 
$this->endWidget();
示例#10
0
/* @var $this RelacionHojaGastosController */
/* @var $model RelacionHojaGastos */
$this->menu = array();
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#relacion-hoja-gastos-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<h1>Relación Hoja de Gastos - <a href="#exportar" class="btn btn-warning" role="button" data-toggle="modal"><i class="icon-share-alt icon-white"></i> Exportar</a></h1>

<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'relacion-hoja-gastos-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'reinstallDatePickerVentas', 'filter' => $model, 'columns' => array(array('header' => 'ID.', 'name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('width' => '30')), array('name' => 'nombre_paciente', 'value' => '$data->paciente->nombre', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('name' => 'apellido_paciente', 'value' => '$data->paciente->apellido', 'htmlOptions' => array('width' => '100'), 'headerHtmlOptions' => array('style' => 'width:150px;text-align:center;')), array('header' => 'Cedula', 'name' => 'n_identificacion', 'value' => '$data->paciente->n_identificacion', 'htmlOptions' => array('width' => '50'), 'headerHtmlOptions' => array('style' => 'width:75px;text-align:center;')), array('name' => 'hoja', 'filter' => array('Hoja de Gatos' => 'Hoja de Gatos', 'Hoja de Gatos Cirugia' => 'Hoja de Gatos Cirugia'), 'value' => '$data->hoja'), array('header' => 'Asistencial:', 'name' => 'asistencial_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data->asistencial->nombreCompleto', 'htmlOptions' => array('width' => '180')), array('name' => 'linea_servicio_id', 'htmlOptions' => array('width' => '180'), 'filter' => CHtml::listData(LineaServicio::model()->findAll("estado = 'activo' order by nombre"), 'id', 'nombre'), 'value' => '$data[\'lineaServicio\'][\'nombre\']'), array('header' => 'Fecha', 'name' => 'fecha', 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array('language' => 'es', 'model' => $model, 'attribute' => 'fecha', 'options' => array('showAnim' => 'fold', 'language' => 'es', 'dateFormat' => 'dd-mm-yy', 'changeMonth' => true, 'changeYear' => true, 'yearRange' => '2014:2025'), 'htmlOptions' => array('id' => 'datepicker_for_fecha', 'style' => 'height:20px;width:80px;'), 'defaultOptions' => array('showOn' => 'focus', 'showOtherMonths' => true, 'selectOtherMonths' => true, 'changeMonth' => true, 'changeYear' => true, 'showButtonPanel' => true)), true), 'value' => 'Yii::app()->dateformatter->format("dd-MM-yyyy",$data[\'fecha\']);', 'htmlOptions' => array('width' => '80')), array('name' => 'costo', 'value' => 'number_format($data->costo,2)', 'footer' => "<h6>\$ " . number_format($model->getTotal($model->searchSuma()), 2) . '</h6>'), array('header' => 'Registrada por:', 'name' => 'personal_id', 'filter' => CHtml::listData(Personal::model()->findAll(array('order' => 'nombres ASC', 'condition' => "activo = 'SI'")), 'id', 'nombreCompleto'), 'value' => '$data[\'personal\'][\'nombreCompleto\']', 'htmlOptions' => array('width' => '180')), array('class' => 'CButtonColumn', 'template' => '{view}'))));
Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePickerVentas(id, data) {\n        //use the same parameters that you had set in your widget else the datepicker will be refreshed by default\n    \$('#datepicker_for_fecha').datepicker(jQuery.extend({showMonthAfterYear:false},jQuery.datepicker.regional['es'],{'dateFormat':'dd-mm-yy'}));\n    //\$('#datepicker_for_fecha').datepicker(\$.datepicker.regional[ 'es' ]);\n  //\$('#datepicker_for_fecha').datepicker({dateFormat: 'dd-mm-yy'});\n}\n");
?>


<!-- Ventanas Modales -->
<div id="exportar" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Exportar a un archivo de Excel </h3>
  </div>
  <div class="modal-body">
  	<p>Seleccione las opciones de Exportar</p>
 	<form id="frmExportar" name="frmExportar" action="index.php?r=RelacionHojaGastos/exportar" method = "post">
  		<div class="span5">
			<label>Filtro:</label>