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


PHP DataEdit::on_success方法代码示例

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


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

示例1: dataedit


//.........这里部分代码省略.........
				window.open("' . site_url('ventas/mvcerti/traepdf/') . '/"+encodeURIComponent(mnumero),"CONSULTA MV","height=350,width=410");
			}
			return false;
		}

		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
			$(".inputnum").numeric(".");

			$("#cliente").autocomplete({
				delay: 600,
				autoFocus: true,
				source: function(req, add){
					$.ajax({
						url:  "' . site_url('ajax/buscascli') . '",
						type: "POST",
						dataType: "json",
						data: {"q":req.term},
						success:
							function(data){
								var sugiere = [];
								if(data.length==0){
									$("#sclinombre").val("");
									$("#sclinombre_val").text("");
									$("#sclirifci").val("");
									$("#sclirifci_val").text("");
								}else{
									$.each(data,
										function(i, val){
											sugiere.push( val );
										}
									);
								}
								add(sugiere);
							},
					})
				},
				minLength: 2,
				select: function( event, ui ) {
					$("#cliente").attr("readonly", "readonly");
					$("#sclinombre").val(ui.item.nombre);
					$("#sclinombre_val").text(ui.item.nombre);
					$("#sclirifci").val(ui.item.rifci);
					$("#sclirifci_val").text(ui.item.rifci);
					setTimeout(function() {  $("#cliente").removeAttr("readonly"); }, 1500);
				}
			});
		});';
        $do = new DataObject('mvcerti');
        $do->pointer('scli', 'mvcerti.cliente =scli.cliente', '`scli`.`nombre`  AS sclinombre, `scli`.`rifci`  AS sclirifci', 'left');
        $edit = new DataEdit('', $do);
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->numero = new inputField('Número', 'numero');
        $edit->numero->rule = 'required|strtoupper|trim|unique';
        $edit->numero->mode = 'autohide';
        $edit->numero->size = 34;
        $edit->numero->maxlength = 32;
        $edit->numero->append('<a href="#" onclick="consulmv();">Consultar</a>');
        $edit->status = new dropdownField('Estatus', 'status');
        $edit->status->option('A', 'Activo');
        $edit->status->option('C', 'Cerrado');
        $edit->status->style = 'width:120px;';
        $edit->status->rule = 'required|enum[A,C]';
        $edit->cliente = new inputField('Cliente', 'cliente');
        $edit->cliente->rule = 'required|existescli';
        $edit->cliente->size = 7;
        $edit->nombre = new inputField('Nombre', 'sclinombre');
        $edit->nombre->type = 'inputhidden';
        $edit->nombre->pointer = true;
        $edit->nombre->in = 'cliente';
        $edit->rifci = new inputField('RIF/CI', 'sclirifci');
        $edit->rifci->type = 'inputhidden';
        $edit->rifci->pointer = true;
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->fecha->calendar = false;
        $edit->obra = new textareaField('Obra', 'obra');
        $edit->obra->cols = 40;
        $edit->obra->rows = 2;
        $edit->obra->rule = 'required';
        //$edit->obra->maxlength =200;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:mvcerti.php

示例2: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});
		';
        $edit = new DataEdit('', 'estado');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = ' 
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});		';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->codigo = new inputField('Codigo', 'codigo');
        $edit->codigo->rule = 'integer';
        $edit->codigo->css_class = 'inputonlynum';
        $edit->codigo->size = 6;
        $edit->codigo->maxlength = 10;
        $edit->codigo->mode = 'autohide';
        $edit->entidad = new inputField('Entidad', 'entidad');
        $edit->entidad->rule = '';
        $edit->entidad->size = 30;
        $edit->entidad->maxlength = 80;
        $edit->capital = new inputField('Capital', 'capital');
        $edit->capital->rule = '';
        $edit->capital->size = 30;
        $edit->capital->maxlength = 80;
        $edit->superficie = new inputField('Superficie', 'superficie');
        $edit->superficie->rule = 'numeric';
        $edit->superficie->css_class = 'inputnum';
        $edit->superficie->size = 12;
        $edit->superficie->maxlength = 10;
        $edit->poblacion = new inputField('Poblacion', 'poblacion');
        $edit->poblacion->rule = 'integer';
        $edit->poblacion->css_class = 'inputonlynum';
        $edit->poblacion->size = 13;
        $edit->poblacion->maxlength = 11;
        $edit->municipios = new inputField('Municipios', 'municipios');
        $edit->municipios->rule = 'integer';
        $edit->municipios->css_class = 'inputonlynum';
        $edit->municipios->size = 13;
        $edit->municipios->maxlength = 11;
        $edit->parroquias = new inputField('Parroquias', 'parroquias');
        $edit->parroquias->rule = 'integer';
        $edit->parroquias->css_class = 'inputonlynum';
        $edit->parroquias->size = 13;
        $edit->parroquias->maxlength = 11;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:69,代码来源:estado.php

示例3: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});
		';
        $edit = new DataEdit($this->tits, 'pactivo');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});		';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->nombre = new inputField('Nombre', 'nombre');
        $edit->nombre->rule = '';
        $edit->nombre->size = 252;
        $edit->nombre->maxlength = 250;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:39,代码来源:pactivo.php

示例4: dataedit


