견적서 수정

This commit is contained in:
basssy 2024-11-27 18:46:02 +09:00
parent 44323266e5
commit cf6e5da7a0

View File

@ -167,29 +167,31 @@ export const useEstimateController = (planNo) => {
if (fileFlg) {
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)
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)
if (!item.paDispOrder) {
if (itemFlg) {
if (isNaN(item.amount)) {
item.amount = '0'
}
if (item.amount < 1) {
itemFlg = false
return alert(getMessage('estimate.detail.save.requiredAmount'))
}
if (estimateData.estimateType !== 'YJSS') {
if (isNaN(item.salePrice)) {
item.salePrice = '0'
if (!item.paDispOrder) {
if (itemFlg) {
if (isNaN(item.amount)) {
item.amount = '0'
}
if (item.salePrice < 1) {
if (item.amount < 1) {
itemFlg = false
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
return alert(getMessage('estimate.detail.save.requiredAmount'))
}
if (estimateData.estimateType !== 'YJSS') {
if (isNaN(item.salePrice)) {
item.salePrice = '0'
}
if (item.salePrice < 1) {
itemFlg = false
return alert(getMessage('estimate.detail.save.requiredSalePrice'))
}
}
}
}