Explorar el Código

모바일 반품처리/현황 수정

juney hace 2 años
padre
commit
e75b591930

+ 50 - 13
src/main/webapp/mobile/app/mrtnmng/MRTNMNG05010.html

@@ -26,27 +26,27 @@
26 26
 					<div class="line">
27 27
 						<label>반품입고장소</label>
28 28
 						<div class="float_left">
29
-							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="수거창고" class="" name="srtnWhsNm" placeholder="수거창고" readonly />
30
-							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID" class="" name="srtnWhsId" />
29
+							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="수거창고" class="" name="srtnWhsNm" placeholder="수거창고" readonly />
30
+							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID" class="" name="srtnWhsId" />
31 31
 							<div class="itp_input_btn">
32
-								<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM"><img src="../img/search.png" alt=""></button>
32
+								<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
33 33
 							</div>
34 34
 						</div>
35 35
 						<div class="float_right_btn">
36
-							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_RTN_WHS_NM"><img src="../img/delete.png" alt=""></button>
36
+							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
37 37
 						</div>
38 38
 					</div>
39 39
 					<div class="line">
40
-						<label>반품장소</label>
40
+						<label>공급업체</label>
41 41
 						<div class="float_left">
42
-							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM" data-check-required="empty" class="" name="swhsNm" placeholder="매장명" readonly />
43
-							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID" data-check-required="empty" class="" name="swhsId" />
42
+							<input type="text" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_NM" class="" name="sspplyNm" placeholder="공급업체" readonly />
43
+							<input type="hidden" id="ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
44 44
 							<div class="itp_input_btn">
45
-								<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
45
+								<button id="ITP_BTN_MRTNMNG05010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
46 46
 							</div>
47 47
 						</div>
48 48
 						<div class="float_right_btn">
49
-							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
49
+							<button id="ITP_BTN_MRTNMNG05010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
50 50
 						</div>
51 51
 					</div>
52 52
 					<div class="line">
@@ -70,7 +70,7 @@
70 70
 			<div id="ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA" class="scroll_area row-10">
71 71
 				<ul id="ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWS" class="mb_0 panel-group"></ul>
72 72
 				<div id="ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWCOPY" style="display: none;">
73
-					<li class="history_list2">
73
+					<li class="history_list2 item-row">
74 74
 						<div class="left">
75 75
 							<div class="nomal">
76 76
 								<label>반품번호 </label>
@@ -82,7 +82,7 @@
82 82
 							<div class="nomal">
83 83
 								<label class="history_label">반품예정일</label>
84 84
 								<span>:</span>
85
-								<div class="fnRtnSchDt history_info"></div>
85
+								<div class="fnColSchDt history_info"></div>
86 86
 							</div>
87 87
 						</div>
88 88
 						<div class="left">
@@ -106,10 +106,10 @@
106 106
 							<div class="nomal">
107 107
 								<label class="col_0">반품요청수량</label>
108 108
 								<span>:</span>
109
-								<div class=" fnRtnReqQty"></div>
109
+								<div class=" fnColReqQty"></div>
110 110
 								<label class="col_0">반품발주수량</label>
111 111
 								<span>:</span>
112
-								<input class="" id="ITP_FORM_MRTNMNG05010_LIST_RTN_PODR_QTY" type="text" name="rtnPodrQty">
112
+								<input class="" id="ITP_FORM_MRTNMNG05010_LIST_RODR_QTY" type="text" name="rodrQty">
113 113
 							</div>
114 114
 						</div>
115 115
 					</li>
@@ -122,6 +122,43 @@
122 122
 		</form>
123 123
 	</div>
124 124
 	<div id="ITP_MOBILE_JS"></div>
