|
|
@ -119,6 +119,8 @@ import ClavesPedimentosService from '../../Services/Catalogos/ClavesPedimentos.S |
|
|
|
import { ICatClavesPedimentos } from '../../Interfaces/Catalogos/ICatClavesPedimentos' |
|
|
|
import { ICatClavesPedimentos } from '../../Interfaces/Catalogos/ICatClavesPedimentos' |
|
|
|
import FileManagerServices from '../../Services/Utils/FileManager.Services' |
|
|
|
import FileManagerServices from '../../Services/Utils/FileManager.Services' |
|
|
|
import CorresponsalesAnticiposServices from '../../Services/Corresponsalias/Corresponsales.Anticipos.Services' |
|
|
|
import CorresponsalesAnticiposServices from '../../Services/Corresponsalias/Corresponsales.Anticipos.Services' |
|
|
|
|
|
|
|
import { BiDownload } from 'react-icons/bi' |
|
|
|
|
|
|
|
import CorresponsalesFacturasServices from '../../Services/Corresponsalias/Corresponsales.Facturas.Services' |
|
|
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
interface IProps { |
|
|
|
IDTrafico: number |
|
|
|
IDTrafico: number |
|
|
@ -1359,7 +1361,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
//
|
|
|
|
//
|
|
|
|
fileData += `0|""|""|""|""|""|""|""|""|${ValorFacturasDls}|""|""|336|""|/ / : :|${moment().format("MM/DD/YYYY hh:mm:ss")}|${moment().format("MM/DD/YYYY hh:mm:ss")}|`; |
|
|
|
fileData += `0|""|""|""|""|""|""|""|""|${ValorFacturasDls}|""|""|336|""|/ / : :|${moment().format("MM/DD/YYYY hh:mm:ss")}|${moment().format("MM/DD/YYYY hh:mm:ss")}|`; |
|
|
|
//
|
|
|
|
//
|
|
|
|
fileData += `0|""|""|""|0|0|0|F|""|0|""|""|0|0|0|0|""|"${CentroCostos}"`; |
|
|
|
fileData += `0|""|""|""|0|0|0|F|""|0|""|""|0|0|0|0|""|"${CentroCostos.trim()}"`; |
|
|
|
//const blob = new Blob([fileData], { type: "text/plain" });
|
|
|
|
//const blob = new Blob([fileData], { type: "text/plain" });
|
|
|
|
const file = new File([fileData], `${FolioTrafico}_${Date.now()}.txt`, {type: "text/plain"}); |
|
|
|
const file = new File([fileData], `${FolioTrafico}_${Date.now()}.txt`, {type: "text/plain"}); |
|
|
|
let formData = new FormData(); |
|
|
|
let formData = new FormData(); |
|
|
@ -1472,6 +1474,17 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
link.click(); |
|
|
|
link.click(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const GetFacturasExcel = () => { |
|
|
|
|
|
|
|
CorresponsalesFacturasServices.GetExcel(IDTrafico) |
|
|
|
|
|
|
|
.then(response => { |
|
|
|
|
|
|
|
downloadFile(response.data, `Facturas_${FolioTrafico}.xlsx`); |
|
|
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
setHeader('Error') |
|
|
|
|
|
|
|
setMsg('Ocurrió un error al generar el archivo. Por favor, intentelo de nuevo.') |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div style={{height:'100%', overflowY:'scroll'}}> |
|
|
|
<div style={{height:'100%', overflowY:'scroll'}}> |
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'100%'}}> |
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'100%'}}> |
|
|
@ -2416,17 +2429,14 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
<Col sm={2}> |
|
|
|
<Col sm={2}> |
|
|
|
<Form.Label |
|
|
|
<Form.Label |
|
|
|
id="LinkFacturas123" |
|
|
|
id="LinkFacturas123" |
|
|
|
onClick={() => { |
|
|
|
|
|
|
|
showModalBox(2) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
style={{ cursor: 'pointer' }} |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<IconContext.Provider |
|
|
|
<IconContext.Provider |
|
|
|
value={{ color: 'green', size: '15px' }} |
|
|
|
value={{ color: 'green', size: '15px' }} |
|
|
|
> |
|
|
|
> |
|
|
|
<HiCurrencyDollar /> |
|
|
|
<BiDownload onClick={() => {GetFacturasExcel()}} style={{ cursor: 'pointer' }}/> |
|
|
|
|
|
|
|
<span onClick={() => {showModalBox(2)}} style={{ cursor: 'pointer' }}><HiCurrencyDollar /> {LblFacturas}</span> |
|
|
|
</IconContext.Provider> |
|
|
|
</IconContext.Provider> |
|
|
|
{LblFacturas} |
|
|
|
|
|
|
|
</Form.Label> |
|
|
|
</Form.Label> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
<Col xs={4}> |
|
|
|
<Col xs={4}> |
|
|
|