diff --git a/src/components/Holos/DocumentSection/ClientSection.vue b/src/components/Holos/DocumentSection/ClientSection.vue new file mode 100644 index 0000000..e6e52d6 --- /dev/null +++ b/src/components/Holos/DocumentSection/ClientSection.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/components/Holos/DocumentSection/CompanyInfoSection.vue b/src/components/Holos/DocumentSection/CompanyInfoSection.vue new file mode 100644 index 0000000..c9b1da5 --- /dev/null +++ b/src/components/Holos/DocumentSection/CompanyInfoSection.vue @@ -0,0 +1,57 @@ + + + diff --git a/src/components/Holos/DocumentSection/CotizacionTable.vue b/src/components/Holos/DocumentSection/CotizacionTable.vue new file mode 100644 index 0000000..d9cc8da --- /dev/null +++ b/src/components/Holos/DocumentSection/CotizacionTable.vue @@ -0,0 +1,320 @@ + + + diff --git a/src/components/Holos/DocumentSection/ExecutiveSection.vue b/src/components/Holos/DocumentSection/ExecutiveSection.vue new file mode 100644 index 0000000..67f01d2 --- /dev/null +++ b/src/components/Holos/DocumentSection/ExecutiveSection.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/components/Holos/DocumentSection/FacturacionTable.vue b/src/components/Holos/DocumentSection/FacturacionTable.vue new file mode 100644 index 0000000..3c5ea6d --- /dev/null +++ b/src/components/Holos/DocumentSection/FacturacionTable.vue @@ -0,0 +1,469 @@ + + + diff --git a/src/components/Holos/DocumentSection/FooterSection.vue b/src/components/Holos/DocumentSection/FooterSection.vue new file mode 100644 index 0000000..29fbe49 --- /dev/null +++ b/src/components/Holos/DocumentSection/FooterSection.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/components/Holos/DocumentSection/HeaderSection.vue b/src/components/Holos/DocumentSection/HeaderSection.vue new file mode 100644 index 0000000..7a2ea14 --- /dev/null +++ b/src/components/Holos/DocumentSection/HeaderSection.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/components/Holos/DocumentSection/ObservationsSection.vue b/src/components/Holos/DocumentSection/ObservationsSection.vue new file mode 100644 index 0000000..96348ec --- /dev/null +++ b/src/components/Holos/DocumentSection/ObservationsSection.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/Holos/DocumentSection/ProductsTableView.vue b/src/components/Holos/DocumentSection/ProductsTableView.vue new file mode 100644 index 0000000..e92e441 --- /dev/null +++ b/src/components/Holos/DocumentSection/ProductsTableView.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/components/Holos/DocumentSection/TotalsSection.vue b/src/components/Holos/DocumentSection/TotalsSection.vue new file mode 100644 index 0000000..f77342d --- /dev/null +++ b/src/components/Holos/DocumentSection/TotalsSection.vue @@ -0,0 +1,117 @@ + + + diff --git a/src/components/Holos/ProductTable.vue b/src/components/Holos/ProductTable.vue deleted file mode 100644 index 15eecce..0000000 --- a/src/components/Holos/ProductTable.vue +++ /dev/null @@ -1,244 +0,0 @@ - - - diff --git a/src/pages/Templates/Configs/ConfigCotizacion.js b/src/pages/Templates/Configs/ConfigCotizacion.js index b8b5321..80e61eb 100644 --- a/src/pages/Templates/Configs/ConfigCotizacion.js +++ b/src/pages/Templates/Configs/ConfigCotizacion.js @@ -4,7 +4,7 @@ export default { branding: { logo: null, - primaryColor: '#dc2626', + primaryColor: '#2c50dd', slogan: ' ', }, @@ -90,7 +90,7 @@ export default { label: 'Nombre del Cliente', tipo: 'text', required: true, - placeholder: 'Nombre completo', + placeholder: 'Ej: Juan Pérez', }, { key: 'clienteRFC', diff --git a/src/pages/Templates/Configs/ConfigFacturacion.js b/src/pages/Templates/Configs/ConfigFacturacion.js new file mode 100644 index 0000000..9d707f8 --- /dev/null +++ b/src/pages/Templates/Configs/ConfigFacturacion.js @@ -0,0 +1,140 @@ +export default{ + templateId: 'temp-cot-002', + nombre: 'Factura', + + branding: { + logo: null, + primaryColor: '#2c50dd', + slogan: ' ', + }, + + campos:[ + { + seccion: 'Datos de la Empresa', + campos: [ + { + key: 'empresaNombre', + label: 'Nombre de la Empresa', + tipo: 'text', + required: true, + placeholder: 'Ej: GOLSYSTEMS', + }, + { + key: 'empresaWeb', + label: 'Sitio Web', + tipo: 'url', + required: false, + placeholder: 'www.ejemplo.com', + }, + { + key: 'empresaDireccion', + label: 'Dirección', + tipo: 'textarea', + required: true, + placeholder: 'Dirección completa', + }, + { + key: 'empresaRFC', + label: 'RFC', + tipo: 'text', + required: true, + placeholder: 'GME111116GJA', + }, + { + key: 'empresaLugar', + label: 'Lugar de Expedición', + tipo: 'text', + required: true, + placeholder: '8000', + }, + { + key: 'empresaCfdi', + label: 'Uso de CFDI', + tipo: 'text', + required: true, + placeholder: 'G03 - Gastos en general', + }, + { + key: 'empresaRegimen', + label: 'Régimen Fiscal', + tipo: 'select', + required: true, + opciones: [ + { value: 'Régimen Simplificado de Confianza', label: 'Régimen Simplificado de Confianza' }, + { value: 'Personas Físicas con Actividades Empresariales y Profesionales', label: 'Personas Físicas con Actividades Empresariales y Profesionales' }, + ] + }, + ] + }, + { + seccion: 'Datos del Cliente', + campos: [ + { + key: 'clienteNombre', + label: 'Nombre del Cliente', + tipo: 'text', + required: true, + placeholder: 'Ej: Juan Pérez', + }, + { + key: 'clienteRFC', + label: 'RFC', + tipo: 'text', + required: false, + placeholder: 'RFC del cliente', + }, + { + key: 'clienteDomicilio', + label: 'Domicilio', + tipo: 'textarea', + required: false, + placeholder: 'Domicilio completo', + }, + { + key: 'clienteRegimen', + label: 'Régimen Fiscal', + tipo: 'select', + required: true, + opciones: [ + { value: 'Régimen Simplificado de Confianza', label: 'Régimen Simplificado de Confianza' }, + { value: 'Personas Físicas con Actividades Empresariales y Profesionales', label: 'Personas Físicas con Actividades Empresariales y Profesionales' }, + ] + } + ] + }, + { + seccion: 'Datos del Documento', + campos: [ + { + key: 'serie', + label: 'Número de Serie', + tipo: 'text', + required: true, + }, + { + key: 'folio', + label: 'Número de Folio', + tipo: 'text', + required: true, + }, + { + key: 'fechaEmision', + label: 'Fecha de Emisión', + tipo: 'date', + required: true, + }, + { + key: 'tipoComprobante', + label: 'Tipo de Comprobante', + tipo: 'select', + required: true, + opciones: [ + { value: 'Ingreso', label: 'Ingreso' }, + { value: 'Egreso', label: 'Egreso' }, + { value: 'Traslado', label: 'Traslado' }, + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/pages/Templates/Configs/usePDFExport.js b/src/pages/Templates/Configs/usePDFExport.js index baf3122..85831df 100644 --- a/src/pages/Templates/Configs/usePDFExport.js +++ b/src/pages/Templates/Configs/usePDFExport.js @@ -1,7 +1,8 @@ import { ref } from 'vue'; -import html2canvas from 'html2canvas-pro'; import { jsPDF } from 'jspdf'; +import html2canvas from 'html2canvas-pro'; + export function usePDFExport() { const isExporting = ref(false); @@ -59,10 +60,10 @@ export function usePDFExport() { compress: true }); - const pdfWidth = 210; // A4 portrait width - const pdfHeight = 297; // A4 portrait height + const pdfWidth = 210; // A4 width + const pdfHeight = 297; // A4 height - // Ajustar imagen al tamaño completo de la página (sin márgenes) + // Ajustar imagen al tamaño completo de la página // para que ocupe toda la hoja A4 pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight, '', 'FAST'); @@ -71,7 +72,6 @@ export function usePDFExport() { Notify.success('PDF generado exitosamente'); } catch (error) { - console.error('Error al generar PDF:', error); Notify.error(`Error al generar el PDF: ${error.message}`); } finally { isExporting.value = false; diff --git a/src/pages/Templates/DocumentTemplate.vue b/src/pages/Templates/DocumentTemplate.vue new file mode 100644 index 0000000..5aaf61b --- /dev/null +++ b/src/pages/Templates/DocumentTemplate.vue @@ -0,0 +1,66 @@ + + + \ No newline at end of file diff --git a/src/pages/Templates/Form.vue b/src/pages/Templates/Form.vue index 5ff2d49..a319fe7 100644 --- a/src/pages/Templates/Form.vue +++ b/src/pages/Templates/Form.vue @@ -1,286 +1,390 @@