//.........这里部分代码省略.........
        $edit->tipo_doc->style = 'width:140px;';
        $edit->tipo_doc->size = 5;
        $edit->tipo_doc->rule = 'required';
        $edit->referencia = new inputField('Referencia', 'referencia');
        $edit->referencia->rule = '';
        $edit->referencia->size = 12;
        $edit->referencia->maxlength = 10;
        $edit->caja = new inputField('Caja', 'caja');
        $edit->caja->rule = '';
        $edit->caja->size = 7;
        $edit->caja->maxlength = 5;
        $edit->serial = new inputField('Serial', 'serial');
        $edit->serial->rule = '';
        $edit->serial->size = 17;
        $edit->serial->maxlength = 15;
        $edit->rifci = new inputField('RIF/CI', 'rifci');
        $edit->rifci->rule = '';
        $edit->rifci->size = 17;
        $edit->rifci->maxlength = 15;
        $edit->cajero = new inputField('Cajero', 'cajero');
        $edit->cajero->rule = '';
        $edit->cajero->size = 17;
        $edit->cajero->maxlength = 15;
        $edit->numero = new inputField('N&uacute;mero', 'numero');
        $edit->numero->rule = '';
        $edit->numero->size = 12;
        $edit->numero->maxlength = 10;
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->fecha->calendar = false;
        $edit->hora = new dateonlyField('Hora', 'hora');
        $edit->hora->rule = 'chora';
        $edit->hora->size = 10;
        $edit->hora->maxlength = 8;
        $edit->baseg = new inputField('Base G.', 'baseg');
        $edit->baseg->rule = 'numeric';
        $edit->baseg->css_class = 'inputnum';
        $edit->baseg->size = 12;
        $edit->baseg->maxlength = 10;
        $edit->ivag = new inputField('Iva G.', 'ivag');
        $edit->ivag->rule = 'numeric';
        $edit->ivag->css_class = 'inputnum';
        $edit->ivag->size = 12;
        $edit->ivag->maxlength = 10;
        $edit->alicuotag = new inputField('Alicuota G.', 'alicuotag');
        $edit->alicuotag->rule = 'numeric';
        $edit->alicuotag->css_class = 'inputnum';
        $edit->alicuotag->size = 7;
        $edit->alicuotag->maxlength = 5;
        $edit->baser = new inputField('Base R.', 'baser');
        $edit->baser->rule = 'numeric';
        $edit->baser->css_class = 'inputnum';
        $edit->baser->size = 12;
        $edit->baser->maxlength = 10;
        $edit->ivar = new inputField('Iva R.', 'ivar');
        $edit->ivar->rule = 'numeric';
        $edit->ivar->css_class = 'inputnum';
        $edit->ivar->size = 12;
        $edit->ivar->maxlength = 10;
        $edit->alicuotar = new inputField('Alicuota R.', 'alicuotar');
        $edit->alicuotar->rule = 'numeric';
        $edit->alicuotar->css_class = 'inputnum';
        $edit->alicuotar->size = 7;
        $edit->alicuotar->maxlength = 5;
        $edit->basea = new inputField('Base A.', 'basea');
        $edit->basea->rule = 'numeric';
        $edit->basea->css_class = 'inputnum';
        $edit->basea->size = 12;
        $edit->basea->maxlength = 10;
        $edit->ivaa = new inputField('Iva A.', 'ivaa');
        $edit->ivaa->rule = 'numeric';
        $edit->ivaa->css_class = 'inputnum';
        $edit->ivaa->size = 12;
        $edit->ivaa->maxlength = 10;
        $edit->alicuotaa = new inputField('Alicuota A.', 'alicuotaa');
        $edit->alicuotaa->rule = 'numeric';
        $edit->alicuotaa->css_class = 'inputnum';
        $edit->alicuotaa->size = 7;
        $edit->alicuotaa->maxlength = 5;
        $edit->exento = new inputField('Exento', 'exento');
        $edit->exento->rule = 'numeric';
        $edit->exento->css_class = 'inputnum';
        $edit->exento->size = 12;
        $edit->exento->maxlength = 10;
        $edit->total = new inputField('Total', 'total');
        $edit->total->rule = 'numeric';
        $edit->total->css_class = 'inputnum';
        $edit->total->size = 12;
        $edit->total->maxlength = 10;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:sfacfis.php

示例5: decliente


//.........这里部分代码省略.........
        $edit->codbanc->style = 'width:180px;';
        $edit->codbanc->size = 2;
        $edit->codbanc->rule = 'required';
        $edit->tipo_op = new dropdownField('Tipo', 'tipo_op');
        $edit->tipo_op->option('', 'Seleccionar');
        $edit->tipo_op->options(array('NC' => 'Transferencia', 'DE' => 'Deposito'));
        $edit->tipo_op->style = 'width:97px';
        $edit->tipo_op->rule = 'required';
        $edit->fechadep = new DateonlyField('Fecha', 'fechadep', 'd/m/Y');
        $edit->fechadep->insertValue = date('Y-m-d');
        $edit->fechadep->updateValue = date('Y-m-d');
        $edit->fechadep->rule = 'required';
        $edit->fechadep->size = 10;
        $edit->fechadep->calendar = false;
        $edit->num_ref = new inputField('Nro de referencia', 'num_ref');
        $edit->num_ref->rule = 'required';
        $edit->num_ref->size = 15;
        $edit->num_ref->maxlength = 20;
        $edit->agencia = new inputField('Agencia Zoom', 'agencia');
        $edit->agencia->size = 20;
        $edit->agencia->maxlength = 50;
        $edit->totalg = new inputField('Monto', 'totalg');
        $edit->totalg->rule = 'numeric';
        $edit->totalg->css_class = 'inputnum';
        $edit->totalg->size = 10;
        $edit->totalg->maxlength = 12;
        $edit->totalg->readonly = true;
        $edit->observa = new textareaField('Observacion', 'observa');
        $edit->observa->rule = '';
        $edit->observa->cols = 50;
        $edit->observa->rows = 3;
        $edit->buttons('modify', 'save', 'undo', 'delete', 'back');
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            //echo json_encode($rt);
            $contenido = '
