Ver código fonte

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

juney 2 anos atrás
pai
commit
844fefb955
27 arquivos alterados com 4353 adições e 281 exclusões
  1. 11 13
      src/main/webapp/app/collmng/COLLMNG03010.html
  2. 54 0
      src/main/webapp/app/inoutmng/INOUTMNG01010.html
  3. 1 1
      src/main/webapp/app/inoutmng/INOUTMNG02010.html
  4. 54 0
      src/main/webapp/app/inoutmng/INOUTMNG03010.html
  5. 4 4
      src/main/webapp/app/oper/OPER01010.html
  6. 159 0
      src/main/webapp/app/popup/biz/BIZPOP_COL_STTMT_PRN.html
  7. 45 0
      src/main/webapp/app/popup/biz/BIZPOP_RTN_PO_REJECT.html
  8. 2 2
      src/main/webapp/app/rtnmng/RTNMNG01010.html
  9. 73 51
      src/main/webapp/app/rtnmng/RTNMNG02010.html
  10. 91 58
      src/main/webapp/app/rtnmng/RTNMNG03010.html
  11. 35 38
      src/main/webapp/app/rtnmng/RTNMNG04010.html
  12. 13 11
      src/main/webapp/app/rtnmng/RTNMNG06010.html
  13. 9 3
      src/main/webapp/bootstrap/dist/css/bootstrap.min.css
  14. 9 8
      src/main/webapp/css/style.css
  15. 4 2
      src/main/webapp/css/ui.jqgrid-bootstrap.css
  16. 355 0
      src/main/webapp/js/app/collmng/ITP_COLLMNG03010.js
  17. 57 69
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG01010.js
  18. 4 4
      src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js
  19. 14 3
      src/main/webapp/js/app/locales/locale-ko.js
  20. 5 4
      src/main/webapp/js/app/oper/ITP_OPER01010.js
  21. 237 0
      src/main/webapp/js/app/popup/biz/ITP_BIZPOP_COL_STTMT_PRN.js
  22. 122 0
      src/main/webapp/js/app/popup/biz/ITP_BIZPOP_RTN_PO_REJECT.js
  23. 49 10
      src/main/webapp/js/app/rtnmng/ITP_RTNMNG01010.js
  24. 843 0
      src/main/webapp/js/app/rtnmng/ITP_RTNMNG02010.js
  25. 1155 0
      src/main/webapp/js/app/rtnmng/ITP_RTNMNG03010.js
  26. 581 0
      src/main/webapp/js/app/rtnmng/ITP_RTNMNG04010.js
  27. 367 0
      src/main/webapp/js/app/rtnmng/ITP_RTNMNG06010.js

+ 11 - 13
src/main/webapp/app/collmng/COLLMNG03010.html

@@ -5,12 +5,9 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>수거서현황-팝업있음</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_COLLMNG03010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_COLLMNG03010_NEWREG" class="btn btn-primary btn-sm CUDP" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수거서출력&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_COLLMNG03010_PRINT" class="btn btn-primary btn-sm CUDP" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수거서출력&nbsp;&nbsp;</button>
9 9
 				</div>
10 10
 				<div style="top:0px; text-align:center; font-size:20px;">
11
-					<span style="text-decoration:underline; font-weight:600;">테스트공급업체</span>
12
-					<button type="button" id="ITP_BTN_COLLMNG03010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
13
-					<button type="button" id="ITP_BTN_COLLMNG03010_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
14 11
 				</div>
15 12
 			</div>
16 13
 			<div class="itp_det_in">
@@ -19,28 +16,29 @@
19 16
 						<div class="itp_srh_border fix">
20 17
 							<div class="col-xs-12">
21 18
 								<form id="ITP_FORM_COLLMNG03010_SEARCH" class="form-horizontal">
19
+								<input type="hidden" id="ITP_FORM_COLLMNG03010_SEARCH_BRAND_ID" name="sbrandId" value="">
20
+								<input type="hidden" id="ITP_FORM_COLLMNG03010_SEARCH_SPPLY_ID" name="sspplyId" value="">
22 21
 									<div class="form-group">
23 22
 										<div class="col-xs-2 itp_ip itp_noMar">
24
-											<select id="ITP_FORM_COLLMNG03010_SERVICE_COL_DT" class="form-control itp_input" name="servicecolDt">
25
-												<option value="A">수거일자 *</option>											
26
-											</select>
23
+ 											<label>수거일자 *</label>
27 24
 										</div>										
28 25
 										<div class="col-xs-3 itp_ip itp_noMar">
29 26
 											<div class="input-daterange input-group date">
30
-												<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_COL_REQ_DT" class="form-control itp_input" name="colReqDt" value="">
27
+												<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
31 28
 												<span class="input-group-addon itp_date_to">~</span>
32
-												<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_COL_DT" class="form-control itp_input" name="colDt" value="">
29
+												<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
33 30
 											</div>
34 31
 										</div>
35 32
 										<div class="col-xs-2 itp_in itp_noMar">
36
-											<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_COL_PLACE" class="form-control itp_input" name="sColPlace" placeholder="수거장소(매장/창고)" />
33
+											<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_WHS_NM" class="form-control itp_input" name="swhsNm" placeholder="수거장소(매장/창고)" />
34
+											<input type="hidden" id="ITP_FORM_COLLMNG03010_SEARCH_WHS_ID" class="form-control itp_input" />
37 35
 										</div>
38 36
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
39
-											<button type="button" id="ITP_BTN_COLLMNG03010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
40
-											<button type="button" id="ITP_BTN_COLLMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
37
+											<button type="button" id="ITP_BTN_COLLMNG03010_SEARCH_WHS_ID" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
38
+											<button type="button" id="ITP_BTN_COLLMNG03010_DELETE_WHS_ID" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
41 39
 						                </div>
42 40
 										<div class="col-xs-4 itp_ip itp_noMar">
43
-											<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="발주번호/품목번호 /품목명" />
41
+											<input type="text" id="ITP_FORM_COLLMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="발주번호/품목번호 /품목명" />
44 42
 										</div>
45 43
 									</div>
46 44
 								</form>

+ 54 - 0
src/main/webapp/app/inoutmng/INOUTMNG01010.html

@@ -6,6 +6,7 @@
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_INOUTMNG01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8 8
 					<button type="button" id="ITP_BTN_INOUTMNG01010_OUT" class="btn btn-success btn-sm OUD" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;출하지시&nbsp;&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_INOUTMNG01010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
9 10
 				</div>
10 11
 			</div>
11 12
 			<div class="itp_det_in">
@@ -63,6 +64,59 @@
63 64
 						</div>
64 65
 					</div>
65 66
 				</div>
67
+				<div id="ITP_AJAX_INOUTMNG01010_VIEW_CONTAINER" >
68
+					<div class="itp_form itp_type1 fix">
69
+						<div class="col-xs-12">
70
+							<form id="ITP_FORM_INOUTMNG01010_VIEW" class="form-horizontal">
71
+								<input type="hidden" id="ITP_FORM_INOUTMNG01010_VIEW_" name="" value="">
72
+								<section class="itp_form_sec">
73
+									<h4 class="itp_form_tit">출하지시 기본정보</h4>
74
+									<div class="itp_form_in">
75
+										<div class="form-group">
76
+											<label class="col-xs-2 itp_lb">브랜드</label>
77
+											<div class="col-xs-4 itp_ip">
78
+												<div class="col-xs-7 itp_in">
79
+													<div class="fnBrandNm"></div>
80
+												</div>
81
+											</div>
82
+											<label class="col-xs-2 itp_lb">납품일자 *</label>
83
+											<div class="col-xs-4 itp_ip">
84
+												<div class="col-xs-7 itp_in">
85
+													<input type="date" id="ITP_FORM_INOUTMNG01010_VIEW_DLV_DT" data-check-required="empty" class="form-control itp_input" name="dlvDt" value="">
86
+												</div>
87
+											</div>
88
+										</div>
89
+										<div class="form-group border">
90
+											<label class="col-xs-2 itp_lb">납품담당자 *</label>
91
+											<div class="col-xs-4 itp_ip">
92
+												<div class="col-xs-7 itp_in">
93
+													<input type="text" id="ITP_FORM_INOUTMNG01010_VIEW_DLV_MGR_NM" data-check-required="empty" class="form-control itp_input" name="dlvMgrNm" value="">
94
+												</div>
95
+											</div>
96
+											<label class="col-xs-2 itp_lb">납품담당자 전화번호*</label>
97
+											<div class="col-xs-4 itp_ip">
98
+												<div class="col-xs-7 itp_in">
99
+													<input type="text" id="ITP_FORM_INOUTMNG01010_VIEW_DLV_MGR_TEL_NO" data-check-required="empty" class="form-control itp_input" name="dlvMgrTelNo" value="">
100
+												</div>
101
+											</div>
102
+										</div>
103
+									</div>
104
+								</section>
105
+							</form>
106
+						</div>
107
+					</div>
108
+					<div class="itp_table fix">
109
+						<div class="itp_table_head fix" style="background:#f5f5f5;">
110
+							<h4 class="itp_table_tit">출하지시 품목</h4>
111
+						</div>
112
+						<div id="ITP_INOUTMNG01010_VIEW_jqGrid_list" class="itp_tb_list">
113
+							<div id="ITP_INOUTMNG01010_VIEW_jqGridView" class="itp_views fix"></div>
114
+							<table id="ITP_INOUTMNG01010_VIEW_jqGrid"></table>
115
+							<div id="ITP_INOUTMNG01010_VIEW_jqGridPager"></div>
116
+							<div id="ITP_INOUTMNG01010_VIEW_jqGridEmpty" class="itp_no_data"></div>
117
+						</div>
118
+					</div>
119
+				</div>
66 120
 			</div>
67 121
 		</article>
68 122
 	</div>

+ 1 - 1
src/main/webapp/app/inoutmng/INOUTMNG02010.html

@@ -27,7 +27,7 @@
27 27
 											</div>
28 28
 										</div>
29 29
 										<div class="col-xs-2 itp_ip itp_noMar">
30
-											<input type="text" id="ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_NM" class="form-control itp_input" name="sshmtWhsNm" placeholder="출하창고" />
30
+											<input type="text" id="ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_NM" class="form-control itp_input" name="sshmtWhsNm" placeholder="출하창고" readonly/>
31 31
 											<input type="hidden" id="ITP_FORM_INOUTMNG02010_DETAIL_SHMT_WHS_ID" class="form-control itp_input" name="sshmtWhsId" />
32 32
 										</div>
33 33
 										<div class="col-xs-1 itp_in" style="width:11%; padding:0px;">

+ 54 - 0
src/main/webapp/app/inoutmng/INOUTMNG03010.html

@@ -5,6 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><strong>수거지시</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_INOUTMNG03010_SRH" class="btn btn-success btn-sm CUD" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수거지시&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_INOUTMNG03010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
8 9
 				</div>
9 10
 			</div>
10 11
 			<div class="itp_det_in">
@@ -62,6 +63,59 @@
62 63
 						</div>
63 64
 					</div>
64 65
 				</div>
66
+				<div id="ITP_AJAX_INOUTMNG03010_VIEW_CONTAINER" >
67
+					<div class="itp_form itp_type1 fix">
68
+						<div class="col-xs-12">
69
+							<form id="ITP_FORM_INOUTMNG03010_VIEW" class="form-horizontal">
70
+								<input type="hidden" id="ITP_FORM_INOUTMNG03010_VIEW_" name="" value="">
71
+								<section class="itp_form_sec">
72
+									<h4 class="itp_form_tit">수거지시 기본정보</h4>
73
+									<div class="itp_form_in">
74
+										<div class="form-group">
75
+											<label class="col-xs-2 itp_lb">브랜드</label>
76
+											<div class="col-xs-4 itp_ip">
77
+												<div class="col-xs-7 itp_in">
78
+													<div class="fnBrandNm"></div>
79
+												</div>
80
+											</div>
81
+											<label class="col-xs-2 itp_lb">수거지시일 *</label>
82
+											<div class="col-xs-4 itp_ip">
83
+												<div class="col-xs-7 itp_in">
84
+													<input type="date" id="ITP_FORM_INOUTMNG03010_VIEW_COL_DT" data-check-required="empty" class="form-control itp_input" name="colDt" value="">
85
+												</div>
86
+											</div>
87
+										</div>
88
+										<div class="form-group border">
89
+											<label class="col-xs-2 itp_lb">수거담당자 *</label>
90
+											<div class="col-xs-4 itp_ip">
91
+												<div class="col-xs-7 itp_in">
92
+													<input type="text" id="ITP_FORM_INOUTMNG03010_VIEW_COL_REQ_MGR_NM" data-check-required="empty" class="form-control itp_input" name="colReqMgrNm" value="">
93
+												</div>
94
+											</div>
95
+											<label class="col-xs-2 itp_lb">수거담당자 전화번호*</label>
96
+											<div class="col-xs-4 itp_ip">
97
+												<div class="col-xs-7 itp_in">
98
+													<input type="text" id="ITP_FORM_INOUTMNG03010_VIEW_COL_REQ_MGR_TEL_NO" data-check-required="empty" class="form-control itp_input" name="colReqMgrTelNo" value="">
99
+												</div>
100
+											</div>
101
+										</div>
102
+									</div>
103
+								</section>
104
+							</form>
105
+						</div>
106
+					</div>
107
+					<div class="itp_table fix">
108
+						<div class="itp_table_head fix" style="background:#f5f5f5;">
109
+							<h4 class="itp_table_tit">수거지시 품목</h4>
110
+						</div>
111
+						<div id="ITP_INOUTMNG03010_VIEW_jqGrid_list" class="itp_tb_list">
112
+							<div id="ITP_INOUTMNG03010_VIEW_jqGridView" class="itp_views fix"></div>
113
+							<table id="ITP_INOUTMNG03010_VIEW_jqGrid"></table>
114
+							<div id="ITP_INOUTMNG03010_VIEW_jqGridPager"></div>
115
+							<div id="ITP_INOUTMNG03010_VIEW_jqGridEmpty" class="itp_no_data"></div>
116
+						</div>
117
+					</div>
118
+				</div>
65 119
 			</div>
66 120
 		</article>
67 121
 	</div>

+ 4 - 4
src/main/webapp/app/oper/OPER01010.html

@@ -4,9 +4,9 @@
4 4
 			<div class="itp_det_head fix">
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i><i class="glyphicon glyphicon-chevron-right"></i> <strong>사용자관리</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7
-					<button type="button" id="ITP_BTN_OPER01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
7
+					<button type="button" id="ITP_BTN_OPER01010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i>조회</button>
8 8
 					<button type="button" id="ITP_BTN_OPER01010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수정&nbsp;&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_OPER01010_NEWREG" class="btn btn-primary btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;신규등록&nbsp;&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_OPER01010_NEWREG" class="btn btn-primary btn-sm NEB" style="display: inline-block;"><i class="glyphicon "></i>신규등록</button>
10 10
 					<button type="button" id="ITP_BTN_OPER01010_DELETE" class="btn btn-danger btn-sm DEB"><i class="glyphicon "></i>&nbsp;&nbsp;삭제&nbsp;&nbsp;</button>
11 11
 					<button type="button" id="ITP_BTN_OPER01010_SAVE" class="btn btn-success btn-sm SAB"><i class="glyphicon "></i>&nbsp;&nbsp;저장&nbsp;&nbsp;</button>
12 12
 					<button type="button" id="ITP_BTN_OPER01010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
@@ -25,8 +25,8 @@
25 25
 											<input type="text" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP_NM" class="form-control itp_input" name="safflShopNm" placeholder="가맹점" />
26 26
 										</div>
27 27
 										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
28
-											<button type="button" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
29
-											<button type="button" id="ITP_FORM_OPER01010_DELETE_AFFL_SHOP" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
28
+											<button type="button" id="ITP_FORM_OPER01010_SEARCH_AFFL_SHOP" class="btn btn-orange btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
29
+											<button type="button" id="ITP_FORM_OPER01010_DELETE_AFFL_SHOP" class="btn btn-warning btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
30 30
 						                </div>
31 31
 										<div class="col-xs-2 itp_ip itp_noMar">
32 32
 											<select id="ITP_FORM_OPER01010_SEARCH_BRAND_ID" class="form-control itp_input" name="sbrandId"></select>

+ 159 - 0
src/main/webapp/app/popup/biz/BIZPOP_COL_STTMT_PRN.html

@@ -0,0 +1,159 @@
1
+<div id="ITP_BIZPOP_COL_PICK_PRN" class="modal itp_modal">
2
+	<div class="modal-dialog" style="width:1200px;">
3
+		<div class="modal-content">
4
+			<form id="ITP_FORM_BIZPOP_COL_PICK_PRN">
5
+				<!-- <input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_FORM_DT" name="fromDt" value="">
6
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_TO_DT" name="toDt" value="">
7
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_BRAND_ID" name="sbrandId" value="">
8
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_SPPLY_ID" name="sspplyId" value=""> -->
9
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_BRAND_ID" name="brandId" value="">
10
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_COL_PICK_UNQ_NO" name="colPickUnqNo" value="">
11
+				<div id="ITP_POPUP_CONTAINER">
12
+					<div class="modal-header">
13
+						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
14
+						<h5 class="modal-title">가맹점 검색</h5>
15
+					</div>
16
+					<div id="ITP_BIZPOP_COL_PICK_PRN_PRINT_AREA" class="modal-body">
17
+						<div class="itp_form fix">
18
+							<div class="col-xs-12 itp_form_inline">
19
+								<div class="form-horizontal fix">
20
+									<div class="pull-right itp_cicon">
21
+										<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_COL_PICK_PRN_BTN_PRINT" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;출력&nbsp;&nbsp;</button>
22
+									</div>
23
+								</div>
24
+							</div>
25
+							<div class="col-xs-12 itp_form_inline">
26
+								<div class="col-xs-5"></div>
27
+								<div class="itp_title">
28
+									<label>수거확인서</label>
29
+								</div>
30
+							</div>	
31
+							<div class="col-xs-12 itp_form_inline">
32
+								<div class="col-xs-6" >
33
+									<div>
34
+										<label style="width:100px;">발행일</label>
35
+										<label>:</label>
36
+										<span class="fnColRegDt"></span>
37
+									</div>
38
+									<div>
39
+										<label style="width:100px;">수거확인번호</label>
40
+										<label>:</label>
41
+										<span class="fnColPickUnqNo"></span>
42
+									</div>
43
+									<div>
44
+										<label style="width:100px;">수거예정일</label>
45
+										<label>:</label>
46
+										<span class="fnColSchDt"></span>
47
+									</div>
48
+									<div>
49
+										<label style="width:100px;">수거담당</label>
50
+										<label>:</label>
51
+										<span class="fnPickMgrNm"></span>
52
+									</div>
53
+								</div>
54
+								<div class="col-xs-6">
55
+									<div class="itp_sign">
56
+										<div class="itp_sign_header">
57
+											<label>서    명</label>
58
+										</div>
59
+										<div class="itp_sign_area"></div>
60
+									</div>
61
+									<div class="itp_sign">
62
+										<div class="itp_sign_header">
63
+											<label>수거확인일</label>
64
+										</div>
65
+										<div class="itp_sign_area"></div>
66
+									</div>
67
+								</div>
68
+							</div>	
69
+							<div class="col-xs-12 itp_form_inline">
70
+								<div class="col-xs-6">
71
+									<div>
72
+										<label style="width:100px;">수거매장/창고</label>
73
+										<label>:</label>
74
+										<span style="margin:0px; " class="fnWhsAddr"></span>
75
+									</div>
76
+									<div>
77
+										<label style="width:100px;">전화번호</label>
78
+										<label>:</label>
79
+										<span class="fnPndrTelNo"></span>
80
+									</div>
81
+								</div>
82
+							</div>	
83
+							<div class="col-xs-6 itp_form_inline">
84
+								<div class="itp_form_info">
85
+										<div class="itp_company_type">
86
+											<label>반품처</label>
87
+										</div>
88
+									<div class="col-xs-11" style="padding:0; width:90%;">
89
+										<label class="col-xs-4">등록번호</label>
90
+										<div class="col-xs-8 itp_form_it">
91
+											<div class="col-xs-12 itp_in fnDlvBsnsRegno"></div>
92
+										</div>
93
+									</div>	
94
+									<div class="col-xs-11" style="padding:0; width:90%;">
95
+										<label class="col-xs-2">상호</label>
96
+										<div class="col-xs-8 itp_form_it">
97
+											<div class="col-xs-12 itp_in fnDlvNm"></div>
98
+										</div>
99
+									</div>
100
+									<div class="col-xs-11" style="padding:0; width:90%;">
101
+										<label class="col-xs-2">성명</label>
102
+										<div class="col-xs-8 itp_form_it">
103
+											<div class="col-xs-12 itp_in fnDlvOwnerNm"></div>
104
+										</div>
105
+									</div>
106
+									<div class="col-xs-11" style="padding:0; width:90%;">
107
+										<label class="col-xs-2">주소</label>
108
+										<div class="col-xs-8 itp_form_it">
109
+											<div class="col-xs-12 itp_in fnDlvAddr"></div>
110
+										</div>
111
+									</div>
112
+								</div>	
113
+							</div>
114
+							<div class="col-xs-6 itp_form_inline">
115
+								<div class="itp_form_info">
116
+										<div class="itp_company_type">
117
+											<label>수거처</label>
118
+										</div>
119
+									<div class="col-xs-11" style="padding:0; width:90%;">
120
+										<label class="col-xs-4">등록번호</label>
121
+										<div class="col-xs-8 itp_form_it">
122
+											<div class="col-xs-12 itp_in fnPoBsnsRegno"></div>
123
+										</div>
124
+									</div>	
125
+									<div class="col-xs-11" style="padding:0; width:90%;">
126
+										<label class="col-xs-2">상호</label>
127
+										<div class="col-xs-8 itp_form_it">
128
+											<div class="col-xs-12 itp_in fnPoNm"></div>
129
+										</div>
130
+									</div>
131
+									<div class="col-xs-11" style="padding:0; width:90%;">
132
+										<label class="col-xs-2">성명</label>
133
+										<div class="col-xs-8 itp_form_it">
134
+											<div class="col-xs-12 itp_in fnPoOwnerNm"></div>
135
+										</div>
136
+									</div>
137
+									<div class="col-xs-11" style="padding:0; width:90%;">
138
+										<label class="col-xs-2">주소</label>
139
+										<div class="col-xs-8 itp_form_it">
140
+											<div class="col-xs-12 itp_in fnPoAddr"></div>
141
+										</div>
142
+									</div>
143
+								</div>	
144
+							</div>
145
+						</div>
146
+						<div id="ITP_BIZPOP_COL_PICK_PRN_jqGrid_list" class="itp_tb_list" data-total-cnt="">
147
+							<div id="ITP_BIZPOP_COL_PICK_PRN_jqGridView" class="itp_views fix"></div>
148
+							<table id="ITP_BIZPOP_COL_PICK_PRN_jqGrid"></table>
149
+							<div id="ITP_BIZPOP_COL_PICK_PRN_jqGridPager"></div>
150
+							<div id="ITP_BIZPOP_COL_PICK_PRN_jqGridEmpty" class="itp_no_data"></div>
151
+						</div>
152
+					</div>
153
+				</div>
154
+			</form>
155
+		</div>
156
+	</div>
157
+
158
+	<div id="ITP_POPUP_JS"></div>
159
+</div>

+ 45 - 0
src/main/webapp/app/popup/biz/BIZPOP_RTN_PO_REJECT.html

@@ -0,0 +1,45 @@
1
+<div id="ITP_BIZPOP_RTN_PO_REJECT" class="modal itp_modal">
2
+	<div class="modal-dialog" style="width:600px;">
3
+		<div class="modal-content">
4
+			<form id="ITP_FORM_BIZPOP_PO_REJECT">
5
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_STORE_ID" name="storeId" value="">
6
+				<input type="hidden" id="ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" value="">
7
+				<div id="ITP_POPUP_CONTAINER">
8
+					<div class="modal-header">
9
+						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
10
+						<h5 class="modal-title">반품요청반려</h5>
11
+					</div>
12
+					<div class="modal-body">
13
+						<div class="itp_form fix">
14
+							<div class="col-xs-12 itp_form_inline">
15
+								<div class="form-horizontal fix">
16
+									<div class="pull-right itp_cicon">
17
+										<button type="button" class="btn btn-success btn-sm" id="ITP_BIZPOP_RTN_PO_REJECT_BTN_CANCEL" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;취소&nbsp;&nbsp;</button>
18
+										<button type="button" class="btn btn-primary btn-sm" id="ITP_BIZPOP_RTN_PO_REJECT_BTN_SELECT"><i class="glyphicon"></i>&nbsp;&nbsp;반려&nbsp;&nbsp;</button>
19
+									</div>
20
+								</div>
21
+							</div>
22
+							<div class="col-xs-12 itp_form_inline">
23
+								<label>반려사유</label>
24
+							</div>	
25
+							<div class="col-xs-12 itp_form_inline">
26
+							<textarea  id="ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_REJECT_DSN" name="rejectDsn" style="width:100%; height:100px;"></textarea>
27
+							</div>
28
+						<div class="col-xs-12 itp_form_inline">
29
+							<label>반려 품목 내역</label>
30
+						</div>	
31
+						</div>
32
+						<div id="ITP_BIZPOP_RTN_PO_REJECT_jqGrid_list" class="itp_tb_list" data-total-cnt="">
33
+							<div id="ITP_BIZPOP_RTN_PO_REJECT_jqGridView" class="itp_views fix"></div>
34
+							<table id="ITP_BIZPOP_RTN_PO_REJECT_jqGrid"></table>
35
+							<div id="ITP_BIZPOP_RTN_PO_REJECT_jqGridPager"></div>
36
+							<div id="ITP_BIZPOP_RTN_PO_REJECT_jqGridEmpty" class="itp_no_data"></div>
37
+						</div>
38
+					</div>
39
+				</div>
40
+			</form>
41
+		</div>
42
+	</div>
43
+
44
+	<div id="ITP_POPUP_JS"></div>
45
+</div>

+ 2 - 2
src/main/webapp/app/rtnmng/RTNMNG01010.html

@@ -38,11 +38,11 @@
38 38
 											<label class="col-xs-2 itp_lb">반품장소</label>
39 39
 											<div class="col-xs-4 itp_ip">
40 40
 												<div class="col-xs-4 itp_in">
41
-													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" value="" />
41
+													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" value="" readonly="readonly" />
42 42
 													<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_WHS_ID" class="form-control itp_input" name="rtnWhsId" value="" />
43 43
 												</div>
44 44
 												<div class="col-xs-4 itp_in">
45
-													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM" data-check-required="empty" class="form-control itp_input" name="rtnLocationNm" value="" />
45
+													<input type="text" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION_NM" data-check-required="empty" class="form-control itp_input" name="rtnLocationNm" value="" readonly="readonly" />
46 46
 													<input type="hidden" id="ITP_FORM_RTNMNG01010_DETAIL_RTN_LOCATION" class="form-control itp_input" name="rtnLocation" value="" />
47 47
 												</div>
48 48
 												<div class="col-xs-1 itp_in" style="width:23%; padding:0px;">

+ 73 - 51
src/main/webapp/app/rtnmng/RTNMNG02010.html

@@ -6,7 +6,7 @@
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_RTNMNG02010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8 8
 					<button type="button" id="ITP_BTN_RTNMNG02010_MODIFY" class="btn btn-success btn-sm UPB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;수정&nbsp;&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_RTNMNG02010_CANCELLIST" class="btn btn-warning btn-sm REQ"><i class="glyphicon "></i> &nbsp;&nbsp;요청&nbsp;&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_RTNMNG02010_REQ" class="btn btn-warning btn-sm REQ"><i class="glyphicon "></i> &nbsp;&nbsp;요청&nbsp;&nbsp;</button>
10 10
 					<button type="button" id="ITP_BTN_RTNMNG02010_SAVE" class="btn btn-success btn-sm TSA"><i class="glyphicon "></i>&nbsp;&nbsp;임시저장&nbsp;&nbsp;</button>
11 11
 					<button type="button" id="ITP_BTN_RTNMNG02010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i> &nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
12 12
 				</div>
@@ -17,35 +17,37 @@
17 17
 						<div class="itp_srh_border fix">
18 18
 							<div class="col-xs-12">
