ソースを参照

Merge branch 'master' of http://106.246.249.162:13000/orderqueen/oqpo-view

yhl88 2 年 前
コミット
75ebebc876

+ 5 - 2
src/main/webapp/mobile/app/main.html

@@ -56,6 +56,9 @@
56 56
 			margin:0 2%;
57 57
 			border:1px solid #aaa;
58 58
 		}
59
+		.noti_pt {
60
+			padding-top:5px;
61
+		} 
59 62
 	</style>
60 63
 </head>
61 64
 <body>
@@ -373,8 +376,8 @@
373 376
 						<div class="fnNoteFromTo noti_text"></div>
374 377
 					</div>
375 378
 					<div class="itp_notify_row">
376
-						<label class="noti_label">첨부파일</label>
377
-						<span>:</span>
379
+						<label class="noti_label noti_pt">첨부파일</label>
380
+						<span class="noti_pt">:</span>
378 381
 						<div class="fnNoteFile noti_text"></div>
379 382
 					</div>
380 383
 				</div>

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

@@ -117,7 +117,7 @@
117 117
                 	<div class="fnItemQty"></div>
118 118
                 </div>
119 119
             </div>
120
-            <div class="pop_line">
120
+            <div class="pop_line divOrdReqAmt">
121 121
               	<div class="itp_label_area">
122 122
                 	<label>구매요청금액 </label>
123 123
                 </div>
@@ -125,7 +125,7 @@
125 125
                 	<div class="fnOrdReqAmt"></div>
126 126
                 </div>
127 127
             </div>
128
-            <div class="pop_line">
128
+            <div class="pop_line divOrdPssblAmt">
129 129
               	<div class="itp_label_area">
130 130
                 	<label>구매가능금액 </label>
131 131
                 </div>
@@ -133,7 +133,7 @@
133 133
                 	<div class="fnOrdPssblAmt"></div>
134 134
                 </div>
135 135
             </div>
136
-            <div class="pop_line border">
136
+            <div class="pop_line border divOrdAmt">
137 137
               	<div class="itp_label_area">
138 138
                 	<label>결제금액 </label>
139 139
                 </div>

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

@@ -143,7 +143,7 @@
143 143
 		      <div class="line">
144 144
 		        <label>반려담당자명</label>
145 145
 		        <div class="line_right">
146
-		          <div class="fnPchReqMgrNm"></div>
146
+		          <div class="fnPchReqRjctNm"></div>
147 147
 		        </div>
148 148
 		      </div>
149 149
 		      <div class="table_header">
@@ -276,7 +276,7 @@
276 276
     </form>
277 277
   </div>
278 278
   <div id="ITP_POP_MPOMNG02010_REQ_AREA" class="popup mobile-pop-close" style="display: none;">
279
-    <div class="pop short">
279
+    <div class="pop">
280 280
       <div class="pop_line">
281 281
 	       <div class="itp_label_area">
282 282
 	           <label>납품요청일</label>
@@ -293,14 +293,30 @@
293 293
          	<div class="fnItemQty"></div>
294 294
 	      </div>
295 295
        </div>
296
-       <div class="pop_line border">
297
-	      <div class="itp_label_area">
298
-	        <label>구매금액</label>
299
-	      </div>  
300
-	      <div class="itp_info_area">
301
-	        <div class="fnOrdAmt">원</div>
302
-	      </div>
303
-      </div>
296
+		<div class="pop_line divOrdReqAmt">
297
+			<div class="itp_label_area">
298
+				<label>구매요청금액 </label>
299
+			</div>
300
+			<div class="itp_info_area">
301
+				<div class="fnOrdReqAmt"></div>
302
+			</div>
303
+		</div>
304
+		<div class="pop_line divOrdPssblAmt">
305
+			<div class="itp_label_area">
306
+				<label>구매가능금액 </label>
307
+			</div>
308
+			<div class="itp_info_area">
309
+				<div class="fnOrdPssblAmt"></div>
310
+			</div>
311
+		</div>
312
+		<div class="pop_line border divOrdAmt">
313
+			<div class="itp_label_area">
314
+				<label>결제금액 </label>
315
+			</div>
316
+			<div class="itp_info_area">
317
+				<div class="fnOrdAmt"></div>
318
+			</div>
319
+		</div>
304 320
       <label class="pop_label pop_msg">구매요청 하시겠습니까?</label>
305 321
       <div class="popup_btn">
306 322
         <button id="ITP_BTN_MPOMNG02010_POP_REQ_CLOSE" class="cancel btn-gray CLB btn-pop-close">취소</button>

+ 1 - 1
src/main/webapp/mobile/app/mpomng/MPOMNG06010.html

@@ -23,7 +23,7 @@
23 23
 							<input id="ITP_FORM_MPOMNG06010_LIST_SEARCH_DLV_STTMT_UNQ_NO" name="sdlvSttmtUnqNo" type="text" placeholder="">
24 24
 						</div>
25 25
 					</div>
