|
|
@ -115,6 +115,8 @@ import { ITiposMercancias } from '../../Interfaces/Catalogos/ICatTiposMercancias |
|
|
|
import axios from 'axios' |
|
|
|
import axios from 'axios' |
|
|
|
import { TargetURL } from '../../Constants/TargetURL' |
|
|
|
import { TargetURL } from '../../Constants/TargetURL' |
|
|
|
import CentrosCostosService from '../../Services/Catalogos/CentrosCostos.Service' |
|
|
|
import CentrosCostosService from '../../Services/Catalogos/CentrosCostos.Service' |
|
|
|
|
|
|
|
import ClavesPedimentosService from '../../Services/Catalogos/ClavesPedimentos.Service' |
|
|
|
|
|
|
|
import { ICatClavesPedimentos } from '../../Interfaces/Catalogos/ICatClavesPedimentos' |
|
|
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
interface IProps { |
|
|
|
IDTrafico: number |
|
|
|
IDTrafico: number |
|
|
@ -310,7 +312,7 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
const [EncabezadoPedimento1, setEncabezadoPedimento1] = useState("Pedimento"); |
|
|
|
const [EncabezadoPedimento1, setEncabezadoPedimento1] = useState("Pedimento"); |
|
|
|
const [EncabezadoPedimento2, setEncabezadoPedimento2] = useState("."); |
|
|
|
const [EncabezadoPedimento2, setEncabezadoPedimento2] = useState("."); |
|
|
|
const [CentroCostos, setCentroCostos] = useState<string>(''); |
|
|
|
const [CentroCostos, setCentroCostos] = useState<string>(''); |
|
|
|
|
|
|
|
const [ClavesPedimentos, setClavesPedimentos] = useState<ICatClavesPedimentos[]>([]) |
|
|
|
const FechaRegistro = currentDate() |
|
|
|
const FechaRegistro = currentDate() |
|
|
|
const msgColor = 'primary' |
|
|
|
const msgColor = 'primary' |
|
|
|
|
|
|
|
|
|
|
@ -522,6 +524,14 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const LoadEverything = () => { |
|
|
|
const LoadEverything = () => { |
|
|
|
|
|
|
|
ClavesPedimentosService.getAllClavesPedimentos() |
|
|
|
|
|
|
|
.then(response => setClavesPedimentos(response.data)) |
|
|
|
|
|
|
|
.catch((e: Error) => { |
|
|
|
|
|
|
|
setHeader('Error') |
|
|
|
|
|
|
|
setMsg('Ocurrio un error: ' + e) |
|
|
|
|
|
|
|
setShowMsg(true) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
}) |
|
|
|
CorresponsalesDataService.getAll() |
|
|
|
CorresponsalesDataService.getAll() |
|
|
|
.then((response) => { |
|
|
|
.then((response) => { |
|
|
|
dispatch(populateCatCorresponsales(response.data)) |
|
|
|
dispatch(populateCatCorresponsales(response.data)) |
|
|
@ -1921,15 +1931,26 @@ export default function TraficoCorresponsales (props:IProps) { |
|
|
|
<Form.Label> |
|
|
|
<Form.Label> |
|
|
|
Clave |
|
|
|
Clave |
|
|
|
<Form.Control |
|
|
|
<Form.Control |
|
|
|
type="text" |
|
|
|
as="select" |
|
|
|
id="Clave" |
|
|
|
id="CmbClavePedimento" |
|
|
|
size="sm" |
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
setClavePedimento(e.target.value) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
className="form-select form-select-sm" |
|
|
|
value={ClavePedimento} |
|
|
|
value={ClavePedimento} |
|
|
|
disabled={ |
|
|
|
disabled={(Depto !== 'Corresponsalias')} |
|
|
|
Depto !== 'Corresponsalias' ? true : false |
|
|
|
> |
|
|
|
} |
|
|
|
<option value="-Seleccione-">-Seleccione-</option> |
|
|
|
onChange={(e) => {if(e.target.value.length <= 2) setClavePedimento(e.target.value)}} |
|
|
|
{ClavesPedimentos |
|
|
|
/> |
|
|
|
? ClavesPedimentos.map((item, index) => { |
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<option key={item.id} value={item.clave}> |
|
|
|
|
|
|
|
{item.clave} |
|
|
|
|
|
|
|
</option> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
: ''} |
|
|
|
|
|
|
|
</Form.Control>
|
|
|
|
</Form.Label> |
|
|
|
</Form.Label> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
<Col sm={3} md={3}> |
|
|
|
<Col sm={3} md={3}> |
|
|
|