Reviewed-on: #43
This commit is contained in:
commit
16e9ce173a
@ -1362,10 +1362,11 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (checkLength(params?.receiveUser.trim()) > 10) {
|
if (checkLength(params?.receiveUser.trim()) > 40) {
|
||||||
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
//로그인이 2차점인데 otherSaleStoreId가 없으면 알럿
|
||||||
if (session.storeLvl !== '1') {
|
if (session.storeLvl !== '1') {
|
||||||
if (params.saleStoreLevel === '1') {
|
if (params.saleStoreLevel === '1') {
|
||||||
@ -1435,20 +1436,15 @@ export default function StuffDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 전각20자 (반각40자)
|
||||||
|
*/
|
||||||
const checkLength = (value) => {
|
const checkLength = (value) => {
|
||||||
let str = new String(value)
|
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
|
||||||
let _byte = 0
|
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
|
||||||
if (str.length !== 0) {
|
|
||||||
for (let i = 0; i < str.length; i++) {
|
let totalLength = fullWidthLength * 2 + halfWidthLength
|
||||||
let str2 = str.charAt(i)
|
return totalLength
|
||||||
if (encodeURIComponent(str2).length > 4) {
|
|
||||||
_byte += 2
|
|
||||||
} else {
|
|
||||||
_byte++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _byte
|
|
||||||
}
|
}
|
||||||
// 임시저장
|
// 임시저장
|
||||||
const onTempSave = async () => {
|
const onTempSave = async () => {
|
||||||
@ -1498,7 +1494,7 @@ export default function StuffDetail() {
|
|||||||
|
|
||||||
// 담당자 자리수 체크
|
// 담당자 자리수 체크
|
||||||
if (params?.receiveUser !== '') {
|
if (params?.receiveUser !== '') {
|
||||||
if (checkLength(params?.receiveUser.trim()) > 10) {
|
if (checkLength(params?.receiveUser.trim()) > 40) {
|
||||||
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -449,7 +449,7 @@ export const useEstimateController = (planNo, flag) => {
|
|||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (checkLength(copyReceiveUser.trim()) > 10) {
|
if (checkLength(copyReceiveUser.trim()) > 40) {
|
||||||
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
return swalFire({ text: getMessage('stuff.detail.tempSave.message2'), type: 'alert', icon: 'warning' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,20 +489,15 @@ export const useEstimateController = (planNo, flag) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 전각20자 (반각40자)
|
||||||
|
*/
|
||||||
const checkLength = (value) => {
|
const checkLength = (value) => {
|
||||||
let str = new String(value)
|
let fullWidthLength = value.replace(/[^\uFF01-\uFF5E]/g, '').length
|
||||||
let _byte = 0
|
let halfWidthLength = value.replace(/[\uFF01-\uFF5E]/g, '').length
|
||||||
if (str.length !== 0) {
|
|
||||||
for (let i = 0; i < str.length; i++) {
|
let totalLength = fullWidthLength * 2 + halfWidthLength
|
||||||
let str2 = str.charAt(i)
|
return totalLength
|
||||||
if (encodeURIComponent(str2).length > 4) {
|
|
||||||
_byte += 2
|
|
||||||
} else {
|
|
||||||
_byte++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return _byte
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -732,7 +732,7 @@
|
|||||||
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
"stuff.detail.tooltip.surfaceType": "塩害地域の定義は各メーカーの設置マニュアルをご確認ください",
|
||||||
"stuff.detail.tempSave.message0": "一時保存されました。 物件番号を取得するには、保存ボタンを押して下さい。,",
|
"stuff.detail.tempSave.message0": "一時保存されました。 物件番号を取得するには、保存ボタンを押して下さい。,",
|
||||||
"stuff.detail.tempSave.message1": "一時保存されました。物件番号を取得するには、必須項目をすべて入力してください。",
|
"stuff.detail.tempSave.message1": "一時保存されました。物件番号を取得するには、必須項目をすべて入力してください。",
|
||||||
"stuff.detail.tempSave.message2": "担当者名は10桁以下で入力してください。",
|
"stuff.detail.tempSave.message2": "担当者名は全角20文字(半角40文字)以下で入力してください.",
|
||||||
"stuff.detail.tempSave.message3": "二次販売店を選択してください。",
|
"stuff.detail.tempSave.message3": "二次販売店を選択してください。",
|
||||||
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
"stuff.detail.confirm.message1": "販売店情報を変更すると、設計依頼文書番号が削除されます。変更しますか?",
|
||||||
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
"stuff.detail.delete.message1": "仕様が確定したものは削除できません。",
|
||||||
|
|||||||
@ -733,7 +733,7 @@
|
|||||||
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 매뉴얼을 확인해주십시오",
|
"stuff.detail.tooltip.surfaceType": "염해지역 정의는 각 메이커의 설치 매뉴얼을 확인해주십시오",
|
||||||
"stuff.detail.tempSave.message0": "임시저장 되었습니다. 물건번호를 획득하려면 저장버튼을 눌러주십시오.",
|
"stuff.detail.tempSave.message0": "임시저장 되었습니다. 물건번호를 획득하려면 저장버튼을 눌러주십시오.",
|
||||||
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
"stuff.detail.tempSave.message1": "임시저장 되었습니다. 물건번호를 획득하려면 필수 항목을 모두 입력해 주십시오.",
|
||||||
"stuff.detail.tempSave.message2": "담당자이름은 10자리 이하로 입력해 주십시오.",
|
"stuff.detail.tempSave.message2": "담당자이름은 전각20자(반각40자) 이하로 입력해 주십시오.",
|
||||||
"stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.",
|
"stuff.detail.tempSave.message3": "2차 판매점을 선택해주세요.",
|
||||||
"stuff.detail.confirm.message1": "판매점 정보를 변경하면 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
"stuff.detail.confirm.message1": "판매점 정보를 변경하면 설계의뢰 문서번호가 삭제됩니다. 변경하시겠습니까?",
|
||||||
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
"stuff.detail.delete.message1": "사양이 확정된 물건은 삭제할 수 없습니다.",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user