本文整理汇总了PHP中DataEdit::getstatus方法的典型用法代码示例。如果您正苦于以下问题:PHP DataEdit::getstatus方法的具体用法?PHP DataEdit::getstatus怎么用?PHP DataEdit::getstatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataEdit
的用法示例。
在下文中一共展示了DataEdit::getstatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dataedit
//.........这里部分代码省略.........
for ($u = 1; $u < 4; $u++) {
$nom = "escala{$u}";
$obj = "{$nom}_{$i}";
$edit->{$obj} = new hiddenField('', $obj);
$edit->{$obj}->insertValue = $row->{$nom};
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'sinv' . $nom;
$edit->{$obj}->ind = $i;
$edit->{$obj}->pointer = true;
$nom = "pescala{$u}";
$obj = "{$nom}_{$i}";
$edit->{$obj} = new hiddenField('', $obj);
$edit->{$obj}->insertValue = $row->{$nom};
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'sinv' . $nom;
$edit->{$obj}->ind = $i;
$edit->{$obj}->pointer = true;
$p_es += $row->{$nom};
}
$gdxe = $edit->get_from_dataobjetct_rel('itpfac', 'dxe', $i);
$obj = 'dxe_' . $i;
if ($p_es > 0) {
$gdxe = $edit->get_from_dataobjetct_rel('itpfac', 'dxe', $i);
$edit->{$obj} = new checkboxField('dxe', $obj, $gdxe == false ? '0' : $gdxe, '0');
$edit->{$obj}->onchange = "cescala('{$i}')";
} else {
$edit->{$obj} = new autoUpdateField('dxp', '0', '0');
}
//$edit->$obj->insertValue = 0;
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'dxe';
$edit->{$obj}->ind = $i;
$obj = 'sinvmmargen_' . $i;
$edit->{$obj} = new hiddenField('', $obj);
$edit->{$obj}->insertValue = $row->mmargen;
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'sinvmmargen';
$edit->{$obj}->ind = $i;
$edit->{$obj}->pointer = true;
$obj = 'costo_' . $i;
$edit->{$obj} = new hiddenField('', $obj);
$edit->{$obj}->insertValue = $row->costo;
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'costo';
$edit->{$obj}->ind = $i;
$obj = 'tota_' . $i;
$edit->{$obj} = new hiddenField('', $obj);
$edit->{$obj}->insertValue = 0;
$edit->{$obj}->rel_id = 'itpfac';
$edit->{$obj}->db_name = 'tota';
$edit->{$obj}->ind = $i;
$i++;
}
$sinvcana = $i;
// fin de campos para detalle
$edit->ivat = new inputField('Impuesto', 'iva');
$edit->ivat->css_class = 'inputnum';
$edit->ivat->type = 'inputhidden';
$edit->ivat->readonly = true;
$edit->ivat->size = 10;
$edit->totals = new inputField('Sub-Total', 'totals');
$edit->totals->css_class = 'inputnum';
$edit->totals->type = 'inputhidden';
$edit->totals->readonly = true;
$edit->totals->size = 10;
$edit->totalg = new inputField('Monto Total', 'totalg');
$edit->totalg->css_class = 'inputnum';
$edit->totalg->type = 'inputhidden';
$edit->totalg->readonly = true;
$edit->totalg->size = 10;
$edit->estampa = new autoUpdateField('estampa', date('Ymd'), date('Ymd'));
$edit->hora = new autoUpdateField('hora', date('H:i:s'), date('H:i:s'));
$edit->usuario = new autoUpdateField('usuario', $this->secu->usuario(), $this->secu->usuario());
$control = $this->rapyd->uri->get_edited_id();
if ($edit->getstatus() == 'show') {
$action = "javascript:window.location='" . site_url($this->url . 'filterscli') . "'";
$edit->button('btn_add', 'Agregar', $action, 'TR');
}
$edit->buttons('save', 'undo', 'modify', 'delete', 'back');
if ($this->genesal) {
$edit->build();
$conten['cana'] = $sinvcana;
$conten['form'] =& $edit;
$conten['title'] = heading('Pedidos No. ' . $edit->numero->value);
$data['head'] = style('mayor/estilo.css');
$data['script'] = script('jquery.js');
$data['script'] .= phpscript('nformat.js');
$data['content'] = $this->load->view('view_pfaclitemayor', $conten, true);
$data['title'] = '';
$this->load->view('view_ventanas_lite', $data);
} else {
$edit->on_save_redirect = false;
$edit->build();
if ($edit->on_success()) {
echo 'Pedido Guardado';
} elseif ($edit->on_error()) {
echo html_entity_decode(preg_replace('/<[^>]*>/', '', $edit->error_string));
}
}
}
示例2: dataedit
function dataedit()
{
$this->rapyd->load('dataedit', 'datadetails');
$scriptadd = ";\n\t\t\t\$('#cod_cli').autocomplete({\n\t\t\t\tdelay: 600,\n\t\t\t\tautoFocus: true,\n\t\t\t\tsource: function( req, add){\n\t\t\t\t\t\$.ajax({\n\t\t\t\t\t\turl: '" . site_url('ajax/buscascli') . "',\n\t\t\t\t\t\ttype: 'POST',\n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tdata: {'q':req.term},\n\t\t\t\t\t\tsuccess:\n\t\t\t\t\t\t\tfunction(data){\n\t\t\t\t\t\t\t\tvar sugiere = [];\n\t\t\t\t\t\t\t\tif(data.length==0){\n\t\t\t\t\t\t\t\t\t\$('#nombre').val('');\n\t\t\t\t\t\t\t\t\t\$('#nombre_val').text('');\n\n\t\t\t\t\t\t\t\t\t\$('#rif').val('');\n\t\t\t\t\t\t\t\t\t\$('#rif_val').text('');\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\$.each(data,\n\t\t\t\t\t\t\t\t\t\tfunction(i, val){\n\t\t\t\t\t\t\t\t\t\t\tsugiere.push( val );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tadd(sugiere);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tminLength: 1,\n\t\t\t\tselect: function( event, ui ) {\n\t\t\t\t\t\$('#cod_cli').attr('readonly', 'readonly');\n\t\t\t\t\t\$('#sclinombre').val(ui.item.nombre);\n\t\t\t\t\t\$('#sclinombre_val').text(ui.item.nombre);\n\t\t\t\t\t\$('#sclirifci').val(ui.item.rifci);\n\t\t\t\t\t\$('#sclirifci_val').text(ui.item.rifci);\n\t\t\t\t\t\$('#cod_cli').val(ui.item.cod_cli);\n\t\t\t\t\tsetTimeout(function() { \$('#cod_cli').removeAttr('readonly'); }, 1500);\n\t\t\t\t}\n\t\t\t});";
$do = new DataObject('medhisto');
$do->pointer('scli', 'scli.cliente=medhisto.cod_cli', 'scli.nombre AS sclinombre, scli.rifci AS sclirifci', 'left');
$edit = new DataEdit('', $do);
$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('Historia Nro', 'numero');
$edit->numero->rule = '';
$edit->numero->size = 22;
$edit->numero->maxlength = 20;
$edit->numero->readonly = true;
$edit->numero->mode = 'autohide';
$edit->numero->when = array('modify');
//$edit->numero->hidden = true;
$edit->cod_cli = new inputField('Cliente', 'cod_cli');
$edit->cod_cli->rule = 'required|existescli';
$edit->cod_cli->size = 8;
$edit->cod_cli->maxlength = 50;
$edit->sclinombre = new inputField('Nombre del cliente', 'sclinombre');
$edit->sclinombre->size = 25;
$edit->sclinombre->maxlength = 40;
$edit->sclinombre->readonly = true;
$edit->sclinombre->autocomplete = false;
$edit->sclinombre->pointer = true;
$edit->sclinombre->rule = 'required';
$edit->sclinombre->type = 'inputhidden';
$edit->sclirifci = new inputField('RIF/CI', 'sclirifci');
$edit->sclirifci->autocomplete = false;
$edit->sclirifci->readonly = true;
$edit->sclirifci->size = 15;
$edit->sclirifci->pointer = true;
$edit->sclirifci->in = 'cod_cli';
$edit->sclirifci->type = 'inputhidden';
$edit->identifica = new inputField('Nro. de identificación del paciente', 'identifica');
$edit->identifica->rule = 'strtoupper|unique';
$edit->identifica->size = 30;
$edit->identifica->maxlength = 50;
$edit->identifica->append("Cédula, pasaporte, partida u otro");
/*
$edit->nombre = new inputField('Nombre del paciente','nombre');
$edit->nombre->rule='strtoupper|required';
$edit->nombre->size =52;
$edit->nombre->maxlength =50;
*/
$edit->ingreso = new dateonlyField('Ingreso', 'ingreso');
$edit->ingreso->rule = 'required|chfecha';
$edit->ingreso->calendar = false;
$edit->ingreso->size = 10;
$edit->ingreso->maxlength = 8;
$edit->ingreso->insertValue = date('Y-m-d');
/*
$edit->referido = new dropdownField('Referido por', 'referido');
$edit->referido->style='width:250px';
$edit->referido->option('','Seleccionar');
$edit->referido->options('SELECT codigo,nombre FROM medrec WHERE tipo="ME" ORDER BY nombre');
$edit->referido->rule='required';
*/
//**************************************************************
// Inicio detalle
//
$i = 0;
$sel = array('a.id', 'a.nombre', 'a.tipo', 'a.tipoadc');
$this->db->from('medhtab AS a');
$this->db->where('a.grupo', '1');
if ($edit->getstatus() !== 'create') {
$historia = $edit->get_from_dataobjetct('numero');
$dbhistoria = $this->db->escape($historia);
$this->db->join('medhvisita AS b', "a.id=b.tabula AND b.historia = {$dbhistoria}", 'left');
$sel[] = 'b.descripcion AS value';
$sel[] = 'b.id AS itid';
}
$this->db->select($sel);
$this->db->order_by('a.indice');
$query = $this->db->get();
foreach ($query->result() as $row) {
$obj = 'descripcion_' . $i;
$nobj = 'itdetalle[' . $row->id . ']';
$par = array('tipo' => $row->tipo, 'nombre' => ucfirst(strtolower($row->nombre)), 'obj' => $nobj, 'tipoadc' => $row->tipoadc);
$rt = $this->_tabuladorfield($par);
$scriptadd .= $rt[1];
if (!isset($row->value)) {
$row->value = '';
}
$value = isset($_POST['itdetalle'][$row->id]) ? $_POST['itdetalle'][$row->id] : $row->value;
$edit->{$obj} = $rt[0];
$edit->{$obj}->db_name = '-';
$edit->{$obj}->data = null;
$edit->{$obj}->value = $value;
$edit->{$obj}->insertValue = $value;
$edit->{$obj}->updateValue = $value;
$edit->{$obj}->pointer = true;
//.........这里部分代码省略.........