물건상세
This commit is contained in:
parent
b5dcdfc7c8
commit
bb116768d3
@ -75,7 +75,7 @@ export default function StuffDetail() {
|
|||||||
installHeight: '', //설치높이
|
installHeight: '', //설치높이
|
||||||
conType: '0', //계약조건(잉여 / 전량)
|
conType: '0', //계약조건(잉여 / 전량)
|
||||||
remarks: '', //메모
|
remarks: '', //메모
|
||||||
tempFlag: 'T', //임시저장(1) 저장(0)
|
tempFlg: 'T', //임시저장(1) 저장(0)
|
||||||
}
|
}
|
||||||
const { register, setValue, getValues, handleSubmit, resetField, control, watch } = useForm({
|
const { register, setValue, getValues, handleSubmit, resetField, control, watch } = useForm({
|
||||||
defaultValues: formInitValue,
|
defaultValues: formInitValue,
|
||||||
@ -108,7 +108,6 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
const [editMode, setEditMode] = useState('NEW')
|
const [editMode, setEditMode] = useState('NEW')
|
||||||
const { managementState, setManagementState } = useContext(ManagementContext)
|
const { managementState, setManagementState } = useContext(ManagementContext)
|
||||||
|
|
||||||
const [planGridProps, setPlanGridProps] = useState({
|
const [planGridProps, setPlanGridProps] = useState({
|
||||||
planGridData: [],
|
planGridData: [],
|
||||||
isPageable: false,
|
isPageable: false,
|
||||||
@ -283,6 +282,7 @@ export default function StuffDetail() {
|
|||||||
{getMessage('stuff.detail.planGrid.btn1')}
|
{getMessage('stuff.detail.planGrid.btn1')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
style={buttonStyle}
|
||||||
type="button"
|
type="button"
|
||||||
className="grid-btn"
|
className="grid-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@ -516,7 +516,6 @@ export default function StuffDetail() {
|
|||||||
firstList = res
|
firstList = res
|
||||||
favList = res.filter((row) => row.priority !== 'B')
|
favList = res.filter((row) => row.priority !== 'B')
|
||||||
otherList = res.filter((row) => row.firstAgentYn === 'N')
|
otherList = res.filter((row) => row.firstAgentYn === 'N')
|
||||||
|
|
||||||
setSaleStoreList(firstList)
|
setSaleStoreList(firstList)
|
||||||
setFavoriteStoreList(firstList)
|
setFavoriteStoreList(firstList)
|
||||||
setShowSaleStoreList(firstList)
|
setShowSaleStoreList(firstList)
|
||||||
@ -547,6 +546,9 @@ export default function StuffDetail() {
|
|||||||
form.setValue('otherSaleStoreLevel', managementState.saleStoreLevel)
|
form.setValue('otherSaleStoreLevel', managementState.saleStoreLevel)
|
||||||
|
|
||||||
form.setValue('saleStoreLevel', '1')
|
form.setValue('saleStoreLevel', '1')
|
||||||
|
|
||||||
|
form.setValue('saleStoreId', managementState.firstAgentId)
|
||||||
|
setSelOptions(managementState.firstAgentId)
|
||||||
}
|
}
|
||||||
|
|
||||||
//설계의뢰No.
|
//설계의뢰No.
|
||||||
@ -1629,6 +1631,7 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||||
|
신규
|
||||||
<Select
|
<Select
|
||||||
id="long-value-select2"
|
id="long-value-select2"
|
||||||
// components={{ NoOptionsMessage }}
|
// components={{ NoOptionsMessage }}
|
||||||
@ -2032,8 +2035,8 @@ export default function StuffDetail() {
|
|||||||
onChange={onSelectionChange}
|
onChange={onSelectionChange}
|
||||||
getOptionLabel={(x) => x.saleStoreName}
|
getOptionLabel={(x) => x.saleStoreName}
|
||||||
getOptionValue={(x) => x.saleStoreId}
|
getOptionValue={(x) => x.saleStoreId}
|
||||||
isClearable={managementState.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : false}
|
isClearable={managementState?.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : false}
|
||||||
isDisabled={managementState.tempFlg === '0' ? true : session?.storeLvl !== '1' ? true : false}
|
isDisabled={managementState?.tempFlg === '0' ? true : session?.storeLvl !== '1' ? true : false}
|
||||||
value={saleStoreList.filter(function (option) {
|
value={saleStoreList.filter(function (option) {
|
||||||
return option.saleStoreId === selOptions
|
return option.saleStoreId === selOptions
|
||||||
})}
|
})}
|
||||||
@ -2066,7 +2069,7 @@ export default function StuffDetail() {
|
|||||||
getOptionValue={(x) => x.saleStoreId}
|
getOptionValue={(x) => x.saleStoreId}
|
||||||
isClearable={false}
|
isClearable={false}
|
||||||
isDisabled={
|
isDisabled={
|
||||||
managementState.tempFlg === '0'
|
managementState?.tempFlg === '0'
|
||||||
? true
|
? true
|
||||||
: session?.storeLvl !== '1'
|
: session?.storeLvl !== '1'
|
||||||
? true
|
? true
|
||||||
@ -2139,6 +2142,7 @@ export default function StuffDetail() {
|
|||||||
<td>
|
<td>
|
||||||
<div className="flx-box">
|
<div className="flx-box">
|
||||||
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
<div className="select-wrap mr5" style={{ width: '567px' }}>
|
||||||
|
상세
|
||||||
<Select
|
<Select
|
||||||
id="long-value-select2"
|
id="long-value-select2"
|
||||||
instanceId="long-value-select2"
|
instanceId="long-value-select2"
|
||||||
@ -2151,9 +2155,13 @@ export default function StuffDetail() {
|
|||||||
getOptionLabel={(x) => x.saleStoreName}
|
getOptionLabel={(x) => x.saleStoreName}
|
||||||
getOptionValue={(x) => x.saleStoreId}
|
getOptionValue={(x) => x.saleStoreId}
|
||||||
isDisabled={
|
isDisabled={
|
||||||
managementState.tempFlg === '0' ? true : session?.storeLvl === '1' && form.watch('saleStoreId') != '' ? false : true
|
managementState?.tempFlg === '0'
|
||||||
|
? true
|
||||||
|
: session?.storeLvl === '1' && form.watch('saleStoreId') != ''
|
||||||
|
? false
|
||||||
|
: true
|
||||||
}
|
}
|
||||||
isClearable={managementState.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : false}
|
isClearable={managementState?.tempFlg === '0' ? false : session?.storeLvl === '1' ? true : false}
|
||||||
value={otherSaleStoreList.filter(function (option) {
|
value={otherSaleStoreList.filter(function (option) {
|
||||||
return option.saleStoreId === otherSelOptions
|
return option.saleStoreId === otherSelOptions
|
||||||
})}
|
})}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user