19 19
 								<form id="ITP_FORM_RTNMNG02010_SEARCH" class="form-horizontal">
20
+									<input type="hidden" id="ITP_FORM_RTNMNG02010_SEARCH_SBRAND_ID" name="sbrandId" value="">
21
+									<input type="hidden" id="ITP_FORM_RTNMNG02010_SEARCH_SSTORE_ID" name="sstoreId" value="">
22
+									<input type="hidden" id="ITP_FORM_RTNMNG02010_SEARCH_SWHS_ID" name="swhsId" value="">
23
+								
20 24
 									<div class="form-group">
21 25
 										<div class="col-xs-2 itp_ip itp_noMar">
22
-											<select id="ITP_FORM_RTNMNG02010_SERVICE_RTN_REQ_DT" class="form-control itp_input" name="servicertnReqDt">
26
+											<select id="ITP_FORM_RTNMNG02010_SERVICE_RTN_REQ_DT" class="form-control itp_input">
23 27
 												<option value="A">반품요청일</option>											
24 28
 											</select>
25 29
 										</div>											
26 30
 										<div class="col-xs-3 itp_ip itp_noMar">
27 31
 											<div class="input-daterange input-group date">
28
-												<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_RTN_REQ_DT" class="form-control itp_input" name="rtnReqDt" value="">
32
+												<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
29 33
 												<span class="input-group-addon itp_date_to">~</span>
30
-												<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_COL_REQ_DT" class="form-control itp_input" name="colReqDt" value="">
34
+												<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
31 35
 											</div>
32 36
 										</div>
33 37
 									</div>
34 38
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
35 39
 										<div class="col-xs-3 itp_ip itp_noMar">
36
-											<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_STORE_NM" class="form-control itp_input" name="sStoreNm" placeholder="매장/창고 팝업" />
40
+											<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_SWHS_NM" class="form-control itp_input" placeholder="반품장소 매장/창고" />
37 41
 										</div>
38 42
 										<div class="col-xs-1 itp_in" style="padding-left: 5px; width:10%;">
39
-											<button type="button" id="ITP_BTN_RTNMNG02010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
40
-											<button type="button" id="ITP_BTN_RTNMNG02010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
43
+											<button type="button" id="ITP_FORM_RTNMNG02010_SSEARCH_SWHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
44
+											<button type="button" id="ITP_FORM_RTNMNG02010_SDELETE_SWHS_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
41 45
 						                </div>
42 46
 										<div class="col-xs-2 itp_ip itp_noMar">
43
-											<select id="ITP_FORM_RTNMNG02010_SEARCH_ST_CD" class="form-control itp_input" name="sStCd">
44
-												<option value="A">상태(대기/요청/접수/반려)</option>											
45
-											</select>
47
+											<select id="ITP_FORM_RTNMNG02010_SEARCH_RTN_REQ_ST_CD" class="form-control itp_input" data-select-code="RTN_REQ_ST_CD" name="srtnReqStCd"></select>
46 48
 										</div>
47 49
 										<div class="col-xs-5 itp_ip itp_noMar">
48
-											<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />
50
+											<input type="text" id="ITP_FORM_RTNMNG02010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
49 51
 										</div>
50 52
 									</div>
51 53
 								</form>
@@ -66,6 +68,10 @@
66 68
 						<div class="col-xs-12">
67 69
 							<form id="ITP_FORM_RTNMNG02010_DETAIL" class="form-horizontal">
68 70
 								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_VIEW_CD" name="viewCd" value="C">
71
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_BRAND_ID" name="brandId" value="">
72
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" value="">
73
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_ST_CD" name="rtnReqStCd" value="">
74
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_MGR_ID" name="rtnReqMgrId" value="">
69 75
 					
70 76
 								<section class="itp_form_sec">
71 77
 									<h4 class="itp_form_tit">반품요청정보</h4>
@@ -77,43 +83,49 @@
77 83
 											<div class="col-xs-4 itp_ip fnRtnReqUnqNo"></div>
78 84
 										</div>
79 85
 									</div>
80
-									<div class="itp_form_in">
81
-										<div class="form-group">
82
-											<label class="col-xs-2 itp_lb">반품장소</label>
83
-											<div class="col-xs-4 itp_ip fnRtnPlace"></div>
84
-											<label class="col-xs-2 itp_lb">반품요청상태</label>
85
-											<div class="col-xs-4 itp_ip fnRtnReqStCd"></div>
86
-										</div>
87
-									</div>
88 86
 									<div class="itp_form_in">	
89 87
 										<div class="form-group">
90
-											<label class="col-xs-2 itp_lb">비고</label>
88
+											<label class="col-xs-2 itp_lb">반품장소</label>
91 89
 											<div class="col-xs-4 itp_ip">
92
-												<div class="col-xs-3 itp_in">
93
-													<div class="input-group fnNote" style="padding:5px;"></div>
90
+												<div class="col-xs-4 itp_in">
91
+													<input type="text" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" value="" readonly="readonly" />
92
+													<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_WHS_ID" class="form-control itp_input" name="rtnWhsId" value="" />
93
+												</div>
94
+												<div class="col-xs-4 itp_in">
95
+													<input type="text" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_LOCATION_NM" data-check-required="empty" class="form-control itp_input" name="rtnLocationNm" value="" readonly="readonly" />
96
+													<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_RTN_LOCATION" class="form-control itp_input" name="rtnLocation" value="" />
94 97
 												</div>
98
+												<div class="col-xs-1 itp_in" style="width:23%; padding:0px;">
99
+													<button type="button" id="ITP_FORM_RTNMNG02010_SEARCH_WHS_NM" class="btn btn-success btn-sm SEB SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
100
+													<button type="button" id="ITP_FORM_RTNMNG02010_DELETE_WHS_NM" class="btn btn-primary btn-sm UPB SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
101
+								                </div>
95 102
 											</div>
96 103
 											<label class="col-xs-2 itp_lb">수거요청일</label>
97
-											<div class="col-xs-4 itp_ip fnColReqDt"></div>
98
-										</div>
99
-									</div>
100
-									<div class="itp_form_in">	
101
-										<div class="form-group">
102
-											<label class="col-xs-2 itp_lb">반품일자</label>
103
-											<div class="col-xs-4 itp_ip fnRtnReqDt"></div>
104
-											<label class="col-xs-2 itp_lb">반려담당자명</label>
105
-											<div class="col-xs-4 itp_ip fnRtnReqMgrNm"></div>
104
+											<div class="col-xs-4 itp_ip">
105
+												<div class="col-xs-4 itp_in">
106
+													<div class="input-daterange input-group date">
107
+														<input type="text" id="ITP_FORM_RTNMNG02010_DETAIL_COL_REQ_DT" data-check-required="empty" class="form-control itp_input" name="colReqDt" value="">
108
+													</div>
109
+												</div>									
110
+											</div>
106 111
 										</div>
107 112
 									</div>
108 113
 									<div class="itp_form_in">
109 114
 										<div class="form-group">
110
-											<label class="col-xs-2 itp_lb">반품사유</label>
111
-											<div class="col-xs-10 itp_ip fnRtnRsn"></div>
115
+											<label class="col-xs-2 itp_lb">비고</label>
116
+											<div class="col-xs-10 itp_ip">
117
+												<input type="text" id="ITP_FORM_RTNMNG02010_DETAIL_NOTE" class="form-control itp_input" name="note" value="" />
118
+											</div>
112 119
 										</div>
113 120
 									</div>
121
+									
114 122
 									<div class="itp_form_in">
115 123
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
116 124
 											<h4 class="itp_table_tit">요청 품목</h4>
125
+											<div class="pull-right itp_cicon">
126
+												<button type="button" id="ITP_BTN_RTNMNG02010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
127
+												<button type="button" id="ITP_BTN_RTNMNG02010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
128
+											</div>
117 129
 										</div>
118 130
 										<div id="ITP_RTNMNG02010_DETAIL_jqGrid_list" class="itp_tb_list">
119 131
 										  <div id="ITP_RTNMNG02010_DETAIL_jqGridView" class="itp_views fix"></div>
@@ -131,7 +143,12 @@
131 143
 					<div class="itp_form itp_type1 fix">
132 144
 						<div class="col-xs-12">
133 145
 							<form id="ITP_FORM_RTNMNG02010_VIEW" class="form-horizontal">
134
-								<input type="hidden" id="ITP_FORM_RTNMNG02010_DETAIL_VIEW_CD" name="viewCd" value="C">
146
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_VIEW_VIEW_CD" name="viewCd" value="C">
147
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_VIEW_BRAND_ID" name="brandId" value="">
148
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_UNQ_NO" name="rtnReqUnqNo" value="">
149
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_ST_CD" name="rtnReqStCd" value="">
150
+								<input type="hidden" id="ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_MGR_ID" name="rtnReqMgrId" value="">
151
+								
135 152
 								<section class="itp_form_sec">
136 153
 									<h4 class="itp_form_tit">반품요청정보</h4>
137 154
 									<div class="itp_form_in">	
@@ -139,44 +156,49 @@
139 156
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
140 157
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
141 158
 											<label class="col-xs-2 itp_lb">반품번호</label>
142
-											<div class="col-xs-4 itp_ip fnPchReqUnqNo"></div>
159
+											<div class="col-xs-4 itp_ip fnRtnReqUnqNo"></div>
143 160
 										</div>
144 161
 									</div>
145 162
 									<div class="itp_form_in">	
146 163
 										<div class="form-group">
147 164
 											<label class="col-xs-2 itp_lb">반품장소</label>
148 165
 											<div class="col-xs-4 itp_ip">
149
-												<div class="col-xs-5 itp_in">
150
-													<input type="text" id="ITP_FORM_RTNMNG02010_VIEW_DLV_PLACE" class="form-control itp_input" name="dlvPlace" placeholder="매장/창고" />
151
-												</div>
152
-												<div class="col-xs-4 itp_in" style="padding-left:3px">
153
-													<button type="button" id="ITP_BTN_RTNMNG02010_VIEW_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
154
-													<button type="button" id="ITP_BTN_RTNMNG02010_VIEW_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
155
-												</div>
166
+												<div class="col-xs-10 itp_in fnRtnWhsNm"></div>
156 167
 											</div>
157 168
 											<label class="col-xs-2 itp_lb">수거요청일</label>
158 169
 											<div class="col-xs-4 itp_ip">
159
-												<div class="col-xs-5 itp_in input-group date">
160
-													<input type="text" id="ITP_FORM_RTNMNG02010_VIEW_COL_REQ_DT" class="form-control itp_input" name="colReqDt" value="">
161
-												</div>
170
+												<div class="col-xs-5 itp_in fnColReqDt"></div>
162 171
 											</div>
163 172
 										</div>
164 173
 									</div>
165 174
 									<div class="itp_form_in">
166 175
 										<div class="form-group">
167 176
 											<label class="col-xs-2 itp_lb">비고</label>
168
-											<div class="col-xs-10 itp_ip">
169
-												<input type="text" id="ITP_FORM_RTNMNG02010_VIEW_NOTE" class="form-control itp_input" name="note" value="" />
177
+											<div class="col-xs-10 itp_ip fnNote"></div>
178
+										</div>
179
+									</div>
180
+									<div class="itp_form_in">	
181
+										<div class="form-group">
182
+											<label class="col-xs-2 itp_lb">반려일자</label>
183
+											<div class="col-xs-4 itp_ip">
184
+												<div class="col-xs-10 itp_in fnRtnRjctDt"></div>
170 185
 											</div>
186
+											<label class="col-xs-2 itp_lb">반려담당자</label>
187
+											<div class="col-xs-4 itp_ip">
188
+												<div class="col-xs-5 itp_in fnRtnRjctNm"></div>
189
+											</div>
190
+										</div>
191
+									</div>
192
+									<div class="itp_form_in">
193
+										<div class="form-group">
194
+											<label class="col-xs-2 itp_lb">반려사유</label>
195
+											<div class="col-xs-10 itp_ip fnRtnRjctRsn"></div>
171 196
 										</div>
172 197
 									</div>
198
+									
173 199
 									<div class="itp_form_in">
174 200
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
175 201
 											<h4 class="itp_table_tit">요청 품목</h4>
176
-											<div class="pull-right itp_cicon">
177
-												<button type="button" id="ITP_BTN_RTNMNG02010_DETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
178
-												<button type="button" id="ITP_BTN_RTNMNG02010_DETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
179
-											</div>
180 202
 										</div>
181 203
 										<div id="ITP_RTNMNG02010_VIEW_jqGrid_list" class="itp_tb_list">
182 204
 										  <div id="ITP_RTNMNG02010_VIEW_jqGridView" class="itp_views fix"></div>

+ 91 - 58
src/main/webapp/app/rtnmng/RTNMNG03010.html

@@ -2,12 +2,13 @@
2 2
 	<div class="itp_cont">
3 3
 		<article class="itp_detail">
4 4
 			<div class="itp_det_head fix">
5
-				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>반품발주 생성-팝업있음</strong></h2>
5
+				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>반품발주 생성</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7
-					<button type="button" id="ITP_BTN_RTNMNG03010_SRH" class="btn btn-success btn-sm RQC" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;반품신규생성&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_RTNMNG03010_MODIFY" class="btn btn-success btn-sm RPOC" style="display: inline-block;"><i class="glyphicon "></i> &nbsp;반품발주생성&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_RTNMNG03010_NEWREG" class="btn btn-primary btn-sm RPRJ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;반품요청 반려&nbsp;</button>
10
-					<button type="button" id="ITP_BTN_RTNMNG03010_CANCELLIST" class="btn btn-warning btn-sm RPO"><i class="glyphicon "></i> &nbsp;&nbsp;반품발주&nbsp;&nbsp;</button>
7
+					<button type="button" id="ITP_BTN_RTNMNG03010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_RTNMNG03010_NEWCREATE" class="btn btn-success btn-sm RQC" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;반품신규생성&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_RTNMNG03010_POCREATE" class="btn btn-success btn-sm RPOC" style="display: inline-block;"><i class="glyphicon "></i> &nbsp;반품발주생성&nbsp;</button>
10
+					<button type="button" id="ITP_BTN_RTNMNG03010_POREJECT" class="btn btn-primary btn-sm RPRJ" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;반품요청 반려&nbsp;</button>
11
+					<button type="button" id="ITP_BTN_RTNMNG03010_RTNPO" class="btn btn-warning btn-sm RPO"><i class="glyphicon "></i> &nbsp;&nbsp;반품발주&nbsp;&nbsp;</button>
11 12
 					<button type="button" id="ITP_BTN_RTNMNG03010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i> &nbsp;취소/목록&nbsp;</button>
12 13
 				</div>
13 14
 			</div>
@@ -17,37 +18,42 @@
17 18
 						<div class="itp_srh_border fix">
18 19
 							<div class="col-xs-12">
19 20
 								<form id="ITP_FORM_RTNMNG03010_SEARCH" class="form-horizontal">
21
+									<input type="hidden" id="ITP_FORM_RTNMNG03010_SEARCH_SBRAND_ID" name="sbrandId" value="">
22
+									<input type="hidden" id="ITP_FORM_RTNMNG03010_SEARCH_SSTORE_ID" name="sstoreId" value="">
23
+								
20 24
 									<div class="form-group">
21 25
 										<div class="col-xs-2 itp_ip itp_noMar">
22
-											<select id="ITP_FORM_RTNMNG03010_SERVICE_RTN_REQ_DT" class="form-control itp_input" name="servicertnReqDt">
26
+											<select id="ITP_FORM_RTNMNG03010_SERVICE_RTN_REQ_DT" class="form-control itp_input">
23 27
 												<option value="A">반품요청일*</option>											
24 28
 											</select>
25 29
 										</div>											
26 30
 										<div class="col-xs-3 itp_ip itp_noMar">
27 31
 											<div class="input-daterange input-group date">
28
-												<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_" class="form-control itp_input" name="" value="">
32
+												<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
29 33
 												<span class="input-group-addon itp_date_to">~</span>
30
-												<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_" class="form-control itp_input" name="" value="">
34
+												<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
31 35
 											</div>
32 36
 										</div>
33 37
 									</div>
34 38
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
35 39
 										<div class="col-xs-2 itp_ip itp_noMar">
36
-											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sSpplyNm" placeholder="공급업체" />
40
+											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_SSPPLY_NM" class="form-control itp_input" name="sspplyNm" placeholder="공급업체" readonly="readonly" />
41
+											<input type="hidden" id="ITP_FORM_RTNMNG03010_SEARCH_SSPPLY_ID" class="form-control itp_input" name="sspplyId" />
37 42
 										</div>
38 43
 										<div class="col-xs-1 itp_in" style="padding:0px; width:8%;">
39
-											<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
40
-											<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
44
+											<button type="button" id="ITP_FORM_RTNMNG03010_SSEARCH_SSPPLY_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
45
+											<button type="button" id="ITP_FORM_RTNMNG03010_SDELETE_SSPPLY_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
41 46
 						                </div>
42 47
 										<div class="col-xs-2 itp_ip itp_noMar">
43
-											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_DLV_PLACE" class="form-control itp_input" name="sDlvPlace" placeholder="매장/창고" />
48
+											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_SWHS_NM" class="form-control itp_input" name="swhsNm" placeholder="매장/창고" readonly="readonly" />
49
+											<input type="hidden" id="ITP_FORM_RTNMNG03010_SEARCH_SWHS_ID" class="form-control itp_input" name="swhsId"  />
44 50
 										</div>
45 51
 										<div class="col-xs-1 itp_in" style="padding:0px; width:10%;">
46
-											<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
47
-											<button type="button" id="ITP_BTN_RTNMNG03010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
52
+											<button type="button" id="ITP_FORM_RTNMNG03010_SSEARCH_SWHS_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
53
+											<button type="button" id="ITP_FORM_RTNMNG03010_SDELETE_SWHS_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
48 54
 						                </div>
49 55
 										<div class="col-xs-4 itp_ip itp_noMar">
50
-											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="품목번호 or 품목명" />
56
+											<input type="text" id="ITP_FORM_RTNMNG03010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="품목번호 or 품목명" />
51 57
 										</div>
52 58
 									</div>
53 59
 								</form>
@@ -63,28 +69,43 @@
63 69
 						</div>
64 70
 					</div>
65 71
 				</div>
72
+				
66 73
 				<div id="ITP_AJAX_RTNMNG03010_DETAIL_CONTAINER">
67 74
 					<div class="itp_form itp_type1 fix">
68 75
 						<div class="col-xs-12">
69 76
 							<form id="ITP_FORM_RTNMNG03010_DETAIL" class="form-horizontal">
70 77
 								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_VIEW_CD" name="viewCd" value="C">
78
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_BRAND_ID" name="brandId" value="">
79
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_STORE_ID" name="storeId" value="">
80
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_RTN_REQ_DVSN" name="rtnReqDvsn" value="">
81
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_SPPLY_ID" name="spplyId" value="">
82
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_RTN_WHS_ID" name="rtnWhsId" value="">
83
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_RTN_LOCATION" name="rtnLocation" value="">
84
+																
85
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_JOB_CD" name="jobCd" value="R">
71 86
 					
72 87
 								<section class="itp_form_sec">
73
-									<h4 class="itp_form_tit">구매발주상세-생성</h4>
88
+									<h4 class="itp_form_tit">반품 발주 상세</h4>
74 89
 									<div class="itp_form_in">	
75 90
 										<div class="form-group">
76 91
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
77 92
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
78 93
 											<label class="col-xs-2 itp_lb">반품발주번호</label>
79
-											<div class="col-xs-4 itp_ip fnRtnPodrUnqNo"></div>
94
+											<div class="col-xs-4 itp_ip fnRtnPodrUnqNo">(자동생성)</div>
80 95
 										</div>
81 96
 									</div>
82 97
 									<div class="itp_form_in">
83 98
 										<div class="form-group">
84 99
 											<label class="col-xs-2 itp_lb">공급업체명</label>
85 100
 											<div class="col-xs-4 itp_ip fnSpplyNm"></div>
86
-											<label class="col-xs-2 itp_lb">반품발주일자</label>
87
-											<div class="col-xs-4 itp_ip "></div>
101
+											<label class="col-xs-2 itp_lb">수거요청일</label>
102
+											<div class="col-xs-4 itp_ip">
103
+												<div class="col-xs-4 itp_in">
104
+													<div class="input-daterange input-group date">
105
+														<input type="text" id="ITP_FORM_RTNMNG03010_DETAIL_COL_REQ_DT" data-check-required="empty" class="form-control itp_input" name="colReqDt" value="">
106
+													</div>
107
+												</div>											
108
+											</div>
88 109
 										</div>
89 110
 									</div>
90 111
 									<div class="itp_form_in">	
@@ -108,7 +129,7 @@
108 129
 											<label class="col-xs-2 itp_lb">수거구분</label>
109 130
 											<div class="col-xs-4 itp_ip">
110 131
 												<div class="col-xs-7 itp_in">
111
-													<select id="ITP_FORM_RTNMNG03010_DETAIL_COL_DVSN" class="form-control itp_input" name="colDvsn">
132
+													<select id="ITP_FORM_RTNMNG03010_DETAIL_COL_DVSN" data-select-code="COL_DVSN" data-check-required="empty" class="form-control itp_input" name="colDvsn">
112 133
 														<option value="A">본사수거/공급사수거</option>											
113 134
 													</select>
114 135
 												</div>
@@ -116,18 +137,18 @@
116 137
 											<label class="col-xs-2 itp_lb">반품입고창고</label>
117 138
 											<div class="col-xs-4 itp_ip">
118 139
 												<div class="col-xs-5 itp_in">
119
-													<input type="text" id="ITP_FORM_RTNMNG03010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" placeholder="창고/공급사" />
140
+													<input type="text" id="ITP_FORM_RTNMNG03010_DETAIL_RTN_WHS_NM" class="form-control itp_input" name="rtnWhsNm" placeholder="창고/공급사" />
120 141
 												</div>
121 142
 												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
122 143
 													<button type="button" id="ITP_BTN_RTNMNG03010_DETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
123
-													<button type="button" id="ITP_BTN_RTNMNG03010_DETAIL_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
144
+													<button type="button" id="ITP_BTN_RTNMNG03010_DETAIL_MODIFY" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
124 145
 								                </div>
125 146
 											</div>
126 147
 										</div>
127 148
 									</div>
128 149
 									<div class="itp_form_in">
129 150
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
130
-											<h4 class="itp_table_tit">발주 품목</h4>
151
+											<h4 class="itp_table_tit">반품발주 품목</h4>
131 152
 										</div>
132 153
 										<div id="ITP_RTNMNG03010_DETAIL_jqGrid_list" class="itp_tb_list">
133 154
 										  <div id="ITP_RTNMNG03010_DETAIL_jqGridView" class="itp_views fix"></div>
@@ -141,20 +162,30 @@
141 162
 						</div>
142 163
 					</div>
143 164
 				</div>
144
-				<div id="ITP_AJAX_RTNMNG03010_VIEW_CONTAINER">
165
+				
166
+				<div id="ITP_AJAX_RTNMNG03010_NDETAIL_CONTAINER">
145 167
 					<div class="itp_form itp_type1 fix">
146 168
 						<div class="col-xs-12">
147
-							<form id="ITP_FORM_RTNMNG03010_VIEW" class="form-horizontal">
148
-								<input type="hidden" id="ITP_FORM_RTNMNG03010_DETAIL_VIEW_CD" name="viewCd" value="C">
169
+							<form id="ITP_FORM_RTNMNG03010_NDETAIL" class="form-horizontal">
170
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_VIEW_CD" name="viewCd" value="C">
171
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_BRAND_ID" name="brandId" value="">
172
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_STORE_ID" name="storeId" value="">
173
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_REQ_DVSN" name="rtnReqDvsn" value="">
174
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_MGR_ID" name="rtnMgrId" value="">
175
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_ID" name="spplyId" value="">
176
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_ID" name="rtnWhsId" value="">
177
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_LOCATION" name="rtnLocation" value="">
178
+																
179
+								<input type="hidden" id="ITP_FORM_RTNMNG03010_NDETAIL_JOB_CD" name="jobCd" value="P">
149 180
 					
150 181
 								<section class="itp_form_sec">
151
-									<h4 class="itp_form_tit">구매발주상세-신규생성</h4>
182
+									<h4 class="itp_form_tit">반품 발주 상세</h4>
152 183
 									<div class="itp_form_in">	
153 184
 										<div class="form-group">
154 185
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
155 186
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
156 187
 											<label class="col-xs-2 itp_lb">반품발주번호</label>
157
-											<div class="col-xs-4 itp_ip fnRtnPodrUnqNo"></div>
188
+											<div class="col-xs-4 itp_ip fnRtnPodrUnqNo">(자동생성)</div>
158 189
 										</div>
159 190
 									</div>
160 191
 									<div class="itp_form_in">
@@ -162,15 +193,21 @@
162 193
 											<label class="col-xs-2 itp_lb">공급업체명</label>
163 194
 											<div class="col-xs-4 itp_ip">
164 195
 												<div class="col-xs-5 itp_in">
165
-													<input type="text" id="ITP_FORM_RTNMNG03010_VIEW_SPPLY_NM" class="form-control itp_input" name="spplyNm" placeholder="창고/공급사" />
196
+													<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_SPPLY_NM" class="form-control itp_input" name="spplyNm" placeholder="공급업체" readonly="readonly" />													
166 197
 												</div>
167 198
 												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
168
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
169
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
199
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_SPPLY_NM" class="btn btn-success btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
200
+													<button type="button" id="ITP_BTN_RTNMNG03010_SDELETE_SPPLY_NM" class="btn btn-primary btn-sm SHOW" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
170 201
 								                </div>
171 202
 											</div>
172
-											<label class="col-xs-2 itp_lb">반품발주일자</label>
173
-											<div class="col-xs-4 itp_ip "></div>
203
+											<label class="col-xs-2 itp_lb">수거요청일</label>
204
+											<div class="col-xs-4 itp_ip">
205
+												<div class="col-xs-4 itp_in">
206
+													<div class="input-daterange input-group date">
207
+														<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_COL_REQ_DT" data-check-required="empty" class="form-control itp_input" name="colReqDt" value="">
208
+													</div>
209
+												</div>											
210
+											</div>
174 211
 										</div>
175 212
 									</div>
176 213
 									<div class="itp_form_in">	
@@ -178,11 +215,11 @@
178 215
 											<label class="col-xs-2 itp_lb">수거장소</label>
179 216
 											<div class="col-xs-4 itp_ip">
180 217
 												<div class="col-xs-5 itp_in">
181
-													<input type="text" id="ITP_FORM_RTNMNG03010_VIEW_WHS_NM" class="form-control itp_input" name="whsNm" placeholder="창고/공급사" />
218
+													<input type="text" id="ITP_FORM_RTNMNG03010_NDETAIL_RTN_WHS_NM" data-check-required="empty" class="form-control itp_input" name="rtnWhsNm" placeholder="창고/공급사" readonly="readonly" />
182 219
 												</div>
183 220
 												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
184
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
185
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
221
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
222
+													<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_MODIFY" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
186 223
 								                </div>
187 224
 											</div>
188 225
 											<label class="col-xs-2 itp_lb">반품 발주 총 금액</label>
@@ -192,49 +229,45 @@
192 229
 									<div class="itp_form_in">	
193 230
 										<div class="form-group">
194 231
 											<label class="col-xs-2 itp_lb">발주담당자</label>
195
-											<div class="col-xs-4 itp_ip fnPodrMgrNm"></div>
232
+											<div class="col-xs-4 itp_ip fnRtnMgrNm"></div>
196 233
 											<label class="col-xs-2 itp_lb">발주담당자연락처</label>
197
-											<div class="col-xs-4 itp_ip fnPodrMgrMblNo"></div>
234
+											<div class="col-xs-4 itp_ip fnRtnMgrTelNo"></div>
198 235
 										</div>
199 236
 									</div>
200 237
 									<div class="itp_form_in">	
201 238
 										<div class="form-group">
202 239
 											<label class="col-xs-2 itp_lb">수거구분</label>
203
-											<div class="col-xs-4 itp_ip">
204
-												<div class="col-xs-7 itp_in">
205
-													<select id="ITP_FORM_RTNMNG03010_VIEW_COL_DVSN" class="form-control itp_input" name="colDvsn">
240
+											<div class="col-xs-10 itp_ip">
241
+												<div class="col-xs-2 itp_in">
242
+													<select id="ITP_FORM_RTNMNG03010_NDETAIL_COL_DVSN" data-select-code="COL_DVSN" data-check-required="empty" class="form-control itp_input" name="colDvsn">
206 243
 														<option value="A">본사수거/공급사수거</option>											
