|
|
@ -1,4 +1,4 @@
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
import { useState } from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import NumberFormat from 'react-number-format';
|
|
|
|
import NumberFormat from 'react-number-format';
|
|
|
@ -9,22 +9,19 @@ import { Grid, TextField, MenuItem, Select, FormControl, InputLabel, InputAdornm
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
import { IconSearch } from '@tabler/icons';
|
|
|
|
import { IconSearch } from '@tabler/icons';
|
|
|
|
|
|
|
|
|
|
|
|
import { getComboCodeList } from 'apis/common';
|
|
|
|
|
|
|
|
import FileInputForms from 'views/cmm/FileInputForms';
|
|
|
|
import FileInputForms from 'views/cmm/FileInputForms';
|
|
|
|
|
|
|
|
|
|
|
|
// const toDate = new Date();
|
|
|
|
// const toDate = new Date();
|
|
|
|
|
|
|
|
|
|
|
|
const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
const JudgeDataModifyForm = ({ rowData, contDocs, ingbs, setOpen, handleModalSave }) => {
|
|
|
|
const alert = useAlert();
|
|
|
|
const alert = useAlert();
|
|
|
|
|
|
|
|
|
|
|
|
const [scCarnum, setScCarnum] = useState(rowData.scCarnum);
|
|
|
|
const [scCarnum, setScCarnum] = useState(rowData.scCarnum);
|
|
|
|
const [scName, setScName] = useState(rowData.scName);
|
|
|
|
const [scName, setScName] = useState(rowData.scName);
|
|
|
|
const [scDong, setScDong] = useState(rowData.scDong);
|
|
|
|
const [scDong, setScDong] = useState(rowData.scDong);
|
|
|
|
const [scContDoc, setScContDoc] = useState();
|
|
|
|
|
|
|
|
const [selectedContDoc, setSelectedContDoc] = useState(rowData.scContDoc);
|
|
|
|
const [selectedContDoc, setSelectedContDoc] = useState(rowData.scContDoc);
|
|
|
|
const [scIngb, setScIngb] = useState();
|
|
|
|
|
|
|
|
const [selectedIngb, setSelectedIngb] = useState(rowData.scIngb);
|
|
|
|
const [selectedIngb, setSelectedIngb] = useState(rowData.scIngb);
|
|
|
|
const [zippost1, setZippost1] = useState(`${rowData.zippost1}${rowData.zippost2}`);
|
|
|
|
const [zipcode1, setZipcode1] = useState((rowData.zipcode1 ?? '') + (rowData.zipcode2 ?? ''));
|
|
|
|
const [scJuso, setScJuso] = useState(rowData.scJuso);
|
|
|
|
const [scJuso, setScJuso] = useState(rowData.scJuso);
|
|
|
|
const [scBunji, setScBunji] = useState(rowData.scBunji);
|
|
|
|
const [scBunji, setScBunji] = useState(rowData.scBunji);
|
|
|
|
const [scWdate, setScWdate] = useState(rowData.scWdate);
|
|
|
|
const [scWdate, setScWdate] = useState(rowData.scWdate);
|
|
|
@ -48,7 +45,7 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
formData.append('scWdate', scWdate);
|
|
|
|
formData.append('scWdate', scWdate);
|
|
|
|
formData.append('scJbtime', scJbtime);
|
|
|
|
formData.append('scJbtime', scJbtime);
|
|
|
|
formData.append('scPos', scPos);
|
|
|
|
formData.append('scPos', scPos);
|
|
|
|
formData.append('zippost1', zippost1);
|
|
|
|
formData.append('zipcode1', zipcode1);
|
|
|
|
formData.append('scJuso', scJuso);
|
|
|
|
formData.append('scJuso', scJuso);
|
|
|
|
formData.append('scBunji', scBunji);
|
|
|
|
formData.append('scBunji', scBunji);
|
|
|
|
|
|
|
|
|
|
|
@ -67,19 +64,6 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
handleModalSave(formData);
|
|
|
|
handleModalSave(formData);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
// setSelectedContDoc('11');
|
|
|
|
|
|
|
|
setScContDoc([]);
|
|
|
|
|
|
|
|
getComboCodeList({ codeMcd: 'SC_CONT_DOC' }).then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
setScContDoc(res.data);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
getComboCodeList({ codeMcd: 'RC_INGB' }).then((res) => {
|
|
|
|
|
|
|
|
console.log(res);
|
|
|
|
|
|
|
|
setScIngb(res.data);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleChangeFile = (e) => {
|
|
|
|
const handleChangeFile = (e) => {
|
|
|
|
const fileKey = e.target.name;
|
|
|
|
const fileKey = e.target.name;
|
|
|
|
const fileArrKey = fileKey + e.target.dataset.index;
|
|
|
|
const fileArrKey = fileKey + e.target.dataset.index;
|
|
|
@ -129,9 +113,14 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
<Grid item sm={3}>
|
|
|
|
<Grid item sm={3}>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<InputLabel required>진술유형</InputLabel>
|
|
|
|
<InputLabel required>진술유형</InputLabel>
|
|
|
|
<Select size="small" defaultValue="11" onChange={(e) => setSelectedContDoc(e?.target?.value)}>
|
|
|
|
<Select
|
|
|
|
{scContDoc &&
|
|
|
|
size="small"
|
|
|
|
scContDoc.map((contDoc) => (
|
|
|
|
defaultValue={selectedContDoc}
|
|
|
|
|
|
|
|
value={selectedContDoc}
|
|
|
|
|
|
|
|
onChange={(e) => setSelectedContDoc(e?.target?.value)}
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
{contDocs &&
|
|
|
|
|
|
|
|
contDocs.map((contDoc) => (
|
|
|
|
<MenuItem key={contDoc.code} value={contDoc.code}>
|
|
|
|
<MenuItem key={contDoc.code} value={contDoc.code}>
|
|
|
|
{contDoc.value}
|
|
|
|
{contDoc.value}
|
|
|
|
</MenuItem>
|
|
|
|
</MenuItem>
|
|
|
@ -156,9 +145,9 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
<Grid item sm={3}>
|
|
|
|
<Grid item sm={3}>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<FormControl fullWidth>
|
|
|
|
<InputLabel required>접수방법</InputLabel>
|
|
|
|
<InputLabel required>접수방법</InputLabel>
|
|
|
|
<Select size="small" defaultValue="1" onChange={(e) => setSelectedIngb(e?.target?.value)}>
|
|
|
|
<Select size="small" defaultValue={selectedIngb} value={selectedIngb} onChange={(e) => setSelectedIngb(e?.target?.value)}>
|
|
|
|
{scIngb &&
|
|
|
|
{ingbs &&
|
|
|
|
scIngb.map((ingb) => (
|
|
|
|
ingbs.map((ingb) => (
|
|
|
|
<MenuItem key={ingb.code} value={ingb.code}>
|
|
|
|
<MenuItem key={ingb.code} value={ingb.code}>
|
|
|
|
{ingb.value}
|
|
|
|
{ingb.value}
|
|
|
|
</MenuItem>
|
|
|
|
</MenuItem>
|
|
|
@ -192,7 +181,7 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid container spacing={0.5} item xs={12} mb={2}>
|
|
|
|
<Grid container spacing={0.5} item xs={12} mb={2}>
|
|
|
|
<Grid item sm={12}>
|
|
|
|
<Grid item sm={6}>
|
|
|
|
<TextField
|
|
|
|
<TextField
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
required
|
|
|
|
required
|
|
|
@ -202,6 +191,12 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
onChange={(e) => setScPos(e?.target?.value)}
|
|
|
|
onChange={(e) => setScPos(e?.target?.value)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Grid item sm={3}>
|
|
|
|
|
|
|
|
<TextField disabled size="small" required label="전송상태" fullWidth value={rowData.scTransferNm} />
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Grid item sm={3}>
|
|
|
|
|
|
|
|
<TextField disabled size="small" required label="자료상태" fullWidth value={rowData.scStateNm} />
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
<Grid container spacing={0.5} item xs={12} mb={2}>
|
|
|
|
<Grid container spacing={0.5} item xs={12} mb={2}>
|
|
|
|
<Grid item sm={1.7}>
|
|
|
|
<Grid item sm={1.7}>
|
|
|
@ -210,8 +205,8 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
fullWidth
|
|
|
|
fullWidth
|
|
|
|
required
|
|
|
|
required
|
|
|
|
label="우편번호"
|
|
|
|
label="우편번호"
|
|
|
|
value={zippost1}
|
|
|
|
value={zipcode1 ?? ''}
|
|
|
|
onChange={(e) => setZippost1(e?.target?.value)}
|
|
|
|
onChange={(e) => setZipcode1(e?.target?.value)}
|
|
|
|
InputProps={{
|
|
|
|
InputProps={{
|
|
|
|
display: 'none',
|
|
|
|
display: 'none',
|
|
|
|
readOnly: true,
|
|
|
|
readOnly: true,
|
|
|
@ -456,6 +451,9 @@ const JudgeDataModifyForm = ({ rowData, handleModalSave }) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
JudgeDataModifyForm.propTypes = {
|
|
|
|
JudgeDataModifyForm.propTypes = {
|
|
|
|
rowData: PropTypes.object.isRequired,
|
|
|
|
rowData: PropTypes.object.isRequired,
|
|
|
|
handleModalSave: PropTypes.func.isRequired
|
|
|
|
contDocs: PropTypes.array.isRequired,
|
|
|
|
|
|
|
|
ingbs: PropTypes.array.isRequired,
|
|
|
|
|
|
|
|
handleModalSave: PropTypes.func.isRequired,
|
|
|
|
|
|
|
|
setOpen: PropTypes.func.isRequired
|
|
|
|
};
|
|
|
|
};
|
|
|
|
export default JudgeDataModifyForm;
|
|
|
|
export default JudgeDataModifyForm;
|
|
|
|