소스 검색

모바일 발주관리 MALL_ID 수정

juney 2 년 전
부모
커밋
78422529da

+ 4 - 4
src/main/webapp/mobile/app/mpomng/MPOMNG01010.html

@@ -8,7 +8,7 @@
8 8
       <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_LOAN_MGNT_UNQ_NO" name="loanMgntUnqNo" value="">
9 9
       <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_PCH_REQ_DVSN" name="pchReqDvsn" value="">
10 10
       <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_PCH_REQ_ST_CD" name="pchReqStCd" value="">
11
-      <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_PG_AFFL_ID" name="pgAfflId" value="">
11
+      <input type="hidden" id="ITP_FORM_MPOMNG01010_DETAIL_MALL_ID" name="mallId" value="">
12 12
       <div class="content">
13 13
         <div class="line">
14 14
           <label>납기요청일</label>
@@ -51,7 +51,7 @@
51 51
       <div id="ITP_LIST_MPOMNG01010_ITEM_AREA" class="scroll_area row-1-1">
52 52
         <ul id="ITP_LIST_MPOMNG01010_DETAIL_ROWS" class="panel-group"></ul>
53 53
         <div id="ITP_LIST_MPOMNG01010_DETAIL_ROWCOPY" style="display:none;">
54
-          <li class="row_2">
54
+          <li class="list-row">
55 55
             <div class="left_info">
56 56
               <div class="check_box"><!-- class 변경 -->
57 57
                 <div><input type="checkbox" name="brandUnitUnqNo" class="fnBrandUnitUnqNo" /></div>
@@ -67,9 +67,9 @@
67 67
               </div>
68 68
             </div>
69 69
             <div class="right">
70
-              <button id="ITP_BTN_MPOMNG01010_DETAIL_MINUS" class="DETAIL_ITEM_MINUS">-</button>
70
+              <button id="ITP_BTN_MPOMNG01010_DETAIL_MINUS">-</button>
71 71
               <div class="num fnPchReqQty">1</div>
72
-              <button id="ITP_BTN_MPOMNG01010_DETAIL_PLUS" class="DETAIL_ITEM_PLUS">+</button>
72
+              <button id="ITP_BTN_MPOMNG01010_DETAIL_PLUS">+</button>
73 73
             </div>
74 74
           </li>
75 75
         </div>

+ 3 - 3
src/main/webapp/mobile/app/mpomng/MPOMNG02010.html

@@ -164,7 +164,7 @@
164 164
       <input type="hidden" id="ITP_FORM_MPOMNG02010_MODIFY_PCH_REQ_DVSN" name="pchReqDvsn" value="">
165 165
       <input type="hidden" id="ITP_FORM_MPOMNG02010_MODIFY_PCH_REQ_UNQ_NO" name="pchReqUnqNo" value="">
166 166
       <input type="hidden" id="ITP_FORM_MPOMNG02010_MODIFY_PCH_REQ_ST_CD" name="pchReqStCd" value="">
167
-      <input type="hidden" id="ITP_FORM_MPOMNG02010_MODIFY_PG_AFFL_ID" name="pgAfflId" value="">
167
+      <input type="hidden" id="ITP_FORM_MPOMNG02010_MODIFY_MALL_ID" name="mallId" value="">
168 168
       <div class="content">
169 169
         <div class="line">
170 170
           <label>납기요청일</label>
@@ -223,9 +223,9 @@
223 223
               </div>
224 224
             </div>
225 225
             <div class="right">
226
-              <button id="ITP_BTN_MPOMNG02010_MODIFY_MINUS" class="DETAIL_ITEM_MINUS">-</button>
226
+              <button id="ITP_BTN_MPOMNG02010_MODIFY_MINUS">-</button>
227 227
               <div class="num fnPchReqQty">1</div>
228
-              <button id="ITP_BTN_MPOMNG02010_MODIFY_PLUS" class="DETAIL_ITEM_PLUS">+</button>
228
+              <button id="ITP_BTN_MPOMNG02010_MODIFY_PLUS">+</button>
229 229
             </div>
230 230
           </li>
231 231
         </div>