207 244
 													</select>
208 245
 												</div>
209 246
 											</div>
210
-											<label class="col-xs-2 itp_lb">반품입고창고</label>
211
-											<div class="col-xs-4 itp_ip">
212
-												<div class="col-xs-5 itp_in">
213
-													<input type="text" id="ITP_FORM_RTNMNG03010_VIEW_WHS_NM" class="form-control itp_input" name="whsNm" placeholder="창고/공급사" />
214
-												</div>
215
-												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
216
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
217
-													<button type="button" id="ITP_BTN_RTNMNG03010_VIEW_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
218
-								                </div>
219
-											</div>
220 247
 										</div>
221 248
 									</div>
222 249
 									<div class="itp_form_in">
223 250
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
224
-											<h4 class="itp_table_tit">발주 품목</h4>
251
+											<h4 class="itp_table_tit">반품발주 품목</h4>
252
+											
253
+											<div class="pull-right itp_cicon">
254
+												<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_ADDROW" class="btn btn-primary btn-sm ARB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;품목추가&nbsp;&nbsp;</button>
255
+												<button type="button" id="ITP_BTN_RTNMNG03010_NDETAIL_DELROW" class="btn btn-danger btn-sm DRB"><i class="glyphicon "></i>&nbsp;&nbsp;품목삭제&nbsp;&nbsp;</button>
256
+											</div>
225 257
 										</div>
226
-										<div id="ITP_RTNMNG03010_VIEW_jqGrid_list" class="itp_tb_list">
227
-										  <div id="ITP_RTNMNG03010_VIEW_jqGridView" class="itp_views fix"></div>
228
-										  <table id="ITP_RTNMNG03010_VIEW_jqGrid"></table>
229
-										  <div id="ITP_RTNMNG03010_VIEW_jqGridPager"></div>
230
-										  <div id="ITP_RTNMNG03010_VIEW_jqGridEmpty" class="itp_no_data"></div>
258
+										<div id="ITP_RTNMNG03010_NDETAIL_jqGrid_list" class="itp_tb_list">
259
+										  <div id="ITP_RTNMNG03010_NDETAIL_jqGridView" class="itp_views fix"></div>
260
+										  <table id="ITP_RTNMNG03010_NDETAIL_jqGrid"></table>
261
+										  <div id="ITP_RTNMNG03010_NDETAIL_jqGridPager"></div>
262
+										  <div id="ITP_RTNMNG03010_NDETAIL_jqGridEmpty" class="itp_no_data"></div>
231 263
 										</div>
232 264
 									</div>
233 265
 								</section>												
234 266
 							</form>
235 267
 						</div>
236 268
 					</div>
237
-				</div>		
269
+				</div>
270
+					
238 271
 			</div>
239 272
 		</article>
240 273
 	</div>

+ 35 - 38
src/main/webapp/app/rtnmng/RTNMNG04010.html

@@ -5,8 +5,7 @@
5 5
 				<h2 class="pull-left itp_det_tit"><i class="glyphicon glyphicon-chevron-right"></i> <strong>반품발주 현황</strong></h2>
6 6
 				<div class="pull-right itp_cicon">
7 7
 					<button type="button" id="ITP_BTN_RTNMNG04010_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;조회&nbsp;&nbsp;</button>
8
-					<button type="button" id="ITP_BTN_RTNMNG04010_NEWREG" class="btn btn-primary btn-sm RPO" style="display: inline-block;"><i class="glyphicon "></i>&nbsp;&nbsp;반품발주&nbsp;&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_RTNMNG04010_CANCELLIST" class="btn btn-warning btn-sm RCPO"><i class="glyphicon "></i>&nbsp;&nbsp;반품취소&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_RTNMNG04010_RTNCANCEL" class="btn btn-warning btn-sm RPO"><i class="glyphicon "></i>&nbsp;&nbsp;반품취소&nbsp;&nbsp;</button>
10 9
 					<button type="button" id="ITP_BTN_RTNMNG04010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon "></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
11 10
 				</div>
12 11
 			</div>
@@ -16,53 +15,62 @@
16 15
 						<div class="itp_srh_border fix">
17 16
 							<div class="col-xs-12">
18 17
 								<form id="ITP_FORM_RTNMNG04010_SEARCH" class="form-horizontal">
18
+									<input type="hidden" id="ITP_FORM_RTNMNG04010_SEARCH_BRAND_ID" name="sbrandId" value="">
19
+									<input type="hidden" id="ITP_FORM_RTNMNG04010_SEARCH_SWHS_ID" name="swhsId" value="">			<!-- 수거창고 -->
20
+									<input type="hidden" id="ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_ID" name="srtnWhsId" value="">	<!-- 반품창고 -->
21
+									<input type="hidden" id="ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_ID" name="sspplyId" value="">		<!-- 수거공급사 -->
22
+								
19 23
 									<div class="form-group">
20 24
 										<div class="col-xs-2 itp_ip itp_noMar">
21
-											<select id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input" name="">
25
+											<select id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input">
22 26
 												<option value="A">반품발주일자</option>											
23 27
 											</select>
24 28
 										</div>										
25 29
 										<div class="col-xs-3 itp_ip itp_noMar">
26 30
 											<div class="input-daterange input-group date">
27
-												<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input" name="" value="">
31
+												<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
28 32
 												<span class="input-group-addon itp_date_to">~</span>
29
-												<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input" name="" value="">
33
+												<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
30 34
 											</div>
31 35
 										</div>
32 36
 										<div class="col-xs-2 itp_ip itp_noMar" style="width:12%"></div>
33 37
 										<div class="col-xs-2 itp_ip itp_noMar">
34
-											<select id="ITP_FORM_RTNMNG04010_SEARCH_RTN_ODR_ST_CD" class="form-control itp_input" name="sRtnOdrStCd">
38
+											<select id="ITP_FORM_RTNMNG04010_SEARCH_RTN_ODR_ST_CD" data-select-code="RTN_ODR_ST_CD" class="form-control itp_input" name="srtnOdrStCd">
35 39
 												<option value="A">반품상태</option>											
36 40
 											</select>
37 41
 										</div>
38 42
 										<div class="col-xs-2 itp_ip itp_noMar">
39
-											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_STORE_NM" class="form-control itp_input" name="sStoreNm" placeholder="수거창고/매장" />
43
+											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_SWHS_NM" class="form-control itp_input" placeholder="수거창고/매장" readonly="readonly" />
40 44
 										</div>
41 45
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
42
-											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
43
-											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
46
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_POP_SWHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
47
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_DEL_SWHS_NM" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
44 48
 						                </div>
45 49
 									</div>
46 50
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
47 51
 										<div class="col-xs-2 itp_ip itp_noMar">
48
-											<select id="ITP_FORM_RTNMNG04010_SEARCH_COL_DVSN" class="form-control itp_input" name="sColDvsn">
52
+											<select id="ITP_FORM_RTNMNG04010_SEARCH_COL_DVSN" data-select-code="COL_DVSN" class="form-control itp_input" name="scolDvsn">
49 53
 												<option value="A">수거구분</option>											
50 54
 											</select>
51 55
 										</div>
56
+										
52 57
 										<div class="col-xs-2 itp_ip itp_noMar">
53
-											<select id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input" name="">
54
-												<option value="A">반품입고창고</option>											
55
-											</select>
58
+											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_NM" class="form-control itp_input" placeholder="반품입고 창고" readonly="readonly" />
56 59
 										</div>
60
+										<div class="col-xs-1 itp_in" style="padding: 0px; width:8%;">
61
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_POP_SRTN_WHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
62
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_DEL_SRTN_WHS_NM" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
63
+						                </div>										
64
+										
57 65
 										<div class="col-xs-2 itp_ip itp_noMar">
58
-											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_" class="form-control itp_input" name="" placeholder="반품입고 공급업체" />
66
+											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_NM" class="form-control itp_input" placeholder="반품입고 공급업체" readonly="readonly" />
59 67
 										</div>
60 68
 										<div class="col-xs-1 itp_in" style="padding: 0px; width:10%;">
61
-											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
62
-											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
69
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_POP_SSPPLY_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
70
+											<button type="button" id="ITP_BTN_RTNMNG04010_SEARCH_DEL_SSPPLY_NM" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
63 71
 						                </div>
64
-										<div class="col-xs-4 itp_ip itp_noMar">
65
-											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_ITEM_NM" class="form-control itp_input" name="sItemNm" placeholder="반품발주번호/품목번호 /품목명" />
72
+										<div class="col-xs-2 itp_ip itp_noMar">
73
+											<input type="text" id="ITP_FORM_RTNMNG04010_SEARCH_ITEM_NM" class="form-control itp_input" name="sitemNm" placeholder="반품발주번호/품목번호 /품목명" />
66 74
 										</div>
67 75
 									</div>
68 76
 								</form>
@@ -83,16 +91,19 @@
83 91
 						<div class="col-xs-12">
84 92
 							<form id="ITP_FORM_RTNMNG04010_DETAIL" class="form-horizontal">
85 93
 								<input type="hidden" id="ITP_FORM_RTNMNG04010_DETAIL_VIEW_CD" name="viewCd" value="C">
94
+								<input type="hidden" id="ITP_FORM_RTNMNG04010_DETAIL_BRAND_ID" name="brandId" value="">
95
+								<input type="hidden" id="ITP_FORM_RTNMNG04010_DETAIL_RTN_PODR_UNQ_NO" name="rtnPodrUnqNo" value="">
96
+								<input type="hidden" id="ITP_FORM_RTNMNG04010_DETAIL_RTN_ODR_ST_CD" name="rtnOdrStCd" value="">
86 97
 					
87 98
 								<section class="itp_form_sec">
88
-									<h4 class="itp_form_tit">반품발주상세</h4>
99
+									<h4 class="itp_form_tit">반품 발주 상세</h4>
89 100
 									<div class="itp_form_in">	
90 101
 										<div class="form-group">
91 102
 											<label class="col-xs-2 itp_lb">브랜드 *</label>
92 103
 											<div class="col-xs-4 itp_ip fnBrandNm"></div>
93 104
 											<label class="col-xs-2 itp_lb">반품발주번호</label>
94 105
 											<div class="col-xs-4 itp_ip">
95
-												<div class="col-xs-3 itp_in">
106
+												<div class="col-xs-10 itp_in">
96 107
 													<div class="input-group fnRtnPodrUnqNo"></div>
97 108
 												</div>
98 109
 											</div>
@@ -103,7 +114,7 @@
103 114
 											<label class="col-xs-2 itp_lb">공급업체명</label>
104 115
 											<div class="col-xs-4 itp_ip fnSpplyNm"></div>
105 116
 											<label class="col-xs-2 itp_lb">반품발주일자</label>
106
-											<div class="col-xs-4 itp_ip "></div>
117
+											<div class="col-xs-4 itp_ip fnRtnOdrRegDt"></div>
107 118
 										</div>
108 119
 									</div>
109 120
 									<div class="itp_form_in">	
@@ -125,28 +136,14 @@
125 136
 									<div class="itp_form_in">	
126 137
 										<div class="form-group">
127 138
 											<label class="col-xs-2 itp_lb">수거구분</label>
128
-											<div class="col-xs-4 itp_ip">
129
-												<div class="col-xs-7 itp_in">
130
-													<select id="ITP_FORM_RTNMNG03010_DETAIL_COL_DVSN" class="form-control itp_input" name="colDvsn">
131
-														<option value="A">본사수거/공급사수거</option>											
132
-													</select>
133
-												</div>
134
-											</div>
139
+											<div class="col-xs-4 itp_ip fnColDvsnNm"></div>
135 140
 											<label class="col-xs-2 itp_lb">반품입고창고</label>
136
-											<div class="col-xs-4 itp_ip">
137
-												<div class="col-xs-5 itp_in">
138
-													<input type="text" id="ITP_FORM_RTNMNG03010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" placeholder="창고/공급사" />
139
-												</div>
140
-												<div class="col-xs-5 itp_in" style="padding-left:3px; ">
141
-													<button type="button" id="ITP_BTN_RTNMNG03010_DETAIL_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
142
-													<button type="button" id="ITP_BTN_RTNMNG03010_DETAIL_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
143
-								                </div>
144
-											</div>
141
+											<div class="col-xs-4 itp_ip fnWhsNm"></div>
145 142
 										</div>
146 143
 									</div>
147 144
 									<div class="itp_form_in">
148 145
 										<div class="itp_table_head fix" style="background:#f5f5f5;">
149
-											<h4 class="itp_table_tit">발주 품목</h4>
146
+											<h4 class="itp_table_tit">반품 발주 품목</h4>
150 147
 										</div>
151 148
 										<div id="ITP_RTNMNG04010_DETAIL_jqGrid_list" class="itp_tb_list">
152 149
 										  <div id="ITP_RTNMNG04010_DETAIL_jqGridView" class="itp_views fix"></div>

+ 13 - 11
src/main/webapp/app/rtnmng/RTNMNG06010.html

@@ -13,35 +13,37 @@
13 13
 						<div class="itp_srh_border fix">
14 14
 							<div class="col-xs-12">
15 15
 								<form id="ITP_FORM_RTNMNG06010_SEARCH" class="form-horizontal">
16
+									<input type="hidden" id="ITP_FORM_RTNMNG06010_SEARCH_SBRAND_ID" name="sbrandId" value="">
17
+									<input type="hidden" id="ITP_FORM_RTNMNG06010_SEARCH_SSTORE_ID" name="sstoreId" value="">
18
+									<input type="hidden" id="ITP_FORM_RTNMNG06010_SEARCH_SSPPLY_ID" name="sspplyId" value="">	<!-- 공급업체 -->
19
+								
16 20
 									<div class="form-group">
17 21
 										<div class="col-xs-1 itp_ip itp_noMar" style="width:10.7%;">
18
-											<select id="ITP_FORM_RTNMNG06010_SERVICE_COL_DT" class="form-control itp_input" name="servicecolDt">
19
-												<option value="A">수거일*</option>											
22
+											<select id="ITP_FORM_RTNMNG06010_SERVICE_COL_DT" class="form-control itp_input">
23
+												<option value="A">수거일</option>											
20 24
 											</select>
21 25
 										</div>
22 26
 										<div class="col-xs-3 itp_ip itp_noMar">
23 27
 											<div class="input-daterange input-group date">
24
-												<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_COL_REQ_DT" class="form-control itp_input" name="colReqDt" value="">
28
+												<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
25 29
 												<span class="input-group-addon itp_date_to">~</span>
26
-												<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_COL_DT" class="form-control itp_input" name="colDt" value="">
30
+												<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value="">
27 31
 											</div>
28 32
 										</div>
29 33
 										<div class="col-xs-2 itp_ip itp_noMar">
30
-											<select id="ITP_FORM_RTNMNG06010_SEARCH_BRAND_NM" class="form-control itp_input" name="sBrandNm">
31
-												<option value="A">브랜드*</option>											
32
-											</select>
34
+											
33 35
 										</div>
34 36
 										<div class="col-xs-5 itp_ip itp_noMar">
35
-											<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_RTN_REQ_DTL_NO" class="form-control itp_input" name="sRtnReqDtlNo" placeholder="반품요청번호" />
37
+											
36 38
 										</div>
37 39
 									</div>
38 40
 									<div class="form-group" style="padding-top: 10px; border-top: 1px dotted #ccc;">
39 41
 										<div class="col-xs-2 itp_ip itp_noMar">
40
-											<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_SPPLY_NM" class="form-control itp_input" name="sSpplyNm" placeholder="공급업체" />
42
+											<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_SSPPLY_NM" class="form-control itp_input" placeholder="공급업체" />
41 43
 										</div>
42 44
 										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
43
-											<button type="button" id="ITP_BTN_RTNMNG06010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
44
-											<button type="button" id="ITP_BTN_RTNMNG06010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
45
+											<button type="button" id="ITP_BTN_RTNMNG06010_SEARCH_POP_SSPPLY_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
46
+											<button type="button" id="ITP_BTN_RTNMNG06010_SEARCH_DEL_SSPPLY_NM" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
45 47
 						                </div>
46 48
 										<div class="col-xs-2 itp_ip itp_noMar">
47 49
 											<input type="text" id="ITP_FORM_RTNMNG06010_SEARCH_STORE_NM" class="form-control itp_input" name="sStoreNm" placeholder="매장/창고" />

Diferenças do arquivo suprimidas por serem muito extensas
+ 9 - 3
src/main/webapp/bootstrap/dist/css/bootstrap.min.css


+ 9 - 8
src/main/webapp/css/style.css

@@ -11,7 +11,7 @@
11 11
 
12 12
 /* COMMON */
