Se cambia el repositorio para que se guarde como un subdominio de gemcousa.mx

AmazonRelease1.1
unknown 2 years ago
parent 816e528183
commit 8cbd9e7772
  1. 545
      src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazonDetail.tsx

@ -169,20 +169,22 @@ export default function RptPendingAnswerFromAmazonDetail(
}, [EstatusSwith, UserChanged]) }, [EstatusSwith, UserChanged])
const ColorSET = (value: number, mode: number) => { const ColorSET = (value: number, mode: number) => {
switch(mode) { switch (mode) {
case 1: { case 1: {
// Background color // Background color
if (value === 1) return '#FFFAF2' if (value === 1) return '#FFFAF2'
else if (value === 2) return '#E5F7B6' else if (value === 2) return '#E5F7B6'
else if (value === 3) return '#E9F3FC' else if (value === 3) return '#E9F3FC'
break break
} case 2: { }
case 2: {
// Border color // Border color
if (value === 1) return '2px solid #F9A721' if (value === 1) return '2px solid #F9A721'
else if (value === 2) return '2px solid green' else if (value === 2) return '2px solid green'
else if (value === 3) return '2px solid blue' else if (value === 3) return '2px solid blue'
break break
} case 3: { }
case 3: {
// Color // Color
if (value === 1) return '#5923F6' if (value === 1) return '#5923F6'
if (value === 2) return '#000000' if (value === 2) return '#000000'
@ -194,59 +196,59 @@ export default function RptPendingAnswerFromAmazonDetail(
return ( return (
<> <>
{props.detail.confirmaFraccion === 2 ? {props.detail.confirmaFraccion === 2 ? (
<tr> <tr>
<th <th
style={{ style={{
width: '50px', width: '50px',
backgroundColor: '#FFFFFF' backgroundColor: '#FFFFFF'
}} }}
className="DetailData" className="DetailData"
> >
&nbsp; &nbsp;
</th> </th>
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
cursor: 'pointer' cursor: 'pointer'
}} }}
className="DetailData" className="DetailData"
onClick={() => openLink(props.detail.itemId)} onClick={() => openLink(props.detail.itemId)}
> >
{props.detail.itemId} {props.detail.itemId}
</td> </td>
<td <td
style={{ style={{
textAlign: 'right' textAlign: 'right'
}} }}
className="DetailData" className="DetailData"
> >
{props.detail.itemDescription} {props.detail.itemDescription}
</td> </td>
<td <td
style={{ style={{
textAlign: 'right' textAlign: 'right'
}} }}
className="DetailData" className="DetailData"
> >
{props.detail.pedimentoDescription} {props.detail.pedimentoDescription}
</td> </td>
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
fontSize: '18px' fontSize: '18px'
}} }}
className="DetailData" className="DetailData"
> >
&nbsp;&nbsp;{props.detail.destinationHTSCode} &nbsp;&nbsp;{props.detail.destinationHTSCode}
</td> </td>
<td <td
style={{ style={{
textAlign: 'center' textAlign: 'center'
}} }}
className="DetailData" className="DetailData"
> >
{/* {props.detail.validaFraccionOriginal === 0 ? ( {/* {props.detail.validaFraccionOriginal === 0 ? (
<IconContext.Provider <IconContext.Provider
value={{ value={{
color: 'orange', color: 'orange',
@ -283,40 +285,42 @@ export default function RptPendingAnswerFromAmazonDetail(
<ImCross /> <ImCross />
</IconContext.Provider> </IconContext.Provider>
)} */} )} */}
</td> </td>
<td <td
style={{
textAlign: 'center'
}}
className="DetailData"
>
<ComboFraccion
IDInvoice={props.IDMaster}
IDDetail={props.detail.id}
FraccionOriginal={props.detail.destinationHTSCode}
ConfirmaFraccion={props.detail.confirmaFraccion}
Deshabilitado={true}
Detail={props.detail}
/>
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
<CurrencyFormat
value={props.detail.fraccionGEMCO ? props.detail.fraccionGEMCO : ''}
disabled={true}
format={'######## ##'}
displayType={'input'}
style={{ style={{
fontSize: '18px', textAlign: 'center'
backgroundColor: }}
props.detail.validaFraccionOriginal === 0 className="DetailData"
? '#FFFAF2 ' >
: '#E5F7B6', <ComboFraccion
/* border: IDInvoice={props.IDMaster}
IDDetail={props.detail.id}
FraccionOriginal={props.detail.destinationHTSCode}
ConfirmaFraccion={props.detail.confirmaFraccion}
Deshabilitado={true}
Detail={props.detail}
/>
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
<CurrencyFormat
value={
props.detail.fraccionGEMCO ? props.detail.fraccionGEMCO : ''
}
disabled={true}
format={'######## ##'}
displayType={'input'}
style={{
fontSize: '18px',
backgroundColor:
props.detail.validaFraccionOriginal === 0
? '#FFFAF2 '
: '#E5F7B6',
/* border:
props.detail.validaFraccionOriginal === 0 props.detail.validaFraccionOriginal === 0
? '2px solid #F9A721' ? '2px solid #F9A721'
: '2px solid green', : '2px solid green',
@ -324,184 +328,187 @@ export default function RptPendingAnswerFromAmazonDetail(
props.detail.validaFraccionOriginal === 0 props.detail.validaFraccionOriginal === 0
? '#5923F6' ? '#5923F6'
: '#000000', */ : '#000000', */
border: '2px solid #000000', border: '2px solid #000000',
color: '@000000', color: '@000000',
width: '115px', width: '115px',
textAlign: 'right', textAlign: 'right',
borderRadius: '10px' borderRadius: '10px'
}}
/>
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
<ComboDescripcion
IDInvoice={props.IDMaster}
IDDetail={props.detail.id}
DescripcionOriginal={props.detail.pedimentoDescription}
ConfirmaDescripcion={props.detail.confirmaDescripcion}
Deshabilitado={true}
Detail={props.detail}
/>
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.descripcionGEMCO}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.countryOfOrigin}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.productGroup}
</td>
<td
style={{
textAlign: 'right'
}}
className="DetailData"
>
{props.detail.brand}
</td>
<td
style={{
textAlign: 'right'
}}
className="DetailData"
>
{props.detail.model}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.itemQuantityUnitOfMeasure}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.quantity}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.weightValue}
</td>
<td
style={{
textAlign: 'center'
}} }}
/> className="DetailData"
</td> >
<td {props.detail.netWeightUnitOfMeasure}
style={{ </td>
textAlign: 'center' <td
}} style={{
className="DetailData" textAlign: 'center'
> }}
<ComboDescripcion className="DetailData"
IDInvoice={props.IDMaster} >
IDDetail={props.detail.id} {props.detail.actualUnitCostMonetaryAmount}
DescripcionOriginal={props.detail.pedimentoDescription} </td>
ConfirmaDescripcion={props.detail.confirmaDescripcion} <td
Deshabilitado={true} /* style={{visibility: EstatusSwith ? 'hidden' : 'visible'}} */
Detail={props.detail} className="DetailData"
/> >
</td> <FormCheck
<td className="form-check form-switch form-control-lg"
style={{ id="switchEnabled"
textAlign: 'center' type="switch"
}} /* disabled={
className="DetailData"
>
{props.detail.descripcionGEMCO}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.countryOfOrigin}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.productGroup}
</td>
<td
style={{
textAlign: 'right'
}}
className="DetailData"
>
{props.detail.brand}
</td>
<td
style={{
textAlign: 'right'
}}
className="DetailData"
>
{props.detail.model}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.itemQuantityUnitOfMeasure}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.quantity}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.weightValue}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.netWeightUnitOfMeasure}
</td>
<td
style={{
textAlign: 'center'
}}
className="DetailData"
>
{props.detail.actualUnitCostMonetaryAmount}
</td>
<td
/* style={{visibility: EstatusSwith ? 'hidden' : 'visible'}} */
className="DetailData"
>
<FormCheck
className="form-check form-switch form-control-lg"
id="switchEnabled"
type="switch"
/* disabled={
props.detail.fraccionGEMCO === props.detail.fraccionGEMCO ===
props.detail.destinationHTSCode.replaceAll('.', '') props.detail.destinationHTSCode.replaceAll('.', '')
} */ } */
disabled={EstatusSwith} disabled={EstatusSwith}
checked={EstatusSwith && props.detail.autorizado} checked={EstatusSwith && props.detail.autorizado}
onChange={() => { onChange={() => {
setEstatusSwitch(!EstatusSwith) setEstatusSwitch(!EstatusSwith)
setUserChanged(true) setUserChanged(true)
setShowModal(!EstatusSwith) setShowModal(!EstatusSwith)
}}
label=""
/>
</td>
<td
style={{
visibility:
CumplimientoNormativo.length === 0 ? 'hidden' : 'visible'
}} }}
label=""
/>
</td>
<td
style={{
visibility:
CumplimientoNormativo.length === 0 ? 'hidden' : 'visible'
}}
>
<OverlayTrigger
placement="bottom"
overlay={
<Tooltip id="button-tooltip-2">{CumplimientoNormativo}</Tooltip>
}
> >
{({ ref, ...triggerHandler }) => ( <OverlayTrigger
<Button variant="light" {...triggerHandler}> placement="bottom"
<IconContext.Provider overlay={
value={{ <Tooltip id="button-tooltip-2">{CumplimientoNormativo}</Tooltip>
color: 'blue', }
size: '25px' >
}} {({ ref, ...triggerHandler }) => (
> <Button variant="light" {...triggerHandler}>
<AiOutlineFileSearch /> <IconContext.Provider
</IconContext.Provider> value={{
<span className="ms-1"></span> color: 'blue',
</Button> size: '25px'
)} }}
</OverlayTrigger> >
</td> <AiOutlineFileSearch />
<td </IconContext.Provider>
style={{ <span className="ms-1"></span>
visibility: </Button>
CumplimientoNormativo.length === 0 ? 'hidden' : 'visible' )}
}} </OverlayTrigger>
> </td>
<OverlayTrigger <td
placement="bottom" style={{
overlay={<Tooltip id="button-tooltip-2">{Comentarios}</Tooltip>} visibility:
CumplimientoNormativo.length === 0 ? 'hidden' : 'visible'
}}
> >
{({ ref, ...triggerHandler }) => ( <OverlayTrigger
<Button variant="light" {...triggerHandler}> placement="bottom"
<IconContext.Provider overlay={<Tooltip id="button-tooltip-2">{Comentarios}</Tooltip>}
value={{ >
color: 'green', {({ ref, ...triggerHandler }) => (
size: '25px' <Button variant="light" {...triggerHandler}>
}} <IconContext.Provider
> value={{
<BsFillChatRightTextFill /> color: 'green',
</IconContext.Provider> size: '25px'
<span className="ms-1"></span> }}
</Button> >
)} <BsFillChatRightTextFill />
</OverlayTrigger> </IconContext.Provider>
</td> <span className="ms-1"></span>
</tr> : '' } </Button>
)}
</OverlayTrigger>
</td>
</tr>
) : (
''
)}
<Modal <Modal
show={ShowModal} show={ShowModal}
@ -517,9 +524,17 @@ export default function RptPendingAnswerFromAmazonDetail(
<Col xs={12}> <Col xs={12}>
<Alert key={'danger'} variant={'danger'}> <Alert key={'danger'} variant={'danger'}>
<Row> <Row>
<Col xs={3} style={{fontWeight:'bold', cursor: 'pointer'}} onClick={() => openLink(props.detail.itemId)}>({props.detail.itemId})</Col> <Col
<Col xs={9}>¿Esta seguro que esta fraccion ya la autorizo Amazon?</Col> xs={3}
</Row> style={{ fontWeight: 'bold', cursor: 'pointer' }}
onClick={() => openLink(props.detail.itemId)}
>
({props.detail.itemId})
</Col>
<Col xs={9}>
¿Esta seguro que esta fraccion ya la autorizo Amazon?
</Col>
</Row>
</Alert> </Alert>
</Col> </Col>
</Row> </Row>
@ -569,9 +584,7 @@ export default function RptPendingAnswerFromAmazonDetail(
as="textarea" as="textarea"
id="Comentarios" id="Comentarios"
size="sm" size="sm"
value={ value={Comentarios}
Comentarios
}
onChange={(e) => setComentarios(e.target.value)} onChange={(e) => setComentarios(e.target.value)}
/> />
</Col> </Col>

Loading…
Cancel
Save