+ 15 - 13
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG01010.js

@@ -62,6 +62,13 @@ let mobPageObj = {
62 62
 				}
63 63
 				return false;
64 64
 			});
65
+			// $(document).on('click', '#ITP_BTN_MPOMNG01010_DETAIL_PLUS', function() {
66
+			// 	console.log('ITP_BTN_MPOMNG01010_DETAIL_PLUS ===> ');
67
+			// 	mobContObj.list.actPlus($(this));
68
+			// });
69
+			// $(document).on('click', '#ITP_BTN_MPOMNG01010_DETAIL_MINUS', function() {
70
+			// 	mobContObj.list.actMinus($(this));
71
+			// });
65 72
 		}
66 73
 	},
67 74
 	ready: function() {
@@ -71,18 +78,8 @@ let mobPageObj = {
71 78
 
72 79
 let mobContObj = {
73 80
 	init: function() {
74
-		this.button();
75 81
 		this.data.load();
76 82
 	},
77
-	button: function() {
78
-		var _this = this;
79
-		$(document).on('click', '.DETAIL_ITEM_PLUS', function() {
80
-			_this.list.actPlus($(this));
81
-		});
82
-		$(document).on('click', '.DETAIL_ITEM_MINUS', function() {
83
-			_this.list.actMinus($(this));
84
-		});
85
-	},
86 83
 	data: {
87 84
 		initPchReq: null,
88 85
 		load: function() {
@@ -95,7 +92,7 @@ let mobContObj = {
95 92
 				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_LOAN_DVSN').val(result.loanDvsn);
96 93
 				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_LOAN_MGNT_UNQ_NO').val(result.loanMgntUnqNo);
97 94
 				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_PCH_REQ_DVSN').val(result.pchReqDvsn);
98
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_PG_AFFL_ID').val(result.pgAfflId);
95
+				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_MALL_ID').val(result.mallId);
99 96
 
100 97
 				$('#ITP_FORM_MPOMNG01010_DETAIL .fnOrdUseAmt').text(CommonObj.currency.add(result.ordUseAmt));
101 98
 				if(result.whsId !== '' && result.location !== '') {
@@ -117,6 +114,7 @@ let mobContObj = {
117 114
 		},
118 115
 		attachRow: function (item) {
119 116
 			console.log(item);
117
+			var _this = this;
120 118
 			var fnIsExist = function(rows) {
121 119
 				var isExist = false;
122 120
 				$.each(rows, function(i, row) {
@@ -130,12 +128,14 @@ let mobContObj = {
130 128
 			if(!fnIsExist(this.rows)) {
131 129
 				this.rows.push(item);
132 130
 				$('#ITP_LIST_MPOMNG01010_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG01010_DETAIL_ROWCOPY').html());
133
-				var $li = $('#ITP_LIST_MPOMNG01010_ITEM_AREA .panel-group > .row_2:last');
131
+				var $li = $('#ITP_LIST_MPOMNG01010_ITEM_AREA .panel-group > .list-row:last');
134 132
 				$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
135 133
 				$li.find('.fnItemNm').text(item.itemNm);
136 134
 				$li.find('.fnPchReqQty').text(item.pchReqQty);
137 135
 				$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
138 136
 				this.pchReqAmtTot();
137
+				$('.list-row #ITP_BTN_MPOMNG01010_DETAIL_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
138
+				$('.list-row #ITP_BTN_MPOMNG01010_DETAIL_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
139 139
 			}
140 140
 		},
141 141
 		detachRow: function () {
@@ -153,6 +153,7 @@ let mobContObj = {
153 153
 		actPlus: function(elem) {
154 154
 			var $div = $(elem).siblings('div');
155 155
 			var num = Number($div.text());
156
+			console.log('actPlus ===> ' + num);
156 157
 			$($div).text((num + 1).toString());
157 158
 			this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
158 159
 			this.pchReqAmtTot();
@@ -160,6 +161,7 @@ let mobContObj = {
160 161
 		actMinus: function(elem) {
161 162
 			var $div = $(elem).siblings('div');
162 163
 			var num = Number($div.text());
164
+			console.log('actMinus ===> ' + num);
163 165
 			if(num <= 1) {
164 166
 				alert('주문수량을 확인하세요.');
165 167
 			} else {
@@ -330,7 +332,7 @@ let mobPopObj = {
330 332
 					$('#ITP_POP_MPOMNG01010_REQ_AREA #ITP_BTN_MPOMNG01010_POP_REQ_CONFIRM').text('확인');
331 333
 				} else {
332 334
 					if (ordUseAmt < pchReqAmtTot) { // 요청금액이 가능금액보다 클 경우
333
-						if($('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_PG_AFFL_ID').val() === '') {	// PG 정보 없음
335
+						if($('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_MALL_ID').val() === '') {	// PG 정보 없음
334 336
 							this.saveMode = 3;
335 337
 							popMsg = 	'무통장 입금 후 구매요청해 주세요.<br>' +
336 338
 										'임시저장 하시겠습니까?';

+ 4 - 11
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -97,15 +97,6 @@ let mobPageObj = {
97 97
 				}
98 98
 				return false;
99 99
 			});
100
-
101
-			$(document).off('click', '#ITP_LIST_MPOMNG02010_MODIFY_ROWS li button');
102
-			$(document).on('click', '#ITP_LIST_MPOMNG02010_MODIFY_ROWS li button', function() {
103
-				if($(this).hasClass('DETAIL_ITEM_PLUS')) {
104
-					mobContentObj.modify.list.actPlus($(this));
105
-				} else if($(this).hasClass('DETAIL_ITEM_MINUS')) {
106
-					mobContentObj.modify.list.actMinus($(this));
107
-				}
108
-			});
109 100
 		}
110 101
 	},
111 102
 	switchScreen: function(mode) {
@@ -276,7 +267,7 @@ let mobContentObj = {
276 267
 			$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_LOAN_MGNT_UNQ_NO').val(result.loanMgntUnqNo);
277 268
 			$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_PCH_REQ_UNQ_NO').val(result.pchReqUnqNo);
278 269
 			$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_PCH_REQ_DVSN').val(result.pchReqDvsn);
279
-			$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_PG_AFFL_ID').val(result.pgAfflId);
270
+			$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_MALL_ID').val(result.mallId);
280 271
 
281 272
 			$('#ITP_FORM_MPOMNG02010_MODIFY .fnOrdUseAmt').text(CommonObj.currency.add(result.ordUseAmt));
282 273
 			if(result.whsId !== '' && result.location !== '') {
@@ -306,6 +297,8 @@ let mobContentObj = {
306 297
 					$li.find('.fnPchReqQty').text(item.pchReqQty);
307 298
 					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
308 299
 					_this.pchReqAmtTot();
300
+					$('.list-row #ITP_BTN_MPOMNG02010_MODIFY_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
301
+					$('.list-row #ITP_BTN_MPOMNG02010_MODIFY_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
309 302
 				};
310 303
 				var fnChkExist = function() {
311 304
 					var isExist = false;
@@ -630,7 +623,7 @@ let mobPopObj = {
630 623
 					$('#ITP_POP_MPOMNG02010_REQ_AREA #ITP_BTN_MPOMNG02010_POP_REQ_CONFIRM').text('확인');
631 624
 				} else {
632 625
 					if (ordUseAmt < pchReqAmtTot) { // 요청금액이 가능금액보다 클 경우
633
-						if($('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_PG_AFFL_ID').val() === '') {	// PG 정보 없음
626
+						if($('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_MALL_ID').val() === '') {	// PG 정보 없음
634 627
 							this.saveMode = 3;
635 628
 							popMsg = 	'무통장 입금 후 구매요청해 주세요.<br>' +
636 629
 								'임시저장 하시겠습니까?';

+ 1 - 1
src/main/webapp/mobile/js/config.js

@@ -42,7 +42,7 @@ require([
42 42
 	'jquery.bootstrap.datepicker.locale',
43 43
 	'message.locale'
44 44
 ], function($) {
45
-	// history.pushState(null, null, location.href);
45
+	history.pushState(null, null, location.href);
46 46
 
47 47
 	CommonObj.init();
48 48