session의 StoreId => 1,2차점 storeId #538
@ -13,6 +13,7 @@ import { currentMenuState } from '@/store/canvasAtom'
|
||||
import { globalLocaleStore } from '@/store/localeAtom'
|
||||
import { useAxios } from '@/hooks/useAxios'
|
||||
import { GlobalDataContext } from '@/app/GlobalDataProvider'
|
||||
import { sessionStore } from '@/store/commonAtom'
|
||||
|
||||
export default function FloorPlan({ children }) {
|
||||
const [correntObjectNo, setCurrentObjectNo] = useRecoilState(correntObjectNoState)
|
||||
@ -26,6 +27,7 @@ export default function FloorPlan({ children }) {
|
||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||
const { promiseGet } = useAxios(globalLocaleState)
|
||||
const { setManagementState } = useContext(GlobalDataContext)
|
||||
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
||||
|
||||
useEffect(() => {
|
||||
getStuffDetailInfo()
|
||||
@ -51,6 +53,12 @@ export default function FloorPlan({ children }) {
|
||||
if (res.data.installHeight === '0') {
|
||||
res.data.installHeight = ''
|
||||
}
|
||||
|
||||
setSessionState((prev) => ({
|
||||
...prev,
|
||||
oneTwoStoreId: res.data.saleStoreId
|
||||
}));
|
||||
|
||||
setManagementState({ ...res.data, surfaceTypeValue: surfaceTypeValue })
|
||||
}
|
||||
})
|
||||
|
||||
@ -132,7 +132,7 @@ export default function PowerConditionalSelect(props) {
|
||||
mixMatlNo: item.mixMatlNo,
|
||||
}
|
||||
})
|
||||
getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList, storeId: sessionState.storeId }).then((res) => {
|
||||
getPcsModelList({ pcsMkrCd, pcsSerList, moduleItemList, storeId: sessionState.oneTwoStoreId }).then((res) => {
|
||||
if (res?.result.code === 200 && res?.data) {
|
||||
setModels(
|
||||
res.data.map((model) => {
|
||||
@ -201,6 +201,7 @@ export default function PowerConditionalSelect(props) {
|
||||
pcsMkrCd: option.pcsMkrCd,
|
||||
mixMatlNo: moduleSelectionData.module.mixMatlNo,
|
||||
moduleMatlCds: moduleSelectionData.module.itemList.map((item) => item.itemId).join(','),
|
||||
storeId: sessionState.oneTwoStoreId,
|
||||
}
|
||||
|
||||
getPcsMakerList(param).then((res) => {
|
||||
|
||||
@ -37,7 +37,7 @@ export function useMasterController() {
|
||||
return null
|
||||
}
|
||||
const paramString = `?${paramArr.map((item) => `arrRoofMatlCd=${item}`).join('&')}`
|
||||
return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}&storeId=${sessionState.storeId}` }).then((res) => {
|
||||
return await get({ url: `/api/v1/master/getModuleTypeItemList${paramString}&storeId=${sessionState.oneTwoStoreId}` }).then((res) => {
|
||||
// console.log('🚀🚀 ~ getModuleTypeItemList ~ res:', res)
|
||||
return res
|
||||
})
|
||||
|
||||
@ -21,7 +21,9 @@ export const dimmedStore = atom({
|
||||
|
||||
export const sessionStore = atom({
|
||||
key: 'sessionState',
|
||||
default: {},
|
||||
default: {
|
||||
oneTwoStoreId: '',
|
||||
},
|
||||
})
|
||||
|
||||
export const slopeSelector = selectorFamily({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user