<h1>Felicitaciones !!!</h1>

<p>Su información ha sido recibida satisfactoriamente. 
Una vez confirmado su pago procederemos a hacer el despacho de su artículo. 
En un lapso de 24 Horas le haremos llegar a su correo el número de guia Zoom 
correspondiente.</p>

<h1>Gracias por su Compra!!!</h1>

			<button onclick="volver()">Volver</button>
			<script>
			function volver(){
				window.location.href = "' . site_url('ventas/spreml/decliente/create') . '";
			}
			</script>
			';
            $data['content'] = $contenido;
            $data["head"] = script("jquery-min.js");
            $data["head"] .= $this->rapyd->get_head();
            $data["head"] .= style("rapyd.css");
            $data["head"] .= style("themes/proteo/proteo.css");
            $data["head"] .= style("themes/darkness/darkness.css");
            $data["head"] .= style("themes/anexos1/anexos1.css");
            $data["target"] = 'dialogo';
            $data['title'] = heading('Registro de Pago');
            $this->load->view('view_ventanas', $data);
        } else {
            //echo $edit->output;
            $estilo = '
开发者ID:codethics,项目名称:proteoerp,代码行数:67,代码来源:spreml.php

示例6: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $edit = new DataEdit('', 'lprecio');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = ' 
		$(function() {
			$("#fecha"    ).datepicker({dateFormat:"dd/mm/yy"});
		});';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->fecha = new dateField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->fecha->calendar = false;
        $edit->tarifa1 = new inputField('Leche de Vaca Fria', 'tarifa1');
        $edit->tarifa1->rule = 'numeric';
        $edit->tarifa1->css_class = 'inputnum';
        $edit->tarifa1->size = 12;
        $edit->tarifa1->maxlength = 10;
        $edit->tarifa2 = new inputField('Leche de Vaca Caliente', 'tarifa2');
        $edit->tarifa2->rule = 'numeric';
        $edit->tarifa2->css_class = 'inputnum';
        $edit->tarifa2->size = 12;
        $edit->tarifa2->maxlength = 10;
        $edit->tarifa3 = new inputField('Leche de Bufala Fria', 'tarifa3');
        $edit->tarifa3->rule = 'numeric';
        $edit->tarifa3->css_class = 'inputnum';
        $edit->tarifa3->size = 12;
        $edit->tarifa3->maxlength = 10;
        $edit->tarifa4 = new inputField('Leche de Bufala Caliente', 'tarifa4');
        $edit->tarifa4->rule = 'numeric';
        $edit->tarifa4->css_class = 'inputnum';
        $edit->tarifa4->size = 12;
        $edit->tarifa4->maxlength = 10;
        $edit->tarifa5 = new inputField('Machiques Fria', 'tarifa5');
        $edit->tarifa5->rule = 'numeric';
        $edit->tarifa5->css_class = 'inputnum';
        $edit->tarifa5->size = 12;
        $edit->tarifa5->maxlength = 10;
        $edit->tarifa6 = new inputField('Machiques Caliente', 'tarifa6');
        $edit->tarifa6->rule = 'numeric';
        $edit->tarifa6->css_class = 'inputnum';
        $edit->tarifa6->size = 12;
        $edit->tarifa6->maxlength = 10;
        $edit->enfria = new inputField('Enfriamiento', 'enfria');
        $edit->enfria->rule = 'numeric';
        $edit->enfria->css_class = 'inputnum';
        $edit->enfria->size = 12;
        $edit->enfria->maxlength = 10;
        $edit->bacteria = new inputField('Calidad Bacteriologica', 'bacteria');
        $edit->bacteria->rule = 'numeric';
        $edit->bacteria->css_class = 'inputnum';
        $edit->bacteria->size = 12;
        $edit->bacteria->maxlength = 10;
        $edit->grasa = new inputField('Porcentaje de Grasa', 'grasa');
        $edit->grasa->rule = 'numeric';
        $edit->grasa->css_class = 'inputnum';
        $edit->grasa->size = 12;
        $edit->grasa->maxlength = 10;
        $edit->build();
        $script = '';
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:77,代码来源:lprecio.php

示例7: dataedit


//.........这里部分代码省略.........
		}
		';
        $script .= '
		$("#cantidad").change(function () {
			totaliza();
		})

		$("#precio").change(function () {
			totaliza();
		})

		';
        $edit = new DataEdit('', 'sclicont');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->numero = new inputField('Numero', 'numero');
        $edit->numero->rule = '';
        $edit->numero->size = 10;
        $edit->numero->maxlength = 8;
        $edit->status = new dropdownField('Estatus', 'status');
        $edit->status->options(array('A' => 'Activo', 'S' => 'Suspendido', 'T' => 'Terminado'));
        $edit->status->style = 'width:80px';
        $edit->status->rule = 'required';
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->calendar = false;
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->fecha->insertValue = date('Y-m-d');
        $edit->inicio = new dateonlyField('Inicio', 'inicio');
        $edit->inicio->rule = 'chfecha';
        $edit->inicio->calendar = false;
        $edit->inicio->size = 10;
        $edit->inicio->maxlength = 8;
        $edit->final = new dateonlyField('Final', 'final');
        $edit->final->rule = 'chfecha';
        $edit->final->calendar = false;
        $edit->final->size = 10;
        $edit->final->maxlength = 8;
        $edit->cliente = new inputField('Cliente', 'cliente');
        $edit->cliente->rule = '';
        $edit->cliente->size = 7;
        $edit->cliente->maxlength = 5;
        $edit->codigo = new inputField('Codigo', 'codigo');
        $edit->codigo->rule = '';
        $edit->codigo->size = 14;
        $edit->codigo->maxlength = 15;
        $edit->descrip = new textareaField('Descripcion', 'descrip');
        $edit->descrip->rule = '';
        $edit->descrip->cols = 35;
        $edit->descrip->rows = 2;
        $edit->cantidad = new inputField('Cantidad', 'cantidad');
        $edit->cantidad->rule = 'numeric';
        $edit->cantidad->css_class = 'inputnum';
        $edit->cantidad->size = 8;
        $edit->cantidad->maxlength = 17;
        $edit->base = new inputField('Base', 'base');
        $edit->base->rule = 'numeric';
        $edit->base->css_class = 'inputnum';
        $edit->base->size = 16;
        $edit->base->maxlength = 17;
        $edit->base->readonly = true;
        $edit->iva = new inputField('IVA', 'iva');
        $edit->iva->rule = 'numeric';
        $edit->iva->css_class = 'inputnum';
        $edit->iva->size = 16;
        $edit->iva->maxlength = 17;
        $edit->iva->readonly = true;
        $edit->precio = new inputField('Precio', 'precio');
        $edit->precio->rule = 'numeric';
        $edit->precio->css_class = 'inputnum';
        $edit->precio->size = 16;
        $edit->precio->maxlength = 17;
        $edit->importe = new inputField('Importe', 'importe');
        $edit->importe->rule = 'numeric';
        $edit->importe->readonly = true;
        $edit->importe->css_class = 'inputnum';
        $edit->importe->size = 16;
        $edit->importe->maxlength = 17;
        $edit->observa = new textareaField('Observaciones', 'observa');
        $edit->observa->rule = '';
        $edit->observa->cols = 68;
        $edit->observa->rows = 2;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            $conten['form'] =& $edit;
            $data['content'] = $this->load->view('view_sclicont', $conten, false);
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:sclicont.php