125
+	<div id="ITP_POP_MRTNMNG05010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: none;">
126
+		<div class="pop">
127
+			<div class="header">
128
+				<div class="header_left">
129
+					<label>공급업체</label>
130
+				</div>
131
+				<div class="header_right">
132
+					<button type="button" id="ITP_BTN_MRTNMNG05010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
133
+				</div>
134
+			</div>
135
+			<div class="search_bar">
136
+				<form id="ITP_FORM_MRTNMNG05010_POP_SPPLY_SEARCH" class="form-horizontal" onsubmit="return false;">
137
+					<input type="hidden" id="ITP_FORM_MRTNMNG05010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
138
+					<input type="hidden" id="ITP_FORM_MRTNMNG05010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
139
+					<input id="ITP_FORM_MRTNMNG05010_POP_SPPLY_KEYWORD" type="text" name="sspplyNm" placeholder="공급업체명">
140
+					<button id="ITP_BTN_MRTNMNG05010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
141
+				</form>
142
+			</div>
143
+			<div class="select_btn">
144
+				<button id="ITP_BTN_MRTNMNG05010_POP_SPPLY_NM" class="btn_red">공급업체 <img src="../img/arrow_down.png"></button>
145
+			</div>
146
+			<div id="ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA" class="popup_scroll">
147
+				<ul id="ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWS" class="mb_0 panel-group itp_nav"></ul>
148
+				<div id="ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWCOPY" style="display: none;">
149
+					<li class="row_2">
150
+						<div class="scroll_left">
151
+							<div class="con_2 fnSpplyNm">공급업체 명A</div>
152
+							<div class="con_2 wichi fnStNm">($)</div>
153
+						</div>
154
+						<div class="scroll_right">
155
+							<button id="ITP_BTN_MRTNMNG05010_POP_SPPLY_CHOICE" class="fnSpplyId" data-item-key="">선택</button>
156
+						</div>
157
+					</li>
158
+				</div>
159
+			</div>
160
+		</div>
161
+	</div>
125 162
 	<div id="ITP_POP_MRTNMNG05010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
126 163
 		<div class="pop">
127 164
 			<div class="header">

+ 54 - 18
src/main/webapp/mobile/app/mrtnmng/MRTNMNG06010.html

@@ -3,7 +3,6 @@
3 3
 		<form id="ITP_FORM_MRTNMNG06010_LIST_SEARCH" class="form-horizontal" onsubmit="return false;">
4 4
 			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_BRAND_ID" name="sbrandId" value="">
5 5
 			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_STORE_ID" name="sstoreId" value="">
6
-			<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_ID" name="sspplyId" value="">
7 6
 			<div class="content">
8 7
 				<div class="content_fix">
9 8
 					<div class="line header">
@@ -26,27 +25,27 @@
26 25
 					<div class="line">
27 26
 						<label>반품입고장소</label>
28 27
 						<div class="float_left">
29
-							<input id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM" name="srtnWhsNm" type="text" data-check-required="empty" data-alert-required="ONLYCHK" data-alert-msg="수거창고" placeholder="매장명" readonly>
30
-							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_RTN_WHS_ID" class="" name="srtnWhsId" />
28
+							<input id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM" name="swhsNm" type="text" placeholder="매장/창고" readonly>
29
+							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
31 30
 							<div class="itp_input_btn">
32
-								<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM" data-call-popup="ITP_POP_MRTNMNG06010_WHS_NM"><img src="../img/search.png" alt=""></button>
31
+								<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM" data-call-popup="ITP_POP_MRTNMNG06010_WHS_NM"><img src="../img/search.png" alt=""></button>
33 32
 							</div>
34 33
 						</div>
35 34
 						<div class="float_right_btn">
36
-							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_RTN_WHS_NM"><img src="../img/delete.png" alt=""></button>
35
+							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
37 36
 						</div>
38 37
 					</div>
39 38
 					<div class="line">
40
-						<label>반품장소</label>
39
+						<label>공급업체</label>
41 40
 						<div class="float_left">
42
-							<input type="text" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_NM" class="" name="swhsNm" placeholder="매장명" readonly />
43
-							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_WHS_ID" class="" name="swhsId" />
41
+							<input type="text" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_NM" class="" name="sspplyNm" placeholder="공급업체" readonly />
42
+							<input type="hidden" id="ITP_FORM_MRTNMNG06010_LIST_SEARCH_SPPLY_ID" class="" name="sspplyId" />
44 43
 							<div class="itp_input_btn">
45
-								<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM"><img src="../img/search.png" alt=""></button>
44
+								<button id="ITP_BTN_MRTNMNG06010_LIST_SEARCH_SPPLY_NM"><img src="../img/search.png" alt=""></button>
46 45
 							</div>
47 46
 						</div>
