|
|
|
@ -28,6 +28,7 @@ import { FaAmazon } from 'react-icons/fa' |
|
|
|
|
import loadingImg from '../../../../../images/ajaxloader.gif' |
|
|
|
|
import { MFileManager } from '../../../../Utils/MFileManager/MFileManager' |
|
|
|
|
import DTO2096RptPayedOperations from '../../DTO/DTO2096RptPayedOperations' |
|
|
|
|
import { GoGear } from "react-icons/go"; |
|
|
|
|
|
|
|
|
|
export interface IRptAmazonPayedOpereationsProps {} |
|
|
|
|
|
|
|
|
@ -191,6 +192,33 @@ export default function RptAmazonPayedOpereations( |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const createACKFile = (referencia: string) => { |
|
|
|
|
DSAmazon.CreateACKFile(referencia) |
|
|
|
|
.then((response: any) => { |
|
|
|
|
DSAmazon.UploadACKFile2Amazon(referencia) |
|
|
|
|
.then((response: any) => { |
|
|
|
|
setHeader('Informativo') |
|
|
|
|
setMsg('Se envio el archivo ACK a Amazon') |
|
|
|
|
setShowMsg(true) |
|
|
|
|
loadReport() |
|
|
|
|
return |
|
|
|
|
}) |
|
|
|
|
.catch((e: Error) => { |
|
|
|
|
console.log(JSON.stringify(e)) |
|
|
|
|
setHeader('Error') |
|
|
|
|
setMsg('Ocurrio un error '+e) |
|
|
|
|
setShowMsg(true) |
|
|
|
|
return |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
.catch((e: Error) => { |
|
|
|
|
setHeader('Error') |
|
|
|
|
setMsg('Ocurrio un error') |
|
|
|
|
setShowMsg(true) |
|
|
|
|
return |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
loadReport() |
|
|
|
|
}, []) |
|
|
|
@ -448,6 +476,19 @@ export default function RptAmazonPayedOpereations( |
|
|
|
|
<td style={{ textAlign: 'center', width: '100px' }}> |
|
|
|
|
{MasterData.pedimento} |
|
|
|
|
</td> |
|
|
|
|
{MasterData.archivoACK==='' ? |
|
|
|
|
<td style={{textAlign:'center'}}> |
|
|
|
|
<div |
|
|
|
|
onClick={() => { createACKFile(MasterData.referencia) }} |
|
|
|
|
> |
|
|
|
|
<IconContext.Provider |
|
|
|
|
value={{ color: 'orange', size: '22px' }} |
|
|
|
|
> |
|
|
|
|
<GoGear /> |
|
|
|
|
</IconContext.Provider> |
|
|
|
|
</div> |
|
|
|
|
</td> |
|
|
|
|
: |
|
|
|
|
<td |
|
|
|
|
style={{ textAlign: 'center', width: '100px' }} |
|
|
|
|
onClick={() => { |
|
|
|
@ -456,6 +497,8 @@ export default function RptAmazonPayedOpereations( |
|
|
|
|
> |
|
|
|
|
{getOnlyDate(MasterData.fhArchivoACK)} |
|
|
|
|
</td> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</tr> |
|
|
|
|
</> |
|
|
|
|
) |
|
|
|
|