|
|
@ -117,6 +117,7 @@ import { TargetURL } from '../../Constants/TargetURL' |
|
|
|
import CentrosCostosService from '../../Services/Catalogos/CentrosCostos.Service' |
|
|
|
import CentrosCostosService from '../../Services/Catalogos/CentrosCostos.Service' |
|
|
|
import ClavesPedimentosService from '../../Services/Catalogos/ClavesPedimentos.Service' |
|
|
|
import ClavesPedimentosService from '../../Services/Catalogos/ClavesPedimentos.Service' |
|
|
|
import { ICatClavesPedimentos } from '../../Interfaces/Catalogos/ICatClavesPedimentos' |
|
|
|
import { ICatClavesPedimentos } from '../../Interfaces/Catalogos/ICatClavesPedimentos' |
|
|
|
|
|
|
|
import FileManagerServices from '../../Services/Utils/FileManager.Services' |
|
|
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
interface IProps { |
|
|
|
IDTrafico: number |
|
|
|
IDTrafico: number |
|
|
@ -318,6 +319,8 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
const [ClavesPedimentos, setClavesPedimentos] = useState<ICatClavesPedimentos[]>([]) |
|
|
|
const [ClavesPedimentos, setClavesPedimentos] = useState<ICatClavesPedimentos[]>([]) |
|
|
|
const FechaRegistro = currentDate() |
|
|
|
const FechaRegistro = currentDate() |
|
|
|
const msgColor = 'primary' |
|
|
|
const msgColor = 'primary' |
|
|
|
|
|
|
|
const [idPdfCuentaMexicana, setIdPdfCuentaMexicana] = useState(0); |
|
|
|
|
|
|
|
const [idXmlCuentaMexicana, setIdXmlCuentaMexicana] = useState(0); |
|
|
|
|
|
|
|
|
|
|
|
const hiddenFileInputRef = useRef<HTMLInputElement>(null); |
|
|
|
const hiddenFileInputRef = useRef<HTMLInputElement>(null); |
|
|
|
var txtContenedores: ICorresponsalContenedores[] = []; |
|
|
|
var txtContenedores: ICorresponsalContenedores[] = []; |
|
|
@ -1383,6 +1386,49 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const cerrarTrafico = () => { |
|
|
|
|
|
|
|
FileManagerServices.GetClientesZip(IDTrafico) |
|
|
|
|
|
|
|
.then(response => { |
|
|
|
|
|
|
|
CTrafDataService.ValidateComplete({id: IDTrafico, idUsuario:UserId, estatus: 4, comentarios:'Todo Correcto'}) |
|
|
|
|
|
|
|
.then(resp => { |
|
|
|
|
|
|
|
setProceso(4); |
|
|
|
|
|
|
|
setHeader('Informativo') |
|
|
|
|
|
|
|
setMsg('Cuenta cerrada con éxito.') |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
}).catch(e => { |
|
|
|
|
|
|
|
setHeader('Error') |
|
|
|
|
|
|
|
setMsg('Ocurrio un error al cerrar la cuenta. Favor de intentarlo nuevamente') |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
setHeader('Error') |
|
|
|
|
|
|
|
setMsg('No se han encontrado uno o más de los archivos obligatorios para cerrar la cuenta.') |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const GetClientesZip = () => { |
|
|
|
|
|
|
|
FileManagerServices.GetClientesZip(IDTrafico) |
|
|
|
|
|
|
|
.then(response => { |
|
|
|
|
|
|
|
downloadFile(response.data); |
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
setHeader('Error') |
|
|
|
|
|
|
|
setMsg('No se han encontrado uno o más de los archivos obligatorios para cerrar la cuenta.') |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const downloadFile = (blob: Blob) => { |
|
|
|
|
|
|
|
const url = window.URL.createObjectURL(new Blob([blob])); |
|
|
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
|
|
link.href = url; |
|
|
|
|
|
|
|
link.setAttribute('download', `expediente_${FolioTrafico}.zip`); |
|
|
|
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
|
|
|
link.click(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'40rem', overflowY:'scroll'}}> |
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'40rem', overflowY:'scroll'}}> |
|
|
@ -3807,6 +3853,102 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|
</Card> */} |
|
|
|
</Card> */} |
|
|
|
</Tab> |
|
|
|
</Tab> |
|
|
|
|
|
|
|
<Tab |
|
|
|
|
|
|
|
eventKey="ComprobantesFacturacion" |
|
|
|
|
|
|
|
title="Comprobantes Facturacion" |
|
|
|
|
|
|
|
tabClassName={Proceso >= 3 ? '' : 'd-none'} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<Card> |
|
|
|
|
|
|
|
<Card.Body> |
|
|
|
|
|
|
|
<Row> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<Form.Label>PDF Cuenta Mexicana</Form.Label> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<Form.Label>XML Cuenta Mexicana</Form.Label> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<Form.Label>Archivos Adicionales</Form.Label> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
</Row> |
|
|
|
|
|
|
|
<Row> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<FileManager |
|
|
|
|
|
|
|
IDUser={UserId} |
|
|
|
|
|
|
|
width={'100%'} |
|
|
|
|
|
|
|
height={100} |
|
|
|
|
|
|
|
IDProcess={37} |
|
|
|
|
|
|
|
IdFile={IDTrafico} |
|
|
|
|
|
|
|
FileName={''} |
|
|
|
|
|
|
|
canDelete={ |
|
|
|
|
|
|
|
Depto === 'Facturacion' && Proceso === 3 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FileType={['pdf']} |
|
|
|
|
|
|
|
Leyenda={`Seleccione el PDF para subirlo al servidor...`} |
|
|
|
|
|
|
|
onAppendFM={function (idFile: number ): void { |
|
|
|
|
|
|
|
setIdPdfCuentaMexicana(idFile); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<FileManager |
|
|
|
|
|
|
|
IDUser={UserId} |
|
|
|
|
|
|
|
width={'100%'} |
|
|
|
|
|
|
|
height={100} |
|
|
|
|
|
|
|
IDProcess={38} |
|
|
|
|
|
|
|
IdFile={IDTrafico} |
|
|
|
|
|
|
|
FileName={''} |
|
|
|
|
|
|
|
canDelete={ |
|
|
|
|
|
|
|
Depto === 'Facturacion' && Proceso === 3 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FileType={['xml']} |
|
|
|
|
|
|
|
Leyenda={`Seleccione el XML para subirlo al servidor...`} |
|
|
|
|
|
|
|
onAppendFM={function (idFile: number): void { |
|
|
|
|
|
|
|
setIdXmlCuentaMexicana(idFile); |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col xs={4}> |
|
|
|
|
|
|
|
<FileManager |
|
|
|
|
|
|
|
IDUser={UserId} |
|
|
|
|
|
|
|
width={'100%'} |
|
|
|
|
|
|
|
height={100} |
|
|
|
|
|
|
|
IDProcess={39} |
|
|
|
|
|
|
|
IdFile={IDTrafico} |
|
|
|
|
|
|
|
FileName={''} |
|
|
|
|
|
|
|
canDelete={ |
|
|
|
|
|
|
|
Depto === 'Facturacion' && Proceso === 3 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
FileType={['zip']} |
|
|
|
|
|
|
|
Leyenda={`Seleccione el zip con los archivos adicionales para subirlo al servidor...`} |
|
|
|
|
|
|
|
onAppendFM={function (idFile: number): void { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
</Row> |
|
|
|
|
|
|
|
<Row className='justify-content-end'> |
|
|
|
|
|
|
|
<Col xs={3} style={{display:'flex', justifyContent:'end'}}> |
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
variant='primary' |
|
|
|
|
|
|
|
onClick={GetClientesZip} |
|
|
|
|
|
|
|
disabled={Proceso < 4} |
|
|
|
|
|
|
|
style={{marginRight:'10px'}} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Descargar Zip |
|
|
|
|
|
|
|
</Button> |
|
|
|
|
|
|
|
<Button
|
|
|
|
|
|
|
|
variant='primary' |
|
|
|
|
|
|
|
onClick={cerrarTrafico} |
|
|
|
|
|
|
|
disabled={Proceso === 4} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
Cerrar Cuenta |
|
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
</Row> |
|
|
|
|
|
|
|
</Card.Body> |
|
|
|
|
|
|
|
</Card> |
|
|
|
|
|
|
|
</Tab> |
|
|
|
</Tabs> |
|
|
|
</Tabs> |
|
|
|
</Card.Body> |
|
|
|
</Card.Body> |
|
|
|
</Card> |
|
|
|
</Card> |
|
|
|