浏览代码

모바일 디자인 적용

juney 2 年之前
父节点
当前提交
b4d18ded71

+ 3 - 1
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -111,17 +111,19 @@ let mobPageObj = {
111 111
 				$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').attr('disabled', true);
112 112
 			}
113 113
 			this.moreView(true);
114
+			// CommonObj.moreView('#ITP_LIST_MPOMNG02010_ITEM_AREA', true, mobContentObj.list.load);
114 115
 		} else if(mode === VIEW_MODE_DETAIL) {
115 116
 			$('#ITP_AJAX_MPOMNG02010_VIEW_CONTAINER').show();
116 117
 			this.moreView(false);
118
+			// CommonObj.moreView('#ITP_LIST_MPOMNG02010_ITEM_AREA', false);
117 119
 		} else if(mode === VIEW_MODE_MODIFY) {
118 120
 			$('#ITP_AJAX_MPOMNG02010_MODIFY_CONTAINER').show();
119 121
 			this.moreView(false);
122
+			// CommonObj.moreView('#ITP_LIST_MPOMNG02010_ITEM_AREA', false);
120 123
 		}
121 124
 		this.viewMode = mode;
122 125
 	},
123 126
 	moreView: function(isScroll) {
124
-		var _this = this;
125 127
 		if(isScroll) {
126 128
 			$('#ITP_LIST_MPOMNG02010_ITEM_AREA').on('scroll', function () {
127 129
 				if($(this).scrollTop() + $(this).innerHeight() + 1 >= $(this)[0].scrollHeight) {

+ 0 - 18
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG01010.js

@@ -388,24 +388,6 @@ let mobPopObj = {
388 388
 				row['viewCd'] 			= 'C';
389 389
 				row['rtnAmt']			= parseInt(row.unitAmt) * parseInt(row.pchReqQty);
390 390
 				gridInsertData.push(row);
391
-				// var item = {};
392
-				// item['viewCd'] 			= 'C';
393
-				// item['brandUnitUnqNo']	= row.brandUnitUnqNo;
394
-				// item['itemId']			= row.itemId;
395
-				// item['itemNm']			= row.itemNm;
396
-				// item['rtnAmt']			= parseInt(row.unitAmt) * parseInt(row.pchReqQty);
397
-				// item['rtnDvsn']			= row.rtnDvsn;
398
-				// item['rtnQty']			= row.pchReqQty;
399
-				// item['rtnReqDtlNo']		= row.rtnReqDtlNo;
400
-				// item['rtnReqUnqNo']		= row.rtnReqUnqNo;
401
-				// item['rtnRsn']			= row.rtnRsn;
402
-				// item['rtnRsnDvsn']		= row.rtnRsnDvsn;
403
-				// item['spplyId']			= row.spplyId;
404
-				// item['storeUnitUnqNo']	= row.storeUnitUnqNo;
405
-				// item['unit']			= row.unit;
406
-				// item['unitAmt']			= row.unitAmt;
407
-				// item['unitGubun']		= row.unitGubun;
408
-				// gridInsertData.push(item);
409 391
 			});
410 392
 			param.gridInsertData = gridInsertData;
411 393
 			param['colReqDt'] = param.colReqDt.replace(/[^0-9]/g, "");

+ 32 - 12
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG02010.js

@@ -89,22 +89,22 @@ let mobPageObj = {
89 89
 				return false;
90 90
 			});
91 91
 
92
-			$(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
92
+			$(document).on('click', '#ITP_LIST_MRTNMNG02010_LIST_ROWS li', function() {
93 93
 				var index = $(this).index();
94 94
 				var item = mobContentObj.list.rows[index];
95 95
 				(item.rtnReqStCd === RTN_REQ_ST_CD_TEMP_SAVE) ? mobContentObj.modify.init(item) : mobContentObj.detail.init(item);
96 96
 			});
97 97
 
98
-			$(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li', function(e) {
99
-				if($(e.target).hasClass('DETAIL_ITEM_PLUS')) {
100
-					mobContentObj.modify.list.actPlus($(this));
101
-				} else if($(e.target).hasClass('DETAIL_ITEM_MINUS')) {
102
-					mobContentObj.modify.list.actMinus($(this));
103
-				} else {
104
-				}
105
-			});
98
+			// $(document).on('click', '#ITP_LIST_MRTNMNG02010_MODIFY_ROWS li', function(e) {
99
+			// 	if($(e.target).hasClass('DETAIL_ITEM_PLUS')) {
100
+			// 		mobContentObj.modify.list.actPlus($(this));
101
+			// 	} else if($(e.target).hasClass('DETAIL_ITEM_MINUS')) {
102
+			// 		mobContentObj.modify.list.actMinus($(this));
103
+			// 	} else {
104
+			// 	}
105
+			// });
106 106
 
107
-			$(document).off('click').on('click', '#ITP_LIST_MRTNMNG02010_POP_WHS_ROWS li button', function() {
107
+			$(document).on('click', '#ITP_LIST_MRTNMNG02010_POP_WHS_ROWS li button', function() {
108 108
 				mobPopObj.popWhsNm.choice($(this));
109 109
 			});
110 110
 		}
@@ -281,13 +281,15 @@ let mobContentObj = {
281 281
 					var $li = $('#ITP_LIST_MRTNMNG02010_MODIFY_AREA .mb_0 > .list-row:last');
282 282
 					$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
283 283
 					$li.find('.fnItemNm').text(item.itemNm);
284
-					$li.find('.fnRtnQty').text(item.rtnQty);
284
+					$li.find('.fnRtnQty').text(item.rtnReqItemQty);
285 285
 					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
286 286
 					item['viewCd'] = viewCd;
287 287
 					if(isPush) {
288 288
 						_this.rows.push(item);
289 289
 					}
290 290
 					_this.rtnReqAmtTot();
291
+					$('.list-row .DETAIL_ITEM_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
292
+					$('.list-row .DETAIL_ITEM_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
291 293
 				};
292 294
 				var fnChkExist = function() {
293 295
 					var isExist = false;
@@ -333,6 +335,24 @@ let mobContentObj = {
333 335
 				}
334 336
 			},
335 337
 			actPlus: function(elem) {
338
+				var $div = $(elem).siblings('div');
339
+				var num = Number($div.text());
340
+				$($div).text((num + 1).toString());
341
+				this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
342
+				this.rtnReqAmtTot();
343
+			},
344
+			actMinus: function(elem) {
345
+				var $div = $(elem).siblings('div');
346
+				var num = Number($div.text());
347
+				if(num <= 1) {
348
+					itp_fn_modal_alert('수량을 확인하세요.');
349
+				} else {
350
+					$($div).text((num - 1).toString());
351
+					this.rows[$div.parents('li').index()]['rtnQty'] = $($div).text();
352
+					this.rtnReqAmtTot();
353
+				}
354
+			},
355
+			/*ctPlus: function(elem) {
336 356
 				console.log('actPlus');
337 357
 				var index = $(elem).index();
338 358
 				var num = Number($(elem).find('.fnRtnQty').text()) + 1;
@@ -350,7 +370,7 @@ let mobContentObj = {
350 370
 					this.rows[index]['rtnQty'] = num;
351 371
 					this.rtnReqAmtTot();
352 372
 				}
353
-			},
373
+			},*/
354 374
 			rtnReqAmtTot: function() {
355 375
 				var reqAmt = 0;
356 376
 				$.each(this.rows, function(index, item) {