48 47
 						<div class="float_right_btn">
49
-							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM"><img src="../img/delete.png" alt=""></button>
48
+							<button id="ITP_BTN_MRTNMNG06010_LIST_DELETE_SPPLY_NM"><img src="../img/delete.png" alt=""></button>
50 49
 						</div>
51 50
 					</div>
52 51
 					<div class="line">
@@ -68,46 +67,46 @@
68 67
 			<div id="ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA" class="scroll_area row-6">
69 68
 				<ul id="ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS" class="mb_0 panel-group"></ul>
70 69
 				<div id="ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWCOPY" style="display: none;">
71
-					<li class="history_list4 ">
70
+					<li class="history_list4 item-row">
72 71
 						<div class="left">
73 72
 							<div class="nomal">
74 73
 								<label>발주번호 </label>
75 74
 								<span>:</span>
76
-								<div class="full fnRtnPodrNo">212121212121112</div>
75
+								<div class="full fnRtnPodrNo"></div>
77 76
 							</div>
78 77
 						</div>
79 78
 						<div class="left">
80 79
 							<div class="nomal">
81 80
 								<label class="history_label">반품예정일</label>
82 81
 								<span>:</span>
83
-								<div class="fn_info fnRtnSchDt">2022.10.10</div>
82
+								<div class="fn_info fnColSchDt"></div>
84 83
 							</div>
85 84
 						</div>
86 85
 						<div class="left">
87 86
 							<div class="nomal">
88 87
 								<label>공급업체</label>
89 88
 								<span>:</span>
90
-								<div class="fnSpplyNm">A공급업체명</div>
89
+								<div class="fnSpplyNm"></div>
91 90
 								<label class="sub_info">납품장소</label>
92 91
 								<span>:</span>
93
-								<div class="fnWhsNm">A매장내</div>
92
+								<div class="fnRtnWhsNm"></div>
94 93
 							</div>
95 94
 						</div>
96 95
 						<div class="left">
97 96
 							<div class="nomal">
98 97
 								<label>품목 </label>
99 98
 								<span>:</span>
100
-								<div class="full fnItemNm">품목명(EA)</div>
99
+								<div class="full fnItemNm"></div>
101 100
 							</div>
102 101
 						</div>
103 102
 						<div class="left">
104 103
 							<div class="nomal">
105 104
 								<label>발주수량</label>
106 105
 								<span>:</span>
107
-								<div class="col_5 fnRtnPodrQty"></div>
106
+								<div class="col_5 fnColReqQty"></div>
108 107
 								<label class="sub_info">입고수량</label>
109 108
 								<span>:</span>
110
-								<div class="fnRtnWhsQty">10</div>
109
+								<div class="fnRodrQty">10</div>
111 110
 							</div>
112 111
 						</div>
113 112
 					</li>
@@ -116,6 +115,43 @@
116 115
 		</form>
117 116
 	</div>
118 117
 	<div id="ITP_MOBILE_JS"></div>
