dev #204

Merged
ysCha merged 4 commits from dev into prd-deploy 2025-07-11 16:00:56 +09:00
6 changed files with 36 additions and 9 deletions

View File

@ -21,6 +21,8 @@ const defaultEstimateData = {
fileList: [], fileList: [],
fileFlg: '0', //후일 자료 제출 (체크 1 노체크 0) fileFlg: '0', //후일 자료 제출 (체크 1 노체크 0)
priceCd: '', priceCd: '',
pricingFlag: false, // 가격 처리 플래그 추가
} }
/** /**

View File

@ -507,6 +507,7 @@ export default function Estimate({}) {
icon: 'warning', icon: 'warning',
confirmFn: () => { confirmFn: () => {
handlePricing(showPriceCd) handlePricing(showPriceCd)
setEstimateContextState({ pricingFlag:true })
}, },
}) })
} }
@ -1437,7 +1438,7 @@ export default function Estimate({}) {
onChange={(e) => { onChange={(e) => {
// //
setHandlePricingFlag(true) setHandlePricingFlag(true)
setEstimateContextState({ estimateType: e.target.value }) setEstimateContextState({ estimateType: e.target.value, setEstimateContextState })
}} }}
/> />
<label htmlFor="YJSS">{getMessage('estimate.detail.estimateType.yjss')}</label> <label htmlFor="YJSS">{getMessage('estimate.detail.estimateType.yjss')}</label>

View File

@ -721,8 +721,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
} }
// Ray casting 알고리즘 // Ray casting 알고리즘
if (((yi > testY) !== (yj > testY)) && if (yi > testY !== yj > testY && testX < ((xj - xi) * (testY - yi)) / (yj - yi) + xi) {
(testX < (xj - xi) * (testY - yi) / (yj - yi) + xi)) {
inside = !inside inside = !inside
} }
} }

View File

@ -167,13 +167,34 @@ export const useEstimateController = (planNo, flag) => {
}) })
} }
//견적서 저장
const handleEstimateSubmit = async () => { const handleEstimateSubmit = async () => {
if(estimateContextState.pricingFlag) {
await handleEstimateSubmitCore();
}else {
swalFire({
text: getMessage('estimate.detail.save.pricingFlag'),
type: 'confirm',
icon: 'warning',
confirmFn: async () => {
await handleEstimateSubmitCore();
},
denyFn: () => false
})
return false
}
}
//견적서 저장
const handleEstimateSubmitCore = async () => {
//0. 필수체크 //0. 필수체크
let flag = true let flag = true
let originFileFlg = false let originFileFlg = false
let fileFlg = true let fileFlg = true
let itemFlg = true let itemFlg = true
if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) { if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) {
flag = false flag = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
@ -355,6 +376,8 @@ export const useEstimateController = (planNo, flag) => {
} }
const realSave = async (fileList) => { const realSave = async (fileList) => {
setEstimateContextState({pricingFlag: false})
//첨부파일저장끝 //첨부파일저장끝
let option = [] let option = []

View File

@ -993,10 +993,10 @@
"estimate.detail.docPopup.title": "見積書出力オプションの設定", "estimate.detail.docPopup.title": "見積書出力オプションの設定",
"estimate.detail.docPopup.explane": "ダウンロードする文書オプションを選択し、[見積書出力]ボタンをクリックします。", "estimate.detail.docPopup.explane": "ダウンロードする文書オプションを選択し、[見積書出力]ボタンをクリックします。",
"estimate.detail.docPopup.schUnitPriceFlg": "ダウンロードファイル", "estimate.detail.docPopup.schUnitPriceFlg": "ダウンロードファイル",
"estimate.detail.docPopup.schUnitPriceFlg.excelFlg0": "仕切用Excel", "estimate.detail.docPopup.schUnitPriceFlg.excelFlg0": "見積書Excel",
"estimate.detail.docPopup.schUnitPriceFlg.excelFlg1": "定価用Excel", "estimate.detail.docPopup.schUnitPriceFlg.excelFlg1": "定価用Excel",
"estimate.detail.docPopup.schUnitPriceFlg.excelFlg2": "見積書", "estimate.detail.docPopup.schUnitPriceFlg.excelFlg2": "見積書書式",
"estimate.detail.docPopup.schUnitPriceFlg.pdfFlg0": "仕切用PDF", "estimate.detail.docPopup.schUnitPriceFlg.pdfFlg0": "見積書PDF",
"estimate.detail.docPopup.schUnitPriceFlg.pdfFlg1": "定価用PDF", "estimate.detail.docPopup.schUnitPriceFlg.pdfFlg1": "定価用PDF",
"estimate.detail.docPopup.schDisplayFlg": "見積提出書の表示名", "estimate.detail.docPopup.schDisplayFlg": "見積提出書の表示名",
"estimate.detail.docPopup.schDisplayFlg.schDisplayFlg0": "販売店名", "estimate.detail.docPopup.schDisplayFlg.schDisplayFlg0": "販売店名",
@ -1034,6 +1034,7 @@
"estimate.detail.save.requiredItemId": "製品を選択してください。", "estimate.detail.save.requiredItemId": "製品を選択してください。",
"estimate.detail.save.requiredAmount": "数量は0より大きい値を入力してください。", "estimate.detail.save.requiredAmount": "数量は0より大きい値を入力してください。",
"estimate.detail.save.requiredSalePrice": "単価は0より大きい値を入力してください。", "estimate.detail.save.requiredSalePrice": "単価は0より大きい値を入力してください。",
"estimate.detail.save.pricingFlag": "設定した価格見積が作成されます。このまま進めてよろしいですか?",
"estimate.detail.reset.alertMsg": "初期化されました。", "estimate.detail.reset.alertMsg": "初期化されました。",
"estimate.detail.reset.confirmMsg": "保存した見積情報が初期化され、最近保存された図面情報が反映されます。本当に初期化しますか?", "estimate.detail.reset.confirmMsg": "保存した見積情報が初期化され、最近保存された図面情報が反映されます。本当に初期化しますか?",
"estimate.detail.lock.alertMsg": "見積もりを[ロック]すると変更できません。 <br />見積もりを修正するには、ロックを解除してください。", "estimate.detail.lock.alertMsg": "見積もりを[ロック]すると変更できません。 <br />見積もりを修正するには、ロックを解除してください。",

View File

@ -1034,6 +1034,7 @@
"estimate.detail.save.requiredItemId": "제품을 선택해주세요.", "estimate.detail.save.requiredItemId": "제품을 선택해주세요.",
"estimate.detail.save.requiredAmount": "수량은 0보다 큰값을 입력해주세요.", "estimate.detail.save.requiredAmount": "수량은 0보다 큰값을 입력해주세요.",
"estimate.detail.save.requiredSalePrice": "단가는 0보다 큰값을 입력해주세요.", "estimate.detail.save.requiredSalePrice": "단가는 0보다 큰값을 입력해주세요.",
"estimate.detail.save.pricingFlag": "설정한 가격 견적이 작성됩니다. 이대로 진행해도 괜찮으시겠습니까?",
"estimate.detail.reset.alertMsg": "초기화 되었습니다.", "estimate.detail.reset.alertMsg": "초기화 되었습니다.",
"estimate.detail.reset.confirmMsg": "수기 변경(저장)한 견적 정보가 초기화되고 최근 저장된 도면정보가 반영됩니다. 정말로 초기화하시겠습니까?", "estimate.detail.reset.confirmMsg": "수기 변경(저장)한 견적 정보가 초기화되고 최근 저장된 도면정보가 반영됩니다. 정말로 초기화하시겠습니까?",
"estimate.detail.lock.alertMsg": "견적서를 [잠금]하면 수정할 수 없습니다. <br />견적서를 수정하려면 잠금해제를 하십시오.", "estimate.detail.lock.alertMsg": "견적서를 [잠금]하면 수정할 수 없습니다. <br />견적서를 수정하려면 잠금해제를 하십시오.",