북면설치 플래그 관련

This commit is contained in:
basssy 2025-02-05 09:11:18 +09:00
parent 716410008a
commit bb85d2ed6b
4 changed files with 41 additions and 28 deletions

View File

@ -1366,6 +1366,9 @@ export default function Estimate({}) {
{getMessage('estimate.detail.fileFlg')} {getMessage('estimate.detail.fileFlg')}
</label> </label>
</div> </div>
{estimateContextState?.northArrangement === '1' && (
<div className="drag-file-guide">{getMessage('estimate.detail.dragFileGuide')}</div>
)}
</div> </div>
</div> </div>
<div className="common-table mb10"> <div className="common-table mb10">

View File

@ -411,11 +411,12 @@ export default function StuffDetail() {
if (session?.storeId === 'T01') { if (session?.storeId === 'T01') {
url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}`
} else { } else {
if (session.storeLvl === '1') { // if (session.storeLvl === '1') {
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} else { // } else {
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} // }
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} }
get({ url: url }).then((res) => { get({ url: url }).then((res) => {
@ -523,11 +524,12 @@ export default function StuffDetail() {
if (session?.storeId === 'T01') { if (session?.storeId === 'T01') {
url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}`
} else { } else {
if (session.storeLvl === '1') { // if (session.storeLvl === '1') {
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} else { // } else {
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} // }
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} }
get({ url: url }).then((res) => { get({ url: url }).then((res) => {
if (!isEmptyArray(res)) { if (!isEmptyArray(res)) {

View File

@ -474,12 +474,13 @@ export default function StuffSearchCondition() {
//T01 //T01
url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}` url = `/api/object/saleStore/${session?.storeId}/firstList?userId=${session?.userId}`
} else { } else {
if (session.storeLvl === '1') { // if (session.storeLvl === '1') {
//T01 1 // //T01 1
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} else { // } else {
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}` // url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} // }
url = `/api/object/saleStore/${session?.storeId}/list?firstFlg=1&userId=${session?.userId}`
} }
get({ url: url }).then((res) => { get({ url: url }).then((res) => {

View File

@ -80,7 +80,6 @@ export const useEstimateController = (planNo) => {
res.data.pkgAsp = roundedNumber.toString() res.data.pkgAsp = roundedNumber.toString()
} }
setEstimateContextState(res.data) setEstimateContextState(res.data)
} }
} }
@ -155,7 +154,7 @@ export const useEstimateController = (planNo) => {
}) })
.catch((error) => { .catch((error) => {
console.log('::FileDownLoad Error::', error) console.log('::FileDownLoad Error::', error)
alert('File does not exist.') return swalFire({ text: getMessage('File does not exist'), type: 'alert' })
}) })
} }
@ -169,19 +168,19 @@ export const useEstimateController = (planNo) => {
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)
return alert(getMessage('estimate.detail.save.requiredCharger')) return swalFire({ text: getMessage('estimate.detail.save.requiredCharger'), type: 'alert' })
} }
if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) { if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) {
flag = false flag = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredObjectName')) return swalFire({ text: getMessage('estimate.detail.save.requiredObjectName'), type: 'alert' })
} }
if (isNaN(Date.parse(estimateData.estimateDate))) { if (isNaN(Date.parse(estimateData.estimateDate))) {
flag = false flag = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredEstimateDate')) return swalFire({ text: getMessage('estimate.detail.save.requiredEstimateDate'), type: 'alert' })
} }
if (estimateData.estimateType === 'YJSS') { if (estimateData.estimateType === 'YJSS') {
@ -189,7 +188,7 @@ export const useEstimateController = (planNo) => {
if (pkgAsp === '0') { if (pkgAsp === '0') {
flag = false flag = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredPkgAsp')) return swalFire({ text: getMessage('estimate.detail.save.requiredPkgAsp'), type: 'alert' })
} }
} }
@ -209,6 +208,14 @@ export const useEstimateController = (planNo) => {
//기존에 첨부된 파일이 없으면 //기존에 첨부된 파일이 없으면
if (isEmptyArray(estimateData.newFileList)) { if (isEmptyArray(estimateData.newFileList)) {
//새로 첨부한 파일이 없으면 //새로 첨부한 파일이 없으면
//북면 먼저 체크
if (estimateData?.northArrangement === '1') {
fileFlg = false
setIsGlobalLoading(false)
return swalFire({ text: getMessage('estimate.detail.save.requiredNorthArrangementFileUpload'), type: 'alert' })
}
if (estimateData.itemList.length > 1) { if (estimateData.itemList.length > 1) {
estimateData.itemList.map((row) => { estimateData.itemList.map((row) => {
if (row.delFlg === '0') { if (row.delFlg === '0') {
@ -217,7 +224,7 @@ export const useEstimateController = (planNo) => {
if (estimateData.fileFlg === '0') { if (estimateData.fileFlg === '0') {
fileFlg = false fileFlg = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredFileUpload')) return swalFire({ text: getMessage('estimate.detail.save.requiredFileUpload'), type: 'alert' })
} }
} }
} }
@ -235,7 +242,7 @@ export const useEstimateController = (planNo) => {
if (item.itemId === '') { if (item.itemId === '') {
itemFlg = false itemFlg = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredItemId')) return swalFire({ text: getMessage('estimate.detail.save.requiredItemId'), type: 'alert' })
} }
} }
@ -251,7 +258,7 @@ export const useEstimateController = (planNo) => {
if (item.amount < 1) { if (item.amount < 1) {
itemFlg = false itemFlg = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredAmount')) return swalFire({ text: getMessage('estimate.detail.save.requiredAmount'), type: 'alert' })
} }
if (estimateData.estimateType !== 'YJSS') { if (estimateData.estimateType !== 'YJSS') {
@ -263,7 +270,7 @@ export const useEstimateController = (planNo) => {
if (item.salePrice < 1) { if (item.salePrice < 1) {
itemFlg = false itemFlg = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredSalePrice')) return swalFire({ text: getMessage('estimate.detail.save.requiredSalePrice'), type: 'alert' })
} }
} }
@ -274,7 +281,7 @@ export const useEstimateController = (planNo) => {
if (isNaN(item.salePrice)) { if (isNaN(item.salePrice)) {
itemFlg = false itemFlg = false
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredSalePrice')) return swalFire({ text: getMessage('estimate.detail.save.requiredSalePrice'), type: 'alert' })
} }
} }
} }
@ -292,7 +299,7 @@ export const useEstimateController = (planNo) => {
}) })
if (delCnt === estimateData.itemList.length) { if (delCnt === estimateData.itemList.length) {
setIsGlobalLoading(false) setIsGlobalLoading(false)
return alert(getMessage('estimate.detail.save.requiredItem')) return swalFire({ text: getMessage('estimate.detail.save.requiredItem'), type: 'alert' })
} }
} }