118
+	<div id="ITP_POP_MRTNMNG06010_SPPLY_AREA" class="popup2 mobile-pop-close" style="display: none;">
119
+		<div class="pop">
120
+			<div class="header">
121
+				<div class="header_left">
122
+					<label>공급업체</label>
123
+				</div>
124
+				<div class="header_right">
125
+					<button type="button" id="ITP_BTN_MRTNMNG06010_POP_SPPLY_CLOSE"><img src="../img/close.png"></button>
126
+				</div>
127
+			</div>
128
+			<div class="search_bar">
129
+				<form id="ITP_FORM_MRTNMNG06010_POP_SPPLY_SEARCH" class="form-horizontal" onsubmit="return false;">
130
+					<input type="hidden" id="ITP_FORM_MRTNMNG06010_POP_SPPLY_ITEM_BRAND_ID" name="sbrandId" value="">
131
+					<input type="hidden" id="ITP_FORM_MRTNMNG06010_PO_PSPPLY_ITEM_STORE_ID" name="sstoreId" value="">
132
+					<input id="ITP_FORM_MRTNMNG06010_POP_SPPLY_KEYWORD" type="text" name="sspplyNm" placeholder="공급업체명">
133
+					<button id="ITP_BTN_MRTNMNG06010_POP_SPPLY_SEARCH"><img src="../img/search.png"></button>
134
+				</form>
135
+			</div>
136
+			<div class="select_btn">
137
+				<button id="ITP_BTN_MRTNMNG06010_POP_SPPLY_NM" class="btn_red">공급업체 <img src="../img/arrow_down.png"></button>
138
+			</div>
139
+			<div id="ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA" class="popup_scroll">
140
+				<ul id="ITP_POP_MRTNMNG06010_LIST_SPPLY_ROWS" class="mb_0 panel-group itp_nav"></ul>
141
+				<div id="ITP_POP_MRTNMNG06010_LIST_SPPLY_ROWCOPY" style="display: none;">
142
+					<li class="row_2">
143
+						<div class="scroll_left">
144
+							<div class="con_2 fnSpplyNm">공급업체 명A</div>
145
+							<div class="con_2 wichi fnStNm">($)</div>
146
+						</div>
147
+						<div class="scroll_right">
148
+							<button id="ITP_BTN_MRTNMNG06010_POP_SPPLY_CHOICE" class="fnSpplyId" data-item-key="">선택</button>
149
+						</div>
150
+					</li>
151
+				</div>
152
+			</div>
153
+		</div>
154
+	</div>
119 155
 	<div id="ITP_POP_MRTNMNG06010_WHS_AREA" class="popup2 mobile-pop-close" style="display: none;">
120 156
 		<div class="pop">
121 157
 			<div class="header">

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

