Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev
This commit is contained in:
commit
6219f8ed6c
@ -219,15 +219,6 @@ export default function Estimate({ params }) {
|
||||
}
|
||||
}, [files])
|
||||
|
||||
// useEffect(() => {
|
||||
// // console.log('USEEFFECT originFiles::::::::::', originFiles)
|
||||
// // if (originFiles.length > 0) {
|
||||
// // setEstimateContextState({
|
||||
// // originFiles: originFiles,
|
||||
// // })
|
||||
// // }
|
||||
// }, [originFiles])
|
||||
|
||||
//상세에서 내려온 첨부파일 set 만들기
|
||||
useEffect(() => {
|
||||
if (isNotEmptyArray(estimateContextState.fileList)) {
|
||||
@ -235,11 +226,15 @@ export default function Estimate({ params }) {
|
||||
setFiles([])
|
||||
setOriginFiles(estimateContextState.fileList)
|
||||
} else {
|
||||
// setOriginFiles([])
|
||||
if (originFiles.length > 0) {
|
||||
let file
|
||||
file = originFiles.filter((item) => item.delFlg === '0')
|
||||
setOriginFiles(file)
|
||||
if (isEmptyArray(files)) {
|
||||
let file
|
||||
file = originFiles.filter((item) => item.delFlg === '0')
|
||||
setEstimateContextState({
|
||||
originFiles: file,
|
||||
})
|
||||
setOriginFiles(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [estimateContextState?.fileList])
|
||||
@ -434,10 +429,8 @@ export default function Estimate({ params }) {
|
||||
|
||||
if (isNotEmptyArray(data.data2)) {
|
||||
estimateContextState.itemList.map((item) => {
|
||||
// console.log('기존아이템::', item)
|
||||
let checkYn = false
|
||||
for (let i = 0; i < data.data2.length; i++) {
|
||||
// console.log('프라이싱결과아이템:::', data.data2[i])
|
||||
if (data.data2[i]) {
|
||||
if (data.data2[i].itemId === item.itemId) {
|
||||
updateList.push({
|
||||
@ -527,6 +520,7 @@ export default function Estimate({ params }) {
|
||||
const onChangeAmount = (value, dispOrder, index) => {
|
||||
//itemChangeFlg = 1, partAdd = 0 셋팅
|
||||
let amount = Number(value.replace(/[^0-9]/g, '').replaceAll(',', ''))
|
||||
|
||||
if (isNaN(amount)) {
|
||||
amount = '0'
|
||||
} else {
|
||||
@ -651,7 +645,6 @@ export default function Estimate({ params }) {
|
||||
}
|
||||
}
|
||||
} else if (item.paDispOrder === dispOrder) {
|
||||
//봄제품을 바꿨을떄
|
||||
return { ...item, delFlg: '1' }
|
||||
} else {
|
||||
return item
|
||||
@ -682,6 +675,7 @@ export default function Estimate({ params }) {
|
||||
bomItem.addFlg = true //봄 추가시도 addFlg
|
||||
})
|
||||
|
||||
updateList = updateList.filter((item) => item.delFlg === '0')
|
||||
setEstimateContextState({
|
||||
itemList: [...updateList, ...bomList],
|
||||
})
|
||||
@ -791,7 +785,6 @@ export default function Estimate({ params }) {
|
||||
itemList.sort((a, b) => a.dispOrder - b.dispOrder)
|
||||
makeUniqueSpecialNoteCd(itemList)
|
||||
itemList.forEach((item) => {
|
||||
// console.log('YJSSS::', item)
|
||||
if (item.delFlg === '0') {
|
||||
let amount = Number(item.amount?.replace(/[^0-9]/g, '').replaceAll(',', '')) || 0
|
||||
// let salePrice = Number(item.salePrice?.replaceAll(',', '')) || 0
|
||||
@ -1227,8 +1220,6 @@ export default function Estimate({ params }) {
|
||||
id={row.code}
|
||||
checked={!!row.check}
|
||||
disabled={row.code === 'ATTR001' || row.pkgYn === '1' ? true : false}
|
||||
// readOnly
|
||||
// onClick={(event) => {
|
||||
onChange={() => {
|
||||
setSpecialNoteList((specialNote) =>
|
||||
specialNote.map((temp) => (temp.code === row.code ? { ...temp, check: !temp.check } : temp)),
|
||||
@ -1243,7 +1234,7 @@ export default function Estimate({ params }) {
|
||||
settingShowContent(row.code)
|
||||
}}
|
||||
>
|
||||
{row.codeNm} / {row.code}
|
||||
{row.codeNm}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -134,6 +134,7 @@ export default function StuffDetail() {
|
||||
field: 'moduleModel',
|
||||
headerName: getMessage('stuff.detail.planGridHeader.moduleModel'),
|
||||
flex: 1,
|
||||
wrapText: true,
|
||||
cellStyle: { justifyContent: 'flex-start' /* 좌측정렬*/ },
|
||||
},
|
||||
{
|
||||
|
||||
@ -194,9 +194,8 @@ export const useEstimateController = (planNo) => {
|
||||
estimateData.itemList.map((item) => {
|
||||
if (item.delFlg === '0') {
|
||||
item.amount = item.amount?.replaceAll(',', '')
|
||||
item.salePrice = parseFloat(item.salePrice?.replaceAll(',', '')).toFixed(2)
|
||||
item.saleTotPrice = parseFloat(item.saleTotPrice?.replaceAll(',', '')).toFixed(2)
|
||||
|
||||
item.salePrice = Number(item.salePrice?.replaceAll(',', '')).toFixed(2)
|
||||
item.saleTotPrice = Number(item.saleTotPrice?.replaceAll(',', '')).toFixed(2)
|
||||
if (!item.paDispOrder) {
|
||||
if (itemFlg) {
|
||||
if (isNaN(item.amount)) {
|
||||
@ -227,7 +226,6 @@ export const useEstimateController = (planNo) => {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
estimateData.itemList = estimateData.itemList.filter((item) => item.delFlg === '0' || !item.addFlg)
|
||||
|
||||
let delCnt = 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user