From ad7e60c5d5a090160c6b9be63c02a75a6c369b91 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 금, 07 1월 2022 14:10:15 +0900 Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa --- src/main/webapp/scripts/app/ispField/ispFieldAdd.controller.js | 54 +----------------------------------------------------- 1 files changed, 1 insertions(+), 53 deletions(-) diff --git a/src/main/webapp/scripts/app/ispField/ispFieldAdd.controller.js b/src/main/webapp/scripts/app/ispField/ispFieldAdd.controller.js index 830e8ac..139308c 100644 --- a/src/main/webapp/scripts/app/ispField/ispFieldAdd.controller.js +++ b/src/main/webapp/scripts/app/ispField/ispFieldAdd.controller.js @@ -13,8 +13,7 @@ $scope.fn = { cancel : cancel, // �뙘�뾽 李� �떕湲� formSubmit : formSubmit, // �뤌 �쟾�넚 - formCheck : formCheck, // �뤌 泥댄겕 - autoHyphenPhone : autoHyphenPhone // �뿰�씫泥� �엯�젰�떆 �븯�씠�뵂 �옄�룞 �엯�젰 + formCheck : formCheck // �뤌 泥댄겕 }; $scope.vm = { @@ -37,60 +36,9 @@ return false; } - // �뿰�씫泥� �엯�젰�떆 �븯�씠�뵂 �옄�룞 �엯�젰 - function autoHyphenPhone() { - let phone = $scope.vm.form.tel - let seoul = $scope.vm.form.tel - - // �빖�뱶�룿 諛� 吏�諛� 吏��뿭踰덊샇 議곌굔 - phone.replace(/^[0-9]/g, ''); - // �꽌�슱 吏��뿭踰덊샇 議곌굔 - seoul.replace(/^[0-9]/g, ''); - var tmp = ''; - - if (phone.length < 4) { - return phone; - } else if (phone.length < 7) { - tmp += phone.substr(0, 3); - tmp += '-'; - tmp += phone.substr(3); - $scope.vm.form.tel = tmp; - } else if (seoul.substring(0, 2) === "02" && seoul.length === 9) { // �꽌�슱 吏��뿭踰덊샇 議곌굔 - tmp += seoul.substring(0, 2); - tmp += '-'; - tmp += seoul.substring(2, 5); - tmp += '-'; - tmp += seoul.substr(5); - $scope.vm.form.tel = tmp; - } else if (seoul.substring(0, 2) === "02" && seoul.length === 10) { // �꽌�슱 吏��뿭踰덊샇 議곌굔 - tmp += seoul.substring(0, 2); - tmp += '-'; - tmp += seoul.substring(2, 6); - tmp += '-'; - tmp += seoul.substr(6); - $scope.vm.form.tel = tmp; - } else if (phone.length < 11) { // �빖�뱶�룿 諛� 吏�諛� 吏��뿭踰덊샇 議곌굔 - tmp += phone.substr(0, 3); - tmp += '-'; - tmp += phone.substr(3, 3); - tmp += '-'; - tmp += phone.substr(6); - $scope.vm.form.tel = tmp; - } else { // �빖�뱶�룿 諛� 吏�諛� 吏��뿭踰덊샇 議곌굔 - tmp += phone.substr(0, 3); - tmp += '-'; - tmp += phone.substr(3, 4); - tmp += '-'; - tmp += phone.substr(7); - $scope.vm.form.tel = tmp; - } - return phone; - } - // �뤌 �쟾�넚 function formSubmit(condition) { $rootScope.spinner = true; - $scope.vm.form.tel = $scope.vm.form.tel.replace(/\-/g,''); // �쟾�솕踰덊샇瑜� 蹂대궪�븧 �븯�씠�뵂�쓣 �젣嫄고빐�꽌 DB�뿉 ���옣 var content = { code : $rootScope.preventXss($scope.vm.form.code), //肄붾뱶 -- Gitblit v1.8.0