Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
a0d7d158a3
@ -272,9 +272,11 @@ export default function Estimate({ params }) {
|
||||
estimateContextState.itemList.map((item) => {
|
||||
let checkYn = false
|
||||
data.data2.map((item2) => {
|
||||
if (item2.itemId === item.itemId) {
|
||||
updateList.push({ ...item, unitPrice: item2.unitPrice })
|
||||
checkYn = true
|
||||
if (item2) {
|
||||
if (item2.itemId === item.itemId) {
|
||||
updateList.push({ ...item, unitPrice: item2.unitPrice })
|
||||
checkYn = true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -510,6 +512,7 @@ export default function Estimate({ params }) {
|
||||
estimateContextState.itemList.map((item) => {
|
||||
if (item.delFlg === '0') {
|
||||
const amount = Number(item.amount.replace(/[^0-9]/g, '').replaceAll(',', ''))
|
||||
|
||||
const price = Number(item.saleTotPrice.replaceAll(',', ''))
|
||||
|
||||
if (item.moduleFlg === '1') {
|
||||
@ -1175,7 +1178,8 @@ export default function Estimate({ params }) {
|
||||
<input
|
||||
type="text"
|
||||
className="input-light al-r"
|
||||
value={item?.amount}
|
||||
// value={item?.amount}
|
||||
value={convertNumberToPriceDecimal(item?.amount.replaceAll(',', ''))}
|
||||
disabled={item.itemId === '' || !!item?.paDispOrder}
|
||||
onChange={(e) => {
|
||||
onChangeAmount(e.target.value, item.dispOrder, index)
|
||||
|
||||
@ -185,17 +185,26 @@ export const useEstimateController = (planNo) => {
|
||||
return alert(getMessage('estimate.detail.save.requiredItem'))
|
||||
}
|
||||
|
||||
estimateData.itemList.map((item) => {
|
||||
item.amount = item.amount.replaceAll(',', '')
|
||||
item.salePrice = parseFloat(item.salePrice.replaceAll(',', '')).toFixed(2)
|
||||
item.saleTotPrice = parseFloat(item.saleTotPrice.replaceAll(',', '')).toFixed(2)
|
||||
})
|
||||
console.log('최종 정보::;', estimateData)
|
||||
|
||||
//2. 상세데이터 저장
|
||||
// return
|
||||
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
||||
if (res.status === 201) {
|
||||
alert(getMessage('estimate.detail.save.alertMsg'))
|
||||
//어디로 보낼지
|
||||
fetchSetting(objectRecoil.floorPlanObjectNo, estimateData.planNo)
|
||||
}
|
||||
})
|
||||
try {
|
||||
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
||||
if (res.status === 201) {
|
||||
alert(getMessage('estimate.detail.save.alertMsg'))
|
||||
//어디로 보낼지
|
||||
fetchSetting(objectRecoil.floorPlanObjectNo, estimateData.planNo)
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log('error::::::::::::', e.response.data.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user