견적서 상세
This commit is contained in:
parent
bb84f31c64
commit
cdc0480db8
@ -234,12 +234,12 @@ export default function Estimate({ params }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Pricing 버튼
|
//Pricing 버튼
|
||||||
const handlePricing = async (priceCd) => {
|
const handlePricing = async (showPriceCd) => {
|
||||||
const param = {
|
const param = {
|
||||||
saleStoreId: session.storeId,
|
saleStoreId: session.storeId,
|
||||||
sapSalesStoreCd: session.custCd,
|
sapSalesStoreCd: session.custCd,
|
||||||
docTpCd: state.estimateType,
|
docTpCd: state.estimateType,
|
||||||
priceCd: priceCd,
|
priceCd: showPriceCd,
|
||||||
//itemIdList: state.itemList, //아이템 최초정보로 호출 delFlg 0인거만..
|
//itemIdList: state.itemList, //아이템 최초정보로 호출 delFlg 0인거만..
|
||||||
itemIdList: state.itemList.filter((item) => item.delFlg === '0'),
|
itemIdList: state.itemList.filter((item) => item.delFlg === '0'),
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ export default function Estimate({ params }) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
setState({
|
setState({
|
||||||
priceCd: priceCd,
|
priceCd: showPriceCd,
|
||||||
itemList: updateList,
|
itemList: updateList,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -1030,7 +1030,7 @@ export default function Estimate({ params }) {
|
|||||||
type="button"
|
type="button"
|
||||||
className="btn-origin grey ml5"
|
className="btn-origin grey ml5"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handlePricing(state?.priceCd)
|
handlePricing(showPriceCd)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{getMessage('estimate.detail.showPrice.pricingBtn')}
|
{getMessage('estimate.detail.showPrice.pricingBtn')}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ export const useEstimateController = (planNo) => {
|
|||||||
const [state, setState] = useReducer(reducer, defaultEstimateData)
|
const [state, setState] = useReducer(reducer, defaultEstimateData)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isLoading) {
|
if (planNo && !isLoading) {
|
||||||
if (objectRecoil.floorPlanObjectNo && planNo) {
|
if (objectRecoil.floorPlanObjectNo && planNo) {
|
||||||
fetchSetting()
|
fetchSetting()
|
||||||
}
|
}
|
||||||
@ -188,15 +188,14 @@ export const useEstimateController = (planNo) => {
|
|||||||
// console.log('최종 남은 아이템정보:::', estimateData.itemList)
|
// console.log('최종 남은 아이템정보:::', estimateData.itemList)
|
||||||
console.log('최종 정보::;', estimateData)
|
console.log('최종 정보::;', estimateData)
|
||||||
|
|
||||||
//drawingFlg null ????
|
|
||||||
//2. 상세데이터 저장
|
//2. 상세데이터 저장
|
||||||
// return
|
// return
|
||||||
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
||||||
console.log('res::::::::::::', res)
|
console.log('res::::::::::::', res)
|
||||||
if (res.status === 201) {
|
if (res.status === 201) {
|
||||||
console.log('201:::::::::')
|
|
||||||
alert(getMessage('estimate.detail.save.alertMsg'))
|
alert(getMessage('estimate.detail.save.alertMsg'))
|
||||||
//어디로 보낼지
|
//어디로 보낼지
|
||||||
|
router.push(`/floor-plan/estimate/5/${estimateData.planNo}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user