當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataFilter::script方法代碼示例

本文整理匯總了PHP中DataFilter::script方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataFilter::script方法的具體用法?PHP DataFilter::script怎麽用?PHP DataFilter::script使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataFilter的用法示例。


在下文中一共展示了DataFilter::script方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: filteredgrid

    function filteredgrid()
    {
        $this->rapyd->load("datafilter", "datagrid");
        $this->rapyd->uri->keep_persistence();
        $this->datasis->modulo_id(707, 1);
        $script = '
		$(function() {
			$(".inputnum").numeric(".");
		});
		';
        $filter = new DataFilter("Filtro de Personal", 'pers');
        $filter->script($script, "create");
        $filter->script($script, "modify");
        $filter->script->css_class = 'inputnum';
        $filter->cedula = new inputField("Cédula", "cedula");
        $filter->cedula->size = 10;
        $filter->cedula->css_class = 'inputnum';
        $filter->nombre = new inputField("Nombre", "nombre");
        $filter->nombre->size = 30;
        $filter->apellido = new inputField("Apellido", "apellido");
        $filter->apellido->size = 30;
        $filter->contrato = new dropdownField("Contrato", "contrato");
        $filter->contrato->style = "width:400px;";
        $filter->contrato->option("", "");
        $filter->contrato->options("SELECT codigo,CONCAT('',codigo,nombre)as nombre FROM noco ORDER BY codigo");
        $filter->divi = new dropdownField("División", "divi");
        $filter->divi->style = "width:250px;";
        $filter->divi->option("", "");
        $filter->divi->options("SELECT division,descrip FROM divi ORDER BY division");
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor('nomina/pers/dataedit/show/<#codigo#>', '<#codigo#>');
        $grid = new DataGrid("Lista de Personal");
        $grid->order_by("codigo", "asc");
        $grid->per_page = 20;
        $grid->column("C&oacute;digo", $uri);
        $grid->column("C&eacute;dula", "cedula");
        $grid->column("Nombre", "nombre");
        $grid->column("Apellidos", "apellido");
        $grid->add("nomina/pers/dataedit/create");
        $grid->build();
        $data['content'] = $filter->output . $grid->output;
        $data['title'] = "<h1>Personal</h1>";
        $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
開發者ID:codethics,項目名稱:proteoerp,代碼行數:46,代碼來源:pers.php

示例2: filteredgrid

 function filteredgrid()
 {
     $this->rapyd->load("datafilter", "datagrid");
     $script = '';
     $filter = new DataFilter("Lista");
     $filter->db->from("suminr");
     $filter->db->join("sprv", "suminr.proveed=sprv.proveed", "LEFT");
     $filter->script($script);
     $filter->numero = new inputField("Numero", "numero");
     $filter->numero->size = 15;
     $filter->fecha = new dateonlyField("Fecha", "fecha");
     $filter->fecha->dbformat = "Y-m-d";
     $filter->fecha->size = 12;
     $modbus = array('tabla' => 'sprv', 'columnas' => array('proveed' => 'Codigo', 'nombre' => 'Nombre'), 'filtro' => array('proveed' => 'Codigo', 'nombre' => 'Nombre'), 'retornar' => array('proveed' => 'proveed'), 'titulo' => 'Buscar Beneficiario');
     $bproveed = $this->datasis->modbus($modbus);
     $filter->proveed = new inputField("Beneficiario", "proveed");
     $filter->proveed->append($bproveed);
     $filter->proveed->size = 7;
     $filter->observacion = new inputField("Observaci&oacute;n", "observacion");
     $filter->observacion->size = 40;
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('suministros/suminr/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
     function sta($status)
     {
         switch ($status) {
             case "P":
                 return "Pendiente";
                 break;
             case "A":
                 return "Anulado";
                 break;
             case "C":
                 return "Recibida";
                 break;
         }
     }
     $grid = new DataGrid();
     $grid->order_by("numero", "desc");
     $grid->per_page = 20;
     $grid->use_function('substr', 'str_pad', 'sta');
     $grid->column_orderby("N&uacute;mero", $uri, "numero");
     $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
     $grid->column_orderby("Beneficiario", "nombre", "proveed", "align='left'");
     $grid->column_orderby("Total", "total", "total", "align='rigth'");
     $grid->column_orderby("Observaci&oacute;n", "<wordwrap><#observacion#>|50|\n|true</wordwrap>", "observacion", "align='left'");
     $grid->column_orderby("Estado", "<sta><#status#></sta>", "status", "align='center'      ");
     $grid->add("suministros/suminr/dataedit/create");
     $grid->build();
     //echo $grid->db->last_query();
     //		$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "Notas de Recepci&oacute;n";
     $data["head"] = script("jquery.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:58,代碼來源:suminr.php

示例3: filteredgrid

    function filteredgrid()
    {
        //$this->datasis->modulo_id(24,1);
        $this->rapyd->load("datafilter", "datagrid");
        $link = site_url('presupuesto/requisicion/getadmin');
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			});
			';
        $filter = new DataFilter("");
        $filter->script($script);
        $filter->db->select(array("a.numero numero", "a.fecha fecha", "a.total total"));
        $filter->db->from("ingresos a");
        //$filter->db->join("uejecutora b" ,"a.uejecuta=b.codigo");
        $filter->numero = new inputField("N&uacute;mero", "numero");
        $filter->numero->size = 15;
        $filter->fecha = new dateonlyField("Fecha", "fecha");
        $filter->fecha->size = 12;
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
        $grid = new DataGrid("");
        $grid->order_by("numero", "desc");
        $grid->per_page = 20;
        $grid->use_function('substr', 'str_pad');
        $grid->column_orderby("N&uacute;mero", $uri, "numero");
        $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
        $grid->column_orderby("Total", "<nformat><#total#></nformat>", "total", "align='right' ");
        $grid->add($this->url . "dataedit/create");
        $grid->build();
        $data['filtro'] = $filter->output;
        $data['content'] = $grid->output;
        $data['title'] = $this->titp;
        $data['script'] = script("jquery.js") . "\n";
        $data["head"] = $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:38,代碼來源:ingresos.php

示例4: filteredgrid

    function filteredgrid()
    {
        //$this->datasis->modulo_id(224,1);
        $this->rapyd->load("datafilter", "datagrid");
        $link = site_url('presupuesto/requisicion/getadmin');
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			});
		
			function get_uadmin(){
				$.post("' . $link . '",{ uejecuta:$("#uejecuta").val() },function(data){$("#td_uadministra").html(data);})
			}
			';
        $filter = new DataFilter("");
        $filter->script($script);
        $filter->db->select(array("a.status", "a.numero numero", "a.fecha fecha", "a.uejecuta", "b.nombre uejecuta2", "c.nombre uadministra2", "a.ano", "tsoli", "tdisp"));
        $filter->db->from("cdisp a");
        $filter->db->join("itcdisp d", "a.numero=d.numero", "LEFT");
        $filter->db->join("uejecutora b", "a.uejecuta=b.codigo", "LEFT");
        $filter->db->join("uadministra c", "a.uadministra=b.codigo", "LEFT");
        $filter->db->groupby("a.numero");
        $filter->numero = new inputField("N&uacute;mero", "numero");
        $filter->numero->size = 15;
        $filter->fecha = new dateonlyField("Fecha", "fecha");
        $filter->fecha->size = 12;
        $filter->uejecuta = new dropdownField("U.Ejecutora", "uejecuta");
        $filter->uejecuta->option("", "Seccionar");
        $filter->uejecuta->options("SELECT codigo,nombre FROM uejecutora ORDER BY nombre");
        $filter->uejecuta->onchange = "get_uadmin();";
        $filter->status = new dropdownField("Estado", "status");
        $filter->status->option('', '');
        $filter->status->option('C', 'Pre-Comprometido');
        $filter->status->option('A', 'Anulado');
        $filter->status->option('F', 'Finalizado Pre-Compromiso');
        $filter->status->option('P', 'Pendiente');
        $filter->codigoadm = new dropdownField("Est. Administrativa", "codigoadm");
        $filter->codigoadm->option("", "Seccionar");
        $filter->codigoadm->options("SELECT b.codigo, CONCAT_WS(' ',b.codigo,b.denominacion) AS val FROM presupuesto AS a JOIN estruadm AS b ON a.codigoadm=b.codigo  GROUP BY b.codigo");
        $filter->codigoadm->db_name = 'd.codigoadm';
        $filter->fondo = new dropdownField("Fuente de Financiamiento", "fondo");
        $filter->fondo->option("", "");
        $filter->fondo->options("SELECT fondo,CONCAT_WS(' ',fondo,descrip)a FROM fondo");
        $filter->fondo->db_name = 'd.fondo';
        $filter->codigopres = new inputField("Partida", "codigopres");
        $filter->codigopres->db_name = "d.codigopres";
        //$filter->codigopres->clause ="likerigth";
        $filter->codigopres->size = 25;
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<#numero#>');
        function status($status = '')
        {
            switch ($status) {
                case 'C':
                    $status = "Pre-Comprometido";
                    break;
                case 'A':
                    $status = "Anulado";
                    break;
                case 'F':
                    $status = "Finalizado";
                    break;
                case 'P':
                    $status = "Pendiente";
                    break;
            }
            return $status;
        }
        $grid = new DataGrid("");
        $grid->order_by("numero", "desc");
        $grid->per_page = 20;
        $grid->use_function('substr', 'str_pad', 'status');
        $grid->column_orderby("N&uacute;mero", $uri, "numero");
        $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
        $grid->column_orderby("Unidad Ejecutora", "uejecuta2", "uejecuta2", "align='left' NOWRAP");
        $grid->column_orderby("Unidad Administrativa", "uadministra2", "uadministra2", "align='left' NOWRAP");
        $grid->column_orderby("Disponible", "<nformat><#tdisp#></nformat>", "tdisp", "align='right' NOWRAP");
        $grid->column_orderby("Solicitado", "<nformat><#tsoli#></nformat>", "tsoli", "align='right' NOWRAP");
        $grid->column_orderby("Estado", "<status><#status#></status>", "status", "align='left'");
        $grid->add($this->url . "dataedit/create");
        $grid->build();
        $data['filtro'] = $filter->output;
        $data['content'] = $grid->output;
        $data['title'] = $this->titp;
        $data['script'] = script("jquery.js") . "\n";
        $data["head"] = $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:89,代碼來源:cdisp.php

示例5: index

    function index()
    {
        $this->rapyd->load('datafilter', 'datagrid');
        $link = site_url('supervisor/sfacfiscal/arreglaserial');
        $linkd = site_url('supervisor/sfacfiscal/arreglaserialdev');
        $link2 = site_url('supervisor/sfacfiscal/arreglanfiscal');
        $link4 = site_url('supervisor/sfacfiscal/arreglanfiscaldev');
        $link3 = site_url('supervisor/sfacfiscal/traereferen');
        $jquery = '
		function riega(id){
			if(confirm("Esta seguro que regar el serial para las facturas?")){
				if(confirm("Desea cambiar solo los registros vacios?"))
					resp=0;
				else
					resp=1;
				$.post("' . $link . '",{ cajero:$("#cajero").val(),fecha:$("#fecha").val(), serial:id ,noresp:resp, nulos:$("#nulos").val(),usuario:$("#usuario").val()},
				function(data){
					alert(data);
				});
			}
		}

		function riegadev(id){
			if(confirm("Esta seguro que regar el serial por las devoluciones?")){
				if(confirm("Desea cambiar solo los registros vacios?"))
					resp=0;
				else
					resp=1;
				$.post("' . $linkd . '",{ cajero:$("#cajero").val(),fecha:$("#fecha").val(), serial:id ,noresp:resp, nulos:$("#nulos").val(),usuario:$("#usuario").val()},
				function(data){
					alert(data);
				});
			}
		}

		function nfiscal(id){
			if(confirm("Esta seguro que regar el numero fiscal?")){
				if(confirm("Desea cambiar solo los registros vacios?"))
					resp=0;
				else
					resp=1;
				$.post("' . $link2 . '",{ cajero:$("#cajero").val(),fecha:$("#fecha").val(), numero:id ,noresp:resp, nulos:$("#nulos").val(),usuario:$("#usuario").val()},
				function(data){
					alert(data);
				});
			}
		}

		function nfiscaldev(id){
			if(confirm("Esta seguro que regar el numero fiscal?")){
				if(confirm("Desea cambiar solo los registros vacios?"))
					resp=0;
				else
					resp=1;
				$.post("' . $link4 . '",{ cajero:$("#cajero").val(),fecha:$("#fecha").val(), numero:id ,noresp:resp, nulos:$("#nulos").val(),usuario:$("#usuario").val()},
				function(data){
					alert(data);
				});
			}
		}


		function buscaref(){
			referenc = prompt("Introduce una referencia");
			$.post("' . $link3 . '",{ referen: referenc },
			function(data){
				alert(data);
			});
		}';
        function exissinv($cen, $t, $tipo_doc)
        {
            if (!empty($cen)) {
                if ($t == 1) {
                    if ($tipo_doc == 'F') {
                        $rt = form_button('asignar', $cen, 'onclick="riega(\'' . $cen . '\');"');
                    } else {
                        $rt = form_button('asignar', $cen, 'onclick="riegadev(\'' . $cen . '\');"');
                    }
                } else {
                    if ($tipo_doc == 'F') {
                        $rt = form_button('asignar', $cen, 'onclick="nfiscal(\'' . $cen . '\');"');
                    } else {
                        $rt = form_button('asignar', $cen, 'onclick="nfiscaldev(\'' . $cen . '\');"');
                    }
                }
            } else {
                $rt = '--';
            }
            return $rt;
        }
        $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
        $filter = new DataFilter('', 'sfac');
        //$filter->db->where('tipo_doc','F');
        $filter->script($jquery);
        $filter->fecha = new dateonlyField('Desde', 'fecha');
        $filter->fecha->clause = 'where';
        $filter->fecha->db_name = 'fecha';
        $filter->fecha->insertValue = date('Y-m-d');
        $filter->fecha->operator = '=';
        $filter->fecha->rule = 'required|chfecha';
//.........這裏部分代碼省略.........
開發者ID:codethics,項目名稱:proteoerp,代碼行數:101,代碼來源:sfacfiscal.php

示例6: filteredgrid

    function filteredgrid()
    {
        //$this->datasis->modulo_id(24,1);
        $this->rapyd->load("datafilter", "datagrid");
        $link = site_url('presupuesto/requisicion/getadmin');
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
				$("#mostrar").attr("title","Haz Click aqui para Mostrar el Filtro, y poder Buscar Documentos de una manera mas r&aacute;pida y cencilla");
				$("input[name=\\"btn_add\\"]").attr("title","Haz Click aqui para Agregar un nuevo Documento");
				
				$("#mostrar,.button,.enlace,.tuxhelp").tooltip({ 
				    track: true, 
				    delay: 0,
				    showURL: false, 
				    opacity: 1,
				    fixPNG: true, 
				    showBody: " - ", 
				    extraClass: "pretty fancy", 
				    top: -15,
				    left: 5
				});
			});
		
			function get_uadmin(){
				$.post("' . $link . '",{ uejecuta:$("#uejecuta").val() },function(data){$("#td_uadministra").html(data);})
			}
			';
        $filter = new DataFilter("");
        $filter->script($script);
        $filter->db->select(array("a.numero numero", "a.fecha fecha", "a.uejecuta", "b.nombre uejecuta2", "c.nombre uadministra2"));
        $filter->db->from("anoprox a");
        $filter->db->join("uejecutora b", "a.uejecuta=b.codigo");
        $filter->db->join("uadministra c", "a.uadministra=b.codigo", "LEFT");
        if ($this->datasis->traevalor('ESPEJO') == "S" && !$this->datasis->essuper()) {
            $filter->db->where("usuario", $this->session->userdata('usuario'));
        }
        $filter->numero = new inputField("N&uacute;mero", "numero");
        $filter->numero->size = 15;
        $filter->fecha = new dateonlyField("Fecha", "fecha", "d/m/Y");
        $filter->fecha->size = 12;
        $filter->uejecuta = new dropdownField("U.Ejecutora", "uejecuta");
        $filter->uejecuta->option("", "Seccionar");
        $filter->uejecuta->options("SELECT codigo,nombre FROM uejecutora ORDER BY nombre");
        $filter->uejecuta->onchange = "get_uadmin();";
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>', array("title" => "Haz Click para ver el Documento de Proyecci&oacute;n N&uacute;mero <#numero#>", "class" => "enlace"));
        $grid = new DataGrid("Haz Click en cualquier n&uacute;mero de Documento para verlo");
        $grid->order_by("numero", "desc");
        $grid->per_page = 20;
        $grid->use_function('substr', 'str_pad');
        $grid->column_orderby("N&uacute;mero", $uri, "numero");
        $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
        $grid->column_orderby("Unidad Ejecutora", "uejecuta2", "uejecuta2", "align='left' NOWRAP");
        $grid->column_orderby("Unidad Administrativa", "uadministra2", "uadministra2", "align='left' NOWRAP");
        $grid->add($this->url . "dataedit/create");
        $grid->build();
        $data['filtro'] = $filter->output;
        $data['content'] = $grid->output;
        $data['title'] = $this->titp;
        $data["head"] = $this->rapyd->get_head() . script('jquery.js') . script('jquery-ui.js') . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.json.min.js") . script('plugins/jquery.tooltip.js') . script('plugins/jquery.autocomplete.js') . style('jquery.autocomplete.css') . style('jquery.tooltip.css') . style('tooltip.css') . style('vino/jquery-ui.css');
        $this->load->view('view_ventanas', $data);
    }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:64,代碼來源:anoprox.php

示例7: filteredgrid

    function filteredgrid()
    {
        //$this->datasis->modulo_id(24,1);
        $this->rapyd->load("datafilter", "datagrid");
        $link = site_url('presupuesto/requisicion/getadmin');
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			
			function get_uadmin(){
				$.post("' . $link . '",{ uejecuta:$("#uejecuta").val() },function(data){$("#td_uadministra").html(data);})
			}
		';
        $filter = new DataFilter("");
        $filter->script($script);
        $filter->db->select(array("a.numero numero", "a.fecha fecha", "a.uejecuta", "b.nombre uejecuta2", "concepto", "total", "status"));
        $filter->db->from("reinte a");
        $filter->db->join("uejecutora b", "a.uejecuta=b.codigo", "LEFT");
        $filter->db->join("uadministra c", "a.uadministra=b.codigo", "LEFT");
        $filter->numero = new inputField("N&uacute;mero", "numero");
        $filter->numero->size = 15;
        $filter->fecha = new dateonlyField("Fecha", "fecha", "d/m/Y");
        $filter->fecha->size = 12;
        $filter->uejecuta = new dropdownField("U.Ejecutora", "uejecuta");
        $filter->uejecuta->option("", "Seccionar");
        $filter->uejecuta->options("SELECT codigo,nombre FROM uejecutora ORDER BY nombre");
        $filter->uejecuta->onchange = "get_uadmin();";
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor($this->url . 'dataedit/show/<#numero#>', '<#numero#>');
        function sta($sta)
        {
            switch ($sta) {
                case 'P':
                    return 'Pendiente';
                case 'E2':
                    return 'Pagado';
                case 'O2':
                    return 'O. Pago';
                case 'T2':
                    return 'Causado';
                case 'C2':
                    return 'Comprometido';
                case 'C1':
                    return 'Causado';
                case 'T1':
                    return 'O. Pago';
                case 'O1':
                    return 'Pagado';
                    //				case 'E1':return 'Comprometido';
            }
        }
        $grid = new DataGrid("Haz Click en cualquier n&uacute;mero de Documento para verlo");
        $grid->order_by("numero", "desc");
        $grid->per_page = 20;
        $grid->use_function('substr', 'str_pad', 'sta');
        $grid->column_orderby("N&uacute;mero", $uri, "numero");
        $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
        $grid->column_orderby("Unidad Ejecutora", "uejecuta2", "uejecuta2", "align='left'  ");
        $grid->column_orderby("Concepto", "concepto", "concepto", "align='left'  ");
        $grid->column_orderby("Total", "total", "total", "align='right' ");
        $grid->column_orderby("Estado", "<sta><#status#></sta>", "status", "align='right' ");
        if ($this->datasis->puede(319)) {
            $grid->add($this->url . "dataedit/create");
        }
        $grid->build();
        $data['filtro'] = $filter->output;
        $data['content'] = $grid->output;
        $data['title'] = $this->titp;
        $data["head"] = $this->rapyd->get_head() . script('jquery.js') . script('jquery-ui.js') . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.json.min.js") . script('plugins/jquery.tooltip.js') . script('plugins/jquery.autocomplete.js') . style('jquery.autocomplete.css') . style('jquery.tooltip.css') . style('tooltip.css') . style('vino/jquery-ui.css');
        $this->load->view('view_ventanas', $data);
    }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:72,代碼來源:reinte.php

示例8: filteredgrid

 function filteredgrid()
 {
     $this->load->helper('form');
     $this->rapyd->load('dataobject', "datafilter", "datagrid");
     $this->rapyd->uri->keep_persistence();
     $this->datasis->modulo_id(52, 1);
     $mNOCO = array('tabla' => 'noco', 'columnas' => array('codigo' => 'C&oacute;digo de Sucursal', 'nombre' => 'Nombre'), 'filtro' => array('codigo' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('codigo' => 'contrato'), 'titulo' => 'Buscar Contratos', 'where' => 'tipo <> "O"');
     $bNOCO = $this->datasis->modbus($mNOCO);
     $script = '
             $(function() {
                     
             });
             ';
     $filter = new DataFilter("", 'pers');
     $filter->db->select(array("noco.nombre noconombre", "pers.codigo", "pers.nacional", "pers.cedula", "pers.nombre", "pers.nombre2", "pers.apellido", "pers.apellido2", "pers.direc1", "pers.direc2", "pers.direc3", "pers.telefono", "pers.nacimi", "pers.sso", "pers.sexo", "pers.civil", "pers.depto", "pers.cargo", "pers.sueldo", "pers.ingreso", "pers.retiro", "pers.tipo", "pers.contrato", "pers.dialib", "pers.status", "pers.banco", "pers.cutipo", "pers.cuenta", "pers.vari1", "pers.vari2", "pers.vari3", "pers.vari4", "pers.vari5", "pers.vari6", "pers.vari7", "pers.vari8", "pers.uaumento", "pers.formato", "pers.dialab", "pers.xdialab", "pers.sucursal", "pers.divi", "pers.carnet", "pers.enlace", "pers.estampa", "pers.usuario", "pers.hora", "pers.transac", "pers.cuentab", "pers.profes", "pers.niveled", "pers.vence", "pers.horario", "pers.rif", "pers.codigoadm", "pers.fondo", "pers.codigopres", "pers.email", "pers.tipoe", "pers.observa", "pers.sueldo", "divi.descrip division"));
     $filter->db->join("noco", "pers.contrato=noco.codigo", "LEFT");
     $filter->db->join("divi", "divi.division=pers.divi", "LEFT");
     $filter->script($script, "create");
     $filter->script($script, "modify");
     $filter->codigo = new inputField("Codigo", "codigo");
     $filter->codigo->size = 30;
     $filter->codigo->db_name = 'pers.codigo';
     $filter->cedula = new inputField("C&eacute;dula", "cedula");
     $filter->cedula->size = 10;
     $filter->cedula->css_class = 'inputnum';
     $filter->cedula->db_name = 'pers.cedula';
     $filter->nombre = new inputField("Nombre", "nombre");
     $filter->nombre->size = 30;
     $filter->nombre->db_name = 'pers.nombre';
     $filter->apellido = new inputField("Apellido", "apellido");
     $filter->apellido->size = 30;
     $filter->apellido->db_name = 'pers.apellido';
     $filter->fondo = new inputField("Fondo", "fondo");
     $filter->fondo->db_name = 'pers.fondo';
     $filter->divi = new dropdownField("Divisi&oacute;n", "divi");
     $filter->divi->style = "width:250px;";
     $filter->divi->option("", "");
     $filter->divi->options("SELECT division,CONCAT_WS(' ',division,descrip)des FROM divi ORDER BY division");
     //$filter->divi->group = "Relaci&oacute;n Laboral";
     $filter->codigoadm = new inputField("Est. Administrativa", "codigoadm");
     $filter->codigoadm->db_name = 'pers.codigoadm';
     $filter->codigopres = new inputField("Codigo Partida", "codigopres");
     $filter->codigopres->db_name = 'pers.codigopres';
     $filter->contrato = new inputField("Contrato", "contrato");
     $filter->contrato->size = 4;
     $filter->contrato->maxlength = 5;
     $filter->contrato->append($bNOCO);
     $filter->contrato->clause = 'where';
     $filter->contrato->operator = '=';
     $filter->sueldo = new inputField("Sueldo", "sueldo");
     $filter->sueldo->db_name = 'pers.sueldo';
     $filter->status = new dropdownField("Estatus", "status");
     $filter->status->option("", "");
     $filter->status->options(array("A" => "Activo", "V" => "Vacaciones", "R" => "Retirado"));
     $filter->status->group = "Relaci&oacute;n Laboral";
     $filter->status->style = "width:100px;";
     //$filter->script->css_class='inputnum';
     $filter->buttons("reset", "search");
     $filter->build();
     $uri = anchor('nomina/pers/dataedit/show/<raencode><#codigo#></raencode>', '<#codigo#>');
     $grid = new DataGrid("");
     $grid->order_by("pers.codigo", "asc");
     $grid->per_page = 20;
     $grid->column_orderby("C&oacute;digo", $uri, "pers.codigo");
     $grid->column_orderby("C&eacute;dula", "cedula", "cedula");
     $grid->column_orderby("Nombre", "nombre", "nombre", "align='left'NOWRAP");
     $grid->column_orderby("Apellidos", "apellido", "apellido", "align='left'NOWRAP");
     $grid->column_orderby("Division", "division", "divi.descrip", "");
     $grid->column_orderby("Contrato", "noconombre", "noconombre", "");
     $grid->column_orderby("Sueldo", "sueldo", "sueldo", "");
     $grid->add("nomina/pers/dataedit/create");
     $grid->build();
     $sql = $grid->db->last_query();
     $cantidad = $grid->recordCount;
     $hidden = array('sql' => $sql, 'cantidad' => $cantidad);
     $form = form_open($this->url . "masivo", '', $hidden);
     $form .= form_submit('modificar', 'Modificar Masivo');
     //$data['content'] = $filter->output.$grid->output;
     $data['filtro'] = $filter->output;
     $data['content'] = $grid->output . $form;
     $data['script'] = script("jquery.js") . "\n";
     $data['title'] = "Personal";
     $data["head"] = script("jquery.pack.js") . script("plugins/jquery.numeric.pack.js") . script("plugins/jquery.floatnumber.js") . $this->rapyd->get_head();
     $this->load->view('view_ventanas', $data);
 }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:85,代碼來源:pers.php

示例9: filteredgrid

    function filteredgrid()
    {
        $this->datasis->modulo_id(24, 1);
        $this->rapyd->load("datafilter", "datagrid");
        $link = site_url('presupuesto/requisicion/getadmin');
        $script = '
			$(function() {
				$(".inputnum").numeric(".");
			});
		
			function get_uadmin(){
				$.post("' . $link . '",{ uejecuta:$("#uejecuta").val() },function(data){$("#td_uadministra").html(data);})
			}
			';
        $filter = new DataFilter("");
        $filter->script($script);
        $filter->db->select("a.numero,a.numero numero,a.fecha fecha,a.uejecuta uejecuta,a.uadministra,a.responsable,a.objetivo,a.tcantidad,a.timporte,a.status,a.ocompra,b.nombre uejecuta2,c.nombre uadministra2");
        $filter->db->from("requi a");
        $filter->db->join("uejecutora b", "a.uejecuta=b.codigo");
        $filter->db->join("uadministra c", "a.uadministra=b.codigo", "LEFT");
        $filter->numero = new inputField("N&uacute;mero", "numero");
        $filter->numero->size = 15;
        $filter->fecha = new dateonlyField("Fecha", "fecha");
        $filter->fecha->size = 12;
        $filter->uejecuta = new dropdownField("U.Ejecutora", "uejecuta");
        $filter->uejecuta->option("", "Seccionar");
        $filter->uejecuta->options("SELECT codigo,nombre FROM uejecutora ORDER BY nombre");
        $filter->uejecuta->onchange = "get_uadmin();";
        $filter->uejecuta->rule = "required";
        $filter->ocompra = new inputField("O. Compra", "ocompra");
        $filter->ocompra->size = 15;
        //$filter->uadministra = new dropdownField("U.Administrativa", "uadministra");
        //$filter->uadministra->option("","Ninguna");
        $filter->buttons("reset", "search");
        $filter->build();
        $uri = anchor('presupuesto/requisicion/dataedit/show/<#numero#>', '<str_pad><#numero#>|8|0|STR_PAD_LEFT</str_pad>');
        //$uri2 = anchor('presupuesto/requisicion/asig_part/modify/<#id#>','<str_pad><#id#>|8|0|STR_PAD_LEFT</str_pad>');
        $grid = new DataGrid("");
        $grid->order_by("numero", "desc");
        $grid->per_page = 20;
        $grid->use_function('substr', 'str_pad');
        $grid->column_orderby("N&uacute;mero", $uri, "numero");
        $grid->column_orderby("Fecha", "<dbdate_to_human><#fecha#></dbdate_to_human>", "fecha", "align='center'");
        $grid->column_orderby("Unidad Ejecutora", "uejecuta2", "uejecuta2", "align='left' NOWRAP");
        $grid->column_orderby("Unidad Administrativa", "uadministra2", "uadministra2", "align='left' NOWRAP");
        $grid->column_orderby("O.Compra", '<str_pad><#ocompra#>|8|0|STR_PAD_LEFT</str_pad>', "ocompra");
        $grid->column_orderby("Estado", "status", "status");
        $grid->column_orderby("Responsable", "responsable", "responsable");
        $grid->column_orderby("Objetivo", "objetivo", "objetivo");
        //$grid->column("Asig. Partida"         ,$uri2);
        $grid->add("presupuesto/requisicion/dataedit/create");
        $grid->build();
        //$ingrid = '<script type="text/javascript">
        //$(document).ready(
        //	function() {
        //		$("#tablagrid").ingrid({
        //			url: "remote.html",
        //			height: 350
        //		});
        //	}
        //);
        //</script> ';
        //
        //$data['style']   = style("ingrid.css");
        $data['filtro'] = $filter->output;
        $data['content'] = $grid->output;
        $data['title'] = "Requisiciones";
        //"";
        $data['script'] = script("jquery.js") . "\n";
        //.script("jquery.ingrid.js")."\n".$ingrid;
        $data["head"] = $this->rapyd->get_head();
        $this->load->view('view_ventanas', $data);
    }
開發者ID:enderochoa,項目名稱:tortuga,代碼行數:73,代碼來源:requisicion.php


注:本文中的DataFilter::script方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。