13 13
 html, body {width:100%; height:100%; background:#eee; overflow-y:hidden;}
14
-* {word-break: break-word}
14
+* {word-break: break-word; font-family: 'GmarketSansMedium';}
15 15
 textarea {resize:none;}
16 16
 a, button {outline:none !important; text-decoration:none !important;}
17 17
 .fix:after {content:"."; display:block; height:0; clear:both; visibility:hidden;}
@@ -88,6 +88,7 @@ a, button {outline:none !important; text-decoration:none !important;}
88 88
 .has-error.radio label, .has-error.radio-inline label {margin-bottom:0px;}
89 89
 .has-error .help-block {font-size:12px;}
90 90
 
91
+
91 92
 /* ITP_WRAPPER */
92 93
 #ITP_WRAPPER {width:100%; height:100%; min-width:1400px;}
93 94
 #ITP_CONTENT_WRAPPER {width:100%;}
@@ -119,7 +120,7 @@ a, button {outline:none !important; text-decoration:none !important;}
119 120
 #ITP_LOGIN .itp_find {margin-top:34px; font-weight:100; cursor:pointer;}
120 121
 #ITP_LOGIN .itp_btn_bar {margin-top:10px;}
121 122
 #ITP_LOGIN .itp_login_img {width:100%; padding:0 auto;}
122
-#ITP_LOGIN .itp_img{width:150px; height:150px; top:-60px; position: absolute; margin:0 33.3%;}
123
+#ITP_LOGIN .itp_img{width:150px; height:150px; top:-50px; position: absolute; margin:0 33.3%;}
123 124
 #ITP_LOGIN .itp_login_input label {position:absolute; top:50%; left:27px; color:#adadad; transform:translateY(-50%); font-size: 12px; border: none; outline:none; transition: top .5s ease;}
124 125
 #ITP_LOGIN .itp_login_input {width:90%; margin:0 5%; position:relative;}
125 126
 #ITP_LOGIN .itp_login_input input {width:100%; padding:20px 10px 10px; outline:none; border-radius:7px; background:#eee;}
@@ -128,8 +129,8 @@ a, button {outline:none !important; text-decoration:none !important;}
128 129
 #ITP_LOGIN .itp_login_input:not(:placeholder-shown) ~ label{top:0px; font-size:12px;}
129 130
 
130 131
 /* ITP_HEADER */
131
-#ITP_HEADER .itp_head {font-family: 'GmarketSansMedium';width:100%; height:40px; position:relative; line-height:40px; z-index:100;}
132
-#ITP_HEADER .itp_tit {margin:0; padding:0; line-height:40px; font-size:20px;}
132
+#ITP_HEADER .itp_head {font-family: 'GmarketSansMedium';width:100%; height:50px; position:relative; line-height:50px; z-index:100;}
133
+#ITP_HEADER .itp_tit {margin:0; padding:0; line-height:50px; font-size:20px;}
133 134
 #ITP_HEADER .itp_tit span {display: inline-block; vertical-align: middle}
134 135
 #ITP_HEADER .itp_lt {position:absolute; top:0px; left:10px;}
135 136
 #ITP_HEADER .itp_rt {position:absolute; top:0px; right:20px;}
@@ -147,8 +148,8 @@ a, button {outline:none !important; text-decoration:none !important;}
147 148
 #ITP_HEADER .itp_sch_brand button{width:90px; border:1px solid #000;}
148 149
 #ITP_HEADER .itp_menu {float:left; border:1px solid #ddd; line-height: 26px; background:#eee;margin:4px; border-radius: 2px; padding:0 4px;}
149 150
 #ITP_HEADER .itp_menu a {color:#000; font-size:13px; text-decoration:none;}
150
-#ITP_HEADER .itp_out {width:70px; height:30px;  float:left; border:1px solid #333; line-height: 28px; background:#fff; margin:6px; border-radius: 10px; padding:0 4px;}
151
-#ITP_HEADER .itp_out a {padding:4px; color:#000; font-size:13px; text-decoration:none;}
151
+#ITP_HEADER .itp_out {width:70px; height:30px;  float:left; border:1px solid #333; line-height: 28px; background:#fff; margin-top:10px; border-radius: 10px; padding:0 4px;}
152
+#ITP_HEADER .itp_out a {padding:8.4px; color:#000; font-size:11px; text-decoration:none;}
152 153
 #ITP_HEADER .itp_tabs {position:relative; z-index:100; transition:all .25s ease; float:right; width:calc(100% - 240px);}
153 154
 #ITP_HEADER .itp_tabs .nav-tabs {padding:4px 4px 0 4px; background:#fff;}
154 155
 #ITP_HEADER .itp_tabs .nav-tabs > li a {border:1px solid #ddd; background:#f5f5f5; font-size:12px; color:#666; padding:5px 13px 5px 15px; margin-right:4px; outline:none;}
@@ -240,7 +241,7 @@ a, button {outline:none !important; text-decoration:none !important;}
240 241
 
241 242
 #ITP_CONTAINER .itp_detail .itp_det_head {padding:0 4px 0 4px; height:42px; background:#fff;}
242 243
 #ITP_CONTAINER .itp_detail .itp_det_head .itp_det_tit {font-size:15px; margin:0; padding:0; line-height:42px;}
243
-#ITP_CONTAINER .itp_detail .itp_det_head .itp_det_tit .glyphicon {color:#337ab7; margin-right:4px;}
244
+#ITP_CONTAINER .itp_detail .itp_det_head .itp_det_tit .glyphicon {color:#F0831E; margin-right:4px;}
244 245
 
245 246
 #ITP_CONTAINER .itp_detail .itp_det_in {padding:15px 20px 15px 20px; height:calc(100vh - 127px); overflow-y:scroll;}
246 247
 #ITP_CONTAINER .itp_detail .itp_cicon {line-height:32px; height:32px;}
@@ -300,7 +301,7 @@ html:lang(en) #ITP_CONTAINER .itp_detail .itp_form .itp_thumb_inline .itp_thumb_
300 301
 
301 302
 #ITP_CONTAINER .itp_detail .itp_lg_form {padding-top:10px;}
302 303
 #ITP_CONTAINER .itp_detail .itp_lg_form.itp_type1 {padding-left:15px; padding-right:15px; padding-bottom:15px; }
303
-#ITP_CONTAINER .itp_detail .itp_lg_form.itp_type1 .itp_srh_border {border:1px solid #ddd; background:#f5f5f5; padding:15px 15px 5px 10px; border-radius:4px;}
304
+#ITP_CONTAINER .itp_detail .itp_lg_form.itp_type1 .itp_srh_border {border:1px solid #ddd; background:#fff; padding:15px 15px 5px 10px; border-radius:4px;box-shadow: 0px 0px 6px #ddd;}
304 305
 #ITP_CONTAINER .itp_detail .itp_lg_form .form-group {margin-bottom:10px;}
305 306
 #ITP_CONTAINER .itp_detail .itp_lg_form .form-control {font-size:13px; color:#333;}
306 307
 #ITP_CONTAINER .itp_detail .itp_lg_form .itp_lb {font-size:13px; padding-top:5px; padding-right:0; color:#333; position:relative;}

+ 4 - 2
src/main/webapp/css/ui.jqgrid-bootstrap.css

@@ -1028,7 +1028,9 @@ td.menu_text {
1028 1028
 	background-color:inherit;
1029 1029
 }
1030 1030
 .ui-jqgrid input[type=checkbox] {width:15px; height:15px;}
1031
+
1031 1032
 .ui-jqgrid .jqgrid-rownum {background:#fff !important;}
1032
-.ui-jqgrid .jqgrid-rownum {background:#fff !important;}
1033
+.ui-jqgrid .jqgrid-rownum:nth-child(even) {background:#f5f5f5 !important;}
1033 1034
 .table>tbody>tr.success .jqgrid-rownum {background:#dff0d8 !important;}
1034
-.table>tbody>tr.active .jqgrid-rownum {background:#f5f5f5 !important;}
1035
+.table>tbody>tr.success .jqgrid-rownum:checked {background:#dff0d8 !important;}
1036
+.table>tbody>tr.active .jqgrid-rownum {background:#e8e8e8 !important;}

+ 355 - 0
src/main/webapp/js/app/collmng/ITP_COLLMNG03010.js

@@ -0,0 +1,355 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		pageObj.init();
5
+	});
6
+});
7
+
8
+
9
+//화면변수
10
+const COLLMNG03010_GRID_ID = '#ITP_COLLMNG03010_jqGrid';
11
+const COLLMNG03010_GRID_LIST = '#ITP_COLLMNG03010_jqGrid_list';
12
+const COLLMNG03010_GRID_PAGER = '#ITP_COLLMNG03010_jqGridPager';
13
+const COLLMNG03010_GRID_EMPTY = '#ITP_COLLMNG03010_jqGridEmpty';
14
+
15
+
16
+//API URL
17
+let API_RTNMNG_INOUTMNG_SPPLY_PICK_GRID_LIST ='/api/rtnmng/inoutmng/spply-pick-grid-list';
18
+
19
+
20
+//화면 grid ColModel
21
+const gridColModel = {
22
+	list:[
23
+		{
24
+			index: 'VIEW_CD', name: 'viewCd',
25
+			label: ITP_MSG_LOCALE.label.viewCd,
26
+			width: '10', fixed: false, align: 'center',
27
+			sortable: false, hidden: true
28
+		},
29
+		{
30
+			index: 'BRAND_ID', name: 'brandId',
31
+			label: ITP_MSG_LOCALE.label.brandId,
32
+			width: '10', fixed: false, align: 'center',
33
+			sortable: false, hidden: true
34
+		},
35
+		{
36
+			index: 'BRAND_NM', name: 'brandNm',
37
+			label: ITP_MSG_LOCALE.label.brandNm,			// 브랜드명
38
+			width: '10', fixed: false, align: 'center',
39
+			sortable: false, hidden: false
40
+		},
41
+		{
42
+			index: 'COL_PICK_UNQ_NO', name: 'colPickUnqNo',
43
+			label: ITP_MSG_LOCALE.label.colPickUnqNo,		// 수거서번호
44
+			width: '10', fixed: false, align: 'center',
45
+			sortable: false, hidden: false
46
+		},
47
+		{
48
+			index: 'PICK_ST_NM', name: 'pickStNm',
49
+			label: ITP_MSG_LOCALE.label.pickStNm,			// 수거서상태
50
+			width: '8', fixed: false, align: 'center',
51
+			sortable: false, hidden: false
52
+		},
53
+		{
54
+			index: 'COL_REQ_DT', name: 'colRegDt',
55
+			label: ITP_MSG_LOCALE.label.colRegDt,			// 수거일자
56
+			width: '10', fixed: false, align: 'center',
57
+			sortable: false, hidden: false
58
+		},
59
+		{
60
+			index: 'COL_REQ_DT', name: 'colReqDt',
61
+			label: ITP_MSG_LOCALE.label.colReqDt,			// 수거요청일
62
+			width: '10', fixed: false, align: 'center',
63
+			sortable: false, hidden: false
64
+		},
65
+		{
66
+			index: 'COL_SCH_DT', name: 'colSchDt',
67
+			label: ITP_MSG_LOCALE.label.colSchDt,			// 수거예정일
68
+			width: '10', fixed: false, align: 'center',
69
+			sortable: false, hidden: false
70
+		},
71
+		{
72
+			index: 'ITEM_ID', name: 'itemId',
73
+			label: ITP_MSG_LOCALE.label.itemId,				// 품목번호
74
+			width: '10', fixed: false, align: 'center',
75
+			sortable: false, hidden: false
76
+		},
77
+		{
78
+			index: 'ITEM_NM', name: 'itemNm',
79
+			label: ITP_MSG_LOCALE.label.itemNm,				// 품목명
80
+			width: '8', fixed: false, align: 'center',
81
+			sortable: false, hidden: false
82
+		},
83
+		{
84
+			index: 'COL_REQ_QTY', name: 'colReqQty',
85
+			label: ITP_MSG_LOCALE.label.colReqQty,			// 수거수량
86
+			width: '6', fixed: false, align: 'center',
87
+			sortable: false, hidden: false
88
+		},		
89
+		{
90
+			index: 'RTN_RSN_DVSN_NM', name: 'rtnRsnDvsnNm',
91
+			label: ITP_MSG_LOCALE.label.rtnRsnDvsnNm,		// 반품사유구분
92
+			width: '10', fixed: false, align: 'center',
93
+			sortable: false, hidden: false
94
+		},
95
+		{
96
+			index: 'UNIT_AMT', name: 'unitAmt',
97
+			label: ITP_MSG_LOCALE.label.unitAmt,			// 단가
98
+			width: '7', fixed: false, align: 'center',
99
+			sortable: false, hidden: false
100
+		},
101
+		{
102
+			index: 'COL_REQ_AMT', name: 'colReqAmt',
103
+			label: ITP_MSG_LOCALE.label.colReqAmt,			// 수거금액
104
+			width: '9', fixed: false, align: 'center',
105
+			sortable: false, hidden: false
106
+		},
107
+		{
108
+			index: 'WHS_NM', name: 'whsNm',
109
+			label: ITP_MSG_LOCALE.label.whsNm,				// 납품장소
110
+			width: '10', fixed: false, align: 'center',
111
+			sortable: false, hidden: false
112
+		},
113
+		{
114
+			index: 'PICK_MGR_NM', name: 'pickMgrNm',
115
+			label: ITP_MSG_LOCALE.label.pickMgrNm,			// 수거담당자
116
+			width: '10', fixed: false, align: 'center',
117
+			sortable: false, hidden: false
118
+		},
119
+		{
120
+			index: 'PICK_MGR_TEL_NO', name: 'pickMgrTelNo',
121
+			label: ITP_MSG_LOCALE.label.pickMgrTelNo,		// 수거담당자연락처
122
+			width: '10', fixed: false, align: 'center',
123
+			sortable: false, hidden: false
124
+		}
125
+	],
126
+	view: [],
127
+	detail: []
128
+};
129
+
130
+
131
+
132
+/*화면공통 Object*/
133
+let pageObj = {
134
+	init: function() {
135
+		this.ui.init();
136
+		this.event.init();
137
+		this.action();
138
+	},
139
+	ui: {
140
+		init: function() {
141
+			this.view();
142
+			this.grid();
143
+			this.ready();
144
+		},
145
+		view: function() {
146
+			// 버튼 권한설정
147
+			fn_proc_btn_auth('COLLMNG03010');
148
+			// 공통코드 표시
149
+			$('select').each(function() {
150
+				if($(this).data('select-code')) {
151
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
152
+				}
153
+			});
154
+			// 조회일자 지정	
155
+			var now = new Date();
156
+			var defaultToDate = new Date(now);
157
+			defaultToDate.setDate(now.getDate() + 10);
158
+			$('#ITP_TAB_COLLMNG03010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
159
+			$('#ITP_FORM_COLLMNG03010_SEARCH_FROM_DT').datepicker('setDate', '2020.10.01');
160
+			$('#ITP_FORM_COLLMNG03010_SEARCH_TO_DT').datepicker('setDate', '2024.10.10');
161
+		},
162
+		grid: function() {
163
+			itp_fn_jqgrid_resize(COLLMNG03010_GRID_ID, COLLMNG03010_GRID_LIST, 'lg');
164
+			listObj.empty.init();
165
+			itp_fn_fire_window_resize();
166
+		},
167
+		ready: function() {
168
+			listObj.init();
169
+		}
170
+	},
171
+	event: {
172
+		init: function() {
173
+			this.button();
174
+		},
175
+		button: function() {
176
+			// 버튼 클릭 이벤트
177
+			$('button').each(function() {
178
+				var id = $(this).attr('id');
179
+				$(this).on('click', function() {
180
+					switch (id) {
181
+						case 'ITP_BTN_COLLMNG03010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
182
+						case 'ITP_BTN_COLLMNG03010_NEWREG'			: listObj.button.create(); 		break;	// 신규등록 버튼
183
+						case 'ITP_BTN_COLLMNG03010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
184
+						case 'ITP_BTN_COLLMNG03010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
185
+						case 'ITP_BTN_COLLMNG03010_DELETE'			: modifyObj.button.del();		break;	// 발주 취소 버튼(예정)
186
+					}
187
+				});
188
+			});
189
+		}
190
+	},
191
+	switchScreen: function(mode) {
192
+        $('.itp_det_head').find('button[id^="ITP_BTN_COLLMNG03010_"]').each(function(i) {
193
+            $(this).hide();
194
+        });
195
+        $('#ITP_TAB_COLLMNG03010').find('div[id$="_CONTAINER"]').each(function(i) {
196
+            $(this).hide();
197
+        });
198
+        if(mode == 'LIST') { // 목록
199
+            fn_show_btn_auth_array(['#ITP_BTN_COLLMNG03010_SRH', '#ITP_BTN_COLLMNG03010_NEWREG']);
200
+            $('#ITP_AJAX_COLLMNG03010_LIST_CONTAINER').show();
201
+            $('#ITP_FORM_COLLMNG03010_SEARCH #ITP_FORM_COLLMNG03010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
202
+            $('#ITP_FORM_COLLMNG03010_SEARCH #ITP_FORM_COLLMNG03010_SEARCH_SPPLY_ID').val(fn_make_user_info.get('spplyId'));
203
+            $('#ITP_BTN_COLLMNG03010_SEARCH_WHS_ID').show();
204
+            $('#ITP_BTN_COLLMNG03010_DELETE_WHS_ID').show();
205
+        }
206
+    },
207
+    action: function() {
208
+		var _this = this;
209
+		$('#ITP_BTN_COLLMNG03010_PRINT').on('click', function() {
210
+			_this.popup();
211
+		});
212
+	},
213
+	popup: function() {
214
+		var selectedIds = $(COLLMNG03010_GRID_ID).getGridParam('selarrrow');
215
+		if(selectedIds.length > 1) { // 1이상 선택시
216
+			alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;//출력
217
+			return; //리턴
218
+		}
219
+		var selRowData ; //변수선언		
220
+		for (var i=selectedIds.length-1; i>=0; i--) {		//1개만 선택시
221
+			selRowData = $(COLLMNG03010_GRID_ID).jqGrid('getRowData', selectedIds[i]);		//cell 선택
222
+		}
223
+		const key = {brandId: selRowData.brandId, colPickUnqNo: selRowData.colPickUnqNo};		// popup key 값 설정
224
+		fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE', null, key, 'S');
225
+	}
226
+};
227
+
228
+
229
+/*목록화면 Object*/
230
+let listObj = {
231
+	init: function() {
232
+		this.grid.init();
233
+		this.action();
234
+	},
235
+	itp_COLLMNG03010_param: {},
236
+	itp_COLLMNG03010_search: false,
237
+	button: {
238
+		search: function() {
239
+			listObj.itp_COLLMNG03010_search = true;
240
+			let param = $('#ITP_FORM_COLLMNG03010_SEARCH').serializeObject();
241
+			param.gridSize = $.jgrid.defaults.rowNum;
242
+            param.gridPage = $.jgrid.defaults.page;
243
+            param.sbrandId = 'BRD221100002';
244
+            param.sspplyId = 'SPY221100004';
245
+            console.log(1234);
246
+            console.log(JSON.stringify(param));
247
+            $(COLLMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
248
+        }
249
+	},
250
+	empty: {
251
+		init: function() {
252
+			var _this = this;
253
+            this.push();
254
+            $(COLLMNG03010_GRID_EMPTY).on('click', function() {
255
+                _this.back();
256
+                listObj.itp_COLLMNG03010_param.gridSize = $.jgrid.defaults.rowNum;
257
+                $(COLLMNG03010_GRID_ID).setGridParam({'postData': JSON.stringify(listObj.itp_COLLMNG03010_param)}).trigger('reloadGrid');
258
+            });
259
+		},
260
+		push: function() {
261
+            let param = $('#ITP_FORM_COLLMNG03010_SEARCH').serializeObject();
262
+            listObj.itp_COLLMNG03010_param = param;
263
+            param.sbrandId = 'BRD221100002';
264
+            param.sspplyId = 'SPY221100004';
265
+        },
266
+        back: function() {
267
+            $('#ITP_FORM_COLLMNG03010_SERVICE_BRAND_TYPE').val(listObj.itp_COLLMNG03010_param.brandType);
268
+            $('#ITP_FORM_COLLMNG03010_SERVICE_ST_CD').val(listObj.itp_COLLMNG03010_param.stCd);
269
+            $('#ITP_FORM_COLLMNG03010_SEARCH_BRAND_NM').val(listObj.itp_COLLMNG03010_param.brandNm);
270
+        }
271
+	},
272
+	grid: {
273
+		init: function() {
274
+			// 데이터 없을때
275
+            listObj.empty.push();
276
+            this.search();
277
+		},
278
+		colModel: gridColModel.list,
279
+		search: function() {
280
+			pageObj.switchScreen('LIST');
281
+			this.unload();
282
+			this.load();
283
+		},
284
+		load: function() {
285
+            let param = $('#ITP_FORM_COLLMNG03010_SEARCH').serializeObject();
286
+            param.gridSize = $.jgrid.defaults.rowNum;
287
+            param.sbrandId = 'BRD221100002';
288
+            param.sspplyId = 'SPY221100004';
289
+            console.log(JSON.stringify(param));
290
+            var option = {
291
+            	gridId: COLLMNG03010_GRID_ID,
292
+            	colModel: gridColModel.list,
293
+            	param: param,
294
+            	url: DOMAIN + API_RTNMNG_INOUTMNG_SPPLY_PICK_GRID_LIST,
295
+            	pager: COLLMNG03010_GRID_PAGER,
296
+            	multiselect: true,
297
+				multiboxonly : false,
298
+				rownumbers: false,/*
299
+            	onCellSelect: function(rowId, cellIdx, cellValue) {
300
+                    var cm = $(this).jqGrid('getGridParam', 'colModel');
301
+                    var colNm = cm[cellIdx].name;
302
+                    if (colNm === 'pchPodrUnqNo') {
303
+                        const pchPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'pchPodrUnqNo');
304
+                        const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
305
+                        const key = {pchPodrUnqNo: pchPodrUnqNoVal, brandId: brandIdVal};
306
+                        var param = $.param(key);
307
+                        modifyObj.init(param);
308
+                    }
309
+				},*/
310
+				loadComplete: function(data) {
311
+					console.log(data);
312
+                    itp_fn_grid_load_complete(data, COLLMNG03010_GRID_ID, true, 'number', 'COLLMNG03010', listObj.itp_COLLMNG03010_search, listObj.empty, true, data.gridRecords, true);
313
+				},
314
+				onPaging: function(action) {
315
+                    itp_fn_grid_paging(COLLMNG03010_GRID_ID, action, param);
316
+                }
317
+            };
318
+            itp_fn_grid_make_remote(option);
319
+		},
320
+		clearData: function() {
321
+			$(COLLMNG03010_GRID_ID).jqGrid('clearGridData', true);
322
+            $(COLLMNG03010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
323
+            $(COLLMNG03010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
324
+            $(COLLMNG03010_GRID_EMPTY).show();
325
+		},
326
+		unload: function() {
327
+			$.jgrid.gridUnload(COLLMNG03010_GRID_ID);
328
+		}
329
+	},
330
+	action: function() {
331
+		var _this = this;
332
+		// 출하창고 조회 버튼 클릭
333
+		$('#ITP_BTN_COLLMNG03010_SEARCH_WHS_ID').on('click', function() {
334
+			_this.popup();
335
+		});
336
+		// 출하창고 텍스트 삭제 버튼 클릭
337
+		$('#ITP_BTN_COLLMNG03010_DELETE_WHS_ID').on('click', function() {
338
+			$('#ITP_FORM_COLLMNG03010_SEARCH_WHS_NM').val('');
339
+			$('#ITP_FORM_COLLMNG03010_SEARCH_WHS_ID').val('');
340
+		});
341
+	},
342
+	popup: function() {
343
+		var popFn = this.callback.create;
344
+		
345
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'),whsDvsn: ''};
346
+		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
347
+	},
348
+	callback: {
349
+		create: function(rowDataPop) {
350
+			console.log(rowDataPop);
351
+			$('#ITP_FORM_COLLMNG03010_SEARCH_WHS_ID').val(rowDataPop.whsId);
352
+			$('#ITP_FORM_COLLMNG03010_SEARCH_WHS_NM').val(rowDataPop.whsNm);
353
+		}
354
+	}
355
+};

+ 57 - 69
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG01010.js

@@ -27,19 +27,12 @@ let INOUTMNG01010_LAST_ROW_ID;
27 27
 
28 28
 
29 29
 /*API URL*/
30
-let API_DETAIL_GRID_LIST 		= '/api/pomng/inoutmng/target-grid-list';	// 목록
30
+let API_DETAIL_GRID_LIST = '/api/pomng/inoutmng/target-grid-list';	// 목록
31 31
 
32 32
 
33 33
 /*화면 Grid ColModel*/
34 34
 const gridColModel = {
35 35
 	list: [
36
-		{
37
-			index: 'SEL_CHK', name: 'selChk',
38
-			label: ITP_MSG_LOCALE.label.selChk, //브랜드아이디
39
-			width: '13', fixed: false, align: 'center',
40
-			sortable: false, hidden: false,editable: true,
41
-			formatter: 'checkbox', edittype:"checkbox", editoptions :{value:'Y:N', defaultValue:'N'}
42
-		},
43 36
 		{
44 37
 			index: 'BRAND_ID', name: 'brandId',
45 38
 			label: ITP_MSG_LOCALE.label.brandId, //브랜드아이디
@@ -99,29 +92,29 @@ const gridColModel = {
99 92
 			label: ITP_MSG_LOCALE.label.unitAmt, //단가
100 93
 			width: '6', fixed: false, align: 'right',
101 94
 			sortable: false, hidden: false,
102
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
95
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
103 96
 		},
104 97
 		{
105 98
 			index: 'PODR_QTY', name: 'podrQty',
106 99
 			label: ITP_MSG_LOCALE.label.podrQty, //발주수량
107 100
 			width: '10', fixed: false, align: 'right',
108 101
 			sortable: false, hidden: false,
109
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
102
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
110 103
 		},
111 104
 		{
112 105
 			index: 'SHMT_QTY', name: 'shmtQty',
113 106
 			label: ITP_MSG_LOCALE.label.shmtQty, //출고수량
114 107
 			width: '10', fixed: false, align: 'right',
115 108
 			sortable: true, editable: true, edittype: 'text',
116
-			editrules: {required: true, number:true},
117
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
109
+			editrules: { required: true, number: true },
110
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
118 111
 		},
119 112
 		{
120 113
 			index: 'STCK_QTY', name: 'stckQty',
121 114
 			label: ITP_MSG_LOCALE.label.stckQty, //현 재고
122 115
 			width: '10', fixed: false, align: 'right',
123 116
 			sortable: false, hidden: false,
124
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
117
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
125 118
 		},
126 119
 		{
127 120
 			index: 'EXPRY_YN', name: 'expryYn',
@@ -140,15 +133,15 @@ const gridColModel = {
140 133
 			label: ITP_MSG_LOCALE.label.expryDate, //유통일자
141 134
 			width: '20', fixed: false, align: 'center',
142 135
 			sortable: false, hidden: false,
143
-			editable:true, sorttype:"date", 
144
-			editoptions : { dataInit : function(e) { $(e).datepicker( ITP_DATE_LANGUAGE ); } }
136
+			editable: true, sorttype: "date",
137
+			editoptions: { dataInit: function(e) { $(e).datepicker(ITP_DATE_LANGUAGE); } }
145 138
 		},
146 139
 		{
147 140
 			index: 'PODR_AMT', name: 'podrAmt',
148 141
 			label: ITP_MSG_LOCALE.label.podrAmt, //발주금액
149 142
 			width: '10', fixed: false, align: 'right',
150 143
 			sortable: false, hidden: false,
151
-			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
144
+			formatter: 'integer', formatoptions: { defaultValue: '', thousandsSeparator: ',' }
152 145
 		},
153 146
 		{
154 147
 			index: 'DLV_REQ_DT', name: 'dlvReqDt',
@@ -181,7 +174,7 @@ const gridColModel = {
181 174
 
182 175
 /*목록화면 Object*/
183 176
 let listObj = {
184
-	init: function () {
177
+	init: function() {
185 178
 		this.view();
186 179
 		this.action();
187 180
 		this.event.init();
@@ -193,17 +186,17 @@ let listObj = {
193 186
 
194 187
 		// 공통코드 표시
195 188
 		$('select').each(function() {
196
-			if($(this).data('select-code')) {
189
+			if ($(this).data('select-code')) {
197 190
 				fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
198 191
 			}
199 192
 		});
200
-		
193
+
201 194
 		var now = new Date();
202 195
 		$('#ITP_TAB_INOUTMNG01010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
203 196
 		$('#ITP_FORM_INOUTMNG01010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setDate(now.getDate())));
204
-		$('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+30)));
205
-		
206
-		
197
+		$('#ITP_FORM_INOUTMNG01010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate() + 30)));
198
+
199
+
207 200
 	},
208 201
 	itp_INOUTMNG01010_search: false,
209 202
 	button: {
@@ -214,29 +207,22 @@ let listObj = {
214 207
 			param.gridSize = $.jgrid.defaults.rowNum;
215 208
 			param.gridPage = $.jgrid.defaults.page;
216 209
 			param.sbrandId = fn_make_user_info.get('brandId');
217
-			$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
210
+			$(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(param) }).trigger('reloadGrid');
218 211
 		},
219 212
 		shmtout: function() {
220
-			
221
-			
222
-			
223
-			
224
-			
213
+
225 214
 			console.log("search event");
226 215
 			listObj.itp_INOUTMNG01010_search = true;
227 216
 			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
228 217
 			param.gridSize = $.jgrid.defaults.rowNum;
229 218
 			param.gridPage = $.jgrid.defaults.page;
230 219
 			param.sbrandId = fn_make_user_info.get('brandId');
231
-			$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
232
-			
233
-			
234
-			
235
-			
236
-			
220
+			$(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(param) }).trigger('reloadGrid');
221
+
222
+
237 223
 		}
238 224
 	},
239
-	action: function () {
225
+	action: function() {
240 226
 		var _this = this;
241 227
 		// 출하창고 조회 버튼 클릭
242 228
 		$('#ITP_FORM_INOUTMNG01010_SEARCH_SHMT_WHS_NM').on('click', function() {
@@ -248,9 +234,9 @@ let listObj = {
248 234
 			console.log("=================================");
249 235
 			$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val('');
250 236
 			$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val('');
251
-			
237
+
252 238
 		});
253
-		
239
+
254 240
 		// 납품장소 조회 버튼 클릭
255 241
 		$('#ITP_FORM_INOUTMNG01010_SEARCH_WHS_NM').on('click', function() {
256 242
 			console.log("=================================");
@@ -262,55 +248,55 @@ let listObj = {
262 248
 			$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val('');
263 249
 			$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val('');
264 250
 		});
265
-		
251
+
266 252
 	},
267
-	popup: function (arg) {
268
-		var popFn ;
253
+	popup: function(arg) {
254
+		var popFn;
269 255
 		// 팝업
270 256
 		if (arg == "S") {
271 257
 			popFn = this.callback.shmtwhs;
272 258
 		} else {
273 259
 			popFn = this.callback.whs;
274 260
 		}
275
-		
261
+
276 262
 		var whsDvsn = "";
277
-		
263
+
278 264
 		if (arg == "S") {
279 265
 			whsDvsn = "W01";
280 266
 		} else {
281 267
 			whsDvsn = "W02";
282 268
 		}
283
-		
284
-		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn: whsDvsn};
285
-		
286
-		
287
-		 
269
+
270
+		const key = { brandId: fn_make_user_info.get('brandId'), storeId: fn_make_user_info.get('storeId'), whsDvsn: whsDvsn };
271
+
272
+
273
+
288 274
 		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
289
-		
275
+
290 276
 	},
291 277
 	callback: {
292 278
 		shmtwhs: function(rowDataPop) {
293 279
 			console.log(rowDataPop);
294
-			if(rowDataPop) {
280
+			if (rowDataPop) {
295 281
 				$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMT_WHS_NM').val(rowDataPop.whsNm);
296 282
 				$('#ITP_FORM_INOUTMNG01010_SEARCH_SSHMTWHS_ID').val(rowDataPop.whsId);
297 283
 			}
298
-			
284
+
299 285
 		},
300 286
 		whs: function(rowDataPop) {
301 287
 			console.log(rowDataPop);
302
-			if(rowDataPop) {
288
+			if (rowDataPop) {
303 289
 				$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
304 290
 				$('#ITP_FORM_INOUTMNG01010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
305 291
 			}
306
-			
292
+
307 293
 		}
308 294
 	},
309 295
 	event: {
310
-		init: function () {
296
+		init: function() {
311 297
 			this.button();
312 298
 		},
313
-		button: function () {
299
+		button: function() {
314 300
 			// 버튼 클릭 이벤트
315 301
 			$('button').each(function() {
316 302
 				var id = $(this).attr('id');
@@ -318,22 +304,22 @@ let listObj = {
318 304
 					console.log("button");
319 305
 					console.log(id);
320 306
 					switch (id) {
321
-						case 'ITP_BTN_INOUTMNG01010_SRH'					: listObj.button.search();		break;	// 조회 버튼 클릭
322
-						case 'ITP_BTN_INOUTMNG01010_OUT'					: listObj.button.shmtout();	break;	// 출하지시 버튼
323
-						
307
+						case 'ITP_BTN_INOUTMNG01010_SRH': listObj.button.search(); break;	// 조회 버튼 클릭
308
+						case 'ITP_BTN_INOUTMNG01010_OUT': listObj.button.shmtout(); break;	// 출하지시 버튼
309
+
324 310
 					}
325 311
 				});
326 312
 			});
327
-			
313
+
328 314
 			$('body').on('click', function(e) {
329 315
 				var gridId = INOUTMNG01010_GRID_ID.replace('#', '');
330 316
 				var rids = $(INOUTMNG01010_GRID_ID).jqGrid('getDataIDs');
331 317
 				var last_row_id = rids[rids.length - 1];
332
-				
333
-				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'INOUTMNG01010');	
318
+
319
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'INOUTMNG01010');
334 320
 			});
335 321
 
336
-			
322
+
337 323
 		}
338 324
 	},
339 325
 	empty: {
@@ -343,7 +329,7 @@ let listObj = {
343 329
 			$(INOUTMNG01010_GRID_EMPTY).on('click', function() {
344 330
 				_this.back();
345 331
 				_this.itp_INOUTMNG01010_param.gridSize = $.jgrid.defaults.rowNum;
346
-				$(INOUTMNG01010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_INOUTMNG01010_param)}).trigger('reloadGrid');
332
+				$(INOUTMNG01010_GRID_ID).setGridParam({ 'postData': JSON.stringify(_this.itp_INOUTMNG01010_param) }).trigger('reloadGrid');
347 333
 			});
348 334
 		},
349 335
 		itp_INOUTMNG01010_param: {},
@@ -360,13 +346,13 @@ let listObj = {
360 346
 		}
361 347
 	},
362 348
 	grid: {
363
-		init: function () {
349
+		init: function() {
364 350
 			// 데이터 없을때
365 351
 			listObj.empty.push();
366 352
 			itp_fn_jqgrid_resize(INOUTMNG01010_GRID_ID, INOUTMNG01010_GRID_LIST, 'lg');
367 353
 			itp_fn_fire_window_resize();
368 354
 			this.search();
369
-			
355
+
370 356
 		},
371 357
 		colModel: gridColModel.list,
372 358
 		search: function() {
@@ -377,16 +363,18 @@ let listObj = {
377 363
 			let param = $('#ITP_FORM_INOUTMNG01010_SEARCH').serializeObject();
378 364
 			param.gridSize = $.jgrid.defaults.rowNum;
379 365
 			param.sbrandId = fn_make_user_info.get('brandId');
380
-			
366
+
381 367
 			var option = {
382
-				multiselect: false,
368
+				multiselect: true,
383 369
 				autowidth: true,
370
+				//cellEdit: true,
384 371
 				gridId: INOUTMNG01010_GRID_ID,
385 372
 				colModel: gridColModel.list,
373
+				//viewrecords:false,
386 374
 				param: param,
387 375
 				url: DOMAIN + API_DETAIL_GRID_LIST,
388 376
 				pager: INOUTMNG01010_GRID_PAGER,
389
-				
377
+
390 378
 				onCellSelect: function(rowid, cellIdx, cellValue) {
391 379
 					INOUTMNG01010_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, INOUTMNG01010_LAST_ROW_ID, INOUTMNG01010_GRID_ID, ['pchPodrUnqNo']);
392 380
 				},
@@ -401,10 +389,10 @@ let listObj = {
401 389
 		},
402 390
 		button: {
403 391
 		},
404
-		unload : function() {
392
+		unload: function() {
405 393
 			$.jgrid.gridUnload(INOUTMNG01010_GRID_ID);
406 394
 		},
407
-		clearData : function() {
395
+		clearData: function() {
408 396
 			$(INOUTMNG01010_GRID_ID).jqGrid('clearGridData', true);
409 397
 			$(INOUTMNG01010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
410 398
 			$(INOUTMNG01010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);

+ 4 - 4
src/main/webapp/js/app/inoutmng/ITP_INOUTMNG02010.js

@@ -228,7 +228,7 @@ let pageObj = {
228 228
             $('#ITP_FORM_INOUTMNG02010_DETAIL #ITP_FORM_INOUTMNG02010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
229 229
 
230 230
             $('.fnBrandId').text('(자동부여)');
231
-        } */else if(mode == 'MODIFY') { // 수정
231
+        } else if(mode == 'MODIFY') { // 수정
232 232
             $('#ITP_AJAX_INOUTMNG02010_DETAIL_CONTAINER').show();
233 233
             fn_show_btn_auth_array(['#ITP_BTN_INOUTMNG02010_CANCELLIST', '#ITP_BTN_INOUTMNG02010_SAVE']);
234 234
 
@@ -250,7 +250,7 @@ let pageObj = {
250 250
         } else if(mode == 'VIEW') { // 보기
251 251
             $('#ITP_AJAX_INOUTMNG02010_VIEW_CONTAINER').show();
252 252
             fn_show_btn_auth_array(['#ITP_BTN_INOUTMNG02010_MODIFY', '#ITP_BTN_INOUTMNG02010_CANCELLIST']);
253
-        }
253
+        }*/
254 254
     },
255 255
     action: function() {
256 256
     	var _this = this;
@@ -262,14 +262,14 @@ let pageObj = {
262 262
 	popup: function() {		
263 263
 		var selectedIds = $(INOUTMNG02010_GRID_ID).getGridParam('selarrrow');
264 264
 		if(selectedIds.length > 1) { // 1이상 선택시
265
-		   alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;//출력
265
+			alert("납품서 하나만 선택해주세요 (대표 납품서번호)") ;//출력
266 266
 			return; //리턴
267 267
 		}
268 268
 		var selRowData ; //변수선언		
269 269
 		for (var i=selectedIds.length-1; i>=0; i--) {		//1개만 선택시
270 270
 			selRowData = $(INOUTMNG02010_GRID_ID).jqGrid('getRowData', selectedIds[i]);		//cell 선택
271 271
 		}
272
-		const key = {brandId :fn_make_user_info.get('brandId'), dlvSttmtUnqNo : selRowData.dlvSttmtUnqNo};		// popup key 값 설정
272
+		const key = {brandId: fn_make_user_info.get('brandId'), dlvSttmtUnqNo: selRowData.dlvSttmtUnqNo};		// popup key 값 설정
273 273
 		fn_call_popup('biz', 'BIZPOP_DLV_STTMT_PRN', '#ITP_ASIDE', null, key, 'S');
274 274
 	}
275 275
 };

+ 14 - 3
src/main/webapp/js/app/locales/locale-ko.js

@@ -237,7 +237,7 @@ const ITP_MSG_LOCALE = (function() {
237 237
 			"selChk": "대상선택",
238 238
 			"rtnPodrUnqNo": "반품발주번호",
239 239
 			"rtnOdrStCd": "반품발주상태코드",
240
-			"rtnOdrStNm": "품발주상태명",
240
+			"rtnOdrStNm": "품발주상태명",
241 241
 			"rtnOdrRegDt": "반품발주일자",
242 242
 			"colReqDt": "수거요청일",
243 243
 			"rtnWhsNm": "수거장소",
@@ -245,8 +245,19 @@ const ITP_MSG_LOCALE = (function() {
245 245
 			"rtnDodrItemQty": "수거품목수",
246 246
 			"rtnMgrNm": "수거 담당자",
247 247
 			"rtnPodrDtlNo": "반품발주항번",
248
-			"rtnReqQty": "수거수량",
249
-			"rtnAmt": "수거금액"
248
+			"rtnReqQty": "반품수량",
249
+			"rtnAmt": "반품금액",
250
+			"colPickUnqNo": "수거서번호",
251
+			"pickStCd": "수거서상태코드",
252
+			"pickStNm": "수거서상태",
253
+			"colRegDt": "수거일자",
254
+			"colSchDt": "수거예정일",
255
+			"colReqQty": "수거수량",
256
+			"rtnRsnDvsn": "반품사유구문코드",
257
+			"rtnRsnDvsnNm": "반품사유구분",
258
+			"colReqAmt": "수거금액",
259
+			"pickMgrNm": "수거담당자",
260
+			"pickMgrTelNo": "수거담당자연락처"
250 261
 		},
251 262
 		"table": {
252 263
 			"brandId": "브랜드ID",

+ 5 - 4
src/main/webapp/js/app/oper/ITP_OPER01010.js

@@ -53,25 +53,25 @@ const gridColModel = {
53 53
 		{
54 54
 			index: 'AFFL_SHOP_NM', name: 'afflShopNm',
55 55
 			label: ITP_MSG_LOCALE.label.afflShopNm, //가맹점
56
-			width: '10', fixed: false, align: 'center',
56
+			width: '10', fixed: false, align: 'left',
57 57
 			sortable: false, hidden: false
58 58
 		},
59 59
 		{
60 60
 			index: 'BRAND_NM', name: 'brandNm',
61 61
 			label: ITP_MSG_LOCALE.label.brandNm, //브랜드
62
-			width: '13', fixed: false, align: 'center',
62
+			width: '13', fixed: false, align: 'left',
63 63
 			sortable: false, hidden: false
64 64
 		},
65 65
 		{
66 66
 			index: 'USER_ID', name: 'userId',
67 67
 			label: ITP_MSG_LOCALE.label.userId, //사용자ID
68
-			width: '10', fixed: false, align: 'center',
68
+			width: '10', fixed: false, align: 'left',
69 69
 			sortable: false, hidden: false
70 70
 		},
71 71
 		{
72 72
 			index: 'USER_NM', name: 'userNm',
73 73
 			label: ITP_MSG_LOCALE.label.userName, //닉네임
74
-			width: '13', fixed: false, align: 'center',
74
+			width: '13', fixed: false, align: 'left',
75 75
 			sortable: false, hidden: false
76 76
 		},
77 77
 		{
@@ -427,6 +427,7 @@ let listObj = {
427 427
 					}
428 428
 				},
429 429
 				loadComplete: function(data) {
430
+					$("tr.jqgrow:odd").css("background", "#f5f5f5");
430 431
 					console.log(data);
431 432
 					itp_fn_grid_load_complete(data, OPER01010_GRID_ID, true, 'number', 'OPER01010', listObj.itp_OPER01010_search, _this.itp_fn_OPER01010_empty, true, data.gridRecords, true);
432 433
 					var ids = $(OPER01010_GRID_ID).getDataIDs();

+ 237 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_COL_STTMT_PRN.js

@@ -0,0 +1,237 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+
6
+	});
7
+});
8
+
9
+let API_POP_INV_INFO = '/api/pomng/inoutmng/info-inv';
10
+
11
+const THIS_FORM_ID = '#ITP_FORM_BIZPOP_COL_PICK_PRN';
12
+const THIS_GIRD_ID = '#ITP_BIZPOP_COL_PICK_PRN_jqGrid';
13
+const THIS_GIRD_LIST = '#ITP_BIZPOP_COL_PICK_PRN_jqGrid_list';
14
+const THIS_GIRD_PAGER = '#ITP_BIZPOP_COL_PICK_PRN_jqGridPager';
15
+const THIS_GIRD_EMPTY = '#ITP_BIZPOP_COL_PICK_PRN_jqGridEmpty';
16
+
17
+function itp_fn_BIZPOP_COL_PICK_PRN(parentPopFn, args, returnType) {
18
+	
19
+	
20
+	let itp_BIZPOP_COL_PICK_PRN_param = args;
21
+	let itp_BIZPOP_COL_PICK_PRN_search = false;
22
+
23
+	
24
+	$('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_BRAND_ID').val(args.brandId);
25
+	$('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_COL_PICK_UNQ_NO').val(args.dlvSttmtUnqNo);
26
+	
27
+
28
+	$('#ITP_BIZPOP_COL_PICK_PRN').one('shown.bs.modal', function(e) {
29
+		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_COL_PICK_PRN_jqGrid_list', '');
30
+		itp_fn_fire_window_resize();
31
+	}).one('hidden.bs.modal', function(e) {
32
+		$('#ITP_BIZPOP_COL_PICK_PRN').remove();
33
+	}).modal('show');
34
+
35
+
36
+	$('#ITP_BIZPOP_COL_PICK_PRN_BTN_SEARCH').on('click', function() {
37
+		//인쇄부분 여기에 추가함
38
+	});
39
+/*	
40
+	$('#ITP_BIZPOP_PO_REJECT_BTN_CANCEL').on('click', function() {
41
+		let transParm = {pchReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_PO_REJECT_PCH_REQ_UNQ_NO').val(),pchReqRjctRsn: '', retVal:'N', storeId:$('#ITP_FORM_ITP_BIZPOP_PO_REJECT_STORE_ID').val()}
42
+		parentPopFn(transParm);
43
+		$('#ITP_BIZPOP_PO_REJECT').modal('hide'); // 팝업닫기
44
+	});
45
+*/
46
+
47
+	$('#ITP_BIZPOP_COL_PICK_PRN_jqGridEmpty').on('click', function() {
48
+		itp_fn_BIZPOP_COL_PICK_PRN_empty.back();
49
+		//itp_BIZPOP_PO_REJECT_param.gridSize = 10;
50
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_COL_PICK_PRN_param)}).trigger('reloadGrid');
51
+	});
52
+
53
+	var itp_fn_BIZPOP_COL_PICK_PRN_empty = {
54
+		push: function() {
55
+			let param = {brandId: $('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_BRAND_ID').val(), dlvSttmtUnqNo: $('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_COL_PICK_UNQ_NO').val() };
56
+			itp_BIZPOP_COL_PICK_PRN_param = param;
57
+		},
58
+		back: function() {
59
+		}
60
+	};
61
+
62
+	itp_fn_BIZPOP_COL_PICK_PRN_empty.push();
63
+	let param = {brandId: $('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_BRAND_ID').val(), dlvSttmtUnqNo: $('#ITP_FORM_ITP_BIZPOP_COL_PICK_PRN_COL_PICK_UNQ_NO').val() };
64
+	console.log(JSON.stringify(param));
65
+	
66
+	const gridColModel = {
67
+		detail: [
68
+			{
69
+					index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
70
+					label: '발주번호', //
71
+					width: '10', fixed: false, align: 'center',
72
+					sortable: false, hidden: false
73
+				},
74
+				{
75
+					index: 'ITEM_ID', name: 'itemId',
76
+					label: '품목번호', //
77
+					width: '10', fixed: false, align: 'center',
78
+					sortable: false, hidden: false
79
+				},
80
+				{
81
+					index: 'ITEM_NM', name: 'itemNm',
82
+					label: '품목명', //
83
+					width: '10', fixed: false, align: 'center',
84
+					sortable: false, hidden: false
85
+				},
86
+				{
87
+					index: 'PODR_QTY', name: 'podrQty',
88
+					label: '발주수량', //
89
+					width: '5', fixed: false, align: 'center',
90
+					sortable: false, hidden: false
91
+				},
92
+				{
93
+					index: 'COL_QTY', name: 'dlvQty',
94
+					label: '납품서수량', //
95
+					width: '5', fixed: false, align: 'center',
96
+					sortable: false, hidden: false
97
+				},
98
+				{
99
+					index: 'EXPRY_DATE', name: 'expryDate',
100
+					label: '유통기한', //
101
+					width: '10', fixed: false, align: 'center',
102
+					sortable: false, hidden: false
103
+				}
104
+		]
105
+	};
106
+	
107
+	pageObj.call(param);
108
+	pageObj.button();
109
+};
110
+
111
+
112
+let pageObj = {
113
+	init: function() {
114
+		this.button();
115
+	},
116
+	call: function( param) {
117
+		fn_ajax_call(API_POP_INV_INFO, JSON.stringify(param), this.callback, 'POST');
118
+	},
119
+	button: function() {
120
+		$('#ITP_BIZPOP_COL_PICK_PRN_BTN_PRINT').on('click', function (printDiv){
121
+			  var divToPrint=document.getElementById('ITP_BIZPOP_COL_PICK_PRN_PRINT_AREA');
122
+
123
+			  var newWin=window.open('','Print-Window');
124
+
125
+			  newWin.document.open();
126
+
127
+			  newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
128
+
129
+			  newWin.document.close();
130
+
131
+			  setTimeout(function(){newWin.close();},10);
132
+		});
133
+
134
+		
135
+	}, 
136
+	
137
+	callback: function (result) {
138
+		console.log(result);
139
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnColPickUnqNo').text(result.colPickUnqNo);
140
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnColRegDt').text(result.colRegDt);
141
+		
142
+		$('#ITP_BIZPOP_DLV_PICK_PRN .fnPickMgrNm').text(result.pickMgrNm);
143
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnWhsAddr').text(result.whsAddr);
144
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnPndrTelNo').text(result.pndrTelNo);
145
+		
146
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnColBsnsRegno').text(result.colBsnsRegno);
147
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnColNm').text(result.colNm);
148
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnColOwnerNm').text(result.colOwnerNm);
149
+		$('#ITP_BIZPOP_DLV_PICK_PRN .fnColAddr').text(result.colAddr);
150
+		
151
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnRtnBsnsRegno').text(result.rtnBsnsRegno);
152
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnRtnNm').text(result.rtnNm);
153
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnRtnOwnerNm').text(result.rtnOwnerNm);
154
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnRtnAddr').text(result.rtnAddr);
155
+		
156
+		$('#ITP_BIZPOP_COL_PICK_PRN .fnDlvQty').text(result.dlvQty);
157
+		
158
+		// 품목  리스트 조회
159
+		pageObj.grid.init(result.pickDtlInfoList);
160
+	},
161
+	grid: {
162
+		init: function(gridRows) {
163
+			this.gridRows = gridRows;
164
+			this.unload();
165
+			this.load(gridRows);
166
+		},
167
+		gridId: '#ITP_BIZPOP_COL_PICK_PRN_jqGrid',
168
+		gridList: '#ITP_BIZPOP_COL_PICK_PRN_jqGrid_list',
169
+		gridEmpty: '#ITP_BIZPOP_COL_PICK_PRN_jqGridEmpty',
170
+		gridRows: '',
171
+		load : function(gridRows) {
172
+			var _this = this;
173
+			var option = {
174
+				gridId: _this.gridId,
175
+				colModel: [
176
+						{
177
+								index: 'RTN_PODR_UNQ_NO', name: 'rtnPodrUnqNo',
178
+								label: '반품발주번호', //
179
+								width: '10', fixed: false, align: 'center',
180
+								sortable: false, hidden: false
181
+							},
182
+							{
183
+								index: 'ITEM_ID', name: 'itemId',
184
+								label: '품목번호', //
185
+								width: '10', fixed: false, align: 'center',
186
+								sortable: false, hidden: false
187
+							},
188
+							{
189
+								index: 'ITEM_NM', name: 'itemNm',
190
+								label: '품목명', //
191
+								width: '10', fixed: false, align: 'center',
192
+								sortable: false, hidden: false
193
+							},
194
+							{
195
+								index: 'COL_REQ_QTY', name: 'colReqQty',
196
+								label: '수거요청수량', //
197
+								width: '5', fixed: false, align: 'center',
198
+								sortable: false, hidden: false
199
+							},
200
+							{
201
+								index: 'RODR_QTY', name: 'rodrQty',
202
+								label: '수거수량', //
203
+								width: '5', fixed: false, align: 'center',
204
+								sortable: false, hidden: false
205
+							},
206
+							{
207
+								index: 'RTN_RSN_DVSN_NM', name: 'rtnRsnDvsnNm',
208
+								label: '수거사유구분', //
209
+								width: '10', fixed: false, align: 'center',
210
+								sortable: false, hidden: false
211
+							},
212
+							{
213
+								index: 'RTN_RSN', name: 'rtnRsn',
214
+								label: '수거사유', //
215
+								width: '10', fixed: false, align: 'center',
216
+								sortable: false, hidden: false
217
+							}
218
+					],
219
+				data: gridRows,
220
+				multiselect: false,
221
+				loadComplete: function(data) {
222
+					$('#ITP_BIZPOP_COL_PICK_PRN_jqGrid').find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
223
+					data.records === 0 ? _this.clearData() : $('#ITP_BIZPOP_COL_PICK_PRN_jqGridEmpty').hide();
224
+				},
225
+				onCellSelect: function(rowid, cellIdx, cellValue) {
226
+				}
227
+			};
228
+			itp_fn_grid_make_local(option);
229
+		},
230
+		unload : function() {
231
+			$.jgrid.gridUnload(this.gridId);
232
+		}
233
+	}
234
+};
235
+
236
+
237
+

+ 122 - 0
src/main/webapp/js/app/popup/biz/ITP_BIZPOP_RTN_PO_REJECT.js

@@ -0,0 +1,122 @@
1
+require(['config'], function() {
2
+	require([
3
+		'jquery'
4
+	], function($) {
5
+
6
+	});
7
+});
8
+
9
+let API_POP_GRID_LIST = '/api/rtnmng/reject-rtnreq-target'; 
10
+
11
+function itp_fn_BIZPOP_RTN_PO_REJECT(parentPopFn, args, returnType) {
12
+	
13
+	let itp_BIZPOP_RTN_PO_REJECT_param = args;
14
+	let itp_BIZPOP_RTN_PO_REJECT_search = false;
15
+
16
+	const THIS_FORM_ID = '#ITP_FORM_BIZPOP_RTN_PO_REJECT';
17
+	const THIS_GIRD_ID = '#ITP_BIZPOP_RTN_PO_REJECT_jqGrid';
18
+	const THIS_GIRD_PAGER = '#ITP_BIZPOP_RTN_PO_REJECT_jqGridPager';
19
+	console.log(args);
20
+	$('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO').val(args.rtnReqUnqNo);
21
+	$('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_STORE_ID').val(args.storeId);
22
+	
23
+
24
+	$('#ITP_BIZPOP_RTN_PO_REJECT').one('shown.bs.modal', function(e) {
25
+		itp_fn_jqgrid_resize(THIS_GIRD_ID, '#ITP_BIZPOP_RTN_PO_REJECT_jqGrid_list', '');
26
+		itp_fn_fire_window_resize();
27
+	}).one('hidden.bs.modal', function(e) {
28
+		$('#ITP_BIZPOP_RTN_PO_REJECT').remove();
29
+	}).modal('show');
30
+
31
+	$('#ITP_BIZPOP_RTN_PO_REJECT_BTN_SELECT').on('click', function() {
32
+		let transParm = {rtnReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO').val(),rtnRjctRsn: $('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_REJECT_DSN').val(), retVal:'Y', storeId:$('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_STORE_ID').val()}
33
+		parentPopFn(transParm);
34
+		$('#ITP_BIZPOP_RTN_PO_REJECT').modal('hide'); // 팝업닫
35
+	});
36
+	
37
+	$('#ITP_BIZPOP_RTN_PO_REJECT_BTN_CANCEL').on('click', function() {
38
+		let transParm = {rtnReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO').val(),rtnRjctRsn: '', retVal:'N', storeId:$('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_STORE_ID').val()}
39
+		parentPopFn(transParm);
40
+		$('#ITP_BIZPOP_RTN_PO_REJECT').modal('hide'); // 팝업닫기
41
+	});
42
+
43
+	$('#ITP_BIZPOP_RTN_PO_REJECT_jqGridEmpty').on('click', function() {
44
+		itp_fn_BIZPOP_RTN_PO_REJECT_empty.back();
45
+		//itp_BIZPOP_RTN_PO_REJECT_param.gridSize = 10;
46
+		$(THIS_GIRD_ID).setGridParam({'postData': JSON.stringify(itp_BIZPOP_RTN_PO_REJECT_param)}).trigger('reloadGrid');
47
+	});
48
+
49
+	var itp_fn_BIZPOP_RTN_PO_REJECT_empty = {
50
+		push: function() {
51
+			let param = {rtnReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO').val() };
52
+			itp_BIZPOP_RTN_PO_REJECT_param = param;
53
+		},
54
+		back: function() {
55
+		}
56
+	};
57
+
58
+	itp_fn_BIZPOP_RTN_PO_REJECT_empty.push();
59
+	let param = {rtnReqUnqNo: $('#ITP_FORM_ITP_BIZPOP_RTN_PO_REJECT_RTN_REQ_UNQ_NO').val() };
60
+	console.log(JSON.stringify(param));
61
+
62
+	$(THIS_GIRD_ID).jqGrid({
63
+		colModel: [
64
+			{
65
+				index: 'AFFL_SHOP_NM', name: 'itemId',
66
+				label: '품목번호', //
67
+				width: '13', fixed: false, align: 'center',
68
+				sortable: false, hidden: false
69
+			},
70
+			{
71
+				index: 'ITEM_NM', name: 'itemNm',
72
+				label: '품목명', //
73
+				width: '14', fixed: false, align: 'left',
74
+				sortable: false, hidden: false
75
+			},
76
+			{
77
+				index: 'RTN_QTY', name: 'rtnQty',
78
+				label: '반품요청수량', //
79
+				width: '10', fixed: false, align: 'right',
80
+				sortable: false, hidden: false, 
81
+				formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
82
+			},
83
+			{
84
+				index: 'RTN_AMT', name: 'rtnAmt',
85
+				label: '반품요청금액', //
86
+				width: '10', fixed: false, align: 'right',
87
+				sortable: false, hidden: false, 
88
+				formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
89
+			},
90
+			{
91
+				index: 'RTN_REQ_UNQ_NO', name: 'rtnReqUnqNo',
92
+				label: '반품요청번호', //
93
+				width: '5', fixed: false, align: 'center',
94
+				sortable: false, hidden: true
95
+			},
96
+			{
97
+				index: 'RTN_REQ_DTL_NO', name: 'rtnReqDtlNo',
98
+				label: '반품요청순번', //
99
+				width: '5', fixed: false, align: 'center',
100
+				sortable: false, hidden: true
101
+			}
102
+		],
103
+		loadBeforeSend: function(jqXHR) {
104
+		    jqXHR.setRequestHeader('X-AUTH-TOKEN', CONN_KEY);
105
+		},
106
+		postData: JSON.stringify(param),
107
+		url: DOMAIN + API_POP_GRID_LIST,
108
+		pager: THIS_GIRD_PAGER,
109
+		multiselect: false,
110
+		rownumbers: false,
111
+		loadComplete: function(data) {
112
+			console.log(data);
113
+			itp_fn_grid_load_complete(data, THIS_GIRD_ID, true, undefined, 'BIZPOP_RTN_PO_REJECT', itp_BIZPOP_RTN_PO_REJECT_search, itp_fn_BIZPOP_RTN_PO_REJECT_empty, true, data.gridRecords, false);
114
+	    },
115
+	    loadError: function(jqXHR, textStatus, errorThrown) {
116
+	    	itp_fn_grid_load_error(jqXHR, textStatus, errorThrown);
117
+	    },
118
+	    onPaging: function(action) {
119
+	    	itp_fn_grid_paging(THIS_GIRD_ID, action, param);
120
+	    }
121
+	}).navGrid(THIS_GIRD_PAGER, ITP_GRID_NAV_DEFAULTS.navGrid);
122
+};

+ 49 - 10
src/main/webapp/js/app/rtnmng/ITP_RTNMNG01010.js

@@ -84,7 +84,7 @@ const gridColModel = {
84 84
 		{
85 85
 			index: 'RTN_QTY', name: 'rtnQty',
86 86
 			label: '반품수량', //수량
87
-			width: '10', fixed: false, align: 'right',
87
+			width: '10', fixed: false, align: 'center',
88 88
 			sortable: false, editable: true, edittype: 'text',
89 89
 			editrules: { number:true }, 
90 90
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
@@ -92,7 +92,7 @@ const gridColModel = {
92 92
 		{
93 93
 			index: 'RTN_AMT', name: 'rtnAmt',
94 94
 			label: '반품예상금액',
95
-			width: '10', fixed: false, align: 'right',
95
+			width: '10', fixed: false, align: 'center',
96 96
 			sortable: false, editable: false, edittype: 'text', hidden: false, 
97 97
 			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
98 98
 		},		
@@ -115,7 +115,7 @@ const gridColModel = {
115 115
 		{
116 116
 			index: 'RTN_RSN', name: 'rtnRsn',
117 117
 			label: '반품사유', 
118
-			width: '15', fixed: false, align: 'right',
118
+			width: '15', fixed: false, align: 'left',
119 119
 			sortable: false, editable: true, edittype: 'text'
120 120
 		},
121 121
 		{
@@ -332,10 +332,10 @@ let pageObj = {
332 332
 				
333 333
 				var viewCd = jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'viewCd');
334 334
 				var unitAmt = jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'unitAmt');
335
-				var pchReqQty = jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'pchReqQty');
335
+				var rtnQty = jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'rtnQty');
336 336
 				
337
-				if(viewCd != 'D' && unitAmt != null && unitAmt != '' && pchReqQty != null && pchReqQty != '') {		
338
-					jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{pchReqAmt: parseInt(unitAmt)*parseInt(pchReqQty)});
337
+				if(viewCd != 'D' && unitAmt != null && unitAmt != '' && rtnQty != null && rtnQty != '') {		
338
+					jQuery(RTNMNG01010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{rtnAmt: parseInt(unitAmt)*parseInt(rtnQty)});
339 339
 				}
340 340
 			});
341 341
 			
@@ -388,9 +388,48 @@ let createObj = {
388 388
 				// 품목대상 정보 확인 필요
389 389
 				var records = $(RTNMNG01010_DETAIL_GRID_ID).getGridParam('reccount');
390 390
 				if (records == 0) {
391
-					alert( "요청할 품목내역이 없습니다.");
391
+					itp_fn_modal_alert( "요청할 품목내역이 없습니다.");
392 392
 					return ;
393
-				}				
393
+				}		
394
+				
395
+				const rowData = $(RTNMNG01010_DETAIL_GRID_ID).getRowData();
396
+				
397
+				var rtnQtyCheck = true;
398
+				var rtnDvsnCheck = true;
399
+				var rtnRsnDvsnCheck = true;
400
+				var rtnRsnCheck = true;
401
+				
402
+				$.each(rowData, function(key, value) {					
403
+					if(value.rtnQty == '') {
404
+						rtnQtyCheck = false;
405
+					}
406
+					if(value.rtnDvsn == '') {
407
+						rtnDvsnCheck = false;
408
+					}
409
+					if(value.rtnRsnDvsn == '') {
410
+						rtnRsnDvsnCheck = false;
411
+					}
412
+					if(value.rtnRsn == '') {
413
+						rtnRsnCheck = false;
414
+					}
415
+				});
416
+				
417
+				if(rtnQtyCheck == false) {
418
+					itp_fn_modal_alert( "반품수량을 입력하세요.");
419
+					return;
420
+				}		
421
+				if(rtnDvsnCheck == false) {
422
+					itp_fn_modal_alert( "반품구분을 입력하세요.");
423
+					return;
424
+				}
425
+				if(rtnRsnDvsnCheck == false) {
426
+					itp_fn_modal_alert( "사유구분을 입력하세요.");
427
+					return;
428
+				}
429
+				if(rtnRsnCheck == false) {
430
+					itp_fn_modal_alert( "반품사유를 입력하세요.");
431
+					return;
432
+				}
394 433
 				
395 434
 				var saveReq = {
396 435
 				callBack: function(args) {
@@ -425,8 +464,8 @@ let createObj = {
425 464
 						fn_ajax_call(API_DETAIL_SAVE, JSON.stringify(param), searhFn, 'POST');				
426 465
 					}
427 466
 				};
428
-				if (arg == 'PR20') {
429
-					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.reqSave, saveReq, null);
467
+				if (arg == 'RR20') {
468
+					itp_fn_modal_confirm('반품 요청하시겠습니까?', saveReq, null);
430 469
 				} else {
431 470
 					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.tmpSave, saveReq, null);
432 471
 				}

+ 843 - 0
src/main/webapp/js/app/rtnmng/ITP_RTNMNG02010.js

@@ -0,0 +1,843 @@
1
+require(['config'], function() {
2
+	require([
3
+	], function($) {
4
+		pageObj.init();
5
+	});
6
+});
7
+
8
+/********************************************************
9
+ --------------------------------------------------------
10
+ - Object 목록								            -
11
+ --------------------------------------------------------
12
+ * const gridColModel = {}	: 화면 Grid Object			*
13
+ * let pageObj = {}			: 화면공통 Object			*
14
+ * let listObj = {}			: 목록화면 Object			*
15
+ * let viewObj = {}			: 상세화면 Object			*
16
+ * let modifyObj = {}		: 수정화면 Object			*
17
+ * let createObj = {}		: 신규화면 Object			*
18
+ * let sfflyObj = {}		: 공급업체담당자 Object		*
19
+ *******************************************************/
20
+
21
+/*화면 변수*/
22
+const RTNMNG02010_GRID_ID = '#ITP_RTNMNG02010_jqGrid';
23
+const RTNMNG02010_GRID_LIST = '#ITP_RTNMNG02010_jqGrid_list';
24
+const RTNMNG02010_GRID_PAGER = '#ITP_RTNMNG02010_jqGridPager';
25
+const RTNMNG02010_GRID_EMPTY = '#ITP_RTNMNG02010_jqGridEmpty';
26
+
27
+const RTNMNG02010_VIEW_GRID_ID = '#ITP_RTNMNG02010_VIEW_jqGrid';
28
+const RTNMNG02010_VIEW_GRID_LIST = '#ITP_RTNMNG02010_VIEW_jqGrid_list';
29
+const RTNMNG02010_VIEW_GRID_PAGER = '#ITP_RTNMNG02010_VIEW_jqGridPager';
30
+const RTNMNG02010_VIEW_GRID_EMPTY = '#ITP_RTNMNG02010_VIEW_jqGridEmpty';
31
+
32
+const RTNMNG02010_DETAIL_GRID_ID = '#ITP_RTNMNG02010_DETAIL_jqGrid';
33
+const RTNMNG02010_DETAIL_GRID_LIST = '#ITP_RTNMNG02010_DETAIL_jqGrid_list';
34
+const RTNMNG02010_DETAIL_GRID_PAGER = '#ITP_RTNMNG02010_DETAIL_jqGridPager';
35
+const RTNMNG02010_DETAIL_GRID_EMPTY = '#ITP_RTNMNG02010_DETAIL_jqGridEmpty';
36
+
37
+//let ITP_FORM_RTNMNG02010_DETAIL_IS_DUPLICATE = false;
38
+let ITP_FORM_RTNMNG02010_DETAIL_IS_WRITING = false;
39
+
40
+let RTNMNG02010_GRID_LAST_ROW_ID;
41
+let SCREEN_MODE;
42
+
43
+/* 공통코드 리스트 */
44
+let ITP_COMMON_CD_RTN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_DVSN', false);
45
+let ITP_COMMON_CD_RTN_RSN_DVSN = fn_make_common_cd_list(CODE_LIST, 'RTN_RSN_DVSN', false);
46
+
47
+/*API URL*/
48
+let API_DETAIL_GRID_LIST 	= '/api/rtnmng/detail-grid-list';	// 목록
49
+let API_DETAIL_INFO 		= '/api/rtnmng/info-rtnReq';		// 상세
50
+let API_DETAIL_SAVE 		= '/api/rtnmng/save-rtnReq';		// 저장
51
+
52
+/*화면 Grid ColModel*/
53
+const gridColModel = {
54
+	list: [
55
+		{
56
+			index: 'BRAND_ID', name: 'brandId',
57
+			label: ITP_MSG_LOCALE.label.brandId, //브랜드ID
58
+			width: '10', fixed: false, align: 'center',
59
+			sortable: false, hidden: true
60
+		},
61
+		{
62
+			index: 'BRAND_NM', name: 'brandNm',
63
+			label: ITP_MSG_LOCALE.label.brandNm, //브랜드명
64
+			width: '10', fixed: false, align: 'center',
65
+			sortable: false, hidden: false
66
+		},
67
+		{
68
+			index: 'STORE_ID', name: 'storeId',
69
+			label: ITP_MSG_LOCALE.label.storeId, //매장아이디
70
+			width: '13', fixed: false, align: 'center',
71
+			sortable: false, hidden: true
72
+		},
73
+		{
74
+			index: 'RTN_REQ_UNQ_NO', name: 'rtnReqUnqNo',
75
+			label: '반품요청번호', 
76
+			width: '10', fixed: false, align: 'center',
77
+			sortable: false, hidden: false
78
+		},
79
+		{
80
+			index: 'RTN_REQ_ST_CD', name: 'rtnReqStCd',
81
+			label: '상태', 
82
+			width: '0', fixed: false, align: 'center',
83
+			sortable: false, hidden: true
84
+		},
85
+		{
86
+			index: 'RTN_REQ_ST_NM', name: 'rtnReqStNm',
87
+			label: '상태', 
88
+			width: '6', fixed: false, align: 'center',
89
+			sortable: false, hidden: false
90
+		},
91
+		{
92
+			index: 'rtn_Whs_Nm', name: 'rtnWhsNm',
93
+			label: '반품장소', 
94
+			width: '10', fixed: false, align: 'left',
95
+			sortable: false, hidden: false
96
+		}, 
97
+		{
98
+			index: 'RTN_REQ_DT', name: 'rtnReqDt',
99
+			label: '반품요청일', 
100
+			width: '10', fixed: false, align: 'center',
101
+			sortable: false, hidden: false
102
+		},
103
+		{
104
+			index: 'RTN_REQ_AMT', name: 'rtnReqAmt',
105
+			label: '반품요청금액', 
106
+			width: '10', fixed: false, align: 'right',
107
+			sortable: false, hidden: false, 
108
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
109
+		},
110
+		{
111
+			index: 'RTN_REQ_ITEM_QTY', name: 'rtnReqItemQty',
112
+			label: '요청품목수', 
113
+			width: '10', fixed: false, align: 'right',
114
+			sortable: false, hidden: false, 
115
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
116
+		},
117
+		{
118
+			index: 'COL_REQ_DT', name: 'colReqDt',
119
+			label: '수거요청일자', 
120
+			width: '10', fixed: false, align: 'center',
121
+			sortable: false, hidden: false
122
+		},
123
+		{
124
+			index: 'RTN_REQ_MGR_NM', name: 'rtnReqMgrNm',
125
+			label: '반품요청자',
126
+			width: '10', fixed: false, align: 'center',
127
+			sortable: false, hidden: false
128
+		},
129
+		{
130
+			index: 'RTN_RJCT_DT', name: 'rtnRjctDt',
131
+			label: '반려일자',
132
+			width: '10', fixed: false, align: 'center',
133
+			sortable: false, hidden: false
134
+		},
135
+		{
136
+			index: 'RTN_RJCT_NM', name: 'rtnRjctNm',
137
+			label: '반려담당자',
138
+			width: '10', fixed: false, align: 'center',
139
+			sortable: false, hidden: false
140
+		}		
141
+	],
142
+	detail: [
143
+		{
144
+			index: 'VIEW_CD', name: 'viewCd',
145
+			label: ITP_MSG_LOCALE.label.viewCd,
146
+			width: '10', fixed: false, align: 'center',
147
+			sortable: false, hidden: true
148
+		},
149
+		{
150
+			index: 'RTN_REQ_UNQ_NO', name: 'rtnReqUnqNo',
151
+			label: '반품요청고유번호', 
152
+			width: '10', fixed: false, align: 'center',
153
+			sortable: false, hidden: true
154
+		},
155
+		{
156
+			index: 'RTN_REQ_DTL_NO', name: 'rtnReqDtlNo',
157
+			label: '반품요청상세번호', 
158
+			width: '10', fixed: false, align: 'center',
159
+			sortable: false, hidden: true
160
+		},
161
+		{
162
+			index: 'ITEM_ID', name: 'itemId',
163
+			label: ITP_MSG_LOCALE.label.itemId,
164
+			width: '15', fixed: false, align: 'center',
165
+			sortable: false, editable: false, edittype: 'text',
166
+			editrules: { required: true }
167
+		},
168
+		{
169
+			index: 'ITEM_NM', name: 'itemNm',
170
+			label: ITP_MSG_LOCALE.label.itemNm,
171
+			width: '25', fixed: false, align: 'center',
172
+			sortable: true, editable: false, edittype: 'text',
173
+			editrules: { required: true }
174
+		},
175
+		{
176
+			index: 'UNIT', name: 'unit',
177
+			label: ITP_MSG_LOCALE.label.unit,
178
+			width: '10', fixed: false, align: 'center',
179
+			sortable: false, editable: false, edittype: 'text'
180
+		},
181
+		{
182
+			index: 'UNIT_AMT', name: 'unitAmt',
183
+			label: ITP_MSG_LOCALE.label.unitAmt,
184
+			width: '10', fixed: false, align: 'center',
185
+			sortable: false, editable: false, edittype: 'text', hidden: false,
186
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
187
+		},		
188
+		{
189
+			index: 'RTN_QTY', name: 'rtnQty',
190
+			label: '반품수량', 
191
+			width: '10', fixed: false, align: 'right',
192
+			sortable: true, editable: true, edittype: 'text',
193
+			editrules: {required: true, number:true},
194
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
195
+		},
196
+		{
197
+			index: 'RTN_AMT', name: 'rtnAmt',
198
+			label: '반품예상금액', 
199
+			width: '10', fixed: false, align: 'right',
200
+			sortable: false, editable: false, edittype: 'text', hidden: false,
201
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
202
+		},
203
+		{
204
+			index: 'RTN_REQ_DTL_STNM', name: 'rtnReqDtlStNm',
205
+			label: '반품상세상태',
206
+			width: '10', fixed: false, align: 'center',
207
+			sortable: false, editable: false, edittype: 'text', hidden: false
208
+		},
209
+		{
210
+			index: 'rtnReqDtlStCd', name: 'rtnReqDtlStCd',
211
+			label: '반품상세상태코드',
212
+			width: '10', fixed: false, align: 'right',
213
+			sortable: false, editable: false, edittype: 'text', hidden: true
214
+		},
215
+		{
216
+			index: 'RTN_DVSN', name: 'rtnDvsn',
217
+			label: '반품구분',
218
+			width: '10', fixed: false, align: 'center',
219
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
220
+			editoptions: {value: ITP_COMMON_CD_RTN_DVSN},
221
+			editrules: {required: true}
222
+		},
223
+		{
224
+			index: 'RTN_RSN_DVSN', name: 'rtnRsnDvsn',
225
+			label: '사유구분',
226
+			width: '10', fixed: false, align: 'center',
227
+			sortable: false, editable: true, formatter: 'select', edittype: 'select',
228
+			editoptions: {value: ITP_COMMON_CD_RTN_RSN_DVSN},
229
+			editrules: {required: true}
230
+		},
231
+		{
232
+			index: 'RTN_RSN', name: 'rtnRsn',
233
+			label: '반품사유', 
234
+			width: '15', fixed: false, align: 'left',
235
+			sortable: false, editable: true, edittype: 'text'
236
+		},
237
+		{
238
+			index: 'BRAND_UNIT_UNQ_NO', name: 'brandUnitUnqNo',
239
+			label: ITP_MSG_LOCALE.label.brandUnitUnqNo,
240
+			width: '10', fixed: false, align: 'center',
241
+			sortable: false, editable: false, edittype: 'text', hidden: true
242
+		},
243
+		{
244
+			index: 'STORE_UNIT_UNQ_NO', name: 'storeUnitUnqNo',
245
+			label: ITP_MSG_LOCALE.label.storeUnitUnqNo,
246
+			width: '10', fixed: false, align: 'center',
247
+			sortable: false, editable: false, edittype: 'text', hidden: true
248
+		},
249
+		{
250
+			index: 'UNIT_GUBUN', name: 'unitGubun',
251
+			label: ITP_MSG_LOCALE.label.unitGubun,
252
+			width: '10', fixed: false, align: 'center',
253
+			sortable: false, editable: false, edittype: 'text', hidden: true
254
+		}
255
+	]
256
+};
257
+
258
+/*화면공통 Object*/
259
+let pageObj = {
260
+	init: function () {
261
+		this.ui.init();
262
+		this.event.init();
263
+		this.action();
264
+	},
265
+	itp_RTNMNG02010_param: {},
266
+	itp_RTNMNG02010_search: false,
267
+	ui: {
268
+		init: function () {
269
+			this.view();
270
+			this.grid();
271
+			this.ready();
272
+		},
273
+		view: function() {
274
+			// 버튼 권한설정
275
+			fn_proc_btn_auth('RTNMNG02010');
276
+
277
+			// 공통코드 표시
278
+			$('select').each(function() {
279
+				if($(this).data('select-code')) {
280
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
281
+				}
282
+			});
283
+			
284
+			// 브랜드/매장
285
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SBRAND_ID').val(fn_make_user_info.get('brandId'));
286
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SSTORE_ID').val(fn_make_user_info.get('storeId'));
287
+			
288
+			var now = new Date();
289
+			$('#ITP_TAB_RTNMNG02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
290
+			$('#ITP_FORM_RTNMNG02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setDate(now.getDate()-30)));
291
+			$('#ITP_FORM_RTNMNG02010_SEARCH_TO_DT').datepicker('setDate', new Date(now.setDate(now.getDate()+30)));			
292
+			
293
+		},
294
+		grid: function() {
295
+			itp_fn_jqgrid_resize(RTNMNG02010_GRID_ID, RTNMNG02010_GRID_LIST, 'lg');
296
+			listObj.empty.init();
297
+			itp_fn_fire_window_resize();
298
+		},
299
+		ready: function() {
300
+			listObj.init();
301
+		}
302
+	},
303
+	action: function () {
304
+		var _this = this;
305
+		// 납품장소 조회 버튼 클릭
306
+		$('#ITP_FORM_RTNMNG02010_SSEARCH_SWHS_NM').on('click', function() {
307
+			_this.popup('S');
308
+		});
309
+		// 납품장소 텍스트 삭제 버튼 클릭
310
+		$('#ITP_FORM_RTNMNG02010_SDELETE_SWHS_NM').on('click', function() {
311
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SWHS_NM').val('');
312
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SWHS_ID').val('');			
313
+		});
314
+		
315
+		// 수정 화면에서의 납품장소 조회 버튼 클릭
316
+		$('#ITP_FORM_RTNMNG02010_SEARCH_WHS_NM').on('click', function() {
317
+			_this.popup('U');
318
+		});
319
+		
320
+		// 납품장소 텍스트 삭제 버튼 클릭
321
+		$('#ITP_FORM_RTNMNG02010_DELETE_WHS_NM').on('click', function() {
322
+			$('#ITP_FORM_RTNMNG02010_DETAIL_WHS_NM').val('');
323
+			$('#ITP_FORM_RTNMNG02010_DETAIL_WHS_ID').val('');
324
+			$('#ITP_FORM_RTNMNG02010_DETAIL_LOCATION_NM').val('');
325
+			$('#ITP_FORM_RTNMNG02010_DETAIL_LOCATION').val('');			
326
+		});
327
+		
328
+	},
329
+	popup: function (arg) {
330
+		var popFn ;
331
+		// 팝업
332
+		if (arg == "S") {
333
+			popFn = this.callback.create;
334
+		} else {
335
+			popFn = this.callback.modify;
336
+		}
337
+		
338
+		var whsDvsn = "";
339
+		if (fn_make_user_info.get('storeId') == '' ) {
340
+			whsDvsn = "W01";
341
+		} else {
342
+			whsDvsn = "W02";
343
+		}
344
+		
345
+		const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn: whsDvsn};
346
+		fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key, 'S');
347
+		
348
+	},
349
+	callback: {
350
+		create: function(rowDataPop) {
351
+			console.log(rowDataPop);
352
+			if(rowDataPop) {
353
+				$('#ITP_FORM_RTNMNG02010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
354
+				$('#ITP_FORM_RTNMNG02010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
355
+			}			
356
+		},
357
+		modify: function(rowDataPop) {
358
+			console.log(rowDataPop);
359
+			if(rowDataPop) {
360
+				$('#ITP_FORM_RTNMNG02010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
361
+				$('#ITP_FORM_RTNMNG02010_DETAIL_WHS_ID').val(rowDataPop.whsId);
362
+				$('#ITP_FORM_RTNMNG02010_DETAIL_LOCATION_NM').val(rowDataPop.locationNm);
363
+				$('#ITP_FORM_RTNMNG02010_DETAIL_LOCATION').val(rowDataPop.location);
364
+			}
365
+			
366
+		}
367
+	},
368
+	event: {
369
+		init: function () {
370
+			this.button();
371
+		},
372
+		button: function () {
373
+			// 버튼 클릭 이벤트
374
+			$('button').each(function() {
375
+				var id = $(this).attr('id');
376
+				$(this).on('click', function() {
377
+					switch (id) {
378
+						case 'ITP_BTN_RTNMNG02010_SRH'					: listObj.button.search();		break;	// 조회 버튼 클릭
379
+						//case 'ITP_BTN_RTNMNG02010_NEWREG'				: listObj.button.create(); 		break;	// 신규등록 버튼
380
+						case 'ITP_BTN_RTNMNG02010_MODIFY'				: modifyObj.button.modify();	break;	// 수정 버튼
381
+						case 'ITP_BTN_RTNMNG02010_CANCELLIST'			: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
382
+						case 'ITP_BTN_RTNMNG02010_REQ'					: modifyObj.button.save("RR20"); break;	// 구매요청
383
+						case 'ITP_BTN_RTNMNG02010_SAVE'					: modifyObj.button.save("RR00"); break;	// 임시저장
384
+						case 'ITP_BTN_RTNMNG02010_DETAIL_ADDROW'			: pageObj.grid.button.addRow(); break;	// 품목추가
385
+						case 'ITP_BTN_RTNMNG02010_DETAIL_DELROW'			: pageObj.grid.button.delRow(); break;	// 품목삭제
386
+					}
387
+				});
388
+			});
389
+			
390
+			$('body').on('click', function(e) {
391
+				var gridId = RTNMNG02010_DETAIL_GRID_ID.replace('#', '');
392
+				var rids = $(RTNMNG02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
393
+				var last_row_id = rids[rids.length - 1];
394
+				
395
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'RTNMNG02010_DETAIL');	
396
+				
397
+				pageObj.grid.recal();
398
+			});
399
+		}
400
+	},
401
+	switchScreen: function(mode) {
402
+		$('.itp_det_head').find('button[id^="ITP_BTN_RTNMNG02010_"]').each(function(i) {
403
+			$(this).hide();
404
+		});
405
+		$('#ITP_TAB_RTNMNG02010').find('div[id$="_CONTAINER"]').each(function(i) {
406
+			$(this).hide();
407
+		});
408
+		if(mode == 'LIST') { // 목록
409
+			fn_show_btn_auth_array(['#ITP_BTN_RTNMNG02010_SRH']);
410
+			$('#ITP_AJAX_RTNMNG02010_LIST_CONTAINER').show();
411
+			$('#ITP_FORM_RTNMNG02010_DETAIL_SBRAND_ID').val(fn_make_user_info.get('brandId'));
412
+			$('#ITP_FORM_RTNMNG02010_DETAIL_SSTORE_ID').val(fn_make_user_info.get('storeId'));
413
+			SCREEN_MODE = 'LIST' ;
414
+		} else if(mode == 'ADD') { // 등록
415
+			fn_show_btn_auth_array(['#ITP_BTN_RTNMNG02010_CANCELLIST', '#ITP_BTN_RTNMNG02010_SAVE']);
416
+			$('#ITP_AJAX_RTNMNG02010_DETAIL_CONTAINER').show();
417
+
418
+			$('#ITP_FORM_RTNMNG02010_DETAIL').find('input, textarea, select, checkbox').each(function(i, elem) {
419
+				$(this).attr('id') === 'ITP_FORM_RTNMNG02010_DETAIL_VIEW_CD' ? $(this).val('C') : $(this).val('');
420
+				if(elem.type === 'select') {
421
+					$(this).val('').prop('selected', true);
422
+				}
423
+			});
424
+			SCREEN_MODE = 'DETAIL' ;
425
+			
426
+		} else if(mode == 'MODIFY') { // 수정
427
+			fn_show_btn_auth_array(['#ITP_BTN_RTNMNG02010_CANCELLIST', '#ITP_BTN_RTNMNG02010_SAVE', '#ITP_BTN_RTNMNG02010_REQ']);
428
+			
429
+			$('#ITP_AJAX_RTNMNG02010_DETAIL_CONTAINER').show();
430
+			$('#ITP_FORM_RTNMNG02010_DETAIL .itp_form_info').show();
431
+			$('#ITP_FORM_RTNMNG02010_DETAIL .itp_form_change').hide();
432
+			SCREEN_MODE = 'DETAIL' ;
433
+		} else if(mode == 'VIEW') { // 보기
434
+			fn_show_btn_auth_array(['#ITP_BTN_RTNMNG02010_MODIFY', '#ITP_BTN_RTNMNG02010_CANCELLIST']);
435
+			$('#ITP_AJAX_RTNMNG02010_VIEW_CONTAINER').show();
436
+			SCREEN_MODE = 'VIEW' ;
437
+		}
438
+	},
439
+	grid: {
440
+		init: function(mode, gridRows) {
441
+			console.log(mode);
442
+			this.gridId = (mode === 'VIEW') ? RTNMNG02010_VIEW_GRID_ID : RTNMNG02010_DETAIL_GRID_ID;
443
+			this.gridList = (mode === 'VIEW') ? RTNMNG02010_VIEW_GRID_LIST : RTNMNG02010_DETAIL_GRID_LIST;
444
+			this.gridEmpty = (mode === 'VIEW') ? RTNMNG02010_VIEW_GRID_EMPTY : RTNMNG02010_DETAIL_GRID_EMPTY;
445
+			this.gridRows = gridRows;
446
+			this.unload();
447
+			this.load(mode, gridRows);
448
+		},
449
+		
450
+		gridId: '',
451
+		gridList: '',
452
+		gridEmpty: '',
453
+		gridRows: '',
454
+		button: {
455
+			addRow: function() {
456
+				// 팝업
457
+				var popFn = function(rowDataPop) {
458
+					console.log(rowDataPop);
459
+					// 기존등록 데이터
460
+					var exists = '';
461
+					const rowData = $(RTNMNG02010_DETAIL_GRID_ID).getRowData();
462
+					$.each(rowData, function(key, value) {
463
+						if (value.viewCd != "D") {
464
+							exists = exists + value.brandUnitUnqNo + ';';	
465
+						}
466
+					});
467
+
468
+					$.each(rowDataPop, function(key, value) {
469
+						if (exists.indexOf(value.brandUnitUnqNo) < 0 && value.podrPssblDvsn == 'PO01') {
470
+							value['viewCd'] = "C";
471
+							$(RTNMNG02010_DETAIL_GRID_ID).jqGrid('addRowData', value.brandUnitUnqNo, value, 'last');
472
+						}
473
+					});
474
+					$(RTNMNG02010_DETAIL_GRID_EMPTY).hide();
475
+				};
476
+				const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
477
+				fn_call_popup('biz', 'BIZPOP_ITEM', '#ITP_ASIDE', popFn, key, 'S');  // ==>dwkim 추후 작업 진행  파라메타 설명필요
478
+			},
479
+			delRow: function() {
480
+				itp_fn_grid_del_row(RTNMNG02010_DETAIL_GRID_ID);
481
+				pageObj.grid.recal();
482
+			}
483
+		},
484
+		load: function(mode, gridRows) {
485
+			var _this = this;
486
+			var option = {
487
+				gridId: _this.gridId,
488
+				colModel: gridColModel.detail,
489
+				data: gridRows,
490
+				multiselect: true,
491
+				loadComplete: function(data) {
492
+					$(_this.mode === 'VIEW' ? RTNMNG02010_VIEW_GRID_LIST : RTNMNG02010_DETAIL_GRID_LIST).find('.ui-jqgrid .ui-jqgrid-bdiv').css('overflow-x', 'hidden');
493
+					data.records === 0 ? _this.clearData() : $(_this.mode === 'VIEW' ? RTNMNG02010_VIEW_GRID_EMPTY : RTNMNG02010_DETAIL_GRID_EMPTY).hide();
494
+				},
495
+				onCellSelect: function(rowid, cellIdx, cellValue) {
496
+					if(mode !== 'VIEW') {
497
+						RTNMNG02010_GRID_LAST_ROW_ID = itp_fn_set_data_editable(rowid, cellIdx, RTNMNG02010_GRID_LAST_ROW_ID, RTNMNG02010_DETAIL_GRID_ID, ['rtnReqUnqNo']);
498
+					}
499
+				}
500
+			};
501
+			itp_fn_grid_make_local(option);
502
+		},
503
+		recal: function() {
504
+			// console.log("recal call");
505
+			if (SCREEN_MODE === 'DETAIL') {
506
+				var ids = $(RTNMNG02010_DETAIL_GRID_ID).getDataIDs();
507
+				$.each(ids, function(idx, rowId) {
508
+					// console.log("recal start");
509
+					var viewCd = jQuery(RTNMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'viewCd');
510
+					var unitAmt = jQuery(RTNMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'unitAmt');
511
+					var rtnQty = jQuery(RTNMNG02010_DETAIL_GRID_ID).jqGrid('getCell', rowId, 'rtnQty');
512
+					
513
+					if(viewCd != 'D' && unitAmt != null && unitAmt != '' && rtnQty != null && rtnQty != '') {		
514
+						jQuery(RTNMNG02010_DETAIL_GRID_ID).jqGrid('setRowData',rowId,{rtnAmt: parseInt(unitAmt)*parseInt(rtnQty)});
515
+					}
516
+				});
517
+			}
518
+			
519
+		},
520
+		clearData : function() {
521
+			$(this.gridId).jqGrid('clearGridData', true);
522
+			$(this.mode === 'VIEW' ? RTNMNG02010_VIEW_GRID_LIST : RTNMNG02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
523
+			$(this.mode === 'VIEW' ? RTNMNG02010_VIEW_GRID_EMPTY : RTNMNG02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
524
+			$(this.mode === 'VIEW' ? RTNMNG02010_VIEW_GRID_EMPTY : RTNMNG02010_DETAIL_GRID_EMPTY).show();
525
+		},
526
+		unload : function() {
527
+			$.jgrid.gridUnload(this.gridId);
528
+		}
529
+		
530
+	}
531
+	
532
+};
533
+
534
+/*목록화면 Object*/
535
+let listObj = {
536
+	init: function () {
537
+		this.grid.init();
538
+	},
539
+	itp_RTNMNG02010_search: false,
540
+	button: {
541
+		search: function() {
542
+			listObj.itp_RTNMNG02010_search = true;
543
+			let param = $('#ITP_FORM_RTNMNG02010_SEARCH').serializeObject();
544
+			param.gridSize = $.jgrid.defaults.rowNum;
545
+			param.gridPage = $.jgrid.defaults.page;
546
+			console.log(param);
547
+			$(RTNMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
548
+		},
549
+		create: function() {
550
+			if(!fn_make_user_info.isEmpty()) {
551
+				//createObj.init();
552
+			}
553
+		}
554
+	},
555
+	empty: {
556
+		init: function() {
557
+			var _this = this;
558
+			this.push();
559
+			$(RTNMNG02010_GRID_EMPTY).on('click', function() {
560
+				_this.back();
561
+				_this.itp_RTNMNG02010_param.gridSize = $.jgrid.defaults.rowNum;
562
+				$(RTNMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_RTNMNG02010_param)}).trigger('reloadGrid');
563
+			});
564
+		},
565
+		itp_RTNMNG02010_param: {},
566
+		push: function() {
567
+			let param = $('#ITP_FORM_RTNMNG02010_SEARCH').serializeObject();
568
+			listObj.itp_RTNMNG02010_param = param;
569
+		},
570
+		back: function() {
571
+			$('#ITP_FORM_RTNMNG02010_SEARCH_FROM_DT').val(this.itp_RTNMNG02010_param.fromDt);
572
+			$('#ITP_FORM_RTNMNG02010_SEARCH_TO_DT').val(this.itp_RTNMNG02010_param.toDt);
573
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SWHS_ID').val(this.itp_RTNMNG02010_param.swhsId);
574
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SPCH_REQ_ST_CD').val(this.itp_RTNMNG02010_param.spchReqStCd);
575
+			$('#ITP_FORM_RTNMNG02010_SEARCH_SITEM_NM').val(this.itp_RTNMNG02010_param.sitemNm);
576
+		}
577
+	},
578
+	grid: {
579
+		init: function () {
580
+			// 데이터 없을때
581
+			listObj.empty.push();
582
+			itp_fn_jqgrid_resize(RTNMNG02010_GRID_ID, RTNMNG02010_GRID_LIST, 'lg');
583
+			itp_fn_fire_window_resize();
584
+			//this.reload();
585
+			this.search();
586
+		},
587
+		colModel: gridColModel.list,
588
+		search: function() {
589
+			pageObj.switchScreen('LIST');
590
+			this.unload();
591
+			this.load();
592
+		},
593
+		load: function() {
594
+			let param = $('#ITP_FORM_RTNMNG02010_SEARCH').serializeObject();
595
+			param.gridSize = $.jgrid.defaults.rowNum;
596
+			param.sbrandId = fn_make_user_info.get('brandId');
597
+			param.sstoreId = fn_make_user_info.get('storeId');
598
+
599
+			var option = {
600
+				gridId: RTNMNG02010_GRID_ID,
601
+				colModel: gridColModel.list,
602
+				//autowidth: true,
603
+				//shrinkToFit:false, 
604
+				param: param,
605
+				url: DOMAIN + API_DETAIL_GRID_LIST,
606
+				pager: RTNMNG02010_GRID_PAGER,
607
+				onCellSelect: function(rowId, cellIdx, cellValue) {
608
+					var cm = $(this).jqGrid('getGridParam', 'colModel');
609
+					var colNm = cm[cellIdx].name;
610
+					if (colNm == 'rtnReqUnqNo') {
611
+						const selectVal = $(this).jqGrid('getCell', rowId, 'rtnReqUnqNo');
612
+						const key = {brandId:fn_make_user_info.get('brandId'), rtnReqUnqNo: selectVal, viewCd: 'R'};
613
+						var param = $.param(key);
614
+						viewObj.init(param);
615
+					}
616
+				},
617
+				loadComplete: function(data) {
618
+					console.log(data);
619
+					itp_fn_grid_load_complete(data, RTNMNG02010_GRID_ID, true, 'number', 'RTNMNG02010', listObj.itp_RTNMNG02010_search, listObj.empty, true, data.gridRecords, true);
620
+					var ids = $(RTNMNG02010_GRID_ID).getDataIDs();
621
+					$.each(ids, function(idx, rowId) {
622
+						$(RTNMNG02010_GRID_ID).jqGrid('setCell', rowId, 'rtnReqUnqNo', '', ITP_GRID_COL_STYLE.link);
623
+					});
624
+				},
625
+				onPaging: function(action) {
626
+					itp_fn_grid_paging(RTNMNG02010_GRID_ID, action, param);
627
+				}
628
+			};
629
+			
630
+			itp_fn_grid_make_remote(option);
631
+		},
632
+		clearData : function() {
633
+			$(RTNMNG02010_GRID_ID).jqGrid('clearGridData', true);
634
+			$(RTNMNG02010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
635
+			$(RTNMNG02010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
636
+			$(RTNMNG02010_GRID_EMPTY).show();
637
+		},
638
+		unload : function() {
639
+			$.jgrid.gridUnload(RTNMNG02010_GRID_ID);
640
+		}
641
+	}
642
+};
643
+
644
+/*상세화면 Object*/
645
+let viewObj = {
646
+	init: function (param) {
647
+		this.load(param);
648
+	},
649
+	load: function(param) {
650
+		fn_ajax_call(API_DETAIL_INFO, param, this.callback, 'GET');
651
+	},
652
+	callback: function (result) {
653
+		console.log(result);
654
+		pageObj.switchScreen('VIEW');
655
+		$('#ITP_FORM_RTNMNG02010_VIEW #ITP_FORM_RTNMNG02010_VIEW_BRAND_ID').val(result.brandId);
656
+		$('#ITP_FORM_RTNMNG02010_VIEW #ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_UNQ_NO').val(result.rtnReqUnqNo);
657
+		$('#ITP_FORM_RTNMNG02010_VIEW #ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_ST_CD').val(result.rtnReqStCd);
658
+		$('#ITP_FORM_RTNMNG02010_VIEW #ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_MGR_ID').val(result.rtnReqMgrId);
659
+		
660
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnBrandNm').text(result.brandNm);		
661
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnRtnReqUnqNo').text(result.rtnReqUnqNo + ' / ' + result.rtnReqStNm);
662
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnRtnWhsNm').text(result.rtnWhsNm);
663
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnColReqDt').text(result.colReqDt);
664
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnNote').text(result.note);
665
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnRtnRjctDt').text(result.rtnRjctDt);
666
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnRtnRjctNm').text(result.rtnRjctNm);
667
+		$('#ITP_FORM_RTNMNG02010_VIEW .fnRtnRjctRsn').text(result.rtnRjctRsn);
668
+		
669
+		// $('#ITP_FORM_RTNMNG02010_VIEW .fnPchReqTotalAmt').text(itp_fn_number_comma(result.pchReqTotalAmt));
670
+		
671
+		// 품목  리스트 조회
672
+		pageObj.grid.init('VIEW', result.rtnReqDtlList);
673
+	}
674
+};
675
+
676
+/*수정화면 Object*/
677
+let modifyObj = {
678
+	init: function (param) {
679
+		pageObj.grid.init('DETAIL', []);
680
+		//this.load(param);
681
+	},
682
+	button: {
683
+		modify: function (param) {
684
+			itp_fn_form_clear_validate(null, '#ITP_FORM_RTNMNG02010_DETAIL');
685
+			
686
+			const selectVal = $('#ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_UNQ_NO').val();
687
+			const writeVal = $('#ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_MGR_ID').val();
688
+			const stCd = $('#ITP_FORM_RTNMNG02010_VIEW_RTN_REQ_ST_CD').val();
689
+			
690
+			var userId = fn_make_user_info.get('userId');
691
+			if (writeVal != userId) {
692
+				itp_fn_modal_alert(ITP_MSG_LOCALE.message.ajax.diffWrite);
693
+				return;
694
+			}			
695
+			if (stCd != "RR00") {
696
+				itp_fn_modal_alert(ITP_MSG_LOCALE.message.ajax.notWrite);
697
+				return;
698
+			}
699
+			
700
+			const key = {brandId:fn_make_user_info.get('brandId'), rtnReqUnqNo: selectVal, viewCd: 'R'};
701
+			var param = $.param(key);
702
+			modifyObj.load(param);
703
+		},
704
+		save: function(arg) {
705
+			$('body').trigger('click');
706
+			
707
+			const formId = '#ITP_FORM_RTNMNG02010_DETAIL';
708
+			itp_fn_form_clear_validate(null, formId);
709
+			
710
+			itp_fn_grid_save_rows(RTNMNG02010_DETAIL_GRID_ID);
711
+			
712
+			$('#ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_ST_CD').val(arg);
713
+
714
+			if (itp_fn_form_event.isValid(formId)) {
715
+				
716
+				const rowData1 = $(RTNMNG02010_DETAIL_GRID_ID).getRowData();				
717
+				var dataCnt = 0;
718
+				$.each(rowData1, function(key, value) {
719
+					if (value.viewCd != 'D') {
720
+						dataCnt = dataCnt + 1;
721
+					} 
722
+				});
723
+				
724
+				if (dataCnt == 0) {
725
+					itp_fn_modal_alert( "요청할 품목내역이 없습니다.");
726
+					return ;
727
+				}
728
+				
729
+				var rtnQtyCheck = true;
730
+				var rtnDvsnCheck = true;
731
+				var rtnRsnDvsnCheck = true;
732
+				var rtnRsnCheck = true;
733
+				
734
+				$.each(rowData1, function(key, value) {					
735
+					if(value.rtnQty == '') {
736
+						rtnQtyCheck = false;
737
+					}
738
+					if(value.rtnDvsn == '') {
739
+						rtnDvsnCheck = false;
740
+					}
741
+					if(value.rtnRsnDvsn == '') {
742
+						rtnRsnDvsnCheck = false;
743
+					}
744
+					if(value.rtnRsn == '') {
745
+						rtnRsnCheck = false;
746
+					}
747
+				});
748
+				
749
+				if(rtnQtyCheck == false) {
750
+					itp_fn_modal_alert( "반품수량을 입력하세요.");
751
+					return;
752
+				}		
753
+				if(rtnDvsnCheck == false) {
754
+					itp_fn_modal_alert( "반품구분을 입력하세요.");
755
+					return;
756
+				}
757
+				if(rtnRsnDvsnCheck == false) {
758
+					itp_fn_modal_alert( "사유구분을 입력하세요.");
759
+					return;
760
+				}
761
+				if(rtnRsnCheck == false) {
762
+					itp_fn_modal_alert( "반품사유를 입력하세요.");
763
+					return;
764
+				}
765
+				
766
+				var saveReq = {
767
+					callBack: function(args) {
768
+							$(formId).val(arg);
769
+							let gridInsertData = [];
770
+							let gridUpdateData = [];
771
+							let gridDeleteData = [];
772
+							const rowData = $(RTNMNG02010_DETAIL_GRID_ID).getRowData();
773
+							
774
+							$.each(rowData, function(key, value) {
775
+								if (value.viewCd != 'R') {
776
+									if (value.viewCd == 'C') {
777
+										gridInsertData.push(value);
778
+									} else if (value.viewCd == 'U') {
779
+										gridUpdateData.push(value);
780
+									} else if (value.viewCd == 'D') {
781
+										gridDeleteData.push(value);
782
+									}
783
+								}
784
+							});
785
+			
786
+							let param = $(formId).serializeObject();
787
+							param.gridInsertData = gridInsertData;
788
+							param.gridUpdateData = gridUpdateData;
789
+							param.gridDeleteData = gridDeleteData;
790
+							// console.log('>>>>>>>>>>>>>> ' + JSON.stringify(param));
791
+							var searhFn = function() {
792
+								ITP_FORM_RTNMNG02010_DETAIL_IS_WRITING = false;
793
+								modifyObj.button.clear();
794
+								//listObj.grid.search();
795
+							};
796
+							fn_ajax_call(API_DETAIL_SAVE, JSON.stringify(param), searhFn, 'POST');				
797
+						}
798
+				};
799
+				if (arg == 'RR20') {
800
+					itp_fn_modal_confirm('반품 요청하시겠습니까?', saveReq, null);
801
+				} else {
802
+					itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.tmpSave, saveReq, null);
803
+				}
804
+			}
805
+		},
806
+		clear: function () {
807
+			document.getElementById('ITP_FORM_RTNMNG02010_DETAIL').reset();
808
+			listObj.grid.search();
809
+        },
810
+		cancel: function () {
811
+            listObj.grid.search();
812
+       }
813
+	},
814
+	load: function(param) {
815
+		fn_ajax_call(API_DETAIL_INFO, param, this.callback, 'GET');
816
+	},
817
+	callback: function (result) {
818
+		// console.log(result);
819
+		pageObj.switchScreen('MODIFY');
820
+		
821
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_VIEW_CD').val('U');
822
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_BRAND_ID').val(result.brandId);
823
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_UNQ_NO').val(result.rtnReqUnqNo);
824
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_ST_CD').val(result.rtnReqStCd);
825
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_REQ_MGR_ID').val(result.rtnReqMgrId);
826
+		
827
+		$('#ITP_FORM_RTNMNG02010_DETAIL .fnBrandNm').text(result.brandNm);
828
+		$('#ITP_FORM_RTNMNG02010_DETAIL .fnRtnReqUnqNo').text(result.rtnReqUnqNo + ' / ' + result.rtnReqStNm);
829
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_WHS_ID').val(result.rtnWhsId);
830
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_WHS_NM').val(result.rtnWhsNm);
831
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_LOCATION').val(result.rtnLocation);
832
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_RTN_LOCATION_NM').val(result.rtnLocationNm);
833
+		
834
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_COL_REQ_DT').val(result.colReqDt);
835
+		$('#ITP_FORM_RTNMNG02010_DETAIL #ITP_FORM_RTNMNG02010_DETAIL_NOTE').val(result.note);
836
+
837
+		// 품목  리스트 조회
838
+		pageObj.grid.init('DETAIL', result.rtnReqDtlList);
839
+	},
840
+	 
841
+};
842
+
843
+

Diferenças do arquivo suprimidas por serem muito extensas
+ 1155 - 0
src/main/webapp/js/app/rtnmng/ITP_RTNMNG03010.js


+ 581 - 0
src/main/webapp/js/app/rtnmng/ITP_RTNMNG04010.js

@@ -0,0 +1,581 @@
1
+require(['config'], function() {
2
+    require([
3
+    ], function($) {
4
+        pageObj.init();
5
+    });
6
+});
7
+
8
+//화면변수
9
+const RTNMNG04010_GRID_ID = '#ITP_RTNMNG04010_jqGrid';
10
+const RTNMNG04010_GRID_LIST = '#ITP_RTNMNG04010_jqGrid_list';
11
+const RTNMNG04010_GRID_PAGER = '#ITP_RTNMNG04010_jqGridPager';
12
+const RTNMNG04010_GRID_EMPTY = '#ITP_RTNMNG04010_jqGridEmpty';
13
+
14
+const RTNMNG04010_DETAIL_GRID_ID = '#ITP_RTNMNG04010_DETAIL_jqGrid';
15
+const RTNMNG04010_DETAIL_GRID_LIST = '#ITP_RTNMNG04010_DETAIL_jqGrid_list';
16
+const RTNMNG04010_DETAIL_GRID_PAGER = '#ITP_RTNMNG04010_DETAIL_jqGridPager';
17
+const RTNMNG04010_DETAIL_GRID_EMPTY = '#ITP_RTNMNG04010_DETAIL_jqGridEmpty';
18
+
19
+let ITP_PODR_DTL_ST_CD = fn_make_common_cd_list(CODE_LIST, 'PODR_DTL_ST_CD', true, '구매발주상세상태코드');
20
+
21
+//API URL
22
+let API_RTNMNG_RTN_DETAIL_GRID_LIST =  '/api/rtnmng/rtn/detail-grid-list';
23
+let API_RTNMNG_RTN_INFO_RTNODR =  '/api/rtnmng/rtn/info-rtnOdr'; 
24
+let API_RTNMNG_RTN_CANCEL_RTNPO =  '/api/rtnmng/rtn/cancel-rtnPo';
25
+
26
+//화면 grid ColModel
27
+const gridColModel = {
28
+	list:[
29
+		{
30
+			index: 'VIEW_CD', name: 'viewCd',
31
+			label: ITP_MSG_LOCALE.label.viewCd,
32
+			width: '10', fixed: false, align: 'center',
33
+			sortable: false, hidden: true
34
+		},
35
+		{
36
+			index: 'BRAND_NM', name: 'brandNm',
37
+			label: ITP_MSG_LOCALE.label.brandNm,			// 브랜드명
38
+			width: '10', fixed: false, align: 'center',
39
+			sortable: false, hidden: false
40
+		},
41
+		{
42
+			index: 'RTN_PODR_UNQ_NO', name: 'rtnPodrUnqNo',
43
+			label: '반품발주번호', 
44
+			width: '10', fixed: false, align: 'center',
45
+			sortable: false, hidden: false
46
+		},
47
+		{
48
+			index: 'RTN_ODR_ST_NM', name: 'rtnOdrStNm',
49
+			label: '발주상태', 
50
+			width: '10', fixed: false, align: 'center',
51
+			sortable: false, hidden: false
52
+		},
53
+		{
54
+			index: 'RTN_ODR_REG_DT', name: 'rtnOdrRegDt',
55
+			label: '반품발주일자', 
56
+			width: '10', fixed: false, align: 'center',
57
+			sortable: false, hidden: false
58
+		},
59
+		{
60
+			index: 'RTN_WHS_NM', name: 'rtnWhsNm',
61
+			label: '수거처', 
62
+			width: '10', fixed: false, align: 'center',
63
+			sortable: false, hidden: false
64
+		},
65
+		{
66
+			index: 'SPPLY_NM', name: 'spplyNm',
67
+			label: ITP_MSG_LOCALE.label.spplyNm, 			// 공급업체명
68
+			width: '10', fixed: false, align: 'center',
69
+			sortable: false, hidden: false
70
+		},
71
+		{
72
+			index: 'RTN_DODR_TOTAL_AMT', name: 'rtnDodrTotalAmt',
73
+			label: '총 반품발주금액', 
74
+			width: '8', fixed: false, align: 'center',
75
+			sortable: false, hidden: false,
76
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
77
+		},
78
+		{
79
+			index: 'rtn_Dodr_Item_Qty', name: 'rtnDodrItemQty',
80
+			label: '반품발주품목수', 
81
+			width: '7', fixed: false, align: 'center',
82
+			sortable: false, hidden: false, 
83
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
84
+		},
85
+		{
86
+			index: 'COL_REQ_DT', name: 'colReqDt',
87
+			label: '수거요청일', 
88
+			width: '10', fixed: false, align: 'center',
89
+			sortable: false, hidden: false
90
+		},
91
+		{
92
+			index: 'col_Dvsn_Nm', name: 'colDvsnNm',
93
+			label: '수거구분', 
94
+			width: '10', fixed: false, align: 'center',
95
+			sortable: false, hidden: false
96
+		}
97
+	],
98
+	view: [],
99
+	detail: [
100
+		{
101
+			index: 'VIEW_CD', name: 'viewCd',
102
+			label: ITP_MSG_LOCALE.label.viewCd,
103
+			width: '10', fixed: false, align: 'center',
104
+			sortable: false, hidden: true
105
+		},
106
+		{
107
+			index: 'RTN_PODR_DTL_NO', name: 'rtnPodrDtlNo',
108
+			label: ITP_MSG_LOCALE.label.pchPodrDtlNo, 		// 발주항번
109
+			width: '5', fixed: false, align: 'center',
110
+			sortable: false, hidden: false
111
+		},
112
+		{
113
+			index: 'ITEM_ID', name: 'itemId',
114
+			label: ITP_MSG_LOCALE.label.itemId, 			// 품목번호
115
+			width: '5', fixed: false, align: 'center',
116
+			sortable: false, hidden: false
117
+		},
118
+		{
119
+			index: 'ITEM_NM', name: 'itemNm',
120
+			label: ITP_MSG_LOCALE.label.itemNm, 			// 품목명
121
+			width: '5', fixed: false, align: 'left',
122
+			sortable: false, hidden: false
123
+		},
124
+		{
125
+			index: 'RODR_DTL_ST_NM', name: 'rodrDtlStNm',
126
+			label: '발주상세상태', 
127
+			width: '5', fixed: false, align: 'center',
128
+			sortable: false, hidden: false
129
+		},
130
+		{
131
+			index: 'UNIT_AMT', name: 'unitAmt',
132
+			label: ITP_MSG_LOCALE.label.unitAmt, 			// 단가
133
+			width: '5', fixed: false, align: 'center',
134
+			sortable: false, hidden: false,
135
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
136
+		},
137
+		{
138
+			index: 'UNIT', name: 'unit',
139
+			label: ITP_MSG_LOCALE.label.unit, 				// 기본단위
140
+			width: '5', fixed: false, align: 'center',
141
+			sortable: false, hidden: false
142
+		},
143
+		{
144
+			index: 'RTN_REQ_QTY', name: 'rtnReqQty',
145
+			label: '반품요청수량', 
146
+			width: '5', fixed: false, align: 'center',
147
+			sortable: false, hidden: false, 
148
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
149
+		},
150
+		{
151
+			index: 'RTN_ODR_QTY', name: 'rtnOdrQty',
152
+			label: '반품발주수량', 
153
+			width: '5', fixed: false, align: 'center',
154
+			sortable: false, hidden: false, 
155
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
156
+		},
157
+		{
158
+			index: 'RTN_ODR_AMT', name: 'rtnOdrAmt',
159
+			label: ITP_MSG_LOCALE.label.podrAmt, 			// 발주금액
160
+			width: '5', fixed: false, align: 'center',
161
+			sortable: false, hidden: false,
162
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
163
+		}
164
+	]
165
+};
166
+
167
+
168
+/*화면공통 Object*/
169
+let pageObj = {
170
+	init: function() {
171
+		this.ui.init();
172
+		this.event.init();
173
+	},
174
+	ui: {
175
+		init: function() {
176
+			this.view();
177
+			this.grid();
178
+			this.ready();
179
+		},
180
+		view: function() {
181
+			// 버튼 권한설정
182
+			fn_proc_btn_auth('RTNMNG04010');
183
+			// 공통코드 표시
184
+			$('select').each(function() {
185
+				if($(this).data('select-code')) {
186
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
187
+				}
188
+			});
189
+			// 조회일자 지정	
190
+			var now = new Date();
191
+			var defaultToDate = new Date(now);
192
+			defaultToDate.setDate(now.getDate() + 10);
193
+			$('#ITP_TAB_RTNMNG04010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
194
+			$('#ITP_FORM_RTNMNG04010_SEARCH_FROM_DT').datepicker('setDate', now);
195
+			$('#ITP_FORM_RTNMNG04010_SEARCH_TO_DT').datepicker('setDate', defaultToDate);
196
+		},
197
+		grid: function() {
198
+			itp_fn_jqgrid_resize(RTNMNG04010_GRID_ID, RTNMNG04010_GRID_LIST, 'lg');
199
+			listObj.empty.init();
200
+			itp_fn_fire_window_resize();
201
+		},
202
+		ready: function() {
203
+			listObj.init();
204
+		}
205
+	},
206
+	event: {
207
+		init: function() {
208
+			this.button();
209
+		},
210
+		button: function() {
211
+			// 버튼 클릭 이벤트
212
+			$('button').each(function() {
213
+				var id = $(this).attr('id');
214
+				$(this).on('click', function() {
215
+					switch (id) {
216
+						case 'ITP_BTN_RTNMNG04010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
217
+						case 'ITP_BTN_RTNMNG04010_NEWREG'			: listObj.button.create(); 		break;	// 신규등록 버튼
218
+						case 'ITP_BTN_RTNMNG04010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
219
+						case 'ITP_BTN_RTNMNG04010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
220
+						case 'ITP_BTN_RTNMNG04010_RTNCANCEL'		: modifyObj.button.del();		break;	// 발주 취소 버튼(예정)
221
+					}
222
+				});
223
+			});
224
+		}
225
+	},
226
+	switchScreen: function(mode) {
227
+        $('.itp_det_head').find('button[id^="ITP_BTN_RTNMNG04010_"]').each(function(i) {
228
+            $(this).hide();
229
+        });
230
+        $('#ITP_TAB_RTNMNG04010').find('div[id$="_CONTAINER"]').each(function(i) {
231
+            $(this).hide();
232
+        });
233
+        if(mode == 'LIST') { // 목록
234
+            fn_show_btn_auth_array(['#ITP_BTN_RTNMNG04010_SRH', '#ITP_BTN_RTNMNG04010_NEWREG']);
235
+            $('#ITP_AJAX_RTNMNG04010_LIST_CONTAINER').show();
236
+            $('#ITP_FORM_RTNMNG04010_SEARCH #ITP_FORM_RTNMNG04010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
237
+            $('#ITP_BTN_RTNMNG04010_SEARCH_SPPLY_ID').show();
238
+            $('#ITP_BTN_RTNMNG04010_DELETE_SPPLY_ID').show();
239
+            $('#ITP_BTN_RTNMNG04010_SEARCH_WHS_ID').show();
240
+            $('#ITP_BTN_RTNMNG04010_DELETE_WHS_ID').show();
241
+            
242
+        } else if(mode == 'MODIFY') { // 수정
243
+            $('#ITP_AJAX_RTNMNG04010_DETAIL_CONTAINER').show();
244
+            fn_show_btn_auth_array(['#ITP_BTN_RTNMNG04010_CANCELLIST', '#ITP_BTN_RTNMNG04010_RTNCANCEL']);
245
+
246
+            $('#ITP_BTN_RTNMNG04010_CANCELLIST').show();
247
+            $('#ITP_BTN_RTNMNG04010_DELETE').show();
248
+            
249
+            $('#ITP_FORM_RTNMNG04010_DETAIL_BRAND_ID').attr('readonly', true);
250
+            $('#ITP_FORM_RTNMNG04010_DETAIL_BRAND_NM').attr('readonly', true);
251
+            $('#ITP_FORM_RTNMNG04010_DETAIL_BSNS_REG_NO').attr('readonly', true);
252
+            $('#ITP_FORM_RTNMNG04010_DETAIL_CORP_REG_NO').attr('readonly', true);
253
+            $('#ITP_FORM_RTNMNG04010_DETAIL_SEARCH_AFFL_SHOP').hide();
254
+            $('#ITP_FORM_RTNMNG04010_DETAIL_DELETE_AFFL_SHOP').hide();
255
+			$('#ITP_FORM_RTNMNG04010_DETAIL .itp_form_info').show();
256
+			$('#ITP_FORM_RTNMNG04010_DETAIL .itp_form_change').hide();
257
+
258
+            $('#ITP_FORM_RTNMNG04010_DETAIL #ITP_FORM_RTNMNG04010_DETAIL_BRAND_ID').val(fn_make_user_info.get('brandId'));
259
+        } 
260
+    }
261
+};
262
+
263
+
264
+/*목록화면 Object*/
265
+let listObj = {
266
+	init: function() {
267
+		this.grid.init();
268
+		this.action();
269
+	},
270
+	itp_RTNMNG04010_param: {},
271
+	itp_RTNMNG04010_search: false,
272
+	button: {
273
+		search: function() {
274
+			listObj.itp_RTNMNG04010_search = true;
275
+			let param = $('#ITP_FORM_RTNMNG04010_SEARCH').serializeObject();
276
+			param.gridSize = $.jgrid.defaults.rowNum;
277
+            param.gridPage = $.jgrid.defaults.page;
278
+            param.sidx = '0';
279
+            console.log(JSON.stringify(param));
280
+            $(RTNMNG04010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
281
+        }
282
+	},
283
+	empty: {
284
+		init: function() {
285
+			var _this = this;
286
+            this.push();
287
+            $(RTNMNG04010_GRID_EMPTY).on('click', function() {
288
+                _this.back();
289
+                listObj.itp_RTNMNG04010_param.gridSize = $.jgrid.defaults.rowNum;
290
+                $(RTNMNG04010_GRID_ID).setGridParam({'postData': JSON.stringify(listObj.itp_RTNMNG04010_param)}).trigger('reloadGrid');
291
+            });
292
+		},
293
+		push: function() {
294
+            let param = $('#ITP_FORM_RTNMNG04010_SEARCH').serializeObject();
295
+            listObj.itp_RTNMNG04010_param = param;
296
+            param.sidx = '0';
297
+        },
298
+        back: function() {
299
+            $('#ITP_FORM_RTNMNG04010_SERVICE_BRAND_TYPE').val(listObj.itp_RTNMNG04010_param.brandType);
300
+            $('#ITP_FORM_RTNMNG04010_SERVICE_ST_CD').val(listObj.itp_RTNMNG04010_param.stCd);
301
+            $('#ITP_FORM_RTNMNG04010_SEARCH_BRAND_NM').val(listObj.itp_RTNMNG04010_param.brandNm);
302
+        }
303
+	},
304
+	grid: {
305
+		init: function() {
306
+			// 데이터 없을때
307
+            listObj.empty.push();
308
+            this.search();
309
+		},
310
+		colModel: gridColModel.list,
311
+		search: function() {
312
+			pageObj.switchScreen('LIST');
313
+			this.unload();
314
+			this.load();
315
+		},
316
+		load: function() {
317
+            let param = $('#ITP_FORM_RTNMNG04010_SEARCH').serializeObject();
318
+            param.gridSize = $.jgrid.defaults.rowNum;
319
+            param.sidx = '0';
320
+            console.log(JSON.stringify(param));
321
+            var option = {
322
+            	gridId: RTNMNG04010_GRID_ID,
323
+            	colModel: gridColModel.list,
324
+            	param: param,
325
+            	url: DOMAIN + API_RTNMNG_RTN_DETAIL_GRID_LIST,
326
+            	pager: RTNMNG04010_GRID_PAGER,
327
+            	onCellSelect: function(rowId, cellIdx, cellValue) {
328
+                    var cm = $(this).jqGrid('getGridParam', 'colModel');
329
+                    var colNm = cm[cellIdx].name;
330
+                    if (colNm === 'rtnPodrUnqNo') {
331
+                        const rtnPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'rtnPodrUnqNo');
332
+                        const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
333
+                        const key = {rtnPodrUnqNo: rtnPodrUnqNoVal, brandId: brandIdVal};
334
+                        var param = $.param(key);
335
+                        modifyObj.init(param);
336
+                    }
337
+				},
338
+				loadComplete: function(data) {
339
+					console.log(data);
340
+                    itp_fn_grid_load_complete(data, RTNMNG04010_GRID_ID, true, 'number', 'RTNMNG04010', listObj.itp_RTNMNG04010_search, listObj.empty, true, data.gridRecords, true);
341
+                    var ids = $(RTNMNG04010_GRID_ID).getDataIDs();
342
+                    $.each(ids, function(idx, rowId) {
343
+                        $(RTNMNG04010_GRID_ID).jqGrid('setCell', rowId, 'rtnPodrUnqNo', '', ITP_GRID_COL_STYLE.link);
344
+                    });
345
+				},
346
+				onPaging: function(action) {
347
+                    itp_fn_grid_paging(RTNMNG04010_GRID_ID, action, param);
348
+                }
349
+            };
350
+            itp_fn_grid_make_remote(option);
351
+		},
352
+		clearData: function() {
353
+			$(RTNMNG04010_GRID_ID).jqGrid('clearGridData', true);
354
+            $(RTNMNG04010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
355
+            $(RTNMNG04010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
356
+            $(RTNMNG04010_GRID_EMPTY).show();
357
+		},
358
+		unload: function() {
359
+			$.jgrid.gridUnload(RTNMNG04010_GRID_ID);
360
+		}
361
+	},
362
+	action: function() {
363
+		var _this = this;
364
+		// 매장/창고 조회 버튼 클릭
365
+		$('#ITP_BTN_RTNMNG04010_SEARCH_POP_SWHS_NM').on('click', function() {
366
+			_this.popup('whs');
367
+		});
368
+		// 매장/창고 텍스트 삭제 버튼 클릭
369
+		$('#ITP_BTN_RTNMNG04010_SEARCH_DEL_SWHS_NM').on('click', function() {
370
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SWHS_NM').val('');
371
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SWHS_ID').val('');
372
+		});
373
+		
374
+		// 매장/창고 조회 버튼 클릭
375
+		$('#ITP_BTN_RTNMNG04010_SEARCH_POP_SRTN_WHS_NM').on('click', function() {
376
+			_this.popup('rwhs');
377
+		});
378
+		// 매장/창고 텍스트 삭제 버튼 클릭
379
+		$('#ITP_BTN_RTNMNG04010_SEARCH_DEL_SRTN_WHS_NM').on('click', function() {
380
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_NM').val('');
381
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_ID').val('');
382
+		});
383
+		
384
+		// 공급업체 조회 버튼 클릭
385
+		$('#ITP_BTN_RTNMNG04010_SEARCH_POP_SSPPLY_NM').on('click', function() {
386
+			_this.popup('spply');
387
+		});
388
+		// 공급업체 텍스트 삭제 버튼 클릭
389
+		$('#ITP_BTN_RTNMNG04010_SEARCH_DEL_SSPPLY_NM').on('click', function() {
390
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_NM').val('');
391
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_ID').val('');
392
+		});
393
+		
394
+	},
395
+	popup: function(keyword) {
396
+		if(keyword === 'spply'){
397
+			var popFn = this.callback.spply;
398
+			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
399
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
400
+		} else if(keyword === 'whs'){
401
+			var popFn = this.callback.whs;
402
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
403
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
404
+		} else if(keyword === 'rwhs'){
405
+			var popFn = this.callback.rwhs;
406
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
407
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
408
+		}
409
+	},
410
+	callback: {
411
+		whs: function(rowDataPop) {
412
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SWHS_NM').val(rowDataPop.whsNm);
413
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SWHS_ID').val(rowDataPop.whsId);
414
+		}, 
415
+		rwhs: function(rowDataPop) {
416
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_NM').val(rowDataPop.whsNm);
417
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SRTN_WHS_ID').val(rowDataPop.whsId);
418
+		},
419
+		spply: function(rowDataPop) {
420
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_NM').val(rowDataPop.spplyNm);
421
+			$('#ITP_FORM_RTNMNG04010_SEARCH_SSPPLY_ID').val(rowDataPop.spplyId);
422
+		}
423
+	}
424
+};
425
+
426
+
427
+/*수정화면 Object*/
428
+let modifyObj = {
429
+	init: function(param) {
430
+		this.load(param);
431
+	},
432
+	itp_RTNMNG04010_param: {},
433
+	itp_RTNMNG04010_search: false,
434
+	button: {
435
+		cancel: function() {
436
+			listObj.grid.search();
437
+		},
438
+		del: function() {
439
+			
440
+			var modalFn = {
441
+				callBack: () => {
442
+
443
+					var param = {brandId: $('#ITP_FORM_RTNMNG04010_DETAIL_BRAND_ID').val(), rtnPodrUnqNo: $('#ITP_FORM_RTNMNG04010_DETAIL_RTN_PODR_UNQ_NO').val()};
444
+					var searhFn = function () {
445
+						listObj.grid.search();
446
+					}
447
+					fn_ajax_call(API_RTNMNG_RTN_CANCEL_RTNPO, JSON.stringify(param), searhFn, 'POST');
448
+				}
449
+			};
450
+			itp_fn_modal_confirm('반품발주를 취소 하시겠습니까?', modalFn);
451
+		}
452
+	},
453
+	empty: {
454
+		init: function() {
455
+            var _this = this;
456
+            this.push();
457
+            $(RTNMNG04010_VIEW_GRID_EMPTY).on('click', function() {
458
+                _this.back();
459
+                viewObj.itp_RTNMNG04010_param.gridSize = $.jgrid.defaults.rowNum;
460
+                $(RTNMNG04010_GRID_ID).setGridParam({'postData': JSON.stringify(viewObj.itp_RTNMNG04010_param)}).trigger('reloadGrid');
461
+            });
462
+        },
463
+        push: function() {
464
+            let param = $('#ITP_FORM_RTNMNG04010_DETAIL').serializeObject();
465
+            viewObj.itp_RTNMNG04010_param = param;
466
+        },
467
+        back: function() {
468
+            $('#ITP_FORM_RTNMNG04010_SERVICE_BRAND_TYPE').val(viewObj.itp_RTNMNG04010_param.brandType);
469
+            $('#ITP_FORM_RTNMNG04010_SERVICE_ST_CD').val(viewObj.itp_RTNMNG04010_param.stCd);
470
+            $('#ITP_FORM_RTNMNG04010_SEARCH_BRAND_NM').val(viewObj.itp_RTNMNG04010_param.brandNm);
471
+        }
472
+	},
473
+	load: function(param) {
474
+		fn_ajax_call(API_RTNMNG_RTN_INFO_RTNODR, param, this.callback, 'GET');
475
+	},
476
+	callback: function(result) {
477
+		// console.log('>>>> ' + JSON.stringify(result));
478
+		
479
+		// 그리드 전화번호 '-' 함수
480
+		let telNo = '';
481
+		if(result.rtnMgrTelNo != '') {
482
+			function convertTel(value){
483
+				answer = (value.startsWith('0')) ? value.replace(/[^0-9]/g, "")
484
+						.replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})$/,"$1-$2-$3")
485
+						.replace("--", "-") : '';
486
+				return answer;
487
+			}				
488
+			telNo = convertTel(result.rtnMgrTelNo);	
489
+		}
490
+		
491
+		pageObj.switchScreen('MODIFY');
492
+		$('#ITP_FORM_RTNMNG04010_DETAIL #ITP_FORM_RTNMNG04010_DETAIL_BRAND_ID').val(result.brandId);
493
+		$('#ITP_FORM_RTNMNG04010_DETAIL #ITP_FORM_RTNMNG04010_DETAIL_RTN_PODR_UNQ_NO').val(result.rtnPodrUnqNo);
494
+		$('#ITP_FORM_RTNMNG04010_DETAIL #ITP_FORM_RTNMNG04010_DETAIL_RTN_ODR_ST_CD').val(result.rtnOdrStCd);
495
+		
496
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnBrandNm').text(result.brandNm);				
497
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnRtnPodrUnqNo').text(result.rtnPodrUnqNo + ' / ' + result.rtnOdrStNm);
498
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnColPlace').text(result.rtnWhsNm + ' - ' + result.rtnLocationNm);
499
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnWhsNm').text(result.whsNm + ' - ' + result.locationNm);
500
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnSpplyNm').text(result.spplyNm);
501
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnRtnOdrRegDt').text(result.rtnOdrRegDt);
502
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnPodrMgrNm').text(result.rtnMgrNm);
503
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnPodrMgrTelNo').text(telNo);
504
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnColDvsnNm').text(result.colDvsnNm);
505
+		$('#ITP_FORM_RTNMNG04010_DETAIL .fnRtnDodrTotalAmt').text(itp_fn_number_comma(result.rtnDodrTotalAmt));
506
+		
507
+		if('RO20' == result.rtnOdrStCd) { // 반품발주요청
508
+			$('#ITP_BTN_RTNMNG04010_RTNCANCEL').show();
509
+		} else {
510
+			$('#ITP_BTN_RTNMNG04010_RTNCANCEL').hide();
511
+		}
512
+		
513
+		modifyObj.grid.init('MODIFY', result.rtnOdrDtlList)
514
+		
515
+	},
516
+	grid: {
517
+		init: function(mode, gridData) {
518
+			this.mode = mode;
519
+			this.gridId = (mode === 'VIEW') ? RTNMNG04010_VIEW_GRID_ID : RTNMNG04010_DETAIL_GRID_ID;
520
+			this.gridList = (mode === 'VIEW') ? RTNMNG04010_VIEW_GRID_LIST : RTNMNG04010_DETAIL_GRID_LIST;
521
+			this.gridEmpty = (mode === 'VIEW') ? RTNMNG04010_VIEW_GRID_EMPTY : RTNMNG04010_DETAIL_GRID_EMPTY;
522
+			this.unload();
523
+			this.load(mode, gridData);
524
+		},
525
+		mode: '',
526
+		colModel: gridColModel.view,
527
+		load: function(mode, gridData) {
528
+			var _this = this;
529
+			var option = {
530
+				gridId: _this.gridId,
531
+				colModel: gridColModel.detail,
532
+				data: gridData,
533
+				// multiselect: true,
534
+				onSelectRow: function(index, status) {
535
+					if(index) {
536
+						var row = $(RTNMNG04010_DETAIL_GRID_ID).jqGrid('getRowData', index);
537
+						if(row.podrDtlStCd == 'POD2') {
538
+							$("#jqg_ITP_RTNMNG04010_DETAIL_jqGrid_" + index).prop("checked", false);
539
+						}
540
+					}
541
+				},
542
+				onSelectAll: function(rowIds, status) {
543
+					for(let i = 0; i < rowIds.length; i++){
544
+						let podrDtlStCd = $(RTNMNG04010_DETAIL_GRID_ID).getCell(rowIds[i], 'podrDtlStCd');
545
+						if(podrDtlStCd == 'POD2') {
546
+							$("#jqg_ITP_RTNMNG04010_DETAIL_jqGrid_" + rowIds[i]).prop("checked", false);
547
+						} else {
548
+							$("#jqg_ITP_RTNMNG04010_DETAIL_jqGrid_" + rowIds[i]).prop("checked", status);
549
+						}
550
+					}
551
+				},
552
+				loadComplete: function(data) {
553
+					console.log(data);
554
+					let datas = data.rows;
555
+					for(let i = 0; i < datas.length; i++) {
556
+						let podrDtlStCd = datas[i].podrDtlStCd;
557
+						if(podrDtlStCd == 'POD2') {
558
+							$('#jqg_ITP_RTNMNG04010_DETAIL_jqGrid_' + (i + 1)).attr('disabled', true);
559
+						}
560
+					}
561
+					itp_fn_grid_load_complete(data, RTNMNG04010_DETAIL_GRID_ID, true, 'number', 'RTNMNG04010', modifyObj.itp_RTNMNG04010_search, modifyObj.empty, true, data.gridRecords, true);
562
+				}
563
+			};
564
+			itp_fn_grid_make_local(option);
565
+		},
566
+		unload: function() {
567
+			$.jgrid.gridUnload(this.gridId);
568
+		}
569
+	},
570
+	isValid: function(formId) {
571
+		var isValid = false;
572
+		$(formId).find('input, select, checkbox, textarea').each(function(k) {
573
+			if($(this).data('check-required')) {
574
+				var arry = $(this).data('check-required').split(',');
575
+				isValid = itp_fn_form_validate(formId, '#' + $(this).attr('id'), arry, undefined);
576
+				if(!isValid) return false;
577
+			}
578
+		});
579
+		return isValid;
580
+	},
581
+};

+ 367 - 0
src/main/webapp/js/app/rtnmng/ITP_RTNMNG06010.js

@@ -0,0 +1,367 @@
1
+require(['config'], function() {
2
+    require([
3
+    ], function($) {
4
+        pageObj.init();
5
+    });
6
+});
7
+
8
+//화면변수
9
+const RTNMNG06010_GRID_ID = '#ITP_RTNMNG06010_jqGrid';
10
+const RTNMNG06010_GRID_LIST = '#ITP_RTNMNG06010_jqGrid_list';
11
+const RTNMNG06010_GRID_PAGER = '#ITP_RTNMNG06010_jqGridPager';
12
+const RTNMNG06010_GRID_EMPTY = '#ITP_RTNMNG06010_jqGridEmpty';
13
+
14
+//API URL
15
+let API_POMNG_INOUTMNG_WAREHOUSE_GRID_LIST = '/api/rtnmng/inoutmng/retstock-result-grid-list';  
16
+
17
+//화면 grid ColModel
18
+const gridColModel = {
19
+	list:[
20
+		{
21
+			index: 'VIEW_CD', name: 'viewCd',
22
+			label: ITP_MSG_LOCALE.label.viewCd,
23
+			width: '10', fixed: false, align: 'center',
24
+			sortable: false, hidden: true
25
+		},
26
+		{
27
+			index: 'PCH_PODR_UNQ_NO', name: 'pchPodrUnqNo',
28
+			label: ITP_MSG_LOCALE.label.pchPodrUnqNo, 		// 발주번호
29
+			width: '10', fixed: false, align: 'center',
30
+			sortable: false, hidden: false
31
+		},
32
+		{
33
+			index: 'PCH_PODR_DTL_NO', name: 'pchPodrDtlNo',
34
+			label: ITP_MSG_LOCALE.label.pchPodrDtlNo, 		// 발주항번
35
+			width: '5', fixed: false, align: 'center',
36
+			sortable: false, hidden: false
37
+		},
38
+		{
39
+			index: 'DLV_STTMT_UNQ_NO', name: 'dlvSttmtUnqNo',
40
+			label: ITP_MSG_LOCALE.label.dlvSttmtUnqNo, 		// 납품번호
41
+			width: '10', fixed: false, align: 'center',
42
+			sortable: false, hidden: false
43
+		},
44
+		{
45
+			index: 'DLV_STTMT_DTL_NO', name: 'dlvSttmtDtlNo',
46
+			label: ITP_MSG_LOCALE.label.dlvSttmtDtlNo, 		// 납품항번
47
+			width: '5', fixed: false, align: 'center',
48
+			sortable: false, hidden: false
49
+		},
50
+		{
51
+			index: 'PODR_QTY', name: 'podrQty',
52
+			label: ITP_MSG_LOCALE.label.podrQty, 			// 발주수량
53
+			width: '5', fixed: false, align: 'center',
54
+			sortable: false, hidden: false
55
+		},
56
+		{
57
+			index: 'DLV_QTY', name: 'dlvQty',
58
+			label: ITP_MSG_LOCALE.label.dlvQty, 			// 납품수량
59
+			width: '5', fixed: false, align: 'center',
60
+			sortable: false, hidden: false
61
+		},
62
+		{
63
+			index: 'WHS_QTY', name: 'whsQty',
64
+			label: ITP_MSG_LOCALE.label.whsQty, 			// 입고수량
65
+			width: '5', fixed: false, align: 'center',
66
+			sortable: false, hidden: false
67
+		},
68
+		{
69
+			index: 'DIV_REQ_DT', name: 'dlvReqDt',
70
+			label: ITP_MSG_LOCALE.label.dlvReqDt, 			// 납품요청일
71
+			width: '8', fixed: false, align: 'center',
72
+			sortable: false, hidden: false
73
+		},
74
+		
75
+		{
76
+			index: 'DLV_SCH_DT', name: 'dlvSchDt',
77
+			label: ITP_MSG_LOCALE.label.dlvSchDt, 			// 납품예정일
78
+			width: '8', fixed: false, align: 'center',
79
+			sortable: false, hidden: false
80
+		},
81
+		{
82
+			index: 'DLV_CMPLT_DT', name: 'dlvCmpltDt',
83
+			label: ITP_MSG_LOCALE.label.dlvCmpltDt, 		// 납품일자
84
+			width: '8', fixed: false, align: 'center',
85
+			sortable: false, hidden: false
86
+		},
87
+		{
88
+			index: 'WHS_CNFM_NM', name: 'whsCnfmNm',
89
+			label: ITP_MSG_LOCALE.label.whsCnfmNm, 			// 입고확인자
90
+			width: '8', fixed: false, align: 'center',
91
+			sortable: false, hidden: false
92
+		},
93
+		{
94
+			index: 'DLV_MGR_NM', name: 'dlvMgrNm',
95
+			label: ITP_MSG_LOCALE.label.dlvMgrNm, 			// 납품자명
96
+			width: '8', fixed: false, align: 'center',
97
+			sortable: false, hidden: false
98
+		},
99
+		{
100
+			index: 'DLV_MGR_TEL_NO', name: 'dlvMgrTelNo',
101
+			label: ITP_MSG_LOCALE.label.dlvMgrTelNo, 		// 납품자전화번호
102
+			width: '8', fixed: false, align: 'center',
103
+			sortable: false, hidden: false
104
+		},
105
+		{
106
+			index: 'ITEM_ID', name: 'itemId',
107
+			label: ITP_MSG_LOCALE.label.itemId, 			// 품목번호
108
+			width: '8', fixed: false, align: 'center',
109
+			sortable: false, hidden: false
110
+		},
111
+		{
112
+			index: 'ITEM_NM', name: 'itemNm',
113
+			label: ITP_MSG_LOCALE.label.itemNm, 			// 품목명
114
+			width: '8', fixed: false, align: 'center',
115
+			sortable: false, hidden: false
116
+		},
117
+		{
118
+			index: 'UNIT', name: 'unit',
119
+			label: ITP_MSG_LOCALE.label.unit, 				// 기본단위
120
+			width: '5', fixed: false, align: 'center',
121
+			sortable: false, hidden: false
122
+		},
123
+		{
124
+			index: 'WHS_AMT', name: 'whsAmt',
125
+			label: ITP_MSG_LOCALE.label.whsAmt, 			// 입고금액
126
+			width: '8', fixed: false, align: 'center',
127
+			sortable: false, hidden: false,
128
+			formatter: 'integer', formatoptions: {thousandsSeparator: ','}
129
+		}
130
+	],
131
+	view: [],
132
+	detail: []
133
+};
134
+
135
+
136
+/*화면공통 Object*/
137
+let pageObj = {
138
+	init: function() {
139
+		this.ui.init();
140
+		this.event.init();
141
+	},
142
+	ui: {
143
+		init: function() {
144
+			this.view();
145
+			this.grid();
146
+			this.ready();
147
+		},
148
+		view: function() {
149
+			// 버튼 권한설정
150
+			fn_proc_btn_auth('RTNMNG06010');
151
+			// 공통코드 표시
152
+			$('select').each(function() {
153
+				if($(this).data('select-code')) {
154
+					fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
155
+				}
156
+			});
157
+			// 조회일자 지정	
158
+			var now = new Date();
159
+			var defaultToDate = new Date(now);
160
+			defaultToDate.setDate(now.getDate() + 5);
161
+			$('#ITP_TAB_RTNMNG06010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);
162
+			$('#ITP_FORM_RTNMNG06010_SEARCH_FROM_DT').datepicker('setDate', now);
163
+			$('#ITP_FORM_RTNMNG06010_SEARCH_TO_DT').datepicker('setDate', defaultToDate);
164
+		},
165
+		grid: function() {
166
+			itp_fn_jqgrid_resize(RTNMNG06010_GRID_ID, RTNMNG06010_GRID_LIST, 'lg');
167
+			listObj.empty.init();
168
+			itp_fn_fire_window_resize();
169
+		},
170
+		ready: function() {
171
+			listObj.init();
172
+		}
173
+	},
174
+	event: {
175
+		init: function() {
176
+			this.button();
177
+		},
178
+		button: function() {
179
+			// 버튼 클릭 이벤트
180
+			$('button').each(function() {
181
+				var id = $(this).attr('id');
182
+				$(this).on('click', function() {
183
+					switch (id) {
184
+						case 'ITP_BTN_RTNMNG06010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
185
+						case 'ITP_BTN_RTNMNG06010_NEWREG'			: listObj.button.create(); 		break;	// 신규등록 버튼
186
+						case 'ITP_BTN_RTNMNG06010_MODIFY'			: modifyObj.button.modify();	break;	// 수정 버튼
187
+						case 'ITP_BTN_RTNMNG06010_CANCELLIST'		: viewObj.button.cancel(); 		break;	// 취소/목록 버튼
188
+						case 'ITP_BTN_RTNMNG06010_DELETE'			: 								break;	// 삭제 버튼
189
+					}
190
+				});
191
+			});
192
+		}
193
+	},
194
+	switchScreen: function(mode) {
195
+        $('.itp_det_head').find('button[id^="ITP_BTN_RTNMNG06010_"]').each(function(i) {
196
+            $(this).hide();
197
+        });
198
+        $('#ITP_TAB_RTNMNG06010').find('div[id$="_CONTAINER"]').each(function(i) {
199
+            $(this).hide();
200
+        });
201
+        if(mode == 'LIST') { // 목록
202
+            fn_show_btn_auth_array(['#ITP_BTN_RTNMNG06010_SRH', '#ITP_BTN_RTNMNG06010_NEWREG']);
203
+            $('#ITP_AJAX_RTNMNG06010_LIST_CONTAINER').show();
204
+
205
+            $('#ITP_FORM_RTNMNG06010_SEARCH #ITP_FORM_RTNMNG06010_SEARCH_SBRAND_ID').val(fn_make_user_info.get('brandId'));
206
+            $('#ITP_FORM_RTNMNG06010_SEARCH #ITP_FORM_RTNMNG06010_SEARCH_SSTORE_ID').val(fn_make_user_info.get('storeId'));
207
+
208
+            $('#ITP_BTN_RTNMNG06010_SEARCH_SPPLY_ID').show();
209
+            $('#ITP_BTN_RTNMNG06010_DELETE_SPPLY_ID').show();
210
+            $('#ITP_BTN_RTNMNG06010_SEARCH_WHS_ID').show();
211
+            $('#ITP_BTN_RTNMNG06010_DELETE_WHS_ID').show();
212
+        }
213
+    }
214
+}
215
+
216
+
217
+/*목록화면 Object*/
218
+let listObj = {
219
+	init: function() {
220
+		this.grid.init();
221
+		this.action();
222
+	},
223
+	itp_RTNMNG06010_param: {},
224
+	itp_RTNMNG06010_search: false,
225
+	button: {
226
+		search: function() {
227
+			listObj.itp_RTNMNG06010_search = true;
228
+			let param = $('#ITP_FORM_RTNMNG06010_SEARCH').serializeObject();
229
+			param.gridSize = $.jgrid.defaults.rowNum;
230
+            param.gridPage = $.jgrid.defaults.page;
231
+            console.log(JSON.stringify(param));
232
+            $(RTNMNG06010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
233
+        }
234
+	},
235
+	empty: {
236
+		init: function() {
237
+			var _this = this;
238
+            this.push();
239
+            $(RTNMNG06010_GRID_EMPTY).on('click', function() {
240
+                _this.back();
241
+                listObj.itp_RTNMNG06010_param.gridSize = $.jgrid.defaults.rowNum;
242
+                $(RTNMNG06010_GRID_ID).setGridParam({'postData': JSON.stringify(listObj.itp_RTNMNG06010_param)}).trigger('reloadGrid');
243
+            });
244
+		},
245
+		push: function() {
246
+            let param = $('#ITP_FORM_RTNMNG06010_SEARCH').serializeObject();
247
+            listObj.itp_RTNMNG06010_param = param;
248
+        },
249
+        back: function() {
250
+            $('#ITP_FORM_RTNMNG06010_SERVICE_BRAND_TYPE').val(listObj.itp_RTNMNG06010_param.brandType);
251
+            $('#ITP_FORM_RTNMNG06010_SERVICE_ST_CD').val(listObj.itp_RTNMNG06010_param.stCd);
252
+            $('#ITP_FORM_RTNMNG06010_SEARCH_BRAND_NM').val(listObj.itp_RTNMNG06010_param.brandNm);
253
+        }
254
+	},
255
+	grid: {
256
+		init: function() {
257
+			// 데이터 없을때
258
+            listObj.empty.push();
259
+            this.search();
260
+		},
261
+		colModel: gridColModel.list,
262
+		search: function() {
263
+			pageObj.switchScreen('LIST');
264
+			this.unload();
265
+			this.load();
266
+		},
267
+		load: function() {
268
+            let param = $('#ITP_FORM_RTNMNG06010_SEARCH').serializeObject();
269
+            param.gridSize = $.jgrid.defaults.rowNum;
270
+            console.log(JSON.stringify(param));
271
+            var option = {
272
+            	gridId: RTNMNG06010_GRID_ID,
273
+            	colModel: gridColModel.list,
274
+            	param: param,
275
+            	url: DOMAIN + API_POMNG_INOUTMNG_WAREHOUSE_GRID_LIST,
276
+            	pager: RTNMNG06010_GRID_PAGER,
277
+            	rownumbers: false,
278
+            	/*onCellSelect: function(rowId, cellIdx, cellValue) {
279
+                    var cm = $(this).jqGrid('getGridParam', 'colModel');
280
+                    var colNm = cm[cellIdx].name;
281
+                    if (colNm === 'pchPodrUnqNo') {
282
+                        const pchPodrUnqNoVal = $(this).jqGrid('getCell', rowId, 'pchPodrUnqNo');
283
+                        const brandIdVal = $(this).jqGrid('getCell', rowId, 'brandId');
284
+                        const spplyIdVal = LOGIN_USER_INFO.spplyId;
285
+                        const key = {pchPodrUnqNo: pchPodrUnqNoVal, brandId: brandIdVal, spplyId: spplyIdVal};
286
+                        var param = $.param(key);
287
+                        viewObj.init(param);
288
+                    }
289
+				},*/
290
+				loadComplete: function(data) {
291
+					console.log(data);
292
+                    itp_fn_grid_load_complete(data, RTNMNG06010_GRID_ID, true, 'number', 'RTNMNG06010', listObj.itp_RTNMNG06010_search, listObj.empty, true, data.gridRecords, true);
293
+                    var ids = $(RTNMNG06010_GRID_ID).getDataIDs();
294
+                    $.each(ids, function(idx, rowId) {
295
+                        $(RTNMNG06010_GRID_ID).jqGrid('setCell', rowId, 'pchPodrUnqNo', '', ITP_GRID_COL_STYLE.link);
296
+                    });
297
+				},
298
+				onPaging: function(action) {
299
+                    itp_fn_grid_paging(RTNMNG06010_GRID_ID, action, param);
300
+                }
301
+            };
302
+            itp_fn_grid_make_remote(option);
303
+		},
304
+		clearData: function() {
305
+			$(RTNMNG06010_GRID_ID).jqGrid('clearGridData', true);
306
+            $(RTNMNG06010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
307
+            $(RTNMNG06010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
308
+            $(RTNMNG06010_GRID_EMPTY).show();
309
+		},
310
+		unload: function() {
311
+			$.jgrid.gridUnload(RTNMNG06010_GRID_ID);
312
+		}
313
+	},
314
+	action: function() {
315
+		var _this = this;
316
+		// 공급업체 조회 버튼 클릭
317
+		$('#ITP_BTN_RTNMNG06010_SEARCH_SPPLY_ID').on('click', function() {
318
+			_this.popup('spply');
319
+		});
320
+		// 공급업체 텍스트 삭제 버튼 클릭
321
+		$('#ITP_BTN_RTNMNG06010_DELETE_SPPLY_ID').on('click', function() {
322
+			$('#ITP_FORM_RTNMNG06010_DETAIL_SPPLY_NM').val('');
323
+			$('#ITP_FORM_RTNMNG06010_DETAIL_SPPLY_ID').val('');
324
+		});
325
+		
326
+		// 매장/창고 조회 버튼 클릭
327
+		$('#ITP_BTN_RTNMNG06010_SEARCH_WHS_ID').on('click', function() {
328
+			_this.popup('whs');
329
+		});
330
+		// 매장/창고 텍스트 삭제 버튼 클릭
331
+		$('#ITP_BTN_RTNMNG06010_DELETE_WHS_ID').on('click', function() {
332
+			$('#ITP_FORM_RTNMNG06010_DETAIL_WHS_NM').val('');
333
+			$('#ITP_FORM_RTNMNG06010_DETAIL_WHS_ID').val('');
334
+		});
335
+	},
336
+	popup: function(keyword) {
337
+		var popFn = this.callback.create;
338
+		 
339
+		if(keyword === 'spply'){
340
+			const key = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId')};
341
+			fn_call_popup('biz', 'BIZPOP_STORE_SPPLY', '#ITP_ASIDE', popFn, key, 'S');
342
+		} else if(keyword === 'whs'){
343
+			const key1 = {brandId:fn_make_user_info.get('brandId'),storeId:fn_make_user_info.get('storeId'), whsDvsn:""};
344
+			fn_call_popup('biz', 'BIZPOP_WHS_LOCATION', '#ITP_ASIDE', popFn, key1, 'S');
345
+		}
346
+	},
347
+	callback: {
348
+		create: function(rowDataPop) {
349
+			console.log(rowDataPop);
350
+			console.log(Array.isArray(rowDataPop));
351
+			if(rowDataPop.hasOwnProperty('whsId') == false) {
352
+				console.log(rowDataPop.spplyId);
353
+				$('#ITP_FORM_RTNMNG06010_DETAIL_SPPLY_NM').val(rowDataPop.spplyNm);
354
+				$('#ITP_FORM_RTNMNG06010_DETAIL_SPPLY_ID').val(rowDataPop.spplyId);
355
+				//console.log(rowDataPop[0].storeId);
356
+				//$('#ITP_FORM_RTNMNG06010_DETAIL_STORE_NM').val(rowDataPop[0].storeNm);
357
+				//$('#ITP_FORM_RTNMNG06010_DETAIL_STORE_ID').val(rowDataPop[0].storeId);
358
+			} else {
359
+				console.log(rowDataPop);
360
+				console.log(rowDataPop.whsId);
361
+				$('#ITP_FORM_RTNMNG06010_DETAIL_WHS_NM').val(rowDataPop.whsNm);
362
+				$('#ITP_FORM_RTNMNG06010_DETAIL_WHS_ID').val(rowDataPop.whsId);
363
+			}
364
+		}
365
+	}
366
+}
367
+console.log(CONN_KEY);