当前位置: 首页>>代码示例>>PHP>>正文


PHP DataEdit::on_show方法代码示例

本文整理汇总了PHP中DataEdit::on_show方法的典型用法代码示例。如果您正苦于以下问题:PHP DataEdit::on_show方法的具体用法?PHP DataEdit::on_show怎么用?PHP DataEdit::on_show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataEdit的用法示例。


在下文中一共展示了DataEdit::on_show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dataeditdialog


//.........这里部分代码省略.........
        $edit->email->size = 40;
        $edit->email->maxlength = 100;
        $edit->tipo = new autoUpdateField('tipo', '1', '1');
        $edit->credito = new autoUpdateField('credito', 'N', 'N');
        $edit->limite = new autoUpdateField('limite', '0', '0');
        $script = '
		$(function() {
			$("#sclidialogrifci").focusout(function(){

				rif=$(this).val().toUpperCase();
				$(this).val(rif);
				$("#sclidialogrifci").val(rif);
				if(!chrif(rif)){
					alert("Al parecer el RIF colocado no es correcto, por favor verifique con el SENIAT.");
					return true;
				}else{
					$.ajax({
						type: "POST",
						url: "' . site_url('ajax/traerif') . '",
						dataType: "json",
						data: {rifci: rif},
						success: function(data){
							if(data.error==0){
								if($("#sclidialognombre").val()==""){
									$("#sclidialognombre").val(data.nombre);
								}
							}
						}
					});

					//Chequea si esta repetido
					$.ajax({
						type: "POST",
						url: "' . site_url('ajax/rifrep/C') . '",
						dataType: "json",
						data: {rifci: rif, codigo: ' . json_encode($edit->get_from_dataobjetct('cliente')) . '},
						success: function(data){
							if(data.rt){
								$.prompt(data.msj,{
									buttons: { Continuar: true },
									focus: 1,
									submit:function(e,v,m,f){
										$("#nombre").focus();
									}
								});
								$("#sclidialogrifci").unbind("focusout");
							}
						}
					});
					//Fin del chequeo repetido

				}
			});
		});

		function chrif(rif){
			rif.toUpperCase();
			var patt=/[EJPGV][0-9]{9} * /g;
			if(patt.test(rif)){
				var factor= new Array(4,3,2,7,6,5,4,3,2);
				var v=0;
				if(rif[0]=="V"){
					v=1;
				}else if(rif[0]=="E"){
					v=2;
				}else if(rif[0]=="J"){
					v=3;
				}else if(rif[0]=="P"){
					v=4;
				}else if(rif[0]=="G"){
					v=5;
				}
				acum=v*factor[0];
				for(i=1;i<9;i++){
					acum=acum+parseInt(rif[i])*factor[i];
				}
				acum=11-acum%11;
				if(acum>=10 || acum<=0){
					acum=0;
				}
				return (acum==parseInt(rif[9]));
			}else{
				return true;
			}
		}';
        $edit->script($script);
        $edit->build();
        if ($edit->on_show()) {
            echo $edit->output;
        }
        if ($edit->on_success()) {
            $data = array('id' => $edit->_dataobject->get('id'), 'cliente' => $edit->_dataobject->get('cliente'), 'nombre' => $edit->_dataobject->get('nombre'), 'rifci' => $edit->_dataobject->get('rifci'), 'tipo' => $edit->_dataobject->get('tipo'), 'direc' => $edit->_dataobject->get('dire11'), 'descuento' => 0);
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'data' => $data, 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        }
        if ($edit->on_error()) {
            $rt = array('status' => 'B', 'mensaje' => $edit->error_string, 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:scli.php

示例2: ncppro


//.........这里部分代码省略.........
     $edit->preducida->showformat = 'decimal';
     $edit->padicional = new inputField('', 'padicional');
     $edit->padicional->rule = 'numeric';
     $edit->padicional->type = 'inputhidden';
     $edit->padicional->insertValue = $ivas['sobretasa'];
     $edit->padicional->showformat = 'decimal';
     //bases de los impuestos
     $edit->montasa = new inputField('Montasa', 'montasa');
     $edit->montasa->rule = 'max_length[17]|numeric|positive';
     $edit->montasa->css_class = 'inputnum';
     $edit->montasa->size = 19;
     $edit->montasa->maxlength = 17;
     $edit->montasa->rule = 'condi_required';
     $edit->monredu = new inputField('Monredu', 'monredu');
     $edit->monredu->rule = 'max_length[17]|numeric|positive';
     $edit->monredu->css_class = 'inputnum';
     $edit->monredu->size = 19;
     $edit->monredu->maxlength = 17;
     $edit->monredu->rule = 'condi_required';
     $edit->monadic = new inputField('Monadic', 'monadic');
     $edit->monadic->rule = 'max_length[17]|numeric|positive';
     $edit->monadic->css_class = 'inputnum';
     $edit->monadic->size = 19;
     $edit->monadic->maxlength = 17;
     $edit->monadic->rule = 'condi_required';
     //fin de las bases de los impuestos
     $edit->tasa = new inputField('general', 'tasa');
     $edit->tasa->rule = 'max_length[17]|numeric';
     $edit->tasa->css_class = 'inputnum';
     $edit->tasa->size = 12;
     $edit->tasa->maxlength = 17;
     $edit->tasa->rule = 'condi_required|callback_chmontasa[G]';
     $edit->reducida = new inputField('reducida', 'reducida');
     $edit->reducida->rule = 'max_length[17]|numeric|positive';
     $edit->reducida->css_class = 'inputnum';
     $edit->reducida->size = 12;
     $edit->reducida->maxlength = 17;
     $edit->reducida->rule = 'condi_required|callback_chmontasa[R]';
     $edit->sobretasa = new inputField('adicional', 'sobretasa');
     $edit->sobretasa->rule = 'max_length[17]|numeric|positive';
     $edit->sobretasa->css_class = 'inputnum';
     $edit->sobretasa->size = 12;
     $edit->sobretasa->maxlength = 17;
     $edit->sobretasa->rule = 'condi_required|callback_chmontasa[A]|positive';
     $edit->exento = new inputField('Exento', 'exento');
     $edit->exento->rule = 'max_length[17]|numeric';
     $edit->exento->css_class = 'inputnum';
     $edit->exento->size = 19;
     $edit->exento->maxlength = 17;
     $edit->exento->rule = 'condi_required|positive';
     $edit->reteiva = new inputField('Ret. IVA', 'reteiva');
     $edit->reteiva->rule = 'max_length[17]|numeric';
     $edit->reteiva->css_class = 'inputnum';
     $edit->reteiva->size = 19;
     $edit->reteiva->maxlength = 17;
     $edit->reteiva->insertValue = '0';
     $edit->reteiva->rule = 'condi_required|callback_chobligatipo[NC]|positive';
     $edit->monto = new inputField('Total', 'monto');
     $edit->monto->rule = 'required|max_length[17]|numeric';
     $edit->monto->css_class = 'inputnum';
     $edit->monto->size = 19;
     $edit->monto->maxlength = 17;
     $edit->monto->type = 'inputhidden';
     //Campos comodines
     $edit->sprvreteiva = new hiddenField('', 'sprvreteiva');
     $edit->aplrete = new hiddenField('', 'aplrete');
     //Fin de los campos comodines
     $edit->tipo_doc = new autoUpdateField('tipo_doc', 'NC', 'NC');
     $edit->usuario = new autoUpdateField('usuario', $this->secu->usuario(), $this->secu->usuario());
     $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
     $edit->hora = new autoUpdateField('hora', date('H:i:s'), date('H:i:s'));
     $arr_ptasa = array();
     $edit->apltasa = new dropdownField('', 'apltasa');
     $mSQL = 'SELECT fecha,tasa,redutasa,sobretasa FROM civa ORDER BY fecha DESC LIMIT 3';
     $query = $this->db->query($mSQL);
     foreach ($query->result() as $row) {
         $arr_ptasa[] = array(floatval($row->tasa), floatval($row->redutasa), floatval($row->sobretasa));
         $edit->apltasa->option($row->fecha, dbdate_to_human($row->fecha));
     }
     $edit->apltasa->onchange = 'chapltasa()';
     $edit->apltasa->style = 'width:100px;';
     $edit->apltasa->rule = 'required';
     $edit->build();
     if ($edit->on_success()) {
         $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
         echo json_encode($rt);
     }
     if ($edit->on_error()) {
         $rt = array('status' => 'B', 'mensaje' => preg_replace('/<[^>]*>/', '', $edit->error_string), 'pk' => null);
         echo json_encode($rt);
         $act = false;
         return true;
     }
     if ($edit->on_show()) {
         $conten['json_ptasa'] = json_encode($arr_ptasa);
         $conten['form'] =& $edit;
         $conten['title'] = heading('Nota de cr&eacute;dito a factura pagada a proveedor');
         $this->load->view('view_ncppro', $conten);
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:sprm.php

示例3: dataedit


//.........这里部分代码省略.........
     $edit->codbanc = new dropdownField('Banco', 'codbanc');
     $edit->codbanc->style = 'width:480px';
     $edit->codbanc->mode = 'autohide';
     $edit->codbanc->rule = 'required';
     $edit->codbanc->option('', 'Seleccionar');
     $edit->codbanc->options("SELECT TRIM(codbanc) AS codbanc,CONCAT_WS(' ',codbanc,banco,numcuent) AS desca FROM banc WHERE tbanco<>'CAJ'");
     $edit->saldoi = new inputField('Saldo Inicial', 'saldoi');
     $edit->saldoi->rule = 'numeric|required';
     $edit->saldoi->insertValue = '0.0';
     $edit->saldoi->css_class = 'inputnum';
     $edit->saldoi->onkeyup = 'totalizar()';
     $edit->saldoi->size = 15;
     $edit->saldoi->maxlength = 18;
     $edit->saldof = new inputField('Saldo Final', 'saldof');
     $edit->saldof->insertValue = '0.0';
     $edit->saldof->rule = 'numeric|required';
     $edit->saldof->css_class = 'inputnum';
     $edit->saldof->onkeyup = 'totalizar()';
     $edit->saldof->size = 15;
     $edit->saldof->maxlength = 18;
     $edit->deposito = new inputField('Dep&oacute;sitos', 'deposito');
     $edit->deposito->rule = 'numeric';
     $edit->deposito->type = 'inputhidden';
     $edit->deposito->insertValue = '0.0';
     $edit->deposito->css_class = 'inputnum';
     $edit->deposito->size = 20;
     $edit->deposito->maxlength = 18;
     $edit->credito = new inputField('Notas de Cr&eacute;dito', 'credito');
     $edit->credito->rule = 'numeric';
     $edit->credito->type = 'inputhidden';
     $edit->credito->insertValue = '0.0';
     $edit->credito->css_class = 'inputnum';
     $edit->credito->size = 20;
     $edit->credito->maxlength = 18;
     $edit->cheque = new inputField('Cheques', 'cheque');
     $edit->cheque->rule = 'numeric';
     $edit->cheque->type = 'inputhidden';
     $edit->cheque->insertValue = '0.0';
     $edit->cheque->css_class = 'inputnum';
     $edit->cheque->size = 20;
     $edit->cheque->maxlength = 18;
     $edit->debito = new inputField('Notas de D&eacute;bito', 'debito');
     $edit->debito->rule = 'numeric';
     $edit->debito->type = 'inputhidden';
     $edit->debito->insertValue = '0.0';
     $edit->debito->css_class = 'inputnum';
     $edit->debito->size = 20;
     $edit->debito->maxlength = 18;
     $edit->cdeposito = new inputField('Dep&oacute;sitos', 'cdeposito');
     $edit->cdeposito->rule = 'numeric';
     $edit->cdeposito->insertValue = '0.0';
     $edit->cdeposito->css_class = 'inputnum';
     $edit->cdeposito->onkeyup = 'totalizar()';
     $edit->cdeposito->size = 12;
     $edit->cdeposito->maxlength = 18;
     $edit->ccredito = new inputField('Notas de Cr&eacute;dito', 'ccredito');
     $edit->ccredito->rule = 'numeric';
     $edit->ccredito->insertValue = '0.0';
     $edit->ccredito->css_class = 'inputnum';
     $edit->ccredito->onkeyup = 'totalizar()';
     $edit->ccredito->size = 12;
     $edit->ccredito->maxlength = 18;
     $edit->ccheque = new inputField('Cheques', 'ccheque');
     $edit->ccheque->rule = 'numeric';
     $edit->ccheque->insertValue = '0.0';
     $edit->ccheque->css_class = 'inputnum';
     $edit->ccheque->onkeyup = 'totalizar()';
     $edit->ccheque->size = 12;
     $edit->ccheque->maxlength = 18;
     $edit->cdebito = new inputField('Notas de D&eacute;bito', 'cdebito');
     $edit->cdebito->rule = 'numeric';
     $edit->cdebito->insertValue = '0.0';
     $edit->cdebito->css_class = 'inputnum';
     $edit->cdebito->onkeyup = 'totalizar()';
     $edit->cdebito->size = 12;
     $edit->cdebito->maxlength = 18;
     //$edit->status = new inputField('Estatus','status');
     //$edit->status->rule='';
     //$edit->status->size =3;
     //$edit->status->maxlength =1;
     $edit->usuario = new autoUpdateField('usuario', $this->secu->usuario(), $this->secu->usuario());
     $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
     $edit->hora = new autoUpdateField('hora', date('H:i:s'), date('H:i:s'));
     $edit->build();
     if ($edit->on_success()) {
         $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
         echo json_encode($rt);
         return true;
     }
     if ($edit->on_error()) {
         $rt = array('status' => 'B', 'mensaje' => preg_replace('/<[^>]*>/', '', $edit->error_string), 'pk' => null);
         echo json_encode($rt);
         $act = false;
         return true;
     }
     if ($edit->on_show()) {
         $conten['form'] =& $edit;
         $this->load->view('view_bconci', $conten);
     }
 }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:bconci.php

示例4: reporte

    function reporte()
    {
        header('Content-Type: text/html; charset=' . $this->config->item('charset'));
        $this->rapyd->load('dataedit');
        $this->rapyd->uri->keep_persistence();
        $atts = array('width' => '800', 'height' => '600', 'scrollbars' => 'yes', 'status' => 'yes', 'resizable' => 'yes', 'screenx' => '0', 'screeny' => '0');
        $edit = new DataEdit('', 'reportes');
        $id = $edit->_dataobject->pk['nombre'];
        $uri2 = anchor_popup('reportes/ver/' . $id, 'Probar reporte', $atts);
        $uri3 = anchor_popup('supervisor/mantenimiento/centinelas', 'Centinela', $atts);
        $edit->title(' ');
        $script = '
		$("#df1").submit(function(){
			$("#proteo").val(editor.getValue());

			$.post("' . site_url('supervisor/repomenu/gajax_proteo/update/' . $id) . '", {nombre: "' . $id . '", proteo: $("#proteo").val()},
				function(data){
					//alert("Reporte guardado" + data);
				}
			);
			return false;
		});

		function guarda() {
			$("#proteo").val(editor.getValue());
			$.post("' . site_url('supervisor/repomenu/gajax_proteo/update/' . $id) . '", {nombre: "' . $id . '", proteo: $("#proteo").val()},
				function(data){
					//alert("Reporte guardado" + data);
				}
			);
			return false;
		};

		function fcargar(){
			$.post("' . site_url('supervisor/repomenu/cargar/') . '", { nombre:"' . $id . '"},
			function(data){
				if (data){ $("#proteo").val(editor.setValue(data)); } else { alert("Archivo vacio");}
			});
			return false;
		};

		function fguardar(){
			$("#proteo").val(editor.getValue());
			$.post("' . site_url('supervisor/repomenu/guardar/') . '", {nombre: "' . $id . '", proteo: $("#proteo").val()},
			function(data){
				alert(data);
			});
			return false;
		};';
        $edit->script($script, 'modify');
        $edit->back_save = true;
        $edit->back_cancel = true;
        $edit->back_cancel_save = true;
        $edit->back_url = site_url('supervisor/repomenu/filteredgrid');
        $edit->proteo = new textareaField('', 'proteo');
        $edit->proteo->rows = 30;
        $edit->proteo->cols = 130;
        $edit->proteo->css_class = 'text-indent:100px;width:90%;11';
        //$edit->buttons('modify', 'save', 'undo', 'delete', 'back');
        //$accion=$this->datasis->jwinopen(site_url('reportes/ver/'.$id."'"));
        //$edit->button_status('btn_probar','Probar Reporte',$accion,'TL','modify');
        //$accion=$this->datasis->jwinopen(site_url('supervisor/mantenimiento/centinelas'));
        //$edit->button_status('btn_centinela','Centinelas',$accion,'TL','modify');
        //$edit->button_status('btn_guardar'  ,'Guardar a Archivo'   ,'fguardar()','TL','modify');
        //$edit->button_status('btn_cargar'   ,'Cargar desde Archivo','fcargar()' ,'TL','modify');
        $edit->build();
        $rt = array('status' => '', 'msj' => '', 'pk' => '');
        if ($edit->on_success()) {
            $rt['status'] = 'A';
            $rt['msj'] = 'Guardado';
            echo json_encode($rt);
        }
        if ($edit->on_error()) {
            $rt['status'] = 'B';
            $rt['msj'] = $edit->error_string;
            echo json_encode($rt);
        }
        //$this->rapyd->jquery[]='$("#proteo").tabby();';
        //$this->rapyd->jquery[]='$("#proteo").linedtextarea();';
        if ($edit->on_show()) {
            $data['back_url'] = $edit->back_url;
            $data['content'] = $edit->output;
            $data['title'] = $id;
            $data['head'] = $this->rapyd->get_head();
            $this->load->view('editorep', $data);
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:87,代码来源:repomenu.php


注:本文中的DataEdit::on_show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。