@@ -118,7 +118,7 @@ let mobContObj = {
118 118
 				mobContObj.list.pager(result.gridTotal);
119 119
 				$.each(result.gridRows, function (i, item) {
120 120
 					$('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MPOMNG06010_LIST_ITEM_ROWCOPY').html());
121
-					var $li = $('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA .panel-group > .history_list2:last');
121
+					var $li = $('#ITP_LIST_MPOMNG06010_LIST_ITEM_AREA .panel-group > .item-row:last');
122 122
 					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
123 123
 					$li.find('.fnItemNm').text(item.itemNm);
124 124
 					$li.find('.fnWhsNm').text(item.whsNm);

+ 87 - 30
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG05010.js

@@ -9,6 +9,7 @@ require(['config'], function() {
9 9
 const API_MOBILE_GRID_LIST 			= '/api/rtnmng/inoutmng/retstock-target-grid-list';	// 목록
10 10
 const API_MOBILE_SAVE 				= 'api/rtnmng/inoutmng/save-retstock';				// 반품처리
11 11
 const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12
+const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
12 13
 
13 14
 const PAGE_MODE_LIST				= "LIST";
14 15
 const PAGE_MODE_VIEW				= "VIEW";
@@ -51,16 +52,20 @@ let mobPageObj = {
51 52
 			$('button[id^="ITP_BTN_MRTNMNG05010_LIST"]').on('click', function() {
52 53
 				var id = $(this).attr('id');
53 54
 				switch (id) {
54
-					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init('WHS'); 		break;
55
-					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete('WHS'); 			break;
56
-					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM'	: mobPopObj.popWhsNm.init('RTN_WHS'); 	break;
57
-					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_RTN_WHS_NM'	: mobPopObj.popWhsNm.delete('RTN_WHS'); 		break;
58
-					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH'				: mobContObj.list.search();			break;
59
-					case 'ITP_BTN_MRTNMNG05010_LIST_MODIFY'				: mobContObj.list.save();			break;
55
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init(); 	break;
56
+					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete(); 	break;
57
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
58
+					case 'ITP_BTN_MRTNMNG05010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
59
+					case 'ITP_BTN_MRTNMNG05010_LIST_SEARCH'				: mobContObj.list.search();		break;
60
+					case 'ITP_BTN_MRTNMNG05010_LIST_MODIFY'				: mobContObj.list.save();		break;
60 61
 				}
61 62
 				return false;
62 63
 			});
63 64
 
65
+			$(document).on('click', '#ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWS li button', function() {
66
+				mobPopObj.popSpply.choice($(this));
67
+			});
68
+
64 69
 			$(document).on('click', '#ITP_LIST_MRTNMNG05010_POP_WHS_ROWS li button', function() {
65 70
 				mobPopObj.popWhsNm.choice($(this));
66 71
 			});
@@ -114,15 +119,14 @@ let mobContObj = {
114 119
 				mobContObj.list.pager(result.gridTotal);
115 120
 				$.each(result.gridRows, function (i, item) {
116 121
 					$('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG05010_LIST_ITEM_ROWCOPY').html());
117
-					var $li = $('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group > .list-row:last');
118
-					$li.find('.fnDlvSttmtUnqNo').text(item.dlvSttmtUnqNo);
119
-					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
122
+					var $li = $('#ITP_LIST_MRTNMNG05010_LIST_ITEM_AREA .panel-group > .item-row:last');
123
+					$li.find('.fnRtnPodrUnqNo').text(item.rtnPodrUnqNo);
124
+					$li.find('.fnColSchDt').text(item.colSchDt);
120 125
 					$li.find('.fnSpplyNm').text(item.spplyNm);
121
-					$li.find('.fnWhsNm').text(item.whsNm);
122
-					$li.find('.fnItemNm').text(item.itemNm + '(' + item.podrQty + item.unit + ')');
123
-					$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
124
-					$li.find('.fnDlvQty').text(CommonObj.comma.set(item.dlvQty));
125
-					$li.find('.fnWhsQty').val(item.whsQty);
126
+					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
127
+					$li.find('.fnItemNm').text(item.itemNm);
128
+					$li.find('.fnColReqQty').text(CommonObj.comma.set(item.colReqQty));
129
+					$li.find('#ITP_FORM_MRTNMNG05010_LIST_RTN_PODR_QTY').val(item.rodrQty);
126 130
 					mobContObj.list.rows.push(item);
127 131
 				});
128 132
 			};
@@ -209,11 +213,74 @@ let mobContObj = {
209 213
 };
210 214
 
211 215
 let mobPopObj = {
216
+	popSpply: {
217
+		popId: 'ITP_POP_MRTNMNG05010_SPPLY_AREA',
218
+		rows: [],
219
+		init: function() {
220
+			this.rows.length = 0;
221
+			mobPopObj.show(this.popId);
222
+			this.search();
223
+			this.action();
224
+		},
225
+		search: function() {
226
+			var _this = this;
227
+			$('#ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA .panel-group').empty();
228
+			var callbackFn = function(result) {
229
+				console.log(result);
230
+				_this.view(result.gridRows);
231
+			};
232
+			let param = $('#ITP_FORM_MRTNMNG05010_POP_SPPLY_SEARCH').serializeObject();
233
+			fn_ajax_call(API_POP_SPPLY_LIST, JSON.stringify(param), callbackFn, 'POST');
234
+		},
235
+		view: function(gridRows) {
236
+			this.rows = gridRows;
237
+			$.each(gridRows, function (i, item) {
238
+				$('#ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MRTNMNG05010_LIST_SPPLY_ROWCOPY').html());
239
+				var $li = $('#ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA .panel-group > .row_2:last');
240
+				$li.find('.fnSpplyNm').text(item.spplyNm);
241
+				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
242
+				$li.find('.fnSpplyId').data('item-key', item.spplyId);
243
+			});
244
+		},
245
+		choice: function(elem) {
246
+			var _this = this;
247
+			var spplyId = $(elem).data('item-key');
248
+			$.each(this.rows, function (i, item) {
249
+				if(spplyId === item.spplyId) {
250
+					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_ID').val(item.spplyId);
251
+					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_NM').val(item.spplyNm);
252
+					_this.close();
253
+					return false;
254
+				}
255
+			});
256
+		},
257
+		action: function() {
258
+			var _this = this;
259
+			$('button[id^="ITP_BTN_MRTNMNG05010_POP_SPPLY"]').off('click').on('click', function() {
260
+				var id = $(this).attr('id');
261
+				switch (id) {
262
+					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_SEARCH'	: _this.search();			break;
263
+					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_CHOICE'	: _this.choice($(this));	break;
264
+					case 'ITP_BTN_MRTNMNG05010_POP_SPPLY_CLOSE'	: _this.close(); 			break;
265
+				}
266
+				return false;
267
+			});
268
+		},
269
+		delete: function() {
270
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_ID').val('');
271
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_SPPLY_NM').val('');
272
+		},
273
+		close: function() {
274
+			this.rows.length = 0;
275
+			$('#ITP_POP_MRTNMNG05010_LIST_SPPLY_AREA .panel-group').empty();
276
+			$('#ITP_FORM_MRTNMNG05010_POP_SPPLY_SEARCH #ITP_FORM_MRTNMNG05010_POP_SPPLY_KEYWORD').val('');
277
+			mobPopObj.hide(this.popId);
278
+		}
279
+	},
212 280
 	popWhsNm: {
213 281
 		popId: 'ITP_POP_MRTNMNG05010_WHS_AREA',
214 282
 		rows: [],
215
-		init: function (mode) {
216
-			this.popMode = mode;
283
+		init: function () {
217 284
 			this.rows.length = 0;
218 285
 			mobPopObj.show(this.popId);
219 286
 			this.search();
@@ -245,13 +312,8 @@ let mobPopObj = {
245 312
 			var whsId = $(elem).data('whs-id');
246 313
 			$.each(this.rows, function (i, item) {
247 314
 				if(whsId === item.whsId) {
248
-					if(_this.popMode === 'RTN_WHS') {
249
-						$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID').val(item.whsId);
250
-						$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM').val(item.whsNm);
251
-					} else {
252
-						$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
253
-						$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val(item.whsNm);
254
-					}
315
+					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val(item.whsId);
316
+					$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val(item.whsNm);
255 317
 					_this.close();
256 318
 					return false;
257 319
 				}
@@ -270,13 +332,8 @@ let mobPopObj = {
270 332
 			});
271 333
 		},
272 334
 		delete: function() {
273
-			if(this.popMode === 'RTN_WHS') {
274
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_ID').val('');
275
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_RTN_WHS_NM').val('');
276
-			} else {
277
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val('');
278
-				$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val('');
279
-			}
335
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_ID').val('');
336
+			$('#ITP_FORM_MRTNMNG05010_LIST_SEARCH #ITP_FORM_MRTNMNG05010_LIST_SEARCH_WHS_NM').val('');
280 337
 		},
281 338
 		close: function() {
282 339
 			this.rows.length = 0;

+ 22 - 25
src/main/webapp/mobile/js/app/mrtnmng/ITP_MRTNMNG06010.js

@@ -6,7 +6,7 @@ require(['config'], function() {
6 6
 });
7 7
 
8 8
 /*API URL*/
9
-const API_MOBILE_GRID_LIST 			= 'api/rtnmng/inoutmng/retstock-result-grid-list';	// 목록
9
+const API_MOBILE_GRID_LIST 			= '/api/rtnmng/inoutmng/retstock-result-grid-list';	// 목록
10 10
 const API_MOBILE_INFO 				= '/api/rtnmng/po/info-pchOdr';						// 상세
11 11
 const API_POP_SEARCH_LIST			= '/api/whs/mng/pop-whs-search';
12 12
 const API_POP_SPPLY_LIST 			= '/api/spply/pop-grid-list';
@@ -52,11 +52,11 @@ let mobPageObj = {
52 52
 			$('button[id^="ITP_BTN_MRTNMNG06010_LIST"]').on('click', function() {
53 53
 				var id = $(this).attr('id');
54 54
 				switch (id) {
55
-					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init('WHS'); 		break;
56
-					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete('WHS'); 			break;
57
-					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_RTN_WHS_NM'	: mobPopObj.popWhsNm.init('RTN_WHS'); 	break;
58
-					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_RTN_WHS_NM'	: mobPopObj.popWhsNm.delete('RTN_WHS'); 		break;
59
-					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH'				: mobContObj.list.search();					break;
55
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_WHS_NM'		: mobPopObj.popWhsNm.init(); 	break;
56
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_WHS_NM'		: mobPopObj.popWhsNm.delete(); 	break;
57
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH_SPPLY_NM'	: mobPopObj.popSpply.init(); 	break;
58
+					case 'ITP_BTN_MRTNMNG06010_LIST_DELETE_SPPLY_NM'	: mobPopObj.popSpply.delete(); 	break;
59
+					case 'ITP_BTN_MRTNMNG06010_LIST_SEARCH'				: mobContObj.list.search();		break;
60 60
 				}
61 61
 				return false;
62 62
 			});
@@ -95,19 +95,16 @@ let mobContObj = {
95 95
 		rows: [],
96 96
 		init: function() {
97 97
 			mobPageObj.switchScreen(PAGE_MODE_LIST);
98
-			// this.search();
98
+			this.search();
99 99
 		},
100 100
 		search: function() {
101 101
 			var formId = '#ITP_FORM_MRTNMNG06010_LIST_SEARCH';
102
-			itp_fn_form_clear_validate(null, formId);
103
-			if (itp_fn_form_event.isValid(formId)) {
104
-				this.listPage = 1;
105
-				this.rows.length = 0;
106
-				$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS').empty();
107
-				setTimeout(function() {
108
-					mobContObj.list.load();
109
-				}, 100);
110
-			}
102
+			this.listPage = 1;
103
+			this.rows.length = 0;
104
+			$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWS').empty();
105
+			setTimeout(function() {
106
+				mobContObj.list.load();
107
+			}, 100);
111 108
 		},
112 109
 		pager: function(totPage) {
113 110
 			(this.listPage < totPage) ?
@@ -122,22 +119,22 @@ let mobContObj = {
122 119
 				mobContObj.list.pager(result.gridTotal);
123 120
 				$.each(result.gridRows, function (i, item) {
124 121
 					$('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA .panel-group').append($('#ITP_LIST_MRTNMNG06010_LIST_ITEM_ROWCOPY').html());
125
-					var $li = $('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA .panel-group > .list-row:last');
126
-					$li.find('.fnPchPodrUnqNo').text(item.pchPodrUnqNo);
127
-					$li.find('.fnDlvCmpltDt').text(item.dlvCmpltDt);
128
-					$li.find('.fnDlvSchDt').text(item.dlvSchDt);
122
+					var $li = $('#ITP_LIST_MRTNMNG06010_LIST_ITEM_AREA .panel-group > .item-row:last');
123
+					$li.find('.fnRtnPodrNo').text(item.rtnPodrUnqNo);
124
+					$li.find('.fnColCmpltDt').text(item.colCmpltDt);
125
+					$li.find('.fnColSchDt').text(item.colSchDt);
129 126
 					$li.find('.fnSpplyNm').text(item.spplyNm);
130
-					$li.find('.fnWhsNm').text(item.whsNm);
127
+					$li.find('.fnRtnWhsNm').text(item.rtnWhsNm);
131 128
 					$li.find('.fnItemNm').text(item.itemNm);
132
-					$li.find('.fnPodrQty').text(CommonObj.comma.set(item.podrQty));
133
-					$li.find('.fnDlvQty').text(CommonObj.comma.set(item.dlvQty));
129
+					$li.find('.fnColReqQty').text(CommonObj.comma.set(item.colReqQty));
130
+					$li.find('.fnRodrQty').text(CommonObj.comma.set(item.rodrQty));
134 131
 					mobContObj.list.rows.push(item);
135 132
 				});
136 133
 			};
137 134
 			const param = $('#ITP_FORM_MRTNMNG06010_LIST_SEARCH').serializeObject();
138 135
 			param.gridPage = mobContObj.list.listPage;
139 136
 			param.gridSize = mobile_list_size;
140
-			// console.log(JSON.stringify(param));
137
+			console.log(JSON.stringify(param));
141 138
 			fn_ajax_call(API_MOBILE_GRID_LIST, JSON.stringify(param), callbackFn, 'POST');
142 139
 		}
143 140
 	}
@@ -167,7 +164,7 @@ let mobPopObj = {
167 164
 			this.rows = gridRows;
168 165
 			$.each(gridRows, function (i, item) {
169 166
 				$('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group').append($('#ITP_POP_MRTNMNG06010_LIST_SPPLY_ROWCOPY').html());
170
-				var $li = $('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group > .list-row:last');
167
+				var $li = $('#ITP_POP_MRTNMNG06010_LIST_SPPLY_AREA .panel-group > .row_2:last');
171 168
 				$li.find('.fnSpplyNm').text(item.spplyNm);
172 169
 				$li.find('.fnStNm').text($li.find('.fnStNm').text().replace('$', item.stNm));
173 170
 				$li.find('.fnSpplyId').data('item-key', item.spplyId);