Browse Source

모바일 품목추가 오류 수정

juney 2 years ago
parent
commit
9e0acf0585

+ 5 - 42
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -281,26 +281,25 @@ let mobContObj = {
281
 			attachRow: function (items) {
281
 			attachRow: function (items) {
282
 				var _this = this;
282
 				var _this = this;
283
 				var fnIsNotExist = function(rows, item) {
283
 				var fnIsNotExist = function(rows, item) {
284
-					var isAddRow = true;
284
+					var isPushRow = true;
285
 					var isAddItem = true;
285
 					var isAddItem = true;
286
 					$.each(rows, function(i, row) {
286
 					$.each(rows, function(i, row) {
287
 						if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
287
 						if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
288
 							if(row.viewCd === 'D') {
288
 							if(row.viewCd === 'D') {
289
 								row.viewCd = 'U';
289
 								row.viewCd = 'U';
290
-								row.rtnQty = item.rtnQty;
290
+								row.pchReqQty = item.pchReqQty;
291
 							} else {
291
 							} else {
292
-								isAddRow = false;
292
+								isAddItem = false;
293
 							}
293
 							}
294
-							isAddRow = false;
294
+							isPushRow = false;
295
 							return false;
295
 							return false;
296
 						}
296
 						}
297
 					});
297
 					});
298
-					if(isAddRow) _this.rows.push(item);
298
+					if(isPushRow) _this.rows.push(item);
299
 					return isAddItem;
299
 					return isAddItem;
300
 				};
300
 				};
301
 				$.each(items, function(i, item) {
301
 				$.each(items, function(i, item) {
302
 					if(fnIsNotExist(_this.rows, item)) {
302
 					if(fnIsNotExist(_this.rows, item)) {
303
-						_this.rows.push(item);
304
 						$('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_MODIFY_ROWCOPY').html());
303
 						$('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_MODIFY_ROWCOPY').html());
305
 						var $li = $('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group > .item-row:last');
304
 						var $li = $('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group > .item-row:last');
306
 						$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
305
 						$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
@@ -313,42 +312,6 @@ let mobContObj = {
313
 					}
312
 					}
314
 				});
313
 				});
315
 			},
314
 			},
316
-			// attachRow: function (item) {
317
-			// 	var _this = this;
318
-			// 	var append = function(isPush) {
319
-			// 		$('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_MODIFY_ROWCOPY').html());
320
-			// 		var $li = $('#ITP_LIST_MPOMNG02010_MODIFY_AREA .panel-group > .item-row:last');
321
-			// 		$li.find('.fnBrandUnitUnqNo').val(item.brandUnitUnqNo);
322
-			// 		$li.find('.fnItemNm').text(item.itemNm);
323
-			// 		$li.find('.fnPchReqQty').text(item.pchReqQty);
324
-			// 		$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
325
-			// 		$('.item-row #ITP_BTN_MPOMNG02010_MODIFY_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
326
-			// 		$('.item-row #ITP_BTN_MPOMNG02010_MODIFY_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
327
-			// 		if(isPush) {
328
-			// 			_this.rows.push(item);
329
-			// 		}
330
-			// 		_this.pchReqAmtTot();
331
-			// 	};
332
-			// 	var fnIsExist = function() {
333
-			// 		var isExist = false;
334
-			// 		$.each(_this.rows, function(i, row) {
335
-			// 			if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
336
-			// 				if(row.viewCd === 'D') {
337
-			// 					item.viewCd = 'U';
338
-			// 					append(false);
339
-			// 				} else {
340
-			// 					itp_fn_modal_alert('이미 존재하는 품목입니다.');
341
-			// 				}
342
-			// 				isExist = true;
343
-			// 				return false;
344
-			// 			}
345
-			// 		});
346
-			// 		return isExist;
347
-			// 	};
348
-			// 	if(!fnIsExist(this.rows)) {
349
-			// 		append(true);
350
-			// 	}
351
-			// },
352
 			detachRow: function () {
315
 			detachRow: function () {
353
 				if($('#ITP_LIST_MPOMNG02010_MODIFY_AREA input:checkbox[name=brandUnitUnqNo]:checked').length > 0) {
316
 				if($('#ITP_LIST_MPOMNG02010_MODIFY_AREA input:checkbox[name=brandUnitUnqNo]:checked').length > 0) {
354
 					var _this = this;
317
 					var _this = this;

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

@@ -265,7 +265,7 @@ let mobContObj = {
265
 			attachRow: function (items) {
265
 			attachRow: function (items) {
266
 				var _this = this;
266
 				var _this = this;
267
 				var fnIsNotExist = function(rows, item) {
267
 				var fnIsNotExist = function(rows, item) {
268
-					var isAddRow = true;
268
+					var isPushRow = true;
269
 					var isAddItem = true;
269
 					var isAddItem = true;
270
 					$.each(rows, function(i, row) {
270
 					$.each(rows, function(i, row) {
271
 						if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
271
 						if(row.brandUnitUnqNo === item.brandUnitUnqNo) {
@@ -273,13 +273,13 @@ let mobContObj = {
273
 								row.viewCd = 'U';
273
 								row.viewCd = 'U';
274
 								row.rtnQty = item.rtnQty;
274
 								row.rtnQty = item.rtnQty;
275
 							} else {
275
 							} else {
276
-								isAddRow = false;
276
+								isAddItem = false;
277
 							}
277
 							}
278
-							isAddRow = false;
278
+							isPushRow = false;
279
 							return false;
279
 							return false;
280
 						}
280
 						}
281
 					});
281
 					});
282
-					if(isAddRow) _this.rows.push(item);
282
+					if(isPushRow) _this.rows.push(item);
283
 					return isAddItem;
283
 					return isAddItem;
284
 				};
284
 				};
285
 				$.each(items, function(i, item) {
285
 				$.each(items, function(i, item) {

+ 1 - 1
src/main/webapp/mobile/js/app/mstockmng/ITP_MSTOCKMNG02010.js

@@ -204,7 +204,7 @@ function appCallFnBarcode(barcode) {
204
 		'sLocation': $('#ITP_FORM_MSTOCKMNG02010_LIST_SEARCH #ITP_FORM_MSTOCKMNG02010_LIST_SEARCH_LOCATION').val(),
204
 		'sLocation': $('#ITP_FORM_MSTOCKMNG02010_LIST_SEARCH #ITP_FORM_MSTOCKMNG02010_LIST_SEARCH_LOCATION').val(),
205
 		'sBarcode': barcode
205
 		'sBarcode': barcode
206
 	};
206
 	};
207
-	console.log(JSON.stringify(param));
207
+	// console.log(JSON.stringify(param));
208
 	fn_ajax_call(API_MOBILE_BARCODE, param, infoFn, 'GET');
208
 	fn_ajax_call(API_MOBILE_BARCODE, param, infoFn, 'GET');
209
 }
209
 }
210
 
210