견적서

This commit is contained in:
basssy 2024-11-27 11:24:26 +09:00
parent 5c3e4d76cf
commit b6873f4d27
2 changed files with 13 additions and 5 deletions

View File

@ -422,7 +422,8 @@ export default function Estimate({ params }) {
// PKG
let totVolKw = estimateContextState.totVolKw * 1000
let pkgTotPrice = pkgAsp.replaceAll(',', '') * totVolKw
let pkgTotPrice = pkgAsp.replaceAll(',', '') * totVolKw * 1000
setEstimateContextState({
pkgAsp: pkgAsp,
pkgTotPrice: pkgTotPrice.toFixed(3),
@ -655,6 +656,7 @@ export default function Estimate({ params }) {
if (item.moduleFlg === '1') {
//(Kw) 1
const volKw = (item.pnowW * amount) / 1000
// const volKw = item.pnowW * amount
totVolKw += volKw
}
// const price
@ -699,11 +701,11 @@ export default function Estimate({ params }) {
if (item.moduleFlg === '1') {
//(Kw) 1
const volKw = (item.pnowW * amount) / 1000
// const volKw = item.pnowW * amount
totVolKw += volKw
}
setEstimateContextState({
pkgTotPrice: estimateContextState.pkgAsp.replaceAll(',', '') * totVolKw,
pkgTotPrice: estimateContextState.pkgAsp.replaceAll(',', '') * totVolKw * 1000,
})
//pkgTotPrice
// const saleTotPrice

View File

@ -173,7 +173,7 @@ export const useEstimateController = (planNo) => {
if (isNaN(item.amount)) {
item.amount = 0
} else {
Number(item.amount)
item.amount = Number(item.amount)
}
if (item.amount < 1) {
@ -181,7 +181,13 @@ export const useEstimateController = (planNo) => {
return alert(getMessage('estimate.detail.save.requiredAmount'))
}
if (Number(item.salePrice) < 1) {
if (isNaN(item.salePrice)) {
item.salePrice = 0
} else {
item.salePrice = Number(item.salePrice)
}
if (item.salePrice < 1) {
itemFlg = false
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
}