Se realizan modificaciones a los procesos

AmazonRelease1.1
unknown 2 years ago
parent f8bbf75ea6
commit b0682b8b27
  1. 16
      src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswer/RptPendingAnswerFromAmazon.tsx
  2. 2
      src/Components/Clientes/Amazon/Services/Amazon.Services.ts
  3. 11
      src/Components/Utils/MFileManager/MFileManager.tsx
  4. 1
      src/Constants/TargetURL.ts

@ -29,6 +29,7 @@ import RtpPendingAnswerFromAmazonDetail from './RptPendingAnswerFromAmazonDetail
import { AiFillFileUnknown, AiTwotoneFileExcel } from 'react-icons/ai'
import DTO2096PerfilesParecidos from '../../../DTO/DTO2096PerfilesParecidos'
import FileManager from '../../../../../Utils/FileManager/FileManager'
import { MFileManager } from '../../../../../Utils/MFileManager/MFileManager'
export interface IRptPendingAnswerFromAmazonProps {}
export default function RptPendingAnswerFromAmazon(
@ -175,7 +176,7 @@ export default function RptPendingAnswerFromAmazon(
})
}
const relacionaIDArchivoRespuestaConFactura = (idFile : number) => {
/* const relacionaIDArchivoRespuestaConFactura = (idFile : number) => {
DSAmazon.ArchivoRespuestaAmazon(IDFactura, idFile)
.then((response) => {
})
@ -186,7 +187,7 @@ export default function RptPendingAnswerFromAmazon(
setShowMsg(true)
return
})
}
} */
return (
<div>
@ -316,7 +317,9 @@ export default function RptPendingAnswerFromAmazon(
</td>
<td>
<div
onClick={() => { setShowModalAnswerFile(!ShowModalAnswerFile) }}
onClick={() => {
setIDFactura(MasterData.id)
setShowModalAnswerFile(!ShowModalAnswerFile) }}
title="Archivo de respuesta"
>
<IconContext.Provider
@ -688,7 +691,7 @@ export default function RptPendingAnswerFromAmazon(
dialogClassName={'modal-50w'}
>
<Modal.Body>
<div style={{ height: '180px' }}>
<div style={{ height: '330px' }}>
<Row style={{ paddingTop: '15px' }}>
<Col xs={12}>
<Alert key={'danger'} variant={'danger'} style={{textAlign:'center'}}>
@ -699,7 +702,7 @@ export default function RptPendingAnswerFromAmazon(
<Row style={{ paddingTop: '15px' }}>
<Col></Col>
<Col xs={10} style={{ textAlign: 'center' }}>
<FileManager
{/* <FileManager
IDUser={UserId}
width={650}
height={100}
@ -710,7 +713,8 @@ export default function RptPendingAnswerFromAmazon(
FileType={['xlsx']}
Leyenda={`Seleccione el archivo de respuesta de Amazon, arrastrelo hasta aqui y sueltelo para subirlo al servidor...`}
onAppendFM={function (idFile: number): void { relacionaIDArchivoRespuestaConFactura(idFile)}}
/>
/> */}
<MFileManager IDTrafico={IDFactura} Proceso={IDProcess} showPreview={3} canEdit={true} Leyenda='Sube archivos de respuesta de Amazon'/>
</Col>
<Col></Col>
</Row>

@ -96,7 +96,7 @@ class AmazonDataService {
})
}
ExceptionsFileAmazonGET(id: number) {
return http.get<ArrayBuffer>(`/AmazonInvoice/GetArchivoExcepcionesAmazon?id=${id}`, {responseType: 'arraybuffer'})
return http.get<ArrayBuffer>(`/AmazonInvoice/ExceptionsFileAmazonGET?id=${id}`, {responseType: 'arraybuffer'})
.then(function (response) {
return response
})

@ -106,6 +106,13 @@ export const MFileManager: FC<IProps> = (props) => {
const blob = new Blob([response.data], { type: 'image/png' })
const url = window.URL.createObjectURL(blob)
window.open(url)
} else if (
row.nombreArchivo.toLowerCase().endsWith('.xls') ||
row.nombreArchivo.toLowerCase().endsWith('.xlsx')
) {
const blob = new Blob([response.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
const url = window.URL.createObjectURL(blob)
window.open(url)
} else {
const url = window.URL.createObjectURL(new Blob([response.data]))
const link = document.createElement('a')
@ -237,7 +244,7 @@ export const MFileManager: FC<IProps> = (props) => {
{ListaArchivos
? ListaArchivos.map((rec) => {
return (
<ListGroup style={{ width: '380px' }}>
<ListGroup style={{ width: '100%' }}>
<ListGroup.Item
key={rec.id}
style={{
@ -254,7 +261,7 @@ export const MFileManager: FC<IProps> = (props) => {
getFileContent(rec)
}}
>
{rec.nombreArchivo.substring(0, 40)}
{rec.nombreArchivo}
</span>
</Col>
<Col xs={1} style={{ visibility: props.canEdit ? 'visible' : 'hidden' }}>

@ -3,5 +3,6 @@ export class TargetURL {
return !process.env.NODE_ENV || process.env.NODE_ENV === 'development'
? 'https://localhost:5001/api'
: "http://reportes.gemcousa.com:5000/api";
//: "https://www.gemcousa.mx/GEMCOBackend/api";
}
}

Loading…
Cancel
Save