67a0e674ca
Marine maintenance management: work orders with photos, ISM/SWP procedures, MSDS, inventory, RFQ/purchases, vessel history, bilingual PDF reports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
79 lines
3.8 KiB
HTML
79 lines
3.8 KiB
HTML
{% extends 'base.html' %}
|
|
{% block title %}Editar {{ order.order_number }}{% endblock %}
|
|
{% block page_title %}✏️ Editar {{ order.order_number }} — {{ order.vessel_name }}{% endblock %}
|
|
{% block topbar_actions %}
|
|
<a href="{{ url_for('work_order_detail', woid=order.id) }}" class="btn btn-secondary">← Cancelar</a>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<div class="card" style="max-width:820px">
|
|
<form method="POST">
|
|
<div class="form-grid">
|
|
<div class="form-group">
|
|
<label>Sistema Principal</label>
|
|
<select name="system_id">
|
|
<option value="">-- Sin sistema --</option>
|
|
{% for s in systems %}
|
|
<option value="{{ s.id }}" {% if order.system_id==s.id %}selected{% endif %}>{{ s.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tipo de Facturación *</label>
|
|
<select name="billing_type" required>
|
|
<option value="labor_materials" {% if order.billing_type=='labor_materials' or not order.billing_type %}selected{% endif %}>
|
|
Mano de obra + Materiales (discriminado)
|
|
</option>
|
|
<option value="lump_sum" {% if order.billing_type=='lump_sum' %}selected{% endif %}>
|
|
A todo costo (precio fijo todo incluido)
|
|
</option>
|
|
<option value="labor_only" {% if order.billing_type=='labor_only' %}selected{% endif %}>
|
|
Solo mano de obra
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tipo de Trabajo</label>
|
|
<select name="work_type">
|
|
<option value="">-- Seleccionar --</option>
|
|
{% for wt in ['Preventive','Corrective','Inspection','Installation','Other'] %}
|
|
<option value="{{ wt }}" {% if order.work_type==wt %}selected{% endif %}>{{ wt }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group full">
|
|
<label>Scope — Resumen del Trabajo *</label>
|
|
<input type="text" name="scope" value="{{ order.scope or '' }}" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Técnico</label>
|
|
<input type="text" name="technician" value="{{ order.technician or '' }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Fecha Inicio</label>
|
|
<input type="date" name="start_date" value="{{ order.start_date or '' }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Horas Motor (inicio)</label>
|
|
<input type="number" step="0.1" name="engine_hours_start" value="{{ order.engine_hours_start or '' }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Tarifa M.O. ($/h)</label>
|
|
<input type="number" step="0.01" name="labor_rate" value="{{ order.labor_rate or 0 }}">
|
|
</div>
|
|
<div class="form-group full">
|
|
<label>Descripción Detallada</label>
|
|
<textarea name="description" rows="4">{{ order.description or '' }}</textarea>
|
|
</div>
|
|
<div class="form-group full">
|
|
<label>Notas Internas</label>
|
|
<textarea name="notes" rows="2">{{ order.notes or '' }}</textarea>
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-3 mt-6">
|
|
<button type="submit" class="btn btn-primary">💾 Guardar Cambios</button>
|
|
<a href="{{ url_for('work_order_detail', woid=order.id) }}" class="btn btn-secondary">Cancelar</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|