示例8: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});
		';
        $edit = new DataEdit($this->tits, 'tbofici');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = ' 
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});		';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->codofi = new inputField('Codigo', 'codofi');
        $edit->codofi->rule = '';
        $edit->codofi->size = 7;
        $edit->codofi->maxlength = 5;
        $edit->codofi->mode = "autohide";
        $edit->desofi = new inputField('Descripción', 'desofi');
        $edit->desofi->rule = '';
        $edit->desofi->size = 50;
        $edit->desofi->maxlength = 100;
        $edit->dirofi = new inputField('Dirección', 'dirofi');
        $edit->dirofi->rule = '';
        $edit->dirofi->size = 50;
        $edit->dirofi->maxlength = 100;
        $edit->telofi = new textareaField('Tel Oficina', 'telofi');
        $edit->telofi->rule = 'trim';
        $edit->telofi->cols = 47;
        $edit->telofi->rows = 2;
        $edit->telofi->maxlength = 50;
        $edit->gereofi = new inputField('Gerente', 'gereofi');
        $edit->gereofi->rule = '';
        $edit->gereofi->size = 50;
        $edit->gereofi->maxlength = 50;
        $edit->telegofi = new inputField('Tel Gerente', 'telegofi');
        $edit->telegofi->rule = '';
        $edit->telegofi->size = 50;
        $edit->telegofi->maxlength = 50;
        $edit->estado = new inputField('Estado', 'estado');
        $edit->estado->rule = '';
        $edit->estado->size = 50;
        $edit->estado->maxlength = 50;
        $edit->zona = new dropdownField('Zona', 'zona');
        $edit->zona->rule = 'required';
        $edit->zona->options('select codigo, CONCAT(codigo, " ", nombre) nombre FROM zona ORDER BY codigo');
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:68,代码来源:tbofici.php

示例9: dataedit


