물건현황 리스트 사양확정일 필드명 수정 & 임시저장 & 상세화면 ...
This commit is contained in:
parent
4d859d1530
commit
cc9eee731b
@ -123,8 +123,8 @@ export default function Stuff() {
|
||||
{ field: 'dispCompanyName', headerName: getMessage('stuff.gridHeader.dispCompanyName'), cellStyle: { textAlign: 'left' } },
|
||||
{ field: 'receiveUser', headerName: getMessage('stuff.gridHeader.receiveUser'), cellStyle: { textAlign: 'left' } },
|
||||
{
|
||||
field: 'specDate',
|
||||
headerName: getMessage('stuff.gridHeader.specDate'),
|
||||
field: 'specificationConfirmDate',
|
||||
headerName: getMessage('stuff.gridHeader.specificationConfirmDate'),
|
||||
valueFormatter: function (params) {
|
||||
if (params.value) {
|
||||
return dayjs(params?.value).format('YYYY.MM.DD')
|
||||
|
||||
@ -31,7 +31,7 @@ export default function StuffDetail() {
|
||||
const { getMessage } = useMessage()
|
||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||
const ref = useRef()
|
||||
const { get, del, promisePost } = useAxios(globalLocaleState)
|
||||
const { get, del, promisePost, promisePut } = useAxios(globalLocaleState)
|
||||
//form
|
||||
const formInitValue = {
|
||||
// 물건번호 T...(임시) R...(진짜)
|
||||
@ -71,6 +71,8 @@ export default function StuffDetail() {
|
||||
const [honorificCodeList, setHonorificCodeList] = useState([]) //경칭 공통코드 리스트
|
||||
const [selHonorificCode, setSelHonorificCode] = useState('') //선택한 경칭코드
|
||||
const [objectStatusList, setObjectStatusList] = useState([]) //물건구분 공통코드 리스트
|
||||
|
||||
const [selectObjectStatusId, setSelectObjectStatusId] = useState('0') //신축기축 선택값
|
||||
const [windSpeedList, setWindSpeedList] = useState([]) //기준 풍속 공통코드 리스트
|
||||
const [prefCodeList, setPrefCodeList] = useState([]) //도도부현 코트 리스트
|
||||
const [prefValue, setPrefValue] = useState('')
|
||||
@ -93,7 +95,6 @@ export default function StuffDetail() {
|
||||
// console.log('objectNo::', objectNo)
|
||||
|
||||
if (objectNo) {
|
||||
console.log('수정화면')
|
||||
setEditMode('EDIT')
|
||||
|
||||
if (objectNo.substring(0, 1) === 'R') {
|
||||
@ -116,7 +117,6 @@ export default function StuffDetail() {
|
||||
|
||||
//1차점 : X167 T01
|
||||
//2차점 : 10X22, 201X112
|
||||
// get({ url: `/api/object/saleStore/T100/list` }).then((res) => {
|
||||
get({ url: `/api/object/saleStore/${sessionState?.storeId}/list` }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
const firstList = res.filter((row) => row.saleStoreLevel === '1')
|
||||
@ -171,11 +171,8 @@ export default function StuffDetail() {
|
||||
}
|
||||
})
|
||||
|
||||
//상세정보로 1차점 목록등 셋팅??
|
||||
// 임시 1차점 판매점코드 saleStoreId=201TES01
|
||||
// T01
|
||||
//1차점 : X167
|
||||
// get({ url: `/api/object/saleStore/T01/list` }).then((res) => {
|
||||
//1차점 : X167 T01
|
||||
//2차점 : 10X22, 201X112
|
||||
get({ url: `/api/object/saleStore/${sessionState?.storeId}/list` }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
const firstList = res.filter((row) => row.saleStoreLevel === '1')
|
||||
@ -186,11 +183,44 @@ export default function StuffDetail() {
|
||||
setOriginOtherSaleStoreList(otherList)
|
||||
setOtherSaleStoreList(otherList)
|
||||
}
|
||||
})
|
||||
|
||||
console.log('상세데이타::세팅:::::', detailData)
|
||||
//설계의뢰No.
|
||||
form.setValue('planReqNo', detailData.planReqNo)
|
||||
//담당자
|
||||
form.setValue('dispCompanyName', detailData.dispCompanyName)
|
||||
|
||||
//물건구분objectStatusId
|
||||
setSelectObjectStatusId(detailData.objectStatusId)
|
||||
form.setValue('objectStatusId', detailData.objectStatusId)
|
||||
|
||||
//물건명
|
||||
form.setValue('objectName', detailData.objectName)
|
||||
|
||||
//경칭코드
|
||||
|
||||
setSelHonorificCode(detailData.objectNameOmit)
|
||||
form.setValue('objectNameOmit', detailData.objectNameOmit)
|
||||
|
||||
//물건명 후리가나
|
||||
form.setValue('objectNameKana', detailData.objectNameKana)
|
||||
|
||||
// console.log('1차점리스트::', firstList)
|
||||
// console.log('2차점리스트::', otherList)
|
||||
setSelOptions(detailData.saleStoreId)
|
||||
form.setValue('saleStoreId', detailData.saleStoreId)
|
||||
form.setValue('saleStoreLevel', sessionState?.storeLvl)
|
||||
|
||||
//2차점까지 고른경우 확인필요
|
||||
console.log('2차점까지 고른경우 확인필요')
|
||||
// setOtherSelOptions(sessionState?.storeId)
|
||||
// form.setValue('saleStoreId', firstList[0].saleStoreId)
|
||||
// form.setValue('otherSaleStoreId', sessionState?.storeId)
|
||||
// form.setValue('otherSaleStoreLevel', sessionState?.storeLvl)
|
||||
|
||||
form.setValue('zipNo', detailData.zipNo)
|
||||
})
|
||||
}
|
||||
}, [detailData])
|
||||
}, [detailData, sessionState])
|
||||
|
||||
//경칭선택 변경 이벤트
|
||||
const onChangeHonorificCode = (key) => {
|
||||
@ -212,8 +242,26 @@ export default function StuffDetail() {
|
||||
}
|
||||
}
|
||||
|
||||
//물건구분 변경 이벤트
|
||||
const onRadioChange = (key) => {
|
||||
setSelectObjectStatusId(key.target.value)
|
||||
}
|
||||
//1차점 변경 이벤트
|
||||
const onSelectionChange = (key) => {
|
||||
const planReqNo = form.watch('planReqNo')
|
||||
|
||||
let delFlg = false
|
||||
if (planReqNo !== '') {
|
||||
if (confirm('stuff.detail.confirm.message1')) {
|
||||
delFlg = true
|
||||
} else {
|
||||
delFlg = false
|
||||
}
|
||||
}
|
||||
|
||||
if (planReqNo !== '') {
|
||||
if (delFlg) {
|
||||
form.setValue('planReqNo', '')
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setOtherSaleStoreList(otherSaleStoreList)
|
||||
form.setValue('saleStoreId', key.saleStoreId)
|
||||
@ -233,14 +281,54 @@ export default function StuffDetail() {
|
||||
form.setValue('otherSaleStoreId', '')
|
||||
form.setValue('otherSaleStoreName', '')
|
||||
form.setValue('otherSaleStoreLevel', '')
|
||||
setOtherSaleStoreList(originOtherSaleStoreList)
|
||||
//1차점 지웠을때 2차점 자동완성 초기화
|
||||
setOtherSaleStoreList(originOtherSaleStoreList)
|
||||
handleClear()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setOtherSaleStoreList(otherSaleStoreList)
|
||||
form.setValue('saleStoreId', key.saleStoreId)
|
||||
form.setValue('saleStoreName', key.saleStoreName)
|
||||
form.setValue('saleStoreLevel', key.saleStoreLevel)
|
||||
setSelOptions(key.saleStoreId)
|
||||
//선택한 1차점 정보로 2차점 list 추리기
|
||||
//長府工産株式会社 大阪支社
|
||||
let newOtherSaleStoreList = originOtherSaleStoreList.filter((row) => row.firstAgentId === key.saleStoreId)
|
||||
setOtherSaleStoreList(newOtherSaleStoreList)
|
||||
} else {
|
||||
//X누름
|
||||
setSelOptions('')
|
||||
form.setValue('saleStoreId', '')
|
||||
form.setValue('saleStoreName', '')
|
||||
form.setValue('saleStoreLevel', '')
|
||||
form.setValue('otherSaleStoreId', '')
|
||||
form.setValue('otherSaleStoreName', '')
|
||||
form.setValue('otherSaleStoreLevel', '')
|
||||
//1차점 지웠을때 2차점 자동완성 초기화
|
||||
setOtherSaleStoreList(originOtherSaleStoreList)
|
||||
handleClear()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//2차점 변경 이벤트
|
||||
const onSelectionChange2 = (key) => {
|
||||
const planReqNo = form.watch('planReqNo')
|
||||
|
||||
let delFlg = false
|
||||
if (planReqNo !== '') {
|
||||
if (confirm('stuff.detail.confirm.message1')) {
|
||||
delFlg = true
|
||||
} else {
|
||||
delFlg = false
|
||||
}
|
||||
}
|
||||
|
||||
if (planReqNo !== '') {
|
||||
if (delFlg) {
|
||||
form.setValue('planReqNo', '')
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setOtherSelOptions(key.saleStoreId)
|
||||
form.setValue('otherSaleStoreId', key.saleStoreId)
|
||||
@ -253,6 +341,20 @@ export default function StuffDetail() {
|
||||
form.setValue('otherSaleStoreLevel', '')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isObjectNotEmpty(key)) {
|
||||
setOtherSelOptions(key.saleStoreId)
|
||||
form.setValue('otherSaleStoreId', key.saleStoreId)
|
||||
form.setValue('otherSaleStoreName', key.saleStoreName)
|
||||
form.setValue('otherSaleStoreLevel', key.saleStoreLevel)
|
||||
} else {
|
||||
setOtherSelOptions('')
|
||||
form.setValue('otherSaleStoreId', '')
|
||||
form.setValue('otherSaleStoreName', '')
|
||||
form.setValue('otherSaleStoreLevel', '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//1차점 지웠을때 2차점 자동완성 초기화
|
||||
const handleClear = () => {
|
||||
@ -295,8 +397,8 @@ export default function StuffDetail() {
|
||||
if (info.saleStoreLevel === '1') {
|
||||
setSelOptions(info.saleStoreId)
|
||||
form.setValue('saleStoreId', info.saleStoreId)
|
||||
form.setValue('saleStoreName', key.saleStoreName)
|
||||
form.setValue('saleStoreLevel', key.saleStoreLevel)
|
||||
form.setValue('saleStoreName', info.saleStoreName)
|
||||
form.setValue('saleStoreLevel', info.saleStoreLevel)
|
||||
} else {
|
||||
setOtherSelOptions(info.saleStoreId)
|
||||
form.setValue('otherSaleStoreId', info.saleStoreId)
|
||||
@ -310,40 +412,32 @@ export default function StuffDetail() {
|
||||
form.setValue('windSpeed', info.windSpeed)
|
||||
}
|
||||
|
||||
//임시저장 저장 버튼 컨트롤
|
||||
//dispCompanyName: '', //담당자
|
||||
// objectName: '', //물건명
|
||||
// objectNameOmit: '', //경칭선택
|
||||
// saleStoreId: '', //판매점ID
|
||||
// zipNo: '', //우편번호
|
||||
// prefId: '', //도도부현
|
||||
// address: '', //주소
|
||||
// areaId: '', //발전량시뮬레이션지역new
|
||||
// windSpeed: '', //기준풍속
|
||||
// verticalSnowCover: '', //수직적설량
|
||||
// coldRegionFlg: false, //한랭지대책시행
|
||||
// surfaceType: 'Ⅲ・Ⅳ', //면조도구분(Ⅲ・Ⅳ / Ⅱ)
|
||||
// saltAreaFlg: false, //염해지역용아이템사용
|
||||
// installHeight: '', //설치높이
|
||||
// conType : '0' //계약조건(잉여 / 전량)
|
||||
// remarks: '', //메모
|
||||
// tempFlag: 'T', //임시저장(1) 저장(0)
|
||||
const _dispCompanyName = watch('dispCompanyName')
|
||||
//objectName: '', //물건명
|
||||
const _objectName = watch('objectName')
|
||||
// objectNameOmit: '', //경칭선택
|
||||
const _objectNameOmit = watch('objectNameOmit')
|
||||
// saleStoreId: '', //1차 판매점ID
|
||||
const _saleStoreId = watch('saleStoreId')
|
||||
const _saleStoreLevel = watch('saleStoreLevel')
|
||||
// zipNo: '', //우편번호
|
||||
const _zipNo = watch('zipNo')
|
||||
// prefId: '', //도도부현
|
||||
const _prefId = watch('prefId')
|
||||
// address: '', //주소
|
||||
const _address = watch('address')
|
||||
const _areaId = watch('areaId') //new
|
||||
// areaId: '', //발전량시뮬레이션지역
|
||||
const _areaId = watch('areaId')
|
||||
// windSpeed: '', //기준풍속
|
||||
const _windSpeed = watch('windSpeed')
|
||||
// verticalSnowCover: '', //수직적설량
|
||||
const _verticalSnowCover = watch('verticalSnowCover')
|
||||
// installHeight: '', //설치높이
|
||||
const _installHeight = watch('installHeight')
|
||||
|
||||
useEffect(() => {
|
||||
if (editMode === 'NEW') {
|
||||
const formData = form.getValues()
|
||||
// console.log('임시저장폼error체크::::::::::::', formData)
|
||||
let errors = {}
|
||||
if (!formData.dispCompanyName || formData.dispCompanyName.trim().length === 0) {
|
||||
errors.dispCompanyName = true
|
||||
@ -358,6 +452,10 @@ export default function StuffDetail() {
|
||||
errors.saleStoreId = true
|
||||
}
|
||||
|
||||
if (!formData.zipNo) {
|
||||
errors.zipNo = true
|
||||
}
|
||||
|
||||
if (!formData.prefId) {
|
||||
errors.prefId = true
|
||||
}
|
||||
@ -378,19 +476,57 @@ export default function StuffDetail() {
|
||||
errors.installHeight = true
|
||||
}
|
||||
|
||||
// console.log('임시저장용::', errors)
|
||||
setIsFormValid(Object.keys(errors).length === 0 ? true : false)
|
||||
} else {
|
||||
console.log('상세일때 폼체크')
|
||||
const formData = form.getValues()
|
||||
let errors = {}
|
||||
if (!formData.dispCompanyName || formData.dispCompanyName.trim().length === 0) {
|
||||
errors.dispCompanyName = true
|
||||
}
|
||||
if (!formData.objectName || formData.objectName.trim().length === 0) {
|
||||
errors.objectName = true
|
||||
}
|
||||
if (!formData.objectNameOmit) {
|
||||
errors.objectNameOmit = true
|
||||
}
|
||||
if (!formData.saleStoreId) {
|
||||
errors.saleStoreId = true
|
||||
}
|
||||
|
||||
if (!formData.zipNo) {
|
||||
errors.zipNo = true
|
||||
}
|
||||
|
||||
if (!formData.prefId) {
|
||||
errors.prefId = true
|
||||
}
|
||||
|
||||
if (!formData.areaId) {
|
||||
errors.areaId = true
|
||||
}
|
||||
|
||||
if (!formData.windSpeed) {
|
||||
errors.windSpeed = true
|
||||
}
|
||||
|
||||
if (!formData.verticalSnowCover) {
|
||||
errors.verticalSnowCover = true
|
||||
}
|
||||
|
||||
if (!formData.installHeight) {
|
||||
errors.installHeight = true
|
||||
}
|
||||
|
||||
console.log('상세 저장용 에러결과?????::', errors)
|
||||
setIsFormValid(Object.keys(errors).length === 0 ? true : false)
|
||||
}
|
||||
}, [
|
||||
_dispCompanyName,
|
||||
_objectName,
|
||||
_objectNameOmit,
|
||||
_saleStoreId,
|
||||
_saleStoreLevel,
|
||||
// _otherSaleStoreId,
|
||||
// _otherSaleStoreLevel,
|
||||
_zipNo,
|
||||
_prefId,
|
||||
_address,
|
||||
_areaId,
|
||||
@ -424,8 +560,6 @@ export default function StuffDetail() {
|
||||
// 발전량시뮬레이션 지역 목록
|
||||
get({ url: `/api/object/prefecture/${prefValue}/list` }).then((res) => {
|
||||
if (!isEmptyArray(res)) {
|
||||
// form.setValue('areaId', res[0].areaId)
|
||||
// form.setValue('areaName', res[0].prefName)
|
||||
setAreaIdList(res)
|
||||
}
|
||||
})
|
||||
@ -439,29 +573,52 @@ export default function StuffDetail() {
|
||||
}
|
||||
|
||||
//필수값 다 입력했을때
|
||||
const onValid = (data, e) => {
|
||||
const onValid = async () => {
|
||||
const formData = form.getValues()
|
||||
console.log('필수값 통과:::', data, formData)
|
||||
// console.log('필수값 formData:::', formData)
|
||||
console.log('필수값 통과:::', formData)
|
||||
const apiUrl = '/api/object/save-object'
|
||||
const params = {
|
||||
saleStoreId: formData.otherSaleStoreId ? formData.otherSaleStoreId : formData.saleStoreId,
|
||||
saleStoreName: formData.otherSaleStoreName ? formData.otherSaleStoreName : formData.saleStoreName,
|
||||
saleStoreLevel: formData.otherSaleStoreLevel ? formData.otherSaleStoreLevel : formData.saleStoreLevel,
|
||||
objectStatusId: formData.objectStatusId,
|
||||
objectName: formData.objectName,
|
||||
objectNameOmit: formData.objectNameOmit,
|
||||
objectNameKana: formData.objectNameKana,
|
||||
zipNo: formData.zipNo,
|
||||
prefId: formData.prefId,
|
||||
prefName: formData.prefName,
|
||||
address: formData.address,
|
||||
areaId: formData.areaId,
|
||||
receiveUser: formData.dispCompanyName,
|
||||
installHeight: formData.installHeight,
|
||||
windSpeed: formData.windSpeed,
|
||||
verticalSnowCover: formData.verticalSnowCover,
|
||||
surfaceType: formData.surfaceType,
|
||||
conType: formData.conType,
|
||||
coldRegionFlg: formData.coldRegionFlg,
|
||||
saltAreaFlg: formData.saltAreaFlg,
|
||||
tempFlg: '0',
|
||||
workNo: null,
|
||||
workName: null,
|
||||
}
|
||||
console.log('params::', params)
|
||||
alert('작업중')
|
||||
return
|
||||
if (editMode === 'NEW') {
|
||||
await promisePost({ url: apiUrl, data: params }).then((res) => {
|
||||
console.log('진짜저장결과::::', pathname, res)
|
||||
|
||||
//상세화면으로 전환
|
||||
//router.push(`${pathname}?objectNo=${res.data.objectNo.toString()}`)
|
||||
})
|
||||
} else {
|
||||
// 수정모드일때는 PUT
|
||||
// console.log('필수값 다 있고 저장')
|
||||
// console.log('data::::::', data)
|
||||
// console.log('formData::::', formData)
|
||||
// const _dispCompanyName = watch('dispCompanyName')
|
||||
// const _objectStatusId = watch('objectStatusId')
|
||||
// const _objectNameOmit = watch('objectNameOmit')
|
||||
// const _zipNo = watch('zipNo')
|
||||
// const _prefId = watch('prefId')
|
||||
// const _address = watch('address')
|
||||
// const _coldRegionFlg = watch('coldRegionFlg')
|
||||
// console.log(_dispCompanyName)
|
||||
// console.log(_objectStatusId)
|
||||
// console.log(_objectNameOmit)
|
||||
// console.log(_zipNo)
|
||||
// console.log(_prefId)
|
||||
// console.log('prefValue::', prefValue)
|
||||
// console.log(_address)
|
||||
// console.log('_coldRegionFlg::', _coldRegionFlg)
|
||||
await promisePut({ url: apiUrl, data: params }).then((res) => {
|
||||
console.log('진짜데이터 수정 결과::::::::::', pathname, res)
|
||||
//새로고침???
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//필수값 안넣었을때 임시저장 form required사용시
|
||||
@ -474,8 +631,6 @@ export default function StuffDetail() {
|
||||
// 임시저장
|
||||
const onTempSave = async () => {
|
||||
const formData = form.getValues()
|
||||
console.log('임시저장누름:::::', formData)
|
||||
return
|
||||
const params = {
|
||||
saleStoreId: formData.otherSaleStoreId ? formData.otherSaleStoreId : formData.saleStoreId,
|
||||
saleStoreName: formData.otherSaleStoreName ? formData.otherSaleStoreName : formData.saleStoreName,
|
||||
@ -501,15 +656,17 @@ export default function StuffDetail() {
|
||||
workNo: null,
|
||||
workName: null,
|
||||
}
|
||||
|
||||
//1차점 or 2차점 안고르고 임시저장하면
|
||||
if (params.saleStoreId == '') {
|
||||
params.saleStoreId = sessionState.storeId
|
||||
params.saleStoreLevel = sessionState.storeLvl
|
||||
}
|
||||
|
||||
alert('작업중')
|
||||
return
|
||||
await promisePost({ url: '/api/object/save-object', data: params }).then((res) => {
|
||||
if (res.status === 201) {
|
||||
alert('임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.')
|
||||
getMessage('stuff.detail.tempSave.message1')
|
||||
router.push(`${pathname}?objectNo=${res.data.objectNo.toString()}`)
|
||||
}
|
||||
})
|
||||
@ -576,7 +733,7 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
{/* 라디오시작 */}
|
||||
{objectStatusList.map((row, index) => {
|
||||
{objectStatusList.map((row) => {
|
||||
return (
|
||||
<div className="d-check-radio light mr10" key={`objectStatusId_${row.clCode}`}>
|
||||
<input
|
||||
@ -585,6 +742,8 @@ export default function StuffDetail() {
|
||||
value={row.clCode}
|
||||
id={`objectStatus${row.clCode}`}
|
||||
{...register('objectStatusId')}
|
||||
onChange={onRadioChange}
|
||||
checked={row.clCode === selectObjectStatusId}
|
||||
/>
|
||||
<label htmlFor={`objectStatus${row.clCode}`}>{row.clCodeNm}</label>
|
||||
</div>
|
||||
@ -597,7 +756,7 @@ export default function StuffDetail() {
|
||||
<div className="select-wrap" style={{ width: '120px' }}>
|
||||
<Select
|
||||
{...register('objectNameOmit')}
|
||||
id="ng-value-select0"
|
||||
id="long-value-select0"
|
||||
instanceId="long-value-select0"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
@ -782,9 +941,6 @@ export default function StuffDetail() {
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
{/* <div className="input-wrap mr10">
|
||||
<input type="text" className="input-light" readOnly value={form.watch('windSpeed')} {...register('windSpeed')} />
|
||||
</div> */}
|
||||
{/* 기준풍속sel시작 */}
|
||||
<div className="select-wrap mr10" style={{ width: '200px' }}>
|
||||
<Select
|
||||
@ -819,13 +975,6 @@ export default function StuffDetail() {
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
{/* <div className="select-wrap mr10" style={{ width: '200px' }}>
|
||||
<select className="select-light" name="verticalSnowCover" {...register('verticalSnowCover')}>
|
||||
<option value="">수직적설량 인풋</option>
|
||||
<option value="30">30</option>
|
||||
<option value="40">40</option>
|
||||
</select>
|
||||
</div> */}
|
||||
<div className="input-wrap mr10" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('verticalSnowCover')} {...register('verticalSnowCover')} />
|
||||
</div>
|
||||
@ -935,11 +1084,15 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" readOnly />
|
||||
<input type="text" className="input-light" readOnly value={form.watch('planReqNo')} />
|
||||
</div>
|
||||
{objectNo.substring(0, 1) === 'T' ? (
|
||||
<>
|
||||
<Button className="btn-origin grey" onClick={onSearchDesignRequestPopOpen}>
|
||||
{getMessage('stuff.planReqPopup.title')}
|
||||
</Button>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -969,6 +1122,8 @@ export default function StuffDetail() {
|
||||
value={row.clCode}
|
||||
id={`objectStatus${row.clCode}`}
|
||||
{...register('objectStatusId')}
|
||||
onChange={onRadioChange}
|
||||
checked={row.clCode === selectObjectStatusId}
|
||||
/>
|
||||
<label htmlFor={`objectStatus${row.clCode}`}>{row.clCodeNm}</label>
|
||||
</div>
|
||||
@ -981,7 +1136,7 @@ export default function StuffDetail() {
|
||||
<div className="select-wrap" style={{ width: '120px' }}>
|
||||
<Select
|
||||
{...register('objectNameOmit')}
|
||||
id="ng-value-select0"
|
||||
id="long-value-select0"
|
||||
instanceId="long-value-select0"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
@ -993,6 +1148,8 @@ export default function StuffDetail() {
|
||||
isClearable={true}
|
||||
isSearchable={false}
|
||||
value={honorificCodeList.filter(function (option) {
|
||||
console.log('상세 경칭코드결과:::::::::::::::', option.clCode)
|
||||
console.log('상세 셋팅된 경칭코드값:::::::::::::::', selHonorificCode)
|
||||
return option.clCode === selHonorificCode
|
||||
})}
|
||||
></Select>
|
||||
@ -1021,15 +1178,21 @@ export default function StuffDetail() {
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
{/* <Select
|
||||
<Select
|
||||
id="long-value-select1"
|
||||
instanceId="long-value-select1"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
options={saleStoreList}
|
||||
value={form.watch('saleStoreId')}
|
||||
onChange={onSelectionChange}
|
||||
labelField="saleStoreName"
|
||||
valueField="saleStoreId"
|
||||
searchBy="saleStoreName"
|
||||
clearable={true}
|
||||
></Select> */}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={saleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === selOptions
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input type="text" className="input-light" value={form.watch('saleStoreId')} {...form.register('saleStoreId')} readOnly />
|
||||
@ -1037,6 +1200,64 @@ export default function StuffDetail() {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<div className="flx-box">
|
||||
<div className="title">{getMessage('stuff.detail.otherSaleStoreId')}</div>
|
||||
<div className="tooltips">
|
||||
<span>{getMessage('stuff.detail.tooltip.saleStoreId')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||
<Select
|
||||
id="long-value-select2"
|
||||
instanceId="long-value-select2"
|
||||
className="react-select-custom"
|
||||
classNamePrefix="custom"
|
||||
placeholder="Select"
|
||||
ref={ref}
|
||||
options={otherSaleStoreList}
|
||||
onChange={onSelectionChange2}
|
||||
getOptionLabel={(x) => x.saleStoreName}
|
||||
getOptionValue={(x) => x.saleStoreId}
|
||||
isDisabled={sessionState?.storeLvl === '1' && form.watch('saleStoreId') != '' ? false : true}
|
||||
isClearable={sessionState?.storeLvl === '1' ? true : false}
|
||||
value={otherSaleStoreList.filter(function (option) {
|
||||
return option.saleStoreId === otherSelOptions
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
<div className="input-wrap" style={{ width: '216px' }}>
|
||||
<input
|
||||
type="text"
|
||||
className="input-light"
|
||||
value={form.watch('otherSaleStoreId')}
|
||||
{...form.register('otherSaleStoreId')}
|
||||
readOnly
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
{getMessage('stuff.detail.zipNo')} <span className="important">*</span>
|
||||
</th>
|
||||
<td>
|
||||
<div className="flx-box">
|
||||
<div className="input-wrap mr5" style={{ width: '200px' }}>
|
||||
<input type="text" className="input-light" disabled value={form.watch('zipNo')} />
|
||||
</div>
|
||||
<Button className="btn-origin grey" onClick={onSearchPostNumberPopOpen}>
|
||||
{getMessage('stuff.detail.btn.addressPop')}
|
||||
</Button>
|
||||
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -454,7 +454,7 @@
|
||||
"stuff.gridHeader.address": "商品アドレス",
|
||||
"stuff.gridHeader.dispCompanyName": "見積もり",
|
||||
"stuff.gridHeader.receiveUser": "担当者",
|
||||
"stuff.gridHeader.specDate": "仕様確認日",
|
||||
"stuff.gridHeader.specificationConfirmDate": "仕様確認日",
|
||||
"stuff.gridHeader.createDatetime": "登録日",
|
||||
"stuff.message.periodError": "最大1年間閲覧可能.",
|
||||
"stuff.addressPopup.title": "郵便番号",
|
||||
@ -495,6 +495,8 @@
|
||||
"stuff.detail.conType1": "全量",
|
||||
"stuff.detail.remarks": "メモ",
|
||||
"stuff.detail.tooltip.saleStoreId": "販売代理店または販売代理店IDを1文字以上入力してください",
|
||||
"stuff.detail.tempSave.message1": "一時保存されました。商品番号を取得するには、必須項目をすべて入力してください。",
|
||||
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
||||
"stuff.planReqPopup.popTitle": "設計依頼検索",
|
||||
"stuff.planReqPopup.btn1": "検索",
|
||||
"stuff.planReqPopup.btn2": "初期化",
|
||||
|
||||
@ -459,7 +459,7 @@
|
||||
"stuff.gridHeader.address": "물건주소",
|
||||
"stuff.gridHeader.dispCompanyName": "견적처",
|
||||
"stuff.gridHeader.receiveUser": "담당자",
|
||||
"stuff.gridHeader.specDate": "사양확인일",
|
||||
"stuff.gridHeader.specificationConfirmDate": "사양확인일",
|
||||
"stuff.gridHeader.createDatetime": "등록일",
|
||||
"stuff.message.periodError": "최대1년 조회 가능합니다.",
|
||||
"stuff.addressPopup.title": "우편번호",
|
||||
@ -500,6 +500,8 @@
|
||||
"stuff.detail.conType1": "전량",
|
||||
"stuff.detail.remarks": "메모",
|
||||
"stuff.detail.tooltip.saleStoreId": "판매대리점 또는 판매대리점ID를 1자 이상 입력하세요",
|
||||
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
||||
"stuff.detail.confirm.message1": "판매점 정보를 변경하면, 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
||||
"stuff.planReqPopup.popTitle": "설계 요청 검색",
|
||||
"stuff.planReqPopup.btn1": "검색",
|
||||
"stuff.planReqPopup.btn2": "초기화",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user