26
-					<div class="line">
26
+					<div class="line schSpply">
27 27
 						<label>공급업체</label>
28 28
 						<div class="float_left">
29 29
 							<input type="text" id="ITP_FORM_MPOMNG06010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="" readonly>

+ 1 - 1
src/main/webapp/mobile/app/mpomng/MPOMNG07010.html

@@ -23,7 +23,7 @@
23 23
 		          <input id="ITP_FORM_MPOMNG07010_LIST_PCH_PODR_UNQ_NO" name="spchPodrUnqNo" type="text">
24 24
 		        </div>
25 25
 		      </div>
26
-				<div class="line">
26
+				<div class="line schSpply">
27 27
 					<label>공급업체</label>
28 28
 					<div class="float_left">
29 29
 						<input type="text" id="ITP_FORM_MPOMNG07010_LIST_SEARCH_SPPLY_NM" name="sspplyNm" placeholder="" readonly>

+ 2 - 2
src/main/webapp/mobile/css/style.css

@@ -61,12 +61,12 @@ section .popup2 .pop .search_bar button img {width: 17px; position:relative; top
61 61
 section .popup2 .pop .search_bar button.search {float: none; width: 50%; height: 35px; background:rgb(46, 46, 248); color: #fff; font-size: 1rem; padding: 0; border: 1px solid #000; margin: 0 auto;}
62 62
 section .popup2 .pop .search_item_bar {width:98%;margin:5px auto; position: relative; top:-40px; display:flex;}
63 63
 section .popup2 .pop .search_item_bar input {width:40%; height:27px; border-radius:5px; margin:0; font-size:12px;}
64
-section .popup2 .pop .search_item_bar select {width:22%; height:27px; padding:0 15px 0 0; border-radius:5px; margin-right:5px;}
64
+section .popup2 .pop .search_item_bar select {width:22%; height:27px; padding:0; border-radius:5px; margin-right:5px;}
65 65
 section .popup2 .pop .search_btn_bar {width:100%; height:50px; margin-top:-30px; margin-right:10px;}
66 66
 section .popup2 .pop .search_btn_bar .btn_right {float:right; margin-right:10px;}
67 67
 section .popup2 .pop .search_btn_bar .btn_right button img{width:18px; height:18px; margin-right:2px;}
68 68
 section .popup2 .pop .search_btn_bar .btn_right button {height:30px; padding:5px 12px; font-size:12px; font-weight:100; border-radius:3px; border:1px solid #333;}
69
-
69
+section .popup2 .pop .table>tbody>tr {border-bottom:1px solid #ddd;}
70 70
 section .popup2 .pop .table{width:98%; margin:0 auto; border:1px solid #aaa; border-bottom:none; border-left:none; border-right:none;}
71 71
 section .popup2 .pop .table .table_tr {display:flex;}
72 72
 section .popup2 .pop .table .table_tr .tabel_th{width:23%;; height:30px; border-left:1px solid #aaa; background:#eee;}

+ 25 - 27
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG01010.js

@@ -37,11 +37,11 @@ let mobPageObj = {
37 37
 			$('#ITP_MOBILE_MPOMNG01010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
38 38
 			$('#ITP_FORM_MPOMNG01010_DETAIL_DLV_REQ_DT').datepicker('setDate', itp_fn_date_add('D', 5));
39 39
 
40
-			if(fn_make_user_info.get('authTpCd') === '50') {
41
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').attr('readonly', true);
42
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_BTN_MPOMNG01010_DETAIL_SEARCH_WHS_NM').attr('disabled', true);
43
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_BTN_MPOMNG01010_DETAIL_DELETE_WHS_NM').attr('disabled', true);
44
-			}
40
+			// if(fn_make_user_info.get('authTpCd') === '50') {
41
+			// 	$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').attr('readonly', true);
42
+			// 	$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_BTN_MPOMNG01010_DETAIL_SEARCH_WHS_NM').attr('disabled', true);
43
+			// 	$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_BTN_MPOMNG01010_DETAIL_DELETE_WHS_NM').attr('disabled', true);
44
+			// }
45 45
 		}
46 46
 	},
47 47
 	event: {
@@ -63,6 +63,7 @@ let mobPageObj = {
63 63
 				}
64 64
 				return false;
65 65
 			});
66
+
66 67
 		}
67 68
 	},
68 69
 	ready: function() {
@@ -218,6 +219,7 @@ let mobPopObj = {
218 219
 	popItem: {
219 220
 		// rows: null,
220 221
 		init: function() {
222
+			$('#ITP_POP_MPOMNG01010_ITEM_AREA #ITP_FORM_MPOMNG01010_POP_ITEM_KEYWORD').val('');
221 223
 			this.search();
222 224
 		},
223 225
 		search: function() {
@@ -326,7 +328,7 @@ let mobPopObj = {
326 328
 		rows: [],
327 329
 		search: function () {
328 330
 			var _this = this;
329
-			$('#ITP_LIST_MPOMNG01010_POP_WHS_AREA .panel-group').empty();
331
+			$('#ITP_LIST_MPOMNG01010_POP_WHS_AREA .mb_0').empty();
330 332
 			var callbackFn = function(result) {
331 333
 				console.log(result);
332 334
 				$.each(result.gridRows, function (i, item) {
@@ -336,6 +338,7 @@ let mobPopObj = {
336 338
 					$li.find('.fnLocationNm').text(item.locationNm);
337 339
 					$li.find('.fnWhsId').data('whs-id', item.whsId);
338 340
 					$li.find('.fnWhsId').data('location', item.location);
341
+					$('#ITP_LIST_MPOMNG01010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
339 342
 				});
340 343
 			};
341 344
 			const param = $('#ITP_FORM_MPOMNG01010_POP_WHS').serializeObject();
@@ -344,31 +347,20 @@ let mobPopObj = {
344 347
 		},
345 348
 		action: function() {
346 349
 			var _this = this;
347
-			$('#ITP_LIST_MPOMNG01010_POP_WHS_AREA button[id$="POP_WHS_CHOICE"]').off('click').on('click', function() {
348
-				var whsId = $(this).data('whs-id');
349
-				var whsNm = $(this).parent().prev().find('.fnWhsNm').text();
350
-				var location = $(this).data('location');
351
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_ID').val(whsId);
352
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').val(whsNm);
353
-				$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_LOCATION').val(location);
354
-				mobPopObj.hide(ID_ITP_POP_MPOMNG01010_WHS_AREA);
355
-				itp_fn_form_clear_validate(null, '#ITP_FORM_MPOMNG01010_DETAIL');
356
-				// console.log($(this).parent().prev().find('.fnWhsNm').text());
357
-				// $.each(_this.rows, function (i, item) {
358
-				// 	if(whsId === item.whsId) {
359
-				// 		$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_ID').val(item.whsId);
360
-				// 		$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').val(item.whsNm);
361
-				// 		$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_LOCATION').val(item.location);
362
-				// 		mobPopObj.hide(ID_ITP_POP_MPOMNG01010_WHS_AREA);
363
-				// 		itp_fn_form_clear_validate(null, '#ITP_FORM_MPOMNG01010_DETAIL');
364
-				// 		return false;
365
-				// 	}attachRow
366
-				// });
367
-			});
368 350
 			$('#ITP_FORM_MPOMNG01010_POP_WHS button[id="ITP_BTN_MPOMNG01010_POP_WHS_SEARCH"]').off('click').on('click', function() {
369 351
 				_this.search();
370 352
 			});
371 353
 		},
354
+		choice: function(elem) {
355
+			var whsId = $(elem).data('whs-id');
356
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
357
+			var location = $(elem).data('location');
358
+			$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_ID').val(whsId);
359
+			$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').val(whsNm);
360
+			$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_LOCATION').val(location);
361
+			mobPopObj.hide(ID_ITP_POP_MPOMNG01010_WHS_AREA);
362
+			itp_fn_form_clear_validate(null, '#ITP_FORM_MPOMNG01010_DETAIL');
363
+		},
372 364
 		delete: function() {
373 365
 			$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_ID').val('');
374 366
 			$('#ITP_FORM_MPOMNG01010_DETAIL #ITP_FORM_MPOMNG01010_DETAIL_WHS_NM').val('');
@@ -392,8 +384,14 @@ let mobPopObj = {
392 384
 				if(loanDvsn === 'LD03') {		// 무정산
393 385
 					this.saveMode = 2;
394 386
 					popMsg = '구매요청 하시겠습니까?';
387
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdPssblAmt').hide();
388
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdAmt').hide();
389
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdReqAmt').addClass('border');
395 390
 					$('#ITP_POP_MPOMNG01010_REQ_AREA #ITP_BTN_MPOMNG01010_POP_REQ_CONFIRM').text('확인');
396 391
 				} else {
392
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdPssblAmt').show();
393
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdAmt').show();
394
+					$('#ITP_POP_MPOMNG01010_REQ_AREA .divOrdReqAmt').removeClass('border');
397 395
 					if (Number(ordUseAmt) < Number(pchReqAmtTot)) { // 요청금액이 가능금액보다 클 경우
398 396
 						if(CommonObj.isPayPossible()) {	// PG 정보 여부
399 397
 							if(loanDvsn === 'LD01') {	// 선불매장

+ 50 - 57
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG02010.js

@@ -179,7 +179,9 @@ let mobContObj = {
179 179
 			$(document).on('click', '#ITP_LIST_MPOMNG02010_ITEM_ROWS li', function() {
180 180
 				var index = $(this).index();
181 181
 				var item = _this.rows[index];
182
-				(item.pchReqStCd === PCH_REQ_ST_CD_TEMP_SAVE) ? mobContObj.modify.init(item) : mobContObj.detail.init(item);
182
+				(item.pchReqStCd === PCH_REQ_ST_CD_TEMP_SAVE) ?
183
+					(item.pchReqMgrId  === fn_make_user_info.get('userId')) ? mobContObj.modify.init(item) : mobContObj.detail.init(item) :
184
+					mobContObj.detail.init(item);
183 185
 			});
184 186
 		}
185 187
 	},
@@ -206,7 +208,7 @@ let mobContObj = {
206 208
 			$(id).find('.fnPchReqTotalAmt').text(CommonObj.currency.add(result.pchReqTotalAmt));
207 209
 			$(id).find('.fnLocationNm').text(result.locationNm);
208 210
 			$(id).find('.fnPchReqStnm').text(result.pchReqStNm);
209
-			$(id).find('.fnPcReqRjctDt').text(result.pchReqRjctDt);
211
+			$(id).find('.fnPchReqRjctDt').text(result.pchReqRjctDt);
210 212
 			$(id).find('.fnPchReqRjctNm').text(result.pchReqRjctNm);
211 213
 			$.each(result.pchReqDtlList, function (i, item) {
212 214
 				$('#ITP_LIST_MPOMNG02010_VIEW_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_VIEW_ROWCOPY').html());
@@ -306,6 +308,7 @@ let mobContObj = {
306 308
 						$li.find('.fnItemNm').text(item.itemNm);
307 309
 						$li.find('.fnPchReqQty').text(item.pchReqQty);
308 310
 						$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
311
+						$li.find('.fnOrdAmt').text(CommonObj.currency.add(Number(item.unitAmt) * Number(item.pchReqQty)));
309 312
 						$('.item-row #ITP_BTN_MPOMNG02010_MODIFY_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
310 313
 						$('.item-row #ITP_BTN_MPOMNG02010_MODIFY_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
311 314
 						_this.pchReqAmtTot();
@@ -336,10 +339,12 @@ let mobContObj = {
336 339
 				}
337 340
 			},
338 341
 			actPlus: function(elem) {
339
-				var $div = $(elem).siblings('div');
340
-				var num = Number($div.text());
341
-				$($div).text((num + 1).toString());
342
-				this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
342
+				var $li = $(elem).closest('li');
343
+				var num = Number($li.find('.fnPchReqQty').text());
344
+				var calcNum = num + 1;
345
+				$($li).find('.fnPchReqQty').text(calcNum.toString());
346
+				this.rows[$li.index()]['pchReqQty'] = calcNum;
347
+				this.pchReqAmtUnit(elem, calcNum);
343 348
 				this.pchReqAmtTot();
344 349
 			},
345 350
 			actMinus: function(elem) {
@@ -350,9 +355,15 @@ let mobContObj = {
350 355
 				} else {
351 356
 					$($div).text((num - 1).toString());
352 357
 					this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
358
+					this.pchReqAmtUnit(elem,  $($div).text());
353 359
 					this.pchReqAmtTot();
354 360
 				}
355 361
 			},
362
+			pchReqAmtUnit: function(elem, qty) {
363
+				var $div = $(elem).parent().prev();
364
+				var unitAmt = CommonObj.onlyNumber($div.find('.fnUnitAmt').text());
365
+				$div.find('.fnOrdAmt').text(CommonObj.currency.add(Number(unitAmt ? unitAmt : 0) * Number(qty)));
366
+			},
356 367
 			pchReqAmtTot: function() {
357 368
 				var reqAmt = 0;
358 369
 				$.each(this.rows, function(index, item) {
@@ -391,6 +402,7 @@ let mobPopObj = {
391 402
 		popId: 'ITP_POP_MPOMNG02010_ITEM_AREA',
392 403
 		init: function() {
393 404
 			mobPopObj.show(this.popId);
405
+			$('#ITP_POP_MPOMNG02010_ITEM_AREA #ITP_FORM_MPOMNG02010_POP_ITEM_KEYWORD').val('');
394 406
 			this.search();
395 407
 		},
396 408
 		search: function() {
@@ -493,75 +505,49 @@ let mobPopObj = {
493 505
 	},
494 506
 	popWhsNm: {
495 507
 		popId: 'ITP_POP_MPOMNG02010_WHS_AREA',
496
-		mode: '',
497
-		rows: [],
498
-		init: function (mode) {
499
-			this.mode = mode;
508
+		init: function () {
509
+			$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .mb_0').children().remove();
500 510
 			this.rows.length = 0;
501 511
 			mobPopObj.show(this.popId);
502 512
 			this.search();
503 513
 			this.action();
504 514
 		},
515
+		rows: [],
505 516
 		search: function () {
506 517
 			var _this = this;
507
-			$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .panel-group').empty();
518
+			$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .mb_0').empty();
508 519
 			var callbackFn = function(result) {
509
-				console.log(result);
510
-				_this.view(result.gridRows);
520
+				$.each(result.gridRows, function (i, item) {
521
+					$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .mb_0').append($('#ITP_LIST_MPOMNG02010_POP_WHS_ROWCOPY').html());
522
+					var $li = $('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .mb_0 > .row_2:last');
523
+					$li.find('.fnWhsNm').text(item.whsNm);
524
+					$li.find('.fnLocationNm').text(item.locationNm);
525
+					$li.find('.fnWhsId').data('whs-id', item.whsId);
526
+					$li.find('.fnWhsId').data('location', item.location);
527
+					$('#ITP_LIST_MPOMNG02010_POP_WHS_ROWS li button')[$li.index()].addEventListener('click', function() { _this.choice(this); });
528
+				});
511 529
 			};
512 530
 			const param = $('#ITP_FORM_MPOMNG02010_POP_WHS').serializeObject();
513
-			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = (mobPageObj.viewMode === VIEW_MODE_LIST) ? '' : 'W01';
531
+			(fn_make_user_info.get('authTpCd') === '50') ? param.swhsDvsn = 'W02' : param.swhsDvsn = 'W01';
514 532
 			fn_ajax_call(API_POP_SEARCH_LIST, JSON.stringify(param), callbackFn, 'POST');
515 533
 		},
516
-		view: function(gridRows) {
517
-			this.rows = gridRows;
518
-			$.each(gridRows, function (i, item) {
519
-				$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .panel-group').append($('#ITP_LIST_MPOMNG02010_POP_WHS_ROWCOPY').html());
520
-				var $li = $('#ITP_LIST_MPOMNG02010_POP_WHS_AREA .panel-group > .row_2:last');
521
-				$li.find('.fnWhsId').data('whs-id', item.whsId);
522
-				$li.find('.fnWhsNm').text(item.whsNm);
523
-				$li.find('.fnLocationNm').text(item.locationNm);
524
-			});
525
-		},
526 534
 		action: function() {
527 535
 			var _this = this;
528
-			$('#ITP_LIST_MPOMNG02010_POP_WHS_AREA button[id^="ITP_BTN_MPOMNG02010_POP"]').off('click').on('click', function() {
529
-				var id = $(this).attr('id');
530
-				switch (id) {
531
-					case 'ITP_BTN_MPOMNG02010_POP_WHS_SEARCH'	: _this.search();				break;
532
-					case 'ITP_BTN_MPOMNG02010_POP_WHS_CHOICE'	: _this.choice($(this)); 		break;
533
-					case 'ITP_BTN_MPOMNG02010_POP_WHS_CLOSE'	: mobPopObj.hide(_this.popId);	break;
534
-				}
535
-				return false;
536
+			$('#ITP_FORM_MPOMNG02010_POP_WHS button[id="ITP_BTN_MPOMNG02010_POP_WHS_SEARCH"]').off('click').on('click', function() {
537
+				_this.search();
536 538
 			});
537 539
 		},
538 540
 		choice: function(elem) {
539
-			var _this = this;
540 541
 			var whsId = $(elem).data('whs-id');
541
-			$.each(this.rows, function (i, item) {
542
-				if(whsId === item.whsId) {
543
-					if(_this.mode === VIEW_MODE_LIST) {
544
-						$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').val(item.whsId);
545
-						$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_NM').val(item.whsNm);
546
-					} else if(_this.mode === VIEW_MODE_MODIFY) {
547
-						$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_WHS_ID').val(item.whsId);
548
-						$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_WHS_NM').val(item.whsNm);
549
-						$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_LOCATION').val(item.location);
550
-					}
551
-					mobPopObj.hide(_this.popId);
552
-					return false;
553
-				}
554
-			});
542
+			var whsNm = $(elem).parent().prev().find('.fnWhsNm').text();
543
+			var location = $(elem).data('location');
544
+			$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').val(whsId);
545
+			$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_NM').val(whsNm);
546
+			mobPopObj.hide(this.popId);
555 547
 		},
556
-		delete: function(mode) {
557
-			if(mode === VIEW_MODE_LIST) {
558
-				$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').val('');
559
-				$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_NM').val('');
560
-			} else if(mode === VIEW_MODE_MODIFY) {
561
-				$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_WHS_ID').val('');
562
-				$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_WHS_NM').val('');
563
-				$('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_LOCATION').val('');
564
-			}
548
+		delete: function() {
549
+			$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_ID').val('');
550
+			$('#ITP_FORM_MPOMNG02010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_WHS_NM').val('');
565 551
 		}
566 552
 	},
567 553
 	popReqConfirm: {
@@ -589,8 +575,14 @@ let mobPopObj = {
589 575
 				if(loanDvsn === 'LD03') {		// 무정산
590 576
 					this.saveMode = 2;
591 577
 					popMsg = '구매요청 하시겠습니까?';
578
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdPssblAmt').hide();
579
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdAmt').hide();
580
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdReqAmt').addClass('border');
592 581
 					$('#ITP_POP_MPOMNG02010_REQ_AREA #ITP_BTN_MPOMNG02010_POP_REQ_CONFIRM').text('확인');
593 582
 				} else {
583
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdPssblAmt').show();
584
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdAmt').show();
585
+					$('#ITP_POP_MPOMNG02010_REQ_AREA .divOrdReqAmt').removeClass('border');
594 586
 					if (Number(ordUseAmt) < Number(pchReqAmtTot)) { // 요청금액이 가능금액보다 클 경우
595 587
 						if(CommonObj.isPayPossible()) {	// PG 정보 여부
596 588
 							if(loanDvsn === 'LD01') {	// 선불매장
@@ -628,9 +620,10 @@ let mobPopObj = {
628 620
 			}
629 621
 			$('#ITP_POP_MPOMNG02010_REQ_AREA .fnPopDlvReqDt').text($('#ITP_FORM_MPOMNG02010_MODIFY #ITP_FORM_MPOMNG02010_MODIFY_DLV_REQ_DT').val());
630 622
 			$('#ITP_POP_MPOMNG02010_REQ_AREA .fnItemQty').text(CommonObj.currency.add($('#ITP_LIST_MPOMNG02010_MODIFY_ROWS').children().length, '개'));
623
+			$('#ITP_POP_MPOMNG02010_REQ_AREA .fnOrdReqAmt').text($('#ITP_FORM_MPOMNG02010_MODIFY .fnPchReqAmtTot').text());
624
+			$('#ITP_POP_MPOMNG02010_REQ_AREA .fnOrdPssblAmt').text($('#ITP_FORM_MPOMNG02010_MODIFY .fnOrdUseAmt').text());
631 625
 			var ordAmt = Number(pchReqAmtTot) - Number(ordUseAmt);
632 626
 			$('#ITP_POP_MPOMNG02010_REQ_AREA .fnOrdAmt').text(CommonObj.currency.add(ordAmt > 0 ? ordAmt : 0));
633
-			// $('#ITP_POP_MPOMNG02010_REQ_AREA .fnOrdAmt').text(CommonObj.currency.add(pchReqAmtTot));
634 627
 			$('#ITP_POP_MPOMNG02010_REQ_AREA .pop_msg').html(popMsg);
635 628
 		},
636 629
 		action: function() {

+ 29 - 7
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG06010.js

@@ -34,10 +34,7 @@ let mobPageObj = {
34 34
 				}
35 35
 			});
36 36
 
37
-			if(fn_make_user_info.get('authTpCd') === '50') {
38
-				$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_BTN_MPOMNG06010_LIST_SEARCH_SPPLY_NM').attr('disabled', true);
39
-				$('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_BTN_MPOMNG06010_LIST_DELETE_SPPLY_NM').attr('disabled', true);
40
-			}
37
+			(fn_make_user_info.get('authTpCd') === '50') ? $('#ITP_FORM_MPOMNG06010_LIST_SEARCH .schSpply').hide() : $('#ITP_FORM_MPOMNG06010_LIST_SEARCH .schSpply').show();
41 38
 
42 39
 			// 조회일자 지정
43 40
 			$('#ITP_MOBILE_MPOMNG06010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
@@ -143,30 +140,55 @@ let mobContObj = {
143 140
 		},
144 141
 		save: function() {
145 142
 			var _this = this;
143
+			var chkQtyYn = "N";
144
+			var cwhsId = "";
146 145
 			var gridInsertData = [];
147 146
 			$('#ITP_LIST_MPOMNG06010_LIST_ITEM_ROWS li').each(function(index) {
147
+				var value = _this.rows[index];
148 148
 				var whsQty = $(this).find('input[name="whsQty"]').val();
149 149
 				if(whsQty !== '') {
150
+					if (parseInt(whsQty) > parseInt(value.dlvQty)) {
151
+						itp_fn_modal_alert("납품수량보다 입고수량이 더 많습니다.");
152
+						chkQtyYn = "Y";
153
+						return false;
154
+					}
155
+
156
+					if (cwhsId !== "" && cwhsId !== value.whsId) {
157
+						itp_fn_modal_alert("서로 다른 입고창고 품목은 처리할 수 없습니다.");
158
+						chkQtyYn = "Y";
159
+						return false;
160
+					}
161
+
150 162
 					var item = {
151
-						'dlvSttmtDtlNo'	: _this.rows[index].dlvSttmtDtlNo,
152
-						'dlvSttmtUnqNo'	: _this.rows[index].dlvSttmtUnqNo,
153
-						'itemId'		: _this.rows[index].itemId,
163
+						'dlvSttmtDtlNo'	: value.dlvSttmtDtlNo,
164
+						'dlvSttmtUnqNo'	: value.dlvSttmtUnqNo,
165
+						'itemId'		: value.itemId,
154 166
 						'whsQty'		: whsQty
155 167
 					};
156 168
 					gridInsertData.push(item);
157 169
 				}
158 170
 			});
171
+
172
+			if (chkQtyYn === "Y") return;
173
+
174
+			if (gridInsertData.length === 0) {
175
+				itp_fn_modal_alert("입고처리할 품목에 입고수량을 입력해주세요!");
176
+				return ;
177
+			}
178
+
159 179
 			if(gridInsertData.length > 0) {
160 180
 				var modalFn = {
161 181
 					callBack: (args) => {
162 182
 						let param = {};
163 183
 						param['viewCd'] = 'C';
184
+						param['whsId'] = cwhsId;
164 185
 						param['brandId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_BRAND_ID').val();
165 186
 						param['storeId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG02010_LIST_SEARCH_STORE_ID').val();
166 187
 						param['whsId'] = $('#ITP_FORM_MPOMNG06010_LIST_SEARCH #ITP_FORM_MPOMNG06010_LIST_SEARCH_WHS_ID').val();
167 188
 						param['gridInsertData'] = gridInsertData;
168 189
 						console.log(JSON.stringify(param));
169 190
 						var saveFn = function () {
191
+							mobContObj.list.search();
170 192
 						};
171 193
 						fn_ajax_call(API_MOBILE_SAVE, JSON.stringify(param), saveFn, 'POST');
172 194
 					}

+ 1 - 4
src/main/webapp/mobile/js/app/mpomng/ITP_MPOMNG07010.js

@@ -34,10 +34,7 @@ let mobPageObj = {
34 34
 				}
35 35
 			});
36 36
 
37
-			if(fn_make_user_info.get('authTpCd') === '50') {
38
-				$('#ITP_FORM_MPOMNG07010_LIST_SEARCH #ITP_BTN_MPOMNG07010_LIST_SEARCH_SPPLY_NM').attr('disabled', true);
39
-				$('#ITP_FORM_MPOMNG07010_LIST_SEARCH #ITP_BTN_MPOMNG07010_LIST_DELETE_SPPLY_NM').attr('disabled', true);
40
-			}
37
+			(fn_make_user_info.get('authTpCd') === '50') ? $('#ITP_FORM_MPOMNG07010_LIST_SEARCH .schSpply').hide() : $('#ITP_FORM_MPOMNG07010_LIST_SEARCH .schSpply').show();
41 38
 
42 39
 			// 조회일자 지정
43 40
 			$('#ITP_MOBILE_MPOMNG07010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);

+ 41 - 19
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG01010.js

@@ -40,10 +40,10 @@ let mobPageObj = {
40 40
 			$('#ITP_MOBILE_MRTNMNG01010 .itp_input.date').datepicker(ITP_DATE_LANGUAGE);
41 41
 			$('#ITP_FORM_MRTNMNG01010_DETAIL_DLV_REQ_DT').datepicker('setDate', itp_fn_date_add('M', 1));
42 42
 
43
-			if(fn_make_user_info.get('authTpCd') === '50') {
44
-				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_BTN_MRTNMNG01010_DETAIL_SEARCH_WHS_NM').hide();
45
-				$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_BTN_MRTNMNG01010_DETAIL_DELETE_WHS_NM').hide();
46
-			}
43
+			// if(fn_make_user_info.get('authTpCd') === '50') {
44
+			// 	$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_BTN_MRTNMNG01010_DETAIL_SEARCH_WHS_NM').hide();
45
+			// 	$('#ITP_FORM_MRTNMNG01010_DETAIL #ITP_BTN_MRTNMNG01010_DETAIL_DELETE_WHS_NM').hide();
46
+			// }
47 47
 		}
48 48
 	},
49 49
 	event: {
@@ -66,6 +66,7 @@ let mobPageObj = {
66 66
 				return false;
67 67
 			});
68 68
 
69
+			$(document).off('click', '#ITP_LIST_MRTNMNG01010_POP_WHS_ROWS li button');
69 70
 			$(document).on('click', '#ITP_LIST_MRTNMNG01010_POP_WHS_ROWS li button', function() {
70 71
 				mobPopObj.popWhsNm.choice($(this));
71 72
 			});
@@ -78,18 +79,8 @@ let mobPageObj = {
78 79
 
79 80
 let mobContObj = {
80 81
 	init: function() {
81
-		this.button();
82 82
 		this.data.load();
83 83
 	},
84
-	button: function() {
85
-		var _this = this;
86
-		$(document).on('click', '.DETAIL_ITEM_PLUS', function() {
87
-			_this.list.actPlus($(this));
88
-		});
89
-		$(document).on('click', '.DETAIL_ITEM_MINUS', function() {
90
-			_this.list.actMinus($(this));
91
-		});
92
-	},
93 84
 	data: {
94 85
 		initPchReq: null,
95 86
 		load: function() {
@@ -137,6 +128,9 @@ let mobContObj = {
137 128
 					$li.find('.fnItemNm').text(item.itemNm);
138 129
 					$li.find('.fnPchReqQty').text(item.pchReqQty);
139 130
 					$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
131
+					$li.find('.fnOrdAmt').text(CommonObj.currency.add(Number(item.unitAmt) * Number(item.pchReqQty)));
132
+					$('.list-row #ITP_BTN_MRTNMNG01010_DETAIL_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
133
+					$('.list-row #ITP_BTN_MRTNMNG01010_DETAIL_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
140 134
 					_this.pchReqAmtTot();
141 135
 				}
142 136
 			});
@@ -161,11 +155,20 @@ let mobContObj = {
161 155
 			}
162 156
 		},
163 157
 		actPlus: function(elem) {
164
-			var $div = $(elem).siblings('div');
165
-			var num = Number($div.text());
166
-			$($div).text((num + 1).toString());
167
-			this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
158
+			var $li = $(elem).closest('li');
159
+			var num = Number($li.find('.fnPchReqQty').text());
160
+			var calcNum = num + 1;
161
+			$($li).find('.fnPchReqQty').text(calcNum.toString());
162
+			this.rows[$li.index()]['pchReqQty'] = calcNum;
163
+			this.pchReqAmtUnit(elem, calcNum);
168 164
 			this.pchReqAmtTot();
165
+
166
+
167
+			// var $div = $(elem).siblings('div');
168
+			// var num = Number($div.text());
169
+			// $($div).text((num + 1).toString());
170
+			// this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
171
+			// this.pchReqAmtTot();
169 172
 		},
170 173
 		actMinus: function(elem) {
171 174
 			var $div = $(elem).siblings('div');
@@ -175,8 +178,26 @@ let mobContObj = {
175 178
 			} else {
176 179
 				$($div).text((num - 1).toString());
177 180
 				this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
181
+				this.pchReqAmtUnit(elem,  $($div).text());
178 182
 				this.pchReqAmtTot();
179 183
 			}
184
+
185
+
186
+
187
+			// var $div = $(elem).siblings('div');
188
+			// var num = Number($div.text());
189
+			// if(num <= 1) {
190
+			// 	itp_fn_modal_alert('수량을 확인하세요.');
191
+			// } else {
192
+			// 	$($div).text((num - 1).toString());
193
+			// 	this.rows[$div.parents('li').index()]['pchReqQty'] = $($div).text();
194
+			// 	this.pchReqAmtTot();
195
+			// }
196
+		},
197
+		pchReqAmtUnit: function(elem, qty) {
198
+			var $div = $(elem).parent().prev();
199
+			var unitAmt = CommonObj.onlyNumber($div.find('.fnUnitAmt').text());
200
+			$div.find('.fnOrdAmt').text(CommonObj.currency.add(Number(unitAmt ? unitAmt : 0) * Number(qty)));
180 201
 		},
181 202
 		pchReqAmtTot: function() {
182 203
 			var reqAmt = 0;
@@ -205,6 +226,7 @@ let mobPopObj = {
205 226
 	popItem: {
206 227
 		// rows: null,
207 228
 		init: function() {
229
+			$('#ITP_POP_MRTNMNG01010_ITEM_AREA #ITP_FORM_MRTNMNG01010_POP_ITEM_KEYWORD').val('');
208 230
 			this.search();
209 231
 		},
210 232
 		search: function() {
@@ -333,7 +355,7 @@ let mobPopObj = {
333 355
 		},
334 356
 		action: function() {
335 357
 			var _this = this;
336
-			$('button[id^="ITP_BTN_MPOMNG04010_POP_WHS"]').off('click').on('click', function() {
358
+			$('button[id^="ITP_BTN_MRTNMNG01010_POP_WHS"]').off('click').on('click', function() {
337 359
 				var id = $(this).attr('id');
338 360
 				switch (id) {
339 361
 					case 'ITP_BTN_MRTNMNG01010_POP_WHS_SEARCH'	: _this.search();			break;

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

@@ -290,6 +290,7 @@ let mobContObj = {
290 290
 						$li.find('.fnItemNm').text(item.itemNm);
291 291
 						$li.find('.fnRtnQty').text(item.rtnQty);
292 292
 						$li.find('.fnUnitAmt').text(CommonObj.currency.add(item.unitAmt));
293
+						$li.find('.fnOrdAmt').text(CommonObj.currency.add(Number(item.unitAmt) * Number(item.pchReqQty)));
293 294
 						$('.item-row .DETAIL_ITEM_PLUS')[$li.index()].addEventListener('click', function() { _this.actPlus(this); });
294 295
 						$('.item-row .DETAIL_ITEM_MINUS')[$li.index()].addEventListener('click', function() { _this.actMinus(this); });
295 296
 						_this.rtnReqAmtTot();
@@ -394,6 +395,7 @@ let mobPopObj = {
394 395
 		popId: 'ITP_POP_MRTNMNG02010_ITEM_AREA',
395 396
 		init: function() {
396 397
 			mobPopObj.show(this.popId);
398
+			$('#ITP_POP_MRTNMNG02010_ITEM_AREA #ITP_FORM_MRTNMNG02010_POP_ITEM_KEYWORD').val('');
397 399
 			this.search();
398 400
 		},
399 401
 		search: function() {