@@ -301,7 +302,6 @@ export default function StuffDetail() {
type="button"
className="grid-btn"
onClick={() => {
- //mid:5(견적서), /pid:플랜번호
setFloorPlanObjectNo({ floorPlanObjectNo: params.data.objectNo })
setIsGlobalLoading(true)
setMenuNumber(5)
@@ -1025,6 +1025,8 @@ export default function StuffDetail() {
const _objectNameOmit = watch('objectNameOmit')
// saleStoreId: '', //1차 판매점ID
const _saleStoreId = watch('saleStoreId')
+ // 2차 판매점명
+ const _otherSaleStoreId = watch('otherSaleStoreId')
// zipNo: '', //우편번호
const _zipNo = watch('zipNo')
// prefId: '', //도도부현
@@ -1043,6 +1045,7 @@ export default function StuffDetail() {
useEffect(() => {
if (editMode === 'NEW') {
const formData = form.getValues()
+
let errors = {}
if (!formData.receiveUser || formData.receiveUser.trim().length === 0) {
errors.receiveUser = true
@@ -1057,6 +1060,12 @@ export default function StuffDetail() {
errors.saleStoreId = true
}
+ if (session?.storeLvl === '2') {
+ if (!formData.otherSaleStoreId) {
+ errors.otherSaleStoreId = true
+ }
+ }
+
if (!formData.zipNo) {
errors.zipNo = true
}
@@ -1099,6 +1108,12 @@ export default function StuffDetail() {
errors.saleStoreId = true
}
+ if (session?.storeLvl === '2') {
+ if (!formData.otherSaleStoreId) {
+ errors.otherSaleStoreId = true
+ }
+ }
+
if (!formData.zipNo) {
errors.zipNo = true
}
@@ -1130,6 +1145,7 @@ export default function StuffDetail() {
_objectName,
_objectNameOmit,
_saleStoreId,
+ _otherSaleStoreId,
_zipNo,
_prefId,
_address,
@@ -1368,13 +1384,12 @@ export default function StuffDetail() {
setIsGlobalLoading(true)
//상세화면으로 전환
if (res.status === 201) {
+ setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: objectNo })
swalFire({
text: getMessage('stuff.detail.save'),
type: 'alert',
confirmFn: () => {
- setIsGlobalLoading(false)
-
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
},
})
@@ -1391,12 +1406,12 @@ export default function StuffDetail() {
setIsGlobalLoading(true)
if (res.status === 201) {
+ setIsGlobalLoading(false)
setFloorPlanObjectNo({ floorPlanObjectNo: res.data.objectNo })
swalFire({
text: getMessage('stuff.detail.save'),
type: 'alert',
confirmFn: () => {
- setIsGlobalLoading(false)
router.push(`/management/stuff/detail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
},
})
@@ -1468,11 +1483,11 @@ export default function StuffDetail() {
.then((res) => {
setIsGlobalLoading(true)
if (res.status === 201) {
+ setIsGlobalLoading(false)
swalFire({
text: getMessage('stuff.detail.tempSave.message1'),
type: 'alert',
confirmFn: () => {
- setIsGlobalLoading(false)
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
},
})
@@ -1487,11 +1502,11 @@ export default function StuffDetail() {
.then((res) => {
setIsGlobalLoading(true)
if (res.status === 201) {
+ setIsGlobalLoading(false)
swalFire({
text: getMessage('stuff.detail.tempSave.message1'),
type: 'alert',
confirmFn: () => {
- setIsGlobalLoading(false)
router.push(`/management/stuff/tempdetail?objectNo=${res.data.objectNo.toString()}`, { scroll: false })
},
})
@@ -1519,7 +1534,7 @@ export default function StuffDetail() {
confirmFn: () => {
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
del({ url: `/api/object/${objectNo}?${queryStringFormatter(delParams)}` })
- .then((res) => {
+ .then(() => {
setIsGlobalLoading(true)
setFloorPlanObjectNo({ floorPlanObjectNo: '' })
if (session.storeId === 'T01') {
@@ -1595,6 +1610,13 @@ export default function StuffDetail() {
// 그리드 더블 클릭 해당플랜의 도면작성 화면으로 이동
const getCellDoubleClicked = (params) => {
+ //#474정책
+ if (managementState.createUser === 'T01') {
+ if (session.userId !== 'T01') {
+ return false
+ }
+ }
+
if (params?.column?.colId !== 'estimateDate') {
if (params?.data?.planNo && params?.data?.objectNo) {
let objectNo = params?.data?.objectNo
@@ -2462,6 +2484,7 @@ export default function StuffDetail() {
+ 상세
|