示例#1
0
$f->addWidget(new form_input("cliente", "Cliente", $sf->cliente));
$f->addWidget(new form_separator("Fechas"));
$d = new date();
$d->timestamp = $sf->fecha_pedido;
$d->parse();
$f->addWidget(new form_html("Fecha de Pedido ", $d->string));
$d = new date();
$d->timestamp = $sf->fecha_entrega_prevista;
$d->parse();
$f->addWidget(new form_html("Fecha Entrega Prevista", $d->string));
$d = new date();
$d->timestamp = $sf->fecha_entrega;
$d->parse();
$f->addWidget(new form_html("Fecha Entrega", $d->string));
$elw = new estadolistwidget();
$elw->drop($sf);
$f->addWidget(new form_widget("Estado", "", $elw));
$f->addWidget(new form_separator("Datos adicionales"));
$f->addWidget(new form_textarea("otro_material", "Otros materiales", $sf->otro_material));
$f->addWidget(new form_textarea("observaciones", "Observaciones", $sf->observaciones));
$b2 = new Box("Datos Generales del Pedido");
$b2->addWidget($f);
$b3 = new Box("Eventos del Pedido");
$ev = new eventviewer();
$ev->drop($sf);
$b3->addWidget($ev);
$b->addWidget(html::write("<table style=\"width:100%;\"><tr><td valign=\"top\" style=\"width:40%;\">" . $b2->draw() . "</td><td  valign=\"top\">" . $b3->draw() . "</td></tr></table>"));
$b->addWidget(html::write("<script> var idpedido='" . $sf->id . "';</script>"));
$p->addWidget($b);
$b = new Box("Detalle del Pedido");
if ($sf->tipo_pedido == 0 || $sf->tipo_pedido == 2) {
示例#2
0
$p->addWidget(html::write("<h1>A&ntilde;adir evento a pedido <b>" . $sf->referencia . "</b> de <b>" . $sf->cliente . "</b> </h1>"));
$b = new Box("Datos del Evento");
$t = new toolbar();
$t->addWidget(new button("Guardar Datos del Evento", "javascript:document.forms[0].submit()", "disk"));
$b->addWidget($t);
$f = new form("", "");
$opts[] = array("caption" => "Sin procesar", "value" => 0);
$opts[] = array("caption" => "Orden", "value" => 1);
$opts[] = array("caption" => "Taller", "value" => 2);
$opts[] = array("caption" => "Excepci&oacute;n Taller", "value" => 3);
$opts[] = array("caption" => "Fabricaci&oacute;n", "value" => 4);
$opts[] = array("caption" => "Excepci&oacute;n en Fabricaci&oacute;n", "value" => 5);
$opts[] = array("caption" => "Almac&eacute;n", "value" => 6);
$opts[] = array("caption" => "Excepci&oacute;n en Almac&eacute;n", "value" => 7);
$opts[] = array("caption" => "Entrega", "value" => 8);
$opts[] = array("caption" => "Excepci&oacute;n en Entrega", "value" => 9);
$sel = new form_select("estado_nuevo", "Nuevo estado");
$sel->addOptions($opts);
$ew = new estadolistwidget();
$ew->drop($sf);
$f->addWidget(new form_widget("Estado Actual", "", $ew));
$f->addWidget($sel);
$d = new date();
$d->timestamp = $sf->fecha_entrega_prevista;
$ds = new dateselector("fecha_entrega_prevista", $d->timestamp);
$ds->drop($d);
$f->addWidget(new form_widget("Nueva fecha de entrega prevista", "", $ds));
$f->addWidget(new form_textarea("descripcion", "Descripci&oacute;n del Evento", ""));
$b->addWidget($f);
$p->addWidget($b);
$p->draw();
示例#3
0
 function draw()
 {
     $o = $this->popMailBox();
     $id = $o->id;
     $es = new estadowidget();
     $es->drop($o);
     $out .= $es->draw();
     $sf = new scaffold("pedidos_eventos");
     $sf->__query = "SELECT * FROM pedidos_eventos WHERE idpedido=" . $id . " ORDER BY fecha DESC";
     $out .= "<div style=\"overflow:auto;border:inset 1px;background:white;height:250px;\">";
     $out .= "<table style=\"font-size:12px;\" class=\"eventos\"><thead><td>Fecha</td><td>Estado Antiguo</td><td>Estado Nuevo</td><td>Fecha Prevista</td><td>Descripci&oacute;n</td></thead>";
     foreach ($sf->getList() as $evento) {
         $d = new date();
         $d->timestamp = $evento["fecha"];
         $d->parse();
         $d2 = new date();
         $d2->timestamp = $evento["fecha_entrega_prevista"];
         $d2->parse();
         $ewa = new estadolistwidget();
         $ewn = new estadolistwidget();
         $o = new oobject();
         $o->estado = $evento["estado_viejo"];
         $ewa->drop($o);
         $o = new oobject();
         $o->estado = $evento["estado_nuevo"];
         $ewn->drop($o);
         $out .= "<tr><td style=\"width:110px\">" . $d->string . "</td><td style=\"width:158px;\">" . $ewa->draw() . "</td><td  style=\"width:158px;\">" . $ewn->draw() . "</td><td  style=\"width:110px;\">" . $d2->short_string . "</td><td style=\"font-size:9px;\">" . $evento["descripcion"] . "</td></tr>";
     }
     $out .= "</table>";
     $out .= "</div>";
     return $out;
 }