견적서 수정
This commit is contained in:
parent
7b40f48144
commit
7a7c34de4d
@ -273,12 +273,6 @@ export default function Estimate({ params }) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//비워주기
|
|
||||||
setEstimateContextState({
|
|
||||||
pkgAsp: '0',
|
|
||||||
pkgTotPrice: '0',
|
|
||||||
})
|
|
||||||
|
|
||||||
//YJOD로 돌아가도 UNIT_PRICE로 프라이싱 실행해서 정가로 셋팅
|
//YJOD로 돌아가도 UNIT_PRICE로 프라이싱 실행해서 정가로 셋팅
|
||||||
if (handlePricingFlag) {
|
if (handlePricingFlag) {
|
||||||
handlePricing('UNIT_PRICE')
|
handlePricing('UNIT_PRICE')
|
||||||
@ -456,6 +450,9 @@ export default function Estimate({ params }) {
|
|||||||
updates.itemChangeFlg = '1'
|
updates.itemChangeFlg = '1'
|
||||||
updates.partAdd = '0'
|
updates.partAdd = '0'
|
||||||
updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString()
|
updates.saleTotPrice = (Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].salePrice.replaceAll(',', '')).toLocaleString()
|
||||||
|
updates.showSaleTotPrice = (
|
||||||
|
Number(amount.replaceAll(',', '')) * estimateContextState.itemList[index].showSalePrice?.replaceAll(',', '')
|
||||||
|
).toLocaleString()
|
||||||
|
|
||||||
updateList = estimateContextState.itemList.map((item) => {
|
updateList = estimateContextState.itemList.map((item) => {
|
||||||
if (item.dispOrder === dispOrder) {
|
if (item.dispOrder === dispOrder) {
|
||||||
@ -487,6 +484,8 @@ export default function Estimate({ params }) {
|
|||||||
let updates = {}
|
let updates = {}
|
||||||
updates.salePrice = salePrice
|
updates.salePrice = salePrice
|
||||||
updates.saleTotPrice = (Number(salePrice.replaceAll(',', '')) * estimateContextState.itemList[index].amount.replaceAll(',', '')).toLocaleString()
|
updates.saleTotPrice = (Number(salePrice.replaceAll(',', '')) * estimateContextState.itemList[index].amount.replaceAll(',', '')).toLocaleString()
|
||||||
|
updates.showSalePrice = updates.salePrice
|
||||||
|
updates.showSaleTotPrice = updates.saleTotPrice
|
||||||
|
|
||||||
updateList = estimateContextState.itemList.map((item) => {
|
updateList = estimateContextState.itemList.map((item) => {
|
||||||
if (item.dispOrder === dispOrder) {
|
if (item.dispOrder === dispOrder) {
|
||||||
@ -675,34 +674,6 @@ export default function Estimate({ params }) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let estimateOption = estimateContextState?.estimateOption?.split('、')
|
|
||||||
// console.log('오리진::', estimateOption)
|
|
||||||
let removeEstimateOption = estimateOption.filter((option) => !pushData.includes(option))
|
|
||||||
// console.log('남길거?? ', removeEstimateOption)
|
|
||||||
let removeEstimateOptionString = removeEstimateOption.join('、')
|
|
||||||
|
|
||||||
// console.log('SpecialNoteLis::', specialNoteList)
|
|
||||||
|
|
||||||
// specialNoteList.map((row) => {
|
|
||||||
// row.check = false
|
|
||||||
// estimateOption.map((row2) => {
|
|
||||||
// if (row.pkgYn === '0') {
|
|
||||||
// if (row2 === row.code) {
|
|
||||||
// row.check = true
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// // console.log('지울꺼::', removeEstimateOptionString)
|
|
||||||
// if (row.code.includes(removeEstimateOptionString)) {
|
|
||||||
// // console.log('removeEstimateOption::::', removeEstimateOption)
|
|
||||||
// // row.check = false
|
|
||||||
// return
|
|
||||||
// } else {
|
|
||||||
// // console.log('제품가대세팅::::', row.code)
|
|
||||||
// // row.check = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
estimateContextState.itemList.map((item) => {
|
estimateContextState.itemList.map((item) => {
|
||||||
delete item.showSalePrice
|
delete item.showSalePrice
|
||||||
@ -1221,7 +1192,7 @@ export default function Estimate({ params }) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totVolKw')}</div>
|
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.totVolKw')}</div>
|
||||||
<div className="estimate-name blue">{convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 2)}</div>
|
<div className="estimate-name blue">{convertNumberToPriceDecimalToFixed(estimateContextState?.totVolKw, 3)}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="estimate-box">
|
<div className="estimate-box">
|
||||||
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.supplyPrice')}</div>
|
<div className="estimate-tit">{getMessage('estimate.detail.sepcialEstimateProductInfo.supplyPrice')}</div>
|
||||||
@ -1466,9 +1437,7 @@ export default function Estimate({ params }) {
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="input-light al-r"
|
className="input-light al-r"
|
||||||
defaultValue={convertNumberToPriceDecimal(
|
value={convertNumberToPriceDecimal(item?.showSalePrice === '0' ? null : item?.salePrice?.replaceAll(',', ''))}
|
||||||
item?.showSalePrice === '0' ? null : item?.salePrice?.replaceAll(',', ''),
|
|
||||||
)}
|
|
||||||
disabled={
|
disabled={
|
||||||
estimateContextState?.estimateType === 'YJSS'
|
estimateContextState?.estimateType === 'YJSS'
|
||||||
? item?.paDispOrder
|
? item?.paDispOrder
|
||||||
|
|||||||
@ -192,6 +192,9 @@ export const useEstimateController = (planNo) => {
|
|||||||
itemFlg = false
|
itemFlg = false
|
||||||
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
|
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
estimateData.pkgAsp = '0'
|
||||||
|
estimateData.pkgTotPrice = '0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user