|
|
|
@ -153,6 +153,10 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
const stickyValue = window.localStorage.getItem('Departamento') |
|
|
|
|
return stickyValue !== null ? JSON.parse(stickyValue) : '' |
|
|
|
|
}) |
|
|
|
|
const [Perfil, setPerfil] = useState(() => { |
|
|
|
|
const stickyValue = window.localStorage.getItem('Perfil') |
|
|
|
|
return stickyValue !== null ? JSON.parse(stickyValue) : '' |
|
|
|
|
})
|
|
|
|
|
const mCorresponsales = useSelector( |
|
|
|
|
(state: RootState) => state.CatCorresponsales.CatCorresponsales |
|
|
|
|
) |
|
|
|
@ -472,7 +476,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
setIDTrafico(response.data.id) |
|
|
|
|
if (Ready4NextProcess && TerminaProceso >= 0) { |
|
|
|
|
if (Ready4NextProcess && TerminaProceso >= 0 && Depto === 'Corresponsalias') { |
|
|
|
|
if(Proceso === 1) { |
|
|
|
|
setNextStepModalHeader("Referencia completa");
|
|
|
|
|
setNextStepModalBody("Esta referencia se encuentra completa ¿Desea enviarla a contabilidad?") |
|
|
|
@ -850,6 +854,8 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
setChangePermission(true) |
|
|
|
|
} else if (Depto === 'Corresponsalias' && Proceso > 1) { |
|
|
|
|
setChangePermission(false) |
|
|
|
|
} else if (Perfil === 'heineken' && Proceso <= 1){ |
|
|
|
|
setChangePermission(true) |
|
|
|
|
}else setChangePermission(false) |
|
|
|
|
} |
|
|
|
|
if (IDTrafico === 0) { |
|
|
|
@ -1353,6 +1359,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const getCentroCostos = (idCliente: number) => { |
|
|
|
|
if(Perfil !== 'heineken'){ |
|
|
|
|
if(idCliente > 0){ |
|
|
|
|
CentrosCostosService.get(idCliente) |
|
|
|
|
.then(response => { |
|
|
|
@ -1372,10 +1379,11 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div> |
|
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'40rem', overflowY:'scroll'}}> |
|
|
|
|
<div style={{height:'100%', overflowY:'scroll'}}> |
|
|
|
|
<Card className="labelSize13px" style={{borderStyle:'none', height:'100%'}}> |
|
|
|
|
<Card.Body className={StatusColor}> |
|
|
|
|
<Card> |
|
|
|
|
<Card.Header> |
|
|
|
@ -1705,7 +1713,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
</Card> |
|
|
|
|
<br /> |
|
|
|
|
<Tabs |
|
|
|
|
defaultActiveKey="InformacionGeneral" |
|
|
|
|
defaultActiveKey= {Perfil === 'heineken'? "InformacionCorresponsal" : "InformacionGeneral"} |
|
|
|
|
id="uncontrolled-tab-example" |
|
|
|
|
className="mb-3" |
|
|
|
|
style={{visibility: IDTrafico !== 0 ? 'visible' : 'hidden'}} |
|
|
|
@ -1714,6 +1722,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
eventKey="InformacionGeneral" |
|
|
|
|
title="Informacion general" |
|
|
|
|
id="TabInformacionGeneral" |
|
|
|
|
tabClassName={Perfil === 'heineken' ? 'd-none' : ''} |
|
|
|
|
> |
|
|
|
|
<Card |
|
|
|
|
style={{ visibility: IDTrafico !== 0 ? 'visible' : 'hidden' }} |
|
|
|
@ -2797,7 +2806,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Tab |
|
|
|
|
eventKey="InformacionAdicional" |
|
|
|
|
title="Informacion adicional" |
|
|
|
|
tabClassName={mCFacturas.length >= 2 ? '' : 'd-none'} |
|
|
|
|
tabClassName={mCFacturas.length >= 2 && Perfil !== 'heineken' ? '' : 'd-none'} |
|
|
|
|
> |
|
|
|
|
<Card> |
|
|
|
|
<Card.Body> |
|
|
|
@ -3234,13 +3243,12 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Card> |
|
|
|
|
<Card.Body> |
|
|
|
|
{CatTiposDocumento ? ( |
|
|
|
|
<div> |
|
|
|
|
<Row xs={1} md={3} className="g-1"> |
|
|
|
|
<Row className="g-1"> |
|
|
|
|
{CatTiposDocumento.map((c) => { |
|
|
|
|
return ( |
|
|
|
|
<Col key={c.id}> |
|
|
|
|
<Col key={c.id} xs={4}> |
|
|
|
|
<Card |
|
|
|
|
style={{ width: '28rem', textAlign: 'center' }} |
|
|
|
|
style={{ width: '100%', textAlign: 'center', height:'100%' }} |
|
|
|
|
key={c.id} |
|
|
|
|
> |
|
|
|
|
<Card.Body key={c.id}> |
|
|
|
@ -3258,7 +3266,6 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
) |
|
|
|
|
})} |
|
|
|
|
</Row> |
|
|
|
|
</div> |
|
|
|
|
) : null} |
|
|
|
|
</Card.Body> |
|
|
|
|
</Card> |
|
|
|
@ -3290,7 +3297,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
id="FechaEntrada" |
|
|
|
|
size="sm" |
|
|
|
|
value={FEntrada} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onChange={(e) => setFEntrada(e.target.value)} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
@ -3301,7 +3308,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
id="FechaRevalidacionGuia" |
|
|
|
|
size="sm" |
|
|
|
|
value={FRevalidacionGuia} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onChange={(e) => setFRevalidacionGuia(e.target.value)} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
@ -3332,7 +3339,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Col> |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={Fletes} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
@ -3364,7 +3371,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={Seguros} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setSeguros(value) |
|
|
|
@ -3395,7 +3402,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={Embalaje} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setEmbalaje(value) |
|
|
|
@ -3426,7 +3433,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={Otros} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setOtros(value) |
|
|
|
@ -3473,7 +3480,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
id="FechaInicioGastosAlmacenaje" |
|
|
|
|
size="sm" |
|
|
|
|
value={FAlmacenajeInicioGastos} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setFAlmacenajeInicioGastos(e.target.value) |
|
|
|
|
} |
|
|
|
@ -3484,7 +3491,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={CostoDiario} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setCostoDiario(value) |
|
|
|
@ -3515,7 +3522,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={TotalPagar} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setTotalPagar(value) |
|
|
|
@ -3565,35 +3572,23 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<CurrencyFormat |
|
|
|
|
value={TipoCambio} |
|
|
|
|
prefix={'$'} |
|
|
|
|
displayType={ |
|
|
|
|
Depto === 'Corresponsalias' ? 'input' : 'text' |
|
|
|
|
} |
|
|
|
|
displayType='input' |
|
|
|
|
readOnly= {Depto !== 'Corresponsalias' ? true : false} |
|
|
|
|
thousandSeparator={true} |
|
|
|
|
onValueChange={(values: any) => { |
|
|
|
|
const { value } = values |
|
|
|
|
setTipoCambio(value) |
|
|
|
|
}} |
|
|
|
|
style={ |
|
|
|
|
Depto === 'Corresponsalias' |
|
|
|
|
? { |
|
|
|
|
fontSize: '18px', |
|
|
|
|
backgroundColor: '#F5FFED', |
|
|
|
|
border: '2px solid #25D05B', |
|
|
|
|
width: '100px', |
|
|
|
|
textAlign: 'right', |
|
|
|
|
borderRadius: '10px' |
|
|
|
|
} |
|
|
|
|
: { |
|
|
|
|
style={{ |
|
|
|
|
fontSize: '18px', |
|
|
|
|
backgroundColor: '#F5FFED', |
|
|
|
|
border: '2px solid #25D05B', |
|
|
|
|
width: '100px', |
|
|
|
|
width: '100%', |
|
|
|
|
textAlign: 'right', |
|
|
|
|
borderRadius: '10px', |
|
|
|
|
paddingRight: '5px', |
|
|
|
|
paddingLeft: '5px' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
paddingRight: '10px', |
|
|
|
|
paddingLeft: '10px' |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
|
</Row> |
|
|
|
@ -3607,7 +3602,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
id="FechaDespacho" |
|
|
|
|
size="sm" |
|
|
|
|
value={FDespacho} |
|
|
|
|
disabled={Depto !== 'Corresponsalias'} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onChange={(e) => setFDespacho(e.target.value)} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
@ -3621,7 +3616,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
as="select" |
|
|
|
|
className="form-select form-select-sm" |
|
|
|
|
value={Estatus} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' ? true : false} |
|
|
|
|
disabled={Depto !== 'Corresponsalias' && Perfil !== 'heineken'} |
|
|
|
|
onChange={(e) => { |
|
|
|
|
setEstatus(parseInt(e.target.value)) |
|
|
|
|
}} |
|
|
|
@ -3646,15 +3641,15 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Col xs={12}> |
|
|
|
|
<Partidas |
|
|
|
|
IDTrafico={IDTrafico} |
|
|
|
|
canEdit={Depto === 'Corresponsalias'} |
|
|
|
|
canEdit={Depto === 'Corresponsalias' || Perfil === 'heineken'} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
|
</Row> |
|
|
|
|
<Row style={{ paddingTop: 10 }}> |
|
|
|
|
<Col xs={12}> |
|
|
|
|
<Card> |
|
|
|
|
<Card.Body> |
|
|
|
|
{CatTiposDocumento ? ( |
|
|
|
|
<div> |
|
|
|
|
<Row xs={1} md={3} className="g-1"> |
|
|
|
|
{CatTiposDocumentoInfoCorresponsal |
|
|
|
|
? CatTiposDocumentoInfoCorresponsal.map((c) => { |
|
|
|
@ -3662,20 +3657,20 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Col key={c.id}> |
|
|
|
|
<Card |
|
|
|
|
style={{ |
|
|
|
|
width: '28rem', |
|
|
|
|
textAlign: 'center' |
|
|
|
|
textAlign: 'center', |
|
|
|
|
height:'100%' |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
<Card.Body> |
|
|
|
|
<FileManager |
|
|
|
|
IDUser={UserId} |
|
|
|
|
width={400} |
|
|
|
|
width={'100%'} |
|
|
|
|
height={100} |
|
|
|
|
IDProcess={c.proceso} |
|
|
|
|
IdFile={IDTrafico} |
|
|
|
|
FileName={''} |
|
|
|
|
canDelete={ |
|
|
|
|
Depto === 'Corresponsalias' |
|
|
|
|
Depto === 'Corresponsalias' && Perfil !== 'heineken' |
|
|
|
|
} |
|
|
|
|
FileType={['pdf']} |
|
|
|
|
setBackgroundColor={c.id} |
|
|
|
@ -3692,10 +3687,10 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
}) |
|
|
|
|
: ''} |
|
|
|
|
</Row> |
|
|
|
|
</div> |
|
|
|
|
) : null} |
|
|
|
|
</Card.Body> |
|
|
|
|
</Card> |
|
|
|
|
</Col> |
|
|
|
|
</Row> |
|
|
|
|
<Row> |
|
|
|
|
<Col xs={12}> |
|
|
|
@ -3704,7 +3699,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
IDTrafico={IDTrafico} |
|
|
|
|
Proceso={10} |
|
|
|
|
showPreview={1} |
|
|
|
|
canEdit={Depto === 'Corresponsalias'} |
|
|
|
|
canEdit={Depto === 'Corresponsalias' || Perfil === 'heineken'} |
|
|
|
|
Leyenda={'Selecciones las imagenes de previo...'} |
|
|
|
|
/> |
|
|
|
|
</Col> |
|
|
|
@ -3713,7 +3708,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Tab |
|
|
|
|
eventKey="CuentasComplementarias" |
|
|
|
|
title="Cuentas complementarias" |
|
|
|
|
tabClassName="" |
|
|
|
|
tabClassName={Perfil === 'heineken' ? 'd-none' : ''} |
|
|
|
|
> |
|
|
|
|
<Row> |
|
|
|
|
<Col xs={12}> |
|
|
|
@ -3727,7 +3722,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<Tab |
|
|
|
|
eventKey="Rectificaciones" |
|
|
|
|
title="Rectificaciones" |
|
|
|
|
tabClassName="" |
|
|
|
|
tabClassName={Perfil === 'heineken' ? 'd-none' : ''} |
|
|
|
|
> |
|
|
|
|
{/* <Card> |
|
|
|
|
<Row> |
|
|
|
@ -3854,7 +3849,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
|
<div style={{ height: '350px', overflow: 'scroll' }}> |
|
|
|
|
<Partidas |
|
|
|
|
IDTrafico={IDTrafico} |
|
|
|
|
canEdit={Depto === 'Corresponsalias'} |
|
|
|
|
canEdit={Depto === 'Corresponsalias' || Perfil === 'heineken'} |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
) : null} |
|
|
|
|