fix : 상품관리 > 상품조회 > 상품 등록/복사재등록/수정 - input 값 trim 공통함수 추가
This commit is contained in:
@@ -569,6 +569,8 @@
|
||||
* 등록 AJAX
|
||||
******************************************************** */
|
||||
const fn_regist = function () {
|
||||
trimInputValue();
|
||||
|
||||
const url = '<c:url value="/mngr/goods/goodsmngr/insertGoodsInfo"/>';
|
||||
const formData = new FormData();
|
||||
|
||||
@@ -1270,7 +1272,6 @@
|
||||
formData.append('files', file); // 서버에서 파일을 받을 때 'files'라는 이름으로 전송
|
||||
});
|
||||
|
||||
trimInputValue();
|
||||
if (confirm('상품을 <spring:message code="confirm.common.insert"/>')) {
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
|
||||
@@ -621,6 +621,7 @@
|
||||
* 복사 등록 AJAX
|
||||
******************************************************** */
|
||||
const fn_copy_regist = function () {
|
||||
trimInputValue();
|
||||
|
||||
const url = '<c:url value="/mngr/goods/goodsmngr/insertGoodsInfo"/>';
|
||||
const formData = new FormData();
|
||||
@@ -1323,7 +1324,6 @@
|
||||
});
|
||||
|
||||
if (confirm('상품을 <spring:message code="confirm.common.copyInsert"/>')) {
|
||||
trimInputValue();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
|
||||
@@ -1440,6 +1440,7 @@
|
||||
|
||||
//구매 대상자 제한 정보 저장
|
||||
const fn_save_purchase_limmit = function () {
|
||||
trimInputValue();
|
||||
|
||||
if ($('#purchase_limmit_hiddenForm') != null) {
|
||||
$('#purchase_limmit_hiddenForm').remove();
|
||||
@@ -1763,11 +1764,11 @@
|
||||
******************************************************** */
|
||||
//카테고리 수정
|
||||
$(document).on('click', '#btn_update_category', function () {
|
||||
trimInputValue();
|
||||
|
||||
|
||||
if ($('#hiddenForm_categry') != null) {
|
||||
$('#hiddenForm_categry').remove();
|
||||
}
|
||||
if ($('#hiddenForm_categry') != null) {
|
||||
$('#hiddenForm_categry').remove();
|
||||
}
|
||||
|
||||
const url = '<c:url value="/mngr/goods/goodsmngr/updateGoodsDtlCtgryLink"/>';
|
||||
const hiddenForm = document.createElement('form');
|
||||
@@ -1804,6 +1805,7 @@
|
||||
//상품 기본정보 수정
|
||||
$(document).on('click', '#btn_update_BscInfo', function (event) {
|
||||
event.preventDefault()
|
||||
trimInputValue();
|
||||
|
||||
if ($('#hiddenForm_bscInfo') != null) {
|
||||
$('#hiddenForm_bscInfo').remove();
|
||||
@@ -1936,6 +1938,7 @@
|
||||
|
||||
// 상품 판매정보 수정
|
||||
$(document).on('click', '#btn_update_SelInfo', function () {
|
||||
trimInputValue();
|
||||
|
||||
if ($('#hiddenForm_selInfo') != null) {
|
||||
$('#hiddenForm_selInfo').remove();
|
||||
@@ -2214,6 +2217,7 @@
|
||||
//상품 옵션수정
|
||||
$(document).on('click', '#btn_update_opt', function (event) {
|
||||
event.preventDefault()
|
||||
trimInputValue();
|
||||
|
||||
if ($('#hiddenForm_opt') != null) {
|
||||
$('#hiddenForm_opt').remove();
|
||||
@@ -2645,6 +2649,8 @@
|
||||
//상품 이미지 수정
|
||||
$(document).on('click', '#btn_update_img', function (event) {
|
||||
event.preventDefault()
|
||||
trimInputValue();
|
||||
|
||||
if($('#hiddenForm_img') != null) {
|
||||
$('#hiddenForm_img').remove();
|
||||
}
|
||||
@@ -2717,6 +2723,8 @@
|
||||
//상품 기타정보 수정
|
||||
$(document).on('click', '[name="btn_update_EtcInfo"]', function (event) {
|
||||
event.preventDefault()
|
||||
trimInputValue();
|
||||
|
||||
if($('#hiddenForm_etcInfo') != null) {
|
||||
$('#hiddenForm_etcInfo').remove();
|
||||
}
|
||||
@@ -2841,7 +2849,7 @@
|
||||
//관련상품 수정
|
||||
$(document).on('click','#btn_update_relateGoods', function (event) {
|
||||
event.preventDefault()
|
||||
|
||||
trimInputValue();
|
||||
|
||||
if($('#hiddenForm_relateGoods') != null) {
|
||||
$('#hiddenForm_relateGoods').remove();
|
||||
@@ -2884,7 +2892,6 @@
|
||||
//상품 개별 수정 ajax
|
||||
const updateAjaxInfo = (gubun, url, formData, sectionNo) =>{
|
||||
if (confirm(gubun+`을(를) <spring:message code="confirm.common.update"/>`)) {
|
||||
trimInputValue();
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
enctype: 'multipart/form-data',
|
||||
|
||||
Reference in New Issue
Block a user