견적서 주택pkg

This commit is contained in:
basssy 2024-12-06 17:51:22 +09:00
parent 9c31d63e31
commit d822b390b0
4 changed files with 21 additions and 3 deletions

View File

@ -822,8 +822,10 @@ export default function Estimate({ params }) {
}
}
})
// totals.pkgTotPrice = estimateContextState.pkgAspNumber(estimateContextState.pkgAsp.replaceAll(',', '')) * totals.totVolKw * 1000
let pkgAsp = estimateContextState.pkgAsp ? Number(estimateContextState.pkgAsp.replaceAll(',', '')) : 0
totals.pkgTotPrice = Number(estimateContextState.pkgAsp.replaceAll(',', '')) * totals.totVolKw * 1000
totals.pkgTotPrice = pkgAsp * totals.totVolKw * 1000
totals.supplyPrice = totals.addSupplyPrice + totals.pkgTotPrice
totals.vatPrice = totals.supplyPrice * 0.1
totals.totPrice = totals.supplyPrice + totals.vatPrice
@ -1057,7 +1059,6 @@ export default function Estimate({ params }) {
}
//
let constructSpecificationMulti = estimateContextState?.constructSpecificationMulti?.split('、')
return (
<div className={`form-flex-wrap ${style}`} key={`roof_${row}`}>
<div className="input-wrap mr5" style={{ width: '610px' }}>
@ -1076,7 +1077,7 @@ export default function Estimate({ params }) {
<th>{getMessage('estimate.detail.remarks')}</th>
<td colSpan={3}>
<div className="input-wrap">
<input type="text" className="input-light" defaultValue={estimateContextState?.remarks} onBlur={handleBlurRemarks} />
<input type="text" className="input-light" defaultValue={estimateContextState?.remarks || ''} onBlur={handleBlurRemarks} />
</div>
</td>
</tr>

View File

@ -156,6 +156,14 @@ export const useEstimateController = (planNo) => {
return alert(getMessage('estimate.detail.save.requiredEstimateDate'))
}
if (estimateData.estimateType === 'YJSS') {
let pkgAsp = estimateData.pkgAsp
if (pkgAsp === '0') {
flag = false
return alert(getMessage('estimate.detail.save.requiredPkgAsp'))
}
}
//기존에 첨부된 파일이 있으면 파일첨부관련 통과
if (estimateData?.originFiles?.length > 0) {
let cnt = estimateData.originFiles.filter((file) => file.delFlg === '0').length
@ -221,6 +229,13 @@ export const useEstimateController = (planNo) => {
estimateData.pkgAsp = '0'
estimateData.pkgTotPrice = '0'
} else {
if (item.pkgMaterialFlg === '1') {
if (Number(item.salePrice) === 0) {
itemFlg = false
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
}
}
}
}
}

View File

@ -905,6 +905,7 @@
"estimate.detail.save.requiredItem": "製品は1つ以上登録する必要があります.",
"estimate.detail.save.requiredCharger": "担当者は必須です.",
"estimate.detail.save.requiredObjectName": "案件名は必須です.",
"estimate.detail.save.requiredPkgAsp": "住宅pkg単価は0より大きい値を入力してください.",
"estimate.detail.save.requiredEstimateDate": "見積日は必須です.",
"estimate.detail.save.requiredAmount": "数量は0より大きい値を入力してください.",
"estimate.detail.save.requiredSalePrice": "単価は0より大きい値を入力してください.",

View File

@ -915,6 +915,7 @@
"estimate.detail.save.requiredItem": "제품은 1개이상 등록해야 됩니다.",
"estimate.detail.save.requiredCharger": "담당자는 필수값 입니다.",
"estimate.detail.save.requiredObjectName": "안건명은 필수값 입니다.",
"estimate.detail.save.requiredPkgAsp": "주택pkg 단가는 0보다 큰 값을 입력하세요.",
"estimate.detail.save.requiredEstimateDate": "견적일은 필수값 입니다.",
"estimate.detail.save.requiredAmount": "수량은 0보다 큰값을 입력해주세요.",
"estimate.detail.save.requiredSalePrice": "단가는 0보다 큰값을 입력해주세요.",