//.........这里部分代码省略.........
        $edit->tipo->option('G', 'Gasto');
        $edit->tipo->option('I', 'Inventario');
        $edit->tipo->option('S', 'Suministro');
        $edit->tipo->option('A', 'Activo Fijo');
        $edit->grupo = new dropdownField('Grupo', 'grupo');
        $edit->grupo->options('SELECT grupo, CONCAT(grupo," - ",nom_grup) nom_grup from grga order by nom_grup');
        $edit->grupo->style = "width:200px;";
        $lcuent = anchor_popup("/contabilidad/cpla/dataedit/create", image('list_plus.png', 'Agregar', array("border" => "0")), $atts);
        $edit->cuenta = new inputField("Cta. Contable", "cuenta");
        $edit->cuenta->size = 12;
        $edit->cuenta->maxlength = 15;
        $edit->cuenta->rule = 'trim|existecpla';
        $edit->cuenta->append($bcpla);
        //$edit->cuenta->append($lcuent);
        //$edit->cuenta->readonly=true;
        $lcuent = anchor_popup("/contabilidad/cpla/dataedit/create", image('list_plus.png', 'Agregar', array("border" => "0")), $atts);
        $edit->ctarein = new inputField("Cta. Reintegro", "ctarein");
        $edit->ctarein->size = 12;
        $edit->ctarein->maxlength = 15;
        $edit->ctarein->rule = 'trim|existecpla';
        $edit->ctarein->append($bcpla);
        //$edit->ctarein->append($lcuent);
        $edit->ctarein->readonly = true;
        /*
        		$edit->iva = new inputField("IVA", "iva");
        		$edit->iva->css_class='inputnum';
        		$edit->iva->size =9;
        		$edit->iva->maxlength =5;
        		$edit->iva->rule ="trim";
        */
        $ivas = $this->datasis->ivaplica();
        $edit->iva = new dropdownField('IVA %', 'iva');
        foreach ($ivas as $tasa => $ivamonto) {
            $edit->iva->option($ivamonto, nformat($ivamonto));
        }
        $edit->iva->style = 'width:100px;';
        $edit->iva->insertValue = $ivas['tasa'];
        //$edit->iva->onchange='calculos(\'S\');';
        //$edit->medida    = new inputField("Unidad Medida", "medida");
        //$edit->medida->size = 5;
        $AddUnidad = '<a href="javascript:add_unidad();" title="Haz clic para Agregar una unidad nueva">' . image('list_plus.png', 'Agregar', array("border" => "0")) . '</a>';
        $edit->medida = new dropdownField('Medida', 'medida');
        $edit->medida->style = 'width:100px;';
        $edit->medida->option('', 'Seleccionar');
        $edit->medida->options('SELECT unidades, unidades AS valor FROM unidad ORDER BY unidades');
        $edit->medida->append($AddUnidad);
        $edit->fraxuni = new inputField('Cant. X Caja', 'fraxuni');
        $edit->fraxuni->css_class = 'inputnum';
        //no sirve
        $edit->fraxuni->group = 'Existencias';
        $edit->fraxuni->size = 5;
        $edit->ultimo = new inputField('Costo', 'ultimo');
        $edit->ultimo->css_class = 'inputnum';
        //no sirve
        $edit->ultimo->size = 9;
        $edit->promedio = new inputField('Promedio', 'promedio');
        $edit->promedio->css_class = 'inputnum';
        //no sirve
        $edit->promedio->size = 9;
        $edit->minimo = new inputField('M&iacute;nima', 'minimo');
        $edit->minimo->css_class = 'inputnum';
        //no sirve
        $edit->minimo->group = 'Existencias';
        $edit->minimo->size = 5;
        $edit->maximo = new inputField('M&aacute;xima', 'maximo');
        $edit->maximo->css_class = 'inputnum';
        //no sirve
        $edit->maximo->group = 'Existencias';
        $edit->maximo->size = 5;
        $edit->unidades = new inputField('Cajas', 'unidades');
        $edit->unidades->css_class = 'inputnum';
        //no sirve
        $edit->unidades->group = 'Existencias';
        $edit->unidades->size = 5;
        $edit->fraccion = new inputField('Fracci&oacute;nes', 'fraccion');
        $edit->fraccion->css_class = 'inputnum';
        //no sirve
        $edit->fraccion->group = 'Existencias';
        $edit->fraccion->size = 5;
        $edit->reten = new dropdownField('Natural.', 'reten');
        $edit->reten->option('', 'Ninguno');
        $edit->reten->options('SELECT codigo, CONCAT(codigo," - ",activida) val FROM rete WHERE tipo="NR" ORDER BY codigo');
        $edit->reten->style = 'width:220px;';
        $edit->retej = new dropdownField("Jur&iacute;dica.", "retej");
        $edit->retej->option('', 'Ninguno');
        $edit->retej->options('SELECT codigo, CONCAT(codigo," - ",activida) val FROM rete WHERE tipo="JD" ORDER BY codigo');
        $edit->retej->style = 'width:220px;';
        $codigo = $edit->_dataobject->get('codigo');
        $edit->almacenes = new containerField('almacenes', $this->_detalle($codigo));
        $edit->almacenes->when = array('show', 'modify');
        //$edit->buttons("modify", "save", "undo", "back");
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            $conten['form'] =& $edit;
            $this->load->view('view_mgas', $conten);
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:mgas.php

示例10: 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

示例11: dataedit


//.........这里部分代码省略.........
					dataType: "json",
					data: {rifci: rif},
					success: function(data){
						if(data.error==0){
							if($("#telefono").val()==""){ $("#telefono").val(data.telefono); }
							if($("#email").val()   ==""){ $("#email").val(data.email); }
							if($("#sector").val()  ==""){ $("#sector").val(data.sector); }
						}
					}
				});
			}
			return true;
		});
		';
        $script .= '
		$("#campana").change(function(){
			campana_change();
			campa = $(this).val();
		});
		function campana_change(){
			$.post(\'' . site_url('ajax/get_evento') . '\',{ campana:$("#campana").val() },function(data){$("#evento").html(data);})
		}
		';
        $script .= '
		$("#evento").change(function(){
			evento_change();
		});

		function evento_change(){
			$.post(\'' . site_url('ajax/get_asislista') . '\',{ campana:$("#campana").val(), evento:$("#evento").val() },function(data){$("#contenedor").html(data);})
		}
		';
        $idanterior = intval($this->uri->segment(5));
        $campana = '';
        $evento = '';
        if ($idanterior) {
            $ante = $this->datasis->damerow("SELECT campana, evento FROM proasiste WHERE id={$idanterior}");
            $campana = $ante['campana'];
            $evento = $ante['evento'];
        }
        $edit = new DataEdit('', 'proasiste');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->campana = new dropdownField('Campana', 'campana');
        $edit->campana->option('', 'Seleccione una Campa&acute;a');
        $edit->campana->options('SELECT id, campana FROM procamp ORDER BY campana');
        $edit->campana->style = 'width:250px;';
        $edit->campana->insertValue = $campana;
        $edit->evento = new dropdownField('Evento', 'evento');
        $edit->evento->style = 'width:250px;';
        $campa = $edit->getval('campana');
        if ($campana) {
            $campa = $campana;
        }
        if ($campa !== FALSE) {
            $dbcampa = $this->db->escape($campa);
            $edit->evento->options("SELECT id, nombre FROM proevent WHERE campana={$dbcampa} ORDER BY nombre");
        } else {
            $edit->evento->option('', 'Seleccione una Campa&acute;a primero');
        }
        $edit->evento->insertValue = $evento;
        $edit->cedula = new inputField('Cedula', 'cedula');
        $edit->cedula->rule = '';
        $edit->cedula->size = 15;
        $edit->cedula->maxlength = 15;
        $edit->nombre = new inputField('Nombre', 'nombre');
        $edit->nombre->rule = 'strtoupper';
        $edit->nombre->size = 52;
        $edit->nombre->maxlength = 100;
        $edit->telefono = new inputField('Telefono', 'telefono');
        $edit->telefono->rule = '';
        $edit->telefono->size = 32;
        $edit->telefono->maxlength = 30;
        $edit->email = new inputField('Email', 'email');
        $edit->email->rule = '';
        $edit->email->size = 52;
        $edit->email->maxlength = 100;
        $edit->sector = new inputField('Sector', 'sector');
        $edit->sector->rule = 'strtoupper';
        $edit->sector->size = 52;
        $edit->sector->maxlength = 100;
        $div = "<br><div style='overflow:auto;border: 1px solid #9AC8DA;background: #EAEAEA;height:200px' id='contenedor'></div>";
        $edit->contenedor = new containerField('contenedor', $div);
        $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
        $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:proasiste.php

示例12: dataedit


//.........这里部分代码省略.........
        $edit->nombre->size = 50;
        $edit->nombre->maxlength = 100;
        $edit->comenta = new textareaField('Descripcion', 'comenta');
        $edit->comenta->rule = '';
        $edit->comenta->cols = 48;
        $edit->comenta->rows = 3;
        $edit->cedula = new inputField('Cedula', 'cedula');
        $edit->cedula->rule = '';
        $edit->cedula->size = 15;
        $edit->cedula->maxlength = 15;
        $edit->persona = new inputField('Responsable', 'persona');
        $edit->persona->rule = '';
        $edit->persona->size = 50;
        $edit->persona->maxlength = 100;
        $edit->fecha = new dateonlyField('Fecha', 'fecha');
        $edit->fecha->rule = 'chfecha';
        $edit->fecha->calendar = false;
        $edit->fecha->size = 10;
        $edit->fecha->maxlength = 8;
        $edit->horai = new inputField('Inicio', 'horai');
        $edit->horai->rule = '';
        $edit->horai->size = 10;
        $edit->horai->maxlength = 8;
        $edit->horaf = new inputField('Final', 'horaf');
        $edit->horaf->rule = '';
        $edit->horaf->size = 10;
        $edit->horaf->maxlength = 8;
        /*
        		$edit->activador = new textareaField('Activador','activador');
        		$edit->activador->rule='';
        		$edit->activador->cols = 50;
        		$edit->activador->rows = 4;
        */
        $estado = $this->datasis->traevalor('ESTADO');
        if (empty($estado)) {
            $estado = 12;
        } else {
            $estado = $this->datasis->dameval('SELECT codigo FROM estado WHERE entidad="' . $estado . '"');
            if (empty($estado)) {
                $estado = 12;
            }
        }
        $edit->entidad = new dropdownField('Estado', 'entidad');
        $edit->entidad->rule = 'required';
        $edit->entidad->style = 'width:220px;';
        $edit->entidad->option('', 'Seleccione un Estado');
        $edit->entidad->options('SELECT codigo, entidad FROM estado ORDER BY entidad');
        $edit->entidad->insertValue = 12;
        $edit->municipio = new dropdownField('Municipio', 'municipio');
        $edit->municipio->style = 'width:220px;';
        $edo = $edit->getval('entidad');
        if ($edo !== FALSE) {
            $dbedo = $this->db->escape($edo);
            $edit->municipio->options("SELECT codigo, municipio FROM municipios WHERE entidad={$dbedo} ORDER BY municipio");
        } else {
            $edit->municipio->option('', 'Seleccione una Entidad primero');
        }
        $edit->parroquia = new dropdownField('Parroquia', 'parroquia');
        $edit->parroquia->style = 'width:220px;';
        $muni = $edit->getval('municipio');
        if ($muni !== FALSE) {
            $dbmuni = $this->db->escape($muni);
            $edit->parroquia->options("SELECT codigo, parroquia FROM parroquias WHERE entidad={$edo} AND municipio={$dbmuni} ORDER BY parroquia");
        } else {
            $edit->parroquia->option('', 'Seleccione un Municipio primero');
        }
        /*
        		$edit->entidad = new inputField('Entidad','entidad');
        		$edit->entidad->rule='integer';
        		$edit->entidad->insertValue = $estado;
        		$edit->entidad->css_class='inputonlynum';
        		$edit->entidad->size =13;
        		$edit->entidad->maxlength =11;
        
        		$edit->municipio = new inputField('Municipio','municipio');
        		$edit->municipio->rule='integer';
        		$edit->municipio->css_class='inputonlynum';
        		$edit->municipio->size =13;
        		$edit->municipio->maxlength =11;
        
        		$edit->parroquia = new inputField('Parroquia','parroquia');
        		$edit->parroquia->rule='integer';
        		$edit->parroquia->css_class='inputonlynum';
        		$edit->parroquia->size =13;
        		$edit->parroquia->maxlength =11;
        */
        $edit->sector = new inputField('Sector', 'sector');
        $edit->sector->rule = '';
        $edit->sector->size = 52;
        $edit->sector->maxlength = 100;
        $edit->usuario = new autoUpdateField('usuario', $this->session->userdata('usuario'), $this->session->userdata('usuario'));
        $edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:101,代码来源:proevent.php

示例13: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
			$(".inputnum").numeric(".");
		});
		';
        $edit = new DataEdit('', 'medicos');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $edit->cedula = new inputField('Cedula', 'cedula');
        $edit->cedula->rule = '';
        $edit->cedula->size = 15;
        $edit->cedula->maxlength = 13;
        $edit->nombre = new inputField('Nombre', 'nombre');
        $edit->nombre->rule = '';
        $edit->nombre->size = 50;
        $edit->nombre->maxlength = 100;
        $edit->colegio = new inputField('Colegio', 'colegio');
        $edit->colegio->rule = '';
        $edit->colegio->size = 15;
        $edit->colegio->maxlength = 13;
        $edit->sanidad = new inputField('Sanidad', 'sanidad');
        $edit->sanidad->rule = '';
        $edit->sanidad->size = 15;
        $edit->sanidad->maxlength = 13;
        $edit->especialidad = new inputField('Especialidad', 'especialidad');
        $edit->especialidad->rule = '';
        $edit->especialidad->size = 50;
        $edit->especialidad->maxlength = 100;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:48,代码来源:medicos.php

示例14: dataedit

    function dataedit($status = '', $id = '')
    {
        $this->rapyd->load('dataobject', 'dataedit');
        $qformato = $this->qformato = $this->datasis->formato_cpla();
        $link = site_url('inventario/line/ultimo');
        $link2 = site_url('inventario/common/sugerir_line');
        $script = '
		function ultimo(){ $.ajax({ url: "' . $link . '", success: function(msg){ alert( "El ultimo codigo ingresado fue: " + msg );}});}

		function sugerir(){
			$.ajax({
			url: "' . $link2 . '",
			success: function(msg){
				if(msg){
					$("#linea").val(msg);
				} else {
					alert("No es posible generar otra sugerencia. Coloque el c&oacute;digo manualmente");
				}
			}
			});
		}';
        $modbus = array('tabla' => 'cpla', 'columnas' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n'), 'filtro' => array('codigo' => 'C&oacute;digo', 'descrip' => 'Descripci&oacute;n'), 'retornar' => array('codigo' => '<#i#>'), 'titulo' => 'Buscar Cuenta', 'where' => "codigo LIKE \"{$qformato}\"", 'p_uri' => array(4 => '<#i#>'));
        $bcu_venta = $this->datasis->p_modbus($modbus, 'cu_venta');
        $bcu_inve = $this->datasis->p_modbus($modbus, 'cu_inve');
        $bcu_cost = $this->datasis->p_modbus($modbus, 'cu_cost');
        $bcu_devo = $this->datasis->p_modbus($modbus, 'cu_devo');
        $mdepto = array('tabla' => 'dept', 'columnas' => array('codigo' => 'C&oacute;odigo', 'departam' => 'Nombre'), 'filtro' => array('codigo' => 'C&oacute;digo', 'nombre' => 'Nombre'), 'retornar' => array('codigo' => 'depto'), 'titulo' => 'Buscar Departamento');
        $boton = $this->datasis->modbus($mdepto);
        $do = new DataObject('line');
        if ($status == 'create' && !empty($id)) {
            $do->load($id);
            $do->set('linea', '');
        }
        $edit = new DataEdit('', $do);
        $edit->on_save_redirect = false;
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->pre_process('delete', '_pre_delete');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->dpto = new dropdownField('Departamento', 'depto');
        $edit->dpto->option('', 'Seleccionar');
        $edit->dpto->options("SELECT depto, descrip FROM dpto WHERE tipo='I' ORDER BY depto");
        $edit->dpto->rule = 'required';
        $edit->dpto->style = 'width:250px;';
        $ultimo = '<a href="javascript:ultimo();" title="Consultar ultimo c&oacute;digo ingresado"> Consultar ultimo c&oacute;digo</a>';
        $sugerir = '<a href="javascript:sugerir();" title="Sugerir un C&oacute;digo aleatorio">Sugerir C&oacute;digo </a>';
        $edit->linea = new inputField('C&oacute;digo', 'linea');
        $edit->linea->mode = 'autohide';
        $edit->linea->size = 4;
        $edit->linea->rule = 'trim|strtoupper|required|callback_chexiste|alpha_numeric';
        $edit->linea->maxlength = 2;
        $edit->linea->append($sugerir);
        $edit->linea->append($ultimo);
        $edit->descrip = new inputField('Descripci&oacute;n', 'descrip');
        $edit->descrip->size = 35;
        $edit->descrip->rule = 'trim|strtoupper|required';
        $edit->descrip->maxlength = 30;
        $edit->cu_inve = new inputField('Cuenta Inventario', 'cu_inve');
        $edit->cu_inve->size = 18;
        $edit->cu_inve->maxlength = 15;
        $edit->cu_inve->rule = 'trim|existecpla';
        $edit->cu_inve->append($bcu_inve);
        $edit->cu_cost = new inputField('Cuenta Costo', 'cu_cost');
        $edit->cu_cost->size = 18;
        $edit->cu_cost->maxlength = 15;
        $edit->cu_cost->rule = 'trim|existecpla';
        $edit->cu_cost->append($bcu_cost);
        $edit->cu_venta = new inputField('Cuenta Venta', 'cu_venta');
        $edit->cu_venta->size = 18;
        $edit->cu_venta->maxlength = 15;
        $edit->cu_venta->rule = 'trim|existecpla';
        $edit->cu_venta->append($bcu_venta);
        $edit->cu_devo = new inputField('Cuenta Devoluci&oacute;n', 'cu_devo');
        $edit->cu_devo->size = 18;
        $edit->cu_devo->maxlength = 15;
        $edit->cu_devo->rule = 'trim|existecpla';
        $edit->cu_devo->append($bcu_devo);
        //$edit->buttons("modify", "save", "undo", "delete", "back");
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:88,代码来源:line.php

示例15: dataedit

    function dataedit()
    {
        $this->rapyd->load('dataedit');
        $script = '
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});
		';
        $edit = new DataEdit($this->tits, 'tbautobus');
        $edit->script($script, 'modify');
        $edit->script($script, 'create');
        $edit->on_save_redirect = false;
        $edit->back_url = site_url($this->url . 'filteredgrid');
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->post_process('insert', '_post_insert');
        $edit->post_process('update', '_post_update');
        $edit->post_process('delete', '_post_delete');
        $edit->pre_process('insert', '_pre_insert');
        $edit->pre_process('update', '_pre_update');
        $edit->pre_process('delete', '_pre_delete');
        $script = ' 
		$(function() {
			$("#fecha").datepicker({dateFormat:"dd/mm/yy"});
		});		';
        $edit->script($script, 'create');
        $edit->script($script, 'modify');
        $edit->codbus = new inputField('Codigo', 'codbus');
        $edit->codbus->mode = 'autohide';
        $edit->codbus->rule = 'required';
        $edit->codbus->size = 12;
        $edit->codbus->maxlength = 10;
        $edit->codacc = new dropdownField('Accionista', 'codacc');
        $edit->codacc->options('SELECT codacc, CONCAT(codacc," ",nomacc) nombre FROM tbaccio ORDER BY codacc');
        $edit->codacc->mode = 'autohide';
        $edit->codacc->rule = 'required';
        //$edit->codacc->size =12;
        //$edit->codacc->maxlength =10;
        $edit->capasidad = new inputField('Capacidad', 'capasidad');
        $edit->capasidad->rule = '';
        $edit->capasidad->size = 10;
        $edit->capasidad->maxlength = 8;
        $edit->tipbus = new dropdownField('Tipo bus', 'tipbus');
        $edit->tipbus->options("SELECT tipbus, CONCAT(tipbus,' ',desbus) descripcion FROM tbmodbus ORDER BY tipbus");
        $edit->tipbus->rule = '';
        $edit->tipbus->size = 12;
        $edit->tipbus->maxlength = 10;
        $edit->placa = new inputField('Placa', 'placa');
        $edit->placa->rule = 'required';
        $edit->placa->size = 12;
        $edit->placa->maxlength = 10;
        $edit->marca = new dropdownField('Marca', 'marca');
        $edit->marca->options("SELECT marca, marca nombre FROM marc ORDER BY marca");
        $edit->marca->rule = 'required';
        //$edit->marca->size =22;
        //$edit->marca->maxlength =20;
        $edit->modelo = new inputField('Modelo', 'modelo');
        $edit->modelo->rule = '';
        $edit->modelo->size = 42;
        $edit->modelo->maxlength = 40;
        $edit->ano = new inputField('Año', 'ano');
        $edit->ano->rule = 'integer';
        $edit->ano->css_class = 'inputonlynum';
        $edit->ano->size = 5;
        $edit->ano->maxlength = 4;
        $edit->serialc = new inputField('Serial Carroceria', 'serialc');
        $edit->serialc->rule = '';
        $edit->serialc->size = 52;
        $edit->serialc->maxlength = 50;
        $edit->serialm = new inputField('Serial Motor', 'serialm');
        $edit->serialm->rule = '';
        $edit->serialm->size = 52;
        $edit->serialm->maxlength = 50;
        $edit->color = new inputField('Color', 'color');
        $edit->color->rule = '';
        $edit->color->size = 52;
        $edit->color->maxlength = 50;
        $edit->build();
        if ($edit->on_success()) {
            $rt = array('status' => 'A', 'mensaje' => 'Registro guardado', 'pk' => $edit->_dataobject->pk);
            echo json_encode($rt);
        } else {
            echo $edit->output;
        }
    }
开发者ID:codethics,项目名称:proteoerp,代码行数:85,代码来源:tbautobus.php


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