浏览代码

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

juney 2 年之前
父节点
当前提交
82e2807c69

+ 4 - 2
bin/src/main/webapp/app/pomng/POMNG01010.html

@@ -63,9 +63,11 @@
63 63
 											<div class="col-xs-4 itp_ip">
64 64
 												<div class="col-xs-4 itp_in">
65 65
 													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="" />
66
+													<input type="hidden" id="ITP_FORM_POMNG01010_DETAIL_WHS_ID" class="form-control itp_input" name="whsId" value="" />
66 67
 												</div>
67 68
 												<div class="col-xs-4 itp_in">
68
-													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_DTL_LCN" class="form-control itp_input" name="dtlLcn" value="" />
69
+													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_LOCATION_NM" class="form-control itp_input" name="locationNm" value="" />
70
+													<input type="hidden" id="ITP_FORM_POMNG01010_DETAIL_LOCATION" class="form-control itp_input" name="location" value="" />
69 71
 												</div>
70 72
 												<div class="col-xs-1 itp_in" style="width:23%; padding:0px;">
71 73
 													<button type="button" id="ITP_FORM_POMNG01010_SEARCH_WHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
@@ -83,7 +85,7 @@
83 85
 													</div>
84 86
 												</div>
85 87
 											<label class="col-xs-2 itp_lb">구매가능금액</label>
86
-											<div class="col-xs-4 itp_ip fnPchActAmt">10,000,000원 </div>
88
+											<div class="col-xs-4 itp_ip fnPchActAmt"></div>
87 89
 										</div>
88 90
 									</div>
89 91
 									<div class="itp_form_in">

+ 4 - 2
src/main/webapp/app/pomng/POMNG01010.html

@@ -63,9 +63,11 @@
63 63
 											<div class="col-xs-4 itp_ip">
64 64
 												<div class="col-xs-4 itp_in">
65 65
 													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_WHS_NM" class="form-control itp_input" name="whsNm" value="" />
66
+													<input type="hidden" id="ITP_FORM_POMNG01010_DETAIL_WHS_ID" class="form-control itp_input" name="whsId" value="" />
66 67
 												</div>
67 68
 												<div class="col-xs-4 itp_in">
68
-													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_DTL_LCN" class="form-control itp_input" name="dtlLcn" value="" />
69
+													<input type="text" id="ITP_FORM_POMNG01010_DETAIL_LOCATION_NM" class="form-control itp_input" name="locationNm" value="" />
70
+													<input type="hidden" id="ITP_FORM_POMNG01010_DETAIL_LOCATION" class="form-control itp_input" name="location" value="" />
69 71
 												</div>
70 72
 												<div class="col-xs-1 itp_in" style="width:23%; padding:0px;">
71 73
 													<button type="button" id="ITP_FORM_POMNG01010_SEARCH_WHS_NM" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
@@ -83,7 +85,7 @@
83 85
 													</div>
84 86
 												</div>
85 87
 											<label class="col-xs-2 itp_lb">구매가능금액</label>
86
-											<div class="col-xs-4 itp_ip fnPchActAmt">10,000,000원 </div>
88
+											<div class="col-xs-4 itp_ip fnPchActAmt"></div>
87 89
 										</div>
88 90
 									</div>
89 91
 									<div class="itp_form_in">

+ 59 - 44
src/main/webapp/app/settmng/SETTMNG02010.html

@@ -2,12 +2,11 @@
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 7
 					<button type="button" id="ITP_BTN_SETTMNG02010_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_SETTMNG02010_SRH" class="btn btn-success btn-sm DRT" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;상세정보&nbsp;&nbsp;</button>
9
-					<button type="button" id="ITP_BTN_SETTMNG02010_NEWREG" class="btn btn-primary btn-sm CFM" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;확정&nbsp;&nbsp;</button>
10
-					<button type="button" id="ITP_BTN_SETTMNG02010_NEWREG" class="btn btn-primary btn-sm RJT" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;반려&nbsp;&nbsp;</button>
8
+					<button type="button" id="ITP_BTN_SETTMNG02010_CONFIRM" class="btn btn-primary btn-sm CFM" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;확정&nbsp;&nbsp;</button>
9
+					<button type="button" id="ITP_BTN_SETTMNG02010_REJECT" class="btn btn-primary btn-sm RJT" style="display: inline-block;"><i class="glyphicon"></i>&nbsp;&nbsp;반려&nbsp;&nbsp;</button>
11 10
 					<button type="button" id="ITP_BTN_SETTMNG02010_CANCELLIST" class="btn btn-warning btn-sm PRB"><i class="glyphicon"></i>&nbsp;&nbsp;취소/목록&nbsp;&nbsp;</button>
12 11
 				</div>
13 12
 			</div>
@@ -17,36 +16,33 @@
17 16
 						<div class="itp_srh_border fix">
18 17
 							<div class="col-xs-12">
19 18
 								<form id="ITP_FORM_SETTMNG02010_SEARCH" class="form-horizontal">
19
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_SEARCH_BRAND_ID" name="sbrandId" value="">
20
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_SEARCH_STORE_ID" name="sstoreId" value="">
21
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_SEARCH_SPPLY_ID" name="sspplyId" value="">
22
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_GUBUN" name="sgubun" value="2">
23
+								
20 24
 									<div class="form-group">
21
-										<div class="col-xs-1 itp_ip itp_noMar">
22
-											<select id="ITP_FORM_SETTMNG02010_SERVICE_COL_DVSN" class="form-control itp_input" name="servicecolDvsn">
23
-												<option value="A"></option>											
24
-											</select>
25
-										</div>
26 25
 										<div class="col-xs-2 itp_ip itp_noMar">
27
-											<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_COL_PLACE" class="form-control itp_input" name="sColPlace" placeholder="매장명" />
26
+											<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_NM" class="form-control itp_input" placeholder="공급사명" readonly="readonly" />
28 27
 										</div>
29 28
 										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
30
-											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
31
-											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
29
+											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_SPPLY_POP" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
30
+											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_ERASE" class="btn btn-primary btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
32 31
 						                </div>
33
-										<div class="col-xs-1 itp_ip itp_noMar" style="width:9%; top:3px;" >
32
+						                
33
+						                <div class="col-xs-1 itp_ip itp_noMar" style="top:3px; margin-right: -15px;" >
34 34
 											<label>정산요청일</label>
35 35
 										</div>
36
-										<div class="col-xs-3 itp_ip itp_noMar">
36
+										<div class="col-xs-2 itp_ip itp_noMar">
37 37
 											<div class="input-daterange input-group date">
38
-												<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_" class="form-control itp_input" name="" value="">
38
+												<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_FROM_DT" class="form-control itp_input" name="fromDt" value="">
39 39
 												<span class="input-group-addon itp_date_to">~</span>
40
-												<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_" class="form-control itp_input" name="" value="">
40
+												<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_TO_DT" class="form-control itp_input" name="toDt" value=""> 
41 41
 											</div>
42 42
 										</div>
43 43
 										<div class="col-xs-2 itp_ip itp_noMar">
44
-											<input type="text" id="ITP_FORM_SETTMNG02010_SEARCH_COL_PLACE" class="form-control itp_input" name="sColPlace" placeholder="품목명" />
44
+											<select id="ITP_FORM_SETTMNG02010_SEARCH_STTL_ST_CD" data-select-code="STTL_ST_CD" class="form-control itp_input" name="ssttlStCd"></select>
45 45
 										</div>
46
-										<div class="col-xs-1 itp_in" style="width:8%; padding:0px;">
47
-											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_SRH" class="btn btn-success btn-sm SEB" style="display: inline-block;"><i class="glyphicon glyphicon-search"></i></button>
48
-											<button type="button" id="ITP_BTN_SETTMNG02010_SEARCH_MODIFY" class="btn btn-primary btn-sm UPB" style="display: inline-block;"><i class="glyphicon glyphicon-erase"></i></button>
49
-						                </div>
50 46
 									</div>
51 47
 								</form>
52 48
 							</div>
@@ -66,67 +62,86 @@
66 62
 						<div class="col-xs-12">
67 63
 							<form id="ITP_FORM_SETTMNG02010_DETAIL" class="form-horizontal">
68 64
 								<input type="hidden" id="ITP_FORM_SETTMNG02010_DETAIL_VIEW_CD" name="viewCd" value="C">
65
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_DETAIL_BRAND_ID" name="brandId" value="">
66
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_DETAIL_STORE_ID" name="storeId" value="">
67
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_DETAIL_SPPLY_ID" name="spplyId" value="">
68
+								<input type="hidden" id="ITP_FORM_SETTMNG02010_DETAIL_STTL_MGNT_UNQ_NO" name="sttlMgntUnqNo" value="">
69 69
 					
70 70
 								<section class="itp_form_sec">
71
-									<h4 class="itp_form_tit">정산 상세정보-요청</h4>
71
+									<h4 class="itp_form_tit">정산 상세정보</h4>
72 72
 									<div class="itp_form_in">
73 73
 										<div class="form-group">
74
-											<label class="col-xs-2 itp_lb">브랜드 *</label>
74
+											<label class="col-xs-2 itp_lb">브랜드</label>
75 75
 												<div class="col-xs-4 itp_ip">
76 76
 													<div class="col-xs-9 itp_in fnBrandNm"></div>												
77 77
 												</div>
78
-											<label class="col-xs-2 itp_lb">공급업체*</label>
78
+											<label class="col-xs-2 itp_lb">공급업체</label>
79 79
 											<div class="col-xs-4 itp_ip">
80 80
 												<div class="col-xs-10 itp_in">
81
-													<div class="col-xs-6 itp_in fnSpplyNm"></div>
81
+													<div class="col-xs-6 itp_in fnSupplyNm"></div>
82 82
 												</div>
83 83
 											</div>
84 84
 										</div>
85 85
 										<div class="form-group">
86 86
 											<label class="col-xs-2 itp_lb">정산일자</label>
87 87
 											<div class="col-xs-4 itp_ip">
88
-												<div class="col-xs-5 itp_in fnSttlDt"></div>
88
+												<div class="col-xs-5 itp_in">
89
+													<div class="input-group date">
90
+													<input type="text" id="ITP_FORM_SETTMNG03010_DETAIL_STTL_DT" class="form-control itp_input" name="sttlDt" readonly="readonly">
91
+													<span class="input-group-addon itp_input itp_date_to">
92
+														<i class="glyphicon glyphicon-calendar"></i>
93
+													</span>
94
+													</div>
95
+												</div>
89 96
 											</div>
90 97
 											<label class="col-xs-2 itp_lb">정산상태</label>
91 98
 											<div class="col-xs-4 itp_ip">
92
-												<div class="col-xs-8 itp_in "></div>
99
+												<div class="col-xs-8 itp_in fnSttlStNm"></div>
93 100
 											</div>
94 101
 										</div>
95 102
 										<div class="form-group">
96 103
 											<label class="col-xs-2 itp_lb">정산금액</label>
97 104
 											<div class="col-xs-4 itp_ip">
98
-												<div class="col-xs-10 itp_in "></div>
105
+												<div class="col-xs-10 itp_in fnSttlAmt"></div>
99 106
 											</div>
100 107
 											<label class="col-xs-2 itp_lb">잔금</label>
101 108
 											<div class="col-xs-4 itp_ip">
102
-												<div class="col-xs-8 itp_in "></div>
109
+												<div class="col-xs-8 itp_in fnAcctBal"></div>
103 110
 											</div>
104 111
 										</div>
105
-										<div class="form-group border">
106
-											<label class="col-xs-2 itp_lb">요청일</label>
112
+										<div class="form-group">
113
+											<label class="col-xs-2 itp_lb">등록일</label>
107 114
 											<div class="col-xs-4 itp_ip">
108
-												<div class="col-xs-10 itp_in fnReqDt"></div>
115
+												<div class="col-xs-10 itp_in fnSysRegDttm"></div>
109 116
 											</div>
110
-											<label class="col-xs-2 itp_lb">요청자</label>
117
+											<label class="col-xs-2 itp_lb">등록자</label>
111 118
 											<div class="col-xs-4 itp_ip">
112
-												<div class="col-xs-8 itp_in fnDpstReqNm"></div>
119
+												<div class="col-xs-8 itp_in fnSysRegNm"></div>
120
+											</div>
121
+										</div>
122
+									</div>
123
+									<div class="itp_form_in">
124
+										<div class="form-group border">
125
+											<label class="col-xs-2 itp_lb">반려사유</label>
126
+											<div class="col-xs-10 itp_ip">
127
+												<div class="col-xs-10 itp_in"></div>
113 128
 											</div>
114 129
 										</div>
115 130
 									</div>
116
-								</section>								
131
+								</section>							
117 132
 							</form>
118 133
 						</div>
119 134
 					</div>
120
-				</div>
121
-				<div class="itp_table fix">
122
-					<h4 class="itp_form_tit" style="background:#eee; padding:18px 18px; margin:0; border-left:none;"></h4>
123
-					<div id="ITP_SETTMNG02010_DETAIL_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
124
-						<div id="ITP_SETTMNG02010_DETAIL_jqGridView" class="itp_views fix"></div>
125
-						<table id="ITP_SETTMNG02010_DETAIL_jqGrid"></table>
126
-						<div id="ITP_SETTMNG02010_DETAIL_jqGridPager"></div>
127
-						<div id="ITP_SETTMNG02010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
135
+					<div class="itp_table fix">
136
+						<h4 class="itp_form_tit" style="background:#eee; padding:18px 18px; margin:0; border-left:none;"></h4>
137
+						<div id="ITP_SETTMNG02010_DETAIL_jqGrid_list" class="itp_tb_list itp_gType1" data-total-cnt="${totalCnt}">
138
+							<div id="ITP_SETTMNG02010_DETAIL_jqGridView" class="itp_views fix"></div>
139
+							<table id="ITP_SETTMNG02010_DETAIL_jqGrid"></table>
140
+							<div id="ITP_SETTMNG02010_DETAIL_jqGridPager"></div>
141
+							<div id="ITP_SETTMNG02010_DETAIL_jqGridEmpty" class="itp_no_data"></div>
142
+						</div>
128 143
 					</div>
129
-				</div>
144
+				</div>				
130 145
 			</div>
131 146
 		</article>
132 147
 	</div>

+ 554 - 0
src/main/webapp/js/app/settmng/ITP_SETTMNG02010.js

@@ -0,0 +1,554 @@
1
+/********************************************************
2
+ --------------------------------------------------------
3
+ - Object 목록								            -
4
+ --------------------------------------------------------
5
+ * const gridColModel = {}	: 화면 Grid Object			*
6
+ * let pageObj = {}			: 화면공통 Object			*
7
+ * let listObj = {}			: 목록화면 Object			*
8
+ * let modifyObj = {}			: 상세화면 Object			*
9
+ *******************************************************/
10
+
11
+/*화면 변수*/
12
+const SETTMNG02010_GRID_ID = '#ITP_SETTMNG02010_jqGrid';
13
+const SETTMNG02010_GRID_LIST = '#ITP_SETTMNG02010_jqGrid_list';
14
+const SETTMNG02010_GRID_PAGER = '#ITP_SETTMNG02010_jqGridPager';
15
+const SETTMNG02010_GRID_EMPTY = '#ITP_SETTMNG02010_jqGridEmpty';
16
+
17
+const SETTMNG02010_DETAIL_GRID_ID = '#ITP_SETTMNG02010_DETAIL_jqGrid';
18
+const SETTMNG02010_DETAIL_GRID_LIST = '#ITP_SETTMNG02010_DETAIL_jqGrid_list';
19
+const SETTMNG02010_DETAIL_GRID_PAGER = '#ITP_SETTMNG02010_DETAIL_jqGridPager';
20
+const SETTMNG02010_DETAIL_GRID_EMPTY = '#ITP_SETTMNG02010_DETAIL_jqGridEmpty';
21
+
22
+let ITP_FORM_SETTMNG02010_DETAIL_IS_DUPLICATE = false;
23
+let ITP_FORM_SETTMNG02010_DETAIL_IS_WRITING = false;
24
+let SETTMNG02010_DETAIL_GRID_LAST_ROW_ID;
25
+
26
+/*API URL*/
27
+let STTL_STATE_DETAIL_GRID_LIST = '/api/sttl/state/detail-grid-list';
28
+
29
+let STTL_REQ_REQUEST_STTL = '/api/sttl/req/request-sttl';
30
+let STTL_REQ_REQUEST_STTL_PROC = '/api/sttl/req/request-sttl-proc';
31
+let STTL_REQ_INFO_STTL = '/api/sttl/req/info-sttl';
32
+let STTL_REQ_STL_GRID_LIST = '/api/sttl/req/stl-grid-list';
33
+
34
+let LOGIN_AUTH_TYPE_CD;
35
+
36
+/*화면 Grid ColModel*/
37
+const gridColModel = {
38
+	list: [
39
+		{
40
+			index: 'VIEW_CD', name: 'viewCd',
41
+			label: ITP_MSG_LOCALE.label.viewCd,
42
+			width: '10', fixed: false, align: 'center',
43
+			sortable: false, hidden: true
44
+		},		
45
+		{
46
+			index: 'BRAND_NM', name: 'brandNm',
47
+			label: "브랜드",
48
+			width: '10', fixed: false, align: 'center',
49
+			sortable: false, hidden: true
50
+		},
51
+		{
52
+			index: 'STORE_NM', name: 'storeNm',
53
+			label: "매장명",
54
+			width: '10', fixed: false, align: 'center',
55
+			sortable: false, hidden: true
56
+		},
57
+		{
58
+			index: 'SPPLY_NM', name: 'spplyNm',
59
+			label: "공급사명",
60
+			width: '10', fixed: false, align: 'center',
61
+			sortable: false, hidden: false
62
+		},
63
+		{
64
+			index: 'STTL_MGNT_UNQ_NO', name: 'sttlMgntUnqNo',
65
+			label: "정산번호", 
66
+			width: '10', fixed: false, align: 'center',
67
+			sortable: false, hidden: false
68
+		},
69
+		{
70
+			index: 'STTL_ST_CD', name: 'sttlStCd',
71
+			label: "정산상태코드", 
72
+			width: '8', fixed: false, align: 'center',
73
+			sortable: false, hidden: true
74
+		},
75
+		{
76
+			index: 'STTL_ST_NM', name: 'sttlStNm',
77
+			label: "정산상태", 
78
+			width: '10', fixed: false, align: 'center',
79
+			sortable: false, hidden: false
80
+		},		
81
+		{
82
+			index: 'STTL_REQ_DT', name: 'sttlReqDt',
83
+			label: "정산요청일",
84
+			width: '10', fixed: false, align: 'center',
85
+			sortable: false, editable: false, edittype: 'text'
86
+		},
87
+		{
88
+			index: 'STTL_REQ_AMT', name: 'sttlReqAmt',
89
+			label: "정산요청금액",
90
+			width: '10', fixed: false, align: 'center',
91
+			sortable: false, editable: false, edittype: 'text', 
92
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
93
+		}, 
94
+		{
95
+			index: 'STTL_DT', name: 'sttlDt',
96
+			label: "정산일",
97
+			width: '10', fixed: false, align: 'center',
98
+			sortable: false, editable: false, edittype: 'text'
99
+		},
100
+		{
101
+			index: 'STTL_REQ_AMT', name: 'sttlAmt',
102
+			label: "정산금액",
103
+			width: '10', fixed: false, align: 'center',
104
+			sortable: false, editable: false, edittype: 'text', 
105
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
106
+		},
107
+		{
108
+			index: 'ACCT_BAL', name: 'acctBal',
109
+			label: "잔금",
110
+			width: '10', fixed: false, align: 'center',
111
+			sortable: false, editable: false, edittype: 'text', 
112
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
113
+		}, 
114
+		{
115
+			index: 'STTL_REG_MGR_NM', name: 'sttlRegMgrNm',
116
+			label: "등록자",
117
+			width: '10', fixed: false, align: 'center',
118
+			sortable: false, editable: false, edittype: 'text'
119
+		}
120
+	],
121
+	view: [
122
+		{
123
+			index: 'VIEW_CD', name: 'viewCd',
124
+			label: ITP_MSG_LOCALE.label.viewCd,
125
+			width: '10', fixed: false, align: 'center',
126
+			sortable: false, hidden: true
127
+		},
128
+		{
129
+			index: 'STTL_MGNT_DTL_NO', name: 'sttlMgntDtlNo',
130
+			label: '정산관리상세번호',
131
+			width: '10', fixed: false, align: 'center',
132
+			sortable: false, hidden: true
133
+		},		
134
+		{
135
+			index: 'BRAND_NM', name: 'brandNm',
136
+			label: "브랜드",
137
+			width: '10', fixed: false, align: 'center',
138
+			sortable: false, hidden: true
139
+		},
140
+		{
141
+			index: 'STORE_NM', name: 'storeNm',
142
+			label: "매장명",
143
+			width: '10', fixed: false, align: 'center',
144
+			sortable: false, hidden: true
145
+		},
146
+		{
147
+			index: 'ITEM_ID', name: 'itemId',
148
+			label: "품목코드",
149
+			width: '10', fixed: false, align: 'center',
150
+			sortable: false, editable: false, edittype: 'text'
151
+		},
152
+		{
153
+			index: 'ITEM_NM', name: 'itemNm',
154
+			label: "품목명",
155
+			width: '10', fixed: false, align: 'center',
156
+			sortable: false, editable: false, edittype: 'text'
157
+		},
158
+		{
159
+			index: 'UNIT', name: 'unit',
160
+			label: "단위",
161
+			width: '8', fixed: false, align: 'center',
162
+			sortable: false, editable: false, edittype: 'text'
163
+		},
164
+		{
165
+			index: 'UNIT_AMT', name: 'unitAmt',
166
+			label: "단가",
167
+			width: '8', fixed: false, align: 'center',
168
+			sortable: false, editable: false, edittype: 'text', 
169
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
170
+		},
171
+		{
172
+			index: 'PODR_QTY', name: 'podrQty',
173
+			label: "발주수량",
174
+			width: '8', fixed: false, align: 'center',
175
+			sortable: false, editable: false, edittype: 'text', 
176
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
177
+		},
178
+		{
179
+			index: 'DLV_QTY', name: 'dlvQty',
180
+			label: "납품수량",
181
+			width: '8', fixed: false, align: 'center',
182
+			sortable: false, editable: false, edittype: 'text', 
183
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
184
+		},
185
+		{
186
+			index: 'WHS_COL_QTY', name: 'whsColQty',
187
+			label: "입고/수거수량",
188
+			width: '8', fixed: false, align: 'center',
189
+			sortable: false, editable: false, edittype: 'text', 
190
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
191
+		}, 
192
+		{
193
+			index: 'WHS_COL_DT', name: 'whsColDt',
194
+			label: "입고/수거일자",
195
+			width: '8', fixed: false, align: 'center',
196
+			sortable: false, editable: false, edittype: 'text'
197
+		},
198
+		{
199
+			index: 'WHS_COL_AMT', name: 'whsColAmt',
200
+			label: "입고/수거금액",
201
+			width: '8', fixed: false, align: 'center',
202
+			sortable: false, editable: false, edittype: 'text', 
203
+			formatter:'integer',formatoptions: { defaultValue: '', thousandsSeparator: ',' }
204
+		},
205
+		{
206
+			index: 'STTL_DVSN_NM', name: 'sttlDvsnNm',
207
+			label: "정산구분",
208
+			width: '8', fixed: false, align: 'center',
209
+			sortable: false, editable: false, edittype: 'text'
210
+		},
211
+		{
212
+			index: 'PODR_UNQ_NO', name: 'podrUnqNo',
213
+			label: "발주번호",
214
+			width: '8', fixed: false, align: 'center',
215
+			sortable: false, editable: false, edittype: 'text'
216
+		},
217
+		{
218
+			index: 'PODR_DTL_NO', name: 'podrDtlNo',
219
+			label: "발주항번",
220
+			width: '8', fixed: false, align: 'center',
221
+			sortable: false, editable: false, edittype: 'text'
222
+		}
223
+	]
224
+};
225
+
226
+require(['config'], function() {
227
+	require([
228
+		'kakao.map.util'
229
+	], function($) {
230
+		pageObj.init();
231
+	});
232
+});
233
+
234
+/*화면공통 Object*/
235
+let pageObj = {
236
+	init: function () {
237
+		this.ui.init();
238
+		this.event.init();
239
+	},
240
+	ui: {
241
+		init: function () {
242
+			this.view();
243
+			this.grid();
244
+			this.ready();
245
+		},
246
+		view: function() {
247
+			// 버튼 권한설정
248
+			fn_proc_btn_auth('SETTMNG02010');
249
+			
250
+			// 공통코드 표시
251
+			$('select').each(function() {
252
+		        if($(this).data('select-code')) {
253
+		            fn_make_select(CODE_LIST, $(this).data('select-code'), $(this).attr('id'));
254
+		        }
255
+		    });
256
+
257
+			// 조회일자 지정
258
+			var now = new Date();
259
+			$('#ITP_TAB_SETTMNG02010 .input-group.date').datepicker(ITP_DATE_LANGUAGE);			
260
+			$('#ITP_FORM_SETTMNG02010_SEARCH_FROM_DT').datepicker('setDate', new Date(now.setMonth(now.getMonth() - 1)));
261
+			$('#ITP_FORM_SETTMNG02010_SEARCH_TO_DT').datepicker('setDate', new Date());
262
+			
263
+			// 권한에 따라 매장값 설정
264
+			$('#ITP_FORM_SETTMNG02010_SEARCH_BRAND_ID').val(fn_make_user_info.get('brandId'));
265
+			LOGIN_AUTH_TYPE_CD = fn_make_user_info.get('authTpCd'); // 권한타입
266
+			if(LOGIN_AUTH_TYPE_CD == '60') {
267
+				$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_ID').val(fn_make_user_info.get('storeId'));
268
+				$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_NM').val(fn_make_user_info.get('storeNm'));	
269
+			}
270
+			
271
+		},
272
+		grid: function() {
273
+			itp_fn_jqgrid_resize(SETTMNG02010_GRID_ID, SETTMNG02010_GRID_LIST, 'lg');
274
+			listObj.empty.init();
275
+			itp_fn_fire_window_resize();
276
+		},
277
+		ready: function() {
278
+			listObj.init();
279
+		}
280
+	},
281
+	event: {
282
+		init: function () {
283
+			this.button();
284
+			this.change();
285
+		},
286
+		button: function () {
287
+			// 버튼 클릭 이벤트
288
+			$('button').each(function() {
289
+				var id = $(this).attr('id');
290
+				$(this).on('click', function() {
291
+					switch (id) {
292
+						case 'ITP_BTN_SETTMNG02010_SRH'				: listObj.button.search();		break;	// 조회 버튼 클릭
293
+						case 'ITP_BTN_SETTMNG02010_CANCELLIST'		: modifyObj.button.cancel(); 	break;	// 취소/목록 버튼
294
+						// case 'ITP_BTN_SETTMNG02010_NEWREG'			: listObj.button.reqSttl();	break;	// 정산요청 버튼
295
+						// case 'ITP_BTN_SETTMNG02010_REQUEST'			: modifyObj.button.request();	break;	// 요청 버튼
296
+					}
297
+				});
298
+			});
299
+
300
+			$('body').on('click', function(e) {
301
+				var gridId = SETTMNG02010_DETAIL_GRID_ID.replace('#', '');
302
+				var rids = $(SETTMNG02010_DETAIL_GRID_ID).jqGrid('getDataIDs');
303
+				var last_row_id = rids[rids.length - 1];
304
+				itp_fn_grid_reset_selection(e, last_row_id, gridId, 'SETTMNG02010_DETAIL');
305
+			});
306
+
307
+		}, 
308
+		change: function() {
309
+			$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_GUBUN').on('change', function() {
310
+				var gubunVal = $('#ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_GUBUN').val();
311
+				if(gubunVal == '1') { // 매장
312
+					$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_NM').attr('placeholder', '매장명');
313
+					
314
+					$(SETTMNG02010_GRID_ID).jqGrid('hideCol', ["spplyNm"]);
315
+					$(SETTMNG02010_GRID_ID).jqGrid('showCol', ["storeNm"]);		
316
+					// $(SETTMNG02010_GRID_ID).setColProp('spplyNm', {hidden: true});
317
+					// $(SETTMNG02010_GRID_ID).setColProp('storeNm', {hidden: false});
318
+								
319
+				} else if(gubunVal == '2') { // 공급업체
320
+					$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_SPPLY_NM').attr('placeholder', '공급사명');
321
+					
322
+					$(SETTMNG02010_GRID_ID).jqGrid('hideCol', ["storeNm"]);
323
+					$(SETTMNG02010_GRID_ID).jqGrid('showCol', ["spplyNm"]);
324
+					// $(SETTMNG02010_GRID_ID).setColProp('storeNm', {hidden: true});
325
+					// $(SETTMNG02010_GRID_ID).setColProp('spplyNm', {hidden: false});
326
+				}	
327
+				listObj.button.search();	
328
+				// itp_fn_jqgrid_resize(SETTMNG02010_GRID_ID, SETTMNG02010_GRID_LIST, 'lg');							
329
+			});			
330
+		}
331
+	},
332
+	switchScreen: function(mode) {
333
+		if(mode == 'LIST') { // 목록
334
+			$('#ITP_BTN_SETTMNG02010_MODIFY').hide();
335
+			$('#ITP_BTN_SETTMNG02010_CANCELLIST').hide();
336
+			$('#ITP_BTN_SETTMNG02010_DELETE').hide();
337
+			$('#ITP_BTN_SETTMNG02010_REQUEST').hide();
338
+			
339
+			if(LOGIN_AUTH_TYPE_CD == '60') { // 공급사
340
+				$('#ITP_BTN_SETTMNG02010_SEARCH_SPPLY_POP').hide();
341
+				$('#ITP_BTN_SETTMNG02010_SEARCH_ERASE').hide();
342
+			} else {
343
+				$('#ITP_BTN_SETTMNG02010_SEARCH_SPPLY_POP').show();
344
+				$('#ITP_BTN_SETTMNG02010_SEARCH_ERASE').show();
345
+			}
346
+			
347
+			fn_show_btn_auth('#ITP_BTN_SETTMNG02010_SRH');
348
+			fn_show_btn_auth('#ITP_BTN_SETTMNG02010_NEWREG');
349
+			
350
+			$('#ITP_AJAX_SETTMNG02010_LIST_CONTAINER').show();
351
+			$('#ITP_AJAX_SETTMNG02010_DETAIL_CONTAINER').hide();
352
+			
353
+		} else if(mode == 'DETAIL') { // 보기
354
+			$('#ITP_BTN_SETTMNG02010_SRH').hide();
355
+			$('#ITP_BTN_SETTMNG02010_NEWREG').hide();
356
+			$('#ITP_BTN_SETTMNG02010_DELETE').hide();
357
+			
358
+			fn_show_btn_auth('#ITP_BTN_SETTMNG02010_REQUEST');
359
+			fn_show_btn_auth('#ITP_BTN_SETTMNG02010_CANCELLIST');
360
+
361
+			$('#ITP_AJAX_SETTMNG02010_LIST_CONTAINER').hide();
362
+			$('#ITP_AJAX_SETTMNG02010_DETAIL_CONTAINER').show();
363
+		}
364
+	}
365
+};
366
+
367
+/*목록화면 Object*/
368
+let listObj = {
369
+	init: function () {
370
+		this.grid.init();
371
+	},
372
+	itp_SETTMNG02010_search: false,
373
+	button: {
374
+		search: function() {
375
+			listObj.itp_SETTMNG02010_search = true;
376
+			let param = $('#ITP_FORM_SETTMNG02010_SEARCH').serializeObject();
377
+			param.gridSize = $.jgrid.defaults.rowNum;
378
+			param.gridPage = $.jgrid.defaults.page;
379
+			$(SETTMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(param)}).trigger('reloadGrid');
380
+		}
381
+	},
382
+	empty: {
383
+		init: function() {
384
+			var _this = this;
385
+			this.push();
386
+			$(SETTMNG02010_GRID_EMPTY).on('click', function() {
387
+				_this.back();
388
+				_this.itp_SETTMNG02010_param.gridSize = $.jgrid.defaults.rowNum;
389
+				$(SETTMNG02010_GRID_ID).setGridParam({'postData': JSON.stringify(_this.itp_SETTMNG02010_param)}).trigger('reloadGrid');
390
+			});
391
+		},
392
+		itp_SETTMNG02010_param: {},
393
+		push: function() {
394
+			let param = $('#ITP_FORM_SETTMNG02010_SEARCH').serializeObject();
395
+			listObj.itp_SETTMNG02010_param = param;
396
+		},
397
+		back: function() {
398
+			$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_ID').val(listObj.itp_SETTMNG02010_param.sstoreId);
399
+			$('#ITP_FORM_SETTMNG02010_SEARCH_STORE_NM').val(listObj.itp_SETTMNG02010_param.sstoreNm);
400
+			$('#ITP_FORM_SETTMNG02010_SEARCH_FROM_DT').val(listObj.itp_SETTMNG02010_param.fromDt);
401
+			$('#ITP_FORM_SETTMNG02010_SEARCH_TO_DT').val(listObj.itp_SETTMNG02010_param.toDt);
402
+			$('#ITP_FORM_SETTMNG02010_SEARCH_ITEM_NM').val(listObj.itp_SETTMNG02010_param.sitemNm);
403
+		}
404
+	},
405
+	grid: {
406
+		init: function () {
407
+			// 데이터 없을때
408
+			listObj.empty.push();
409
+			this.search();
410
+		},
411
+		colModel: gridColModel.list,
412
+		search: function() {
413
+			pageObj.switchScreen('LIST');
414
+			this.unload();
415
+			this.load();
416
+		},
417
+		load: function() {			
418
+			let param = $('#ITP_FORM_SETTMNG02010_SEARCH').serializeObject();
419
+			param.gridSize = $.jgrid.defaults.rowNum;
420
+
421
+			var option = {
422
+				gridId: SETTMNG02010_GRID_ID,
423
+				colModel: gridColModel.list,
424
+				param: param,
425
+				url: DOMAIN + STTL_STATE_DETAIL_GRID_LIST,
426
+				pager: SETTMNG02010_GRID_PAGER,
427
+				onCellSelect: function(rowId, cellIdx, cellValue) {
428
+					var cm = $(this).jqGrid('getGridParam', 'colModel');
429
+					var colNm = cm[cellIdx].name;
430
+					if (colNm == 'sttlMgntUnqNo') {
431
+						const sttlMgntUnqNoVal = $(this).jqGrid('getCell', rowId, 'sttlMgntUnqNo');
432
+						
433
+						const key = {sttlMgntUnqNo: sttlMgntUnqNoVal, viewCd: 'R'};
434
+						var param = $.param(key);
435
+						modifyObj.init(param);
436
+					}
437
+				},
438
+				loadComplete: function(data) {
439
+					console.log(data);
440
+					itp_fn_grid_load_complete(data, SETTMNG02010_GRID_ID, true, 'number', 'SETTMNG02010', listObj.itp_SETTMNG02010_search, listObj.empty, true, data.gridRecords, true);
441
+					var ids = $(SETTMNG02010_GRID_ID).getDataIDs();
442
+					$.each(ids, function(idx, rowId) {
443
+						$(SETTMNG02010_GRID_ID).jqGrid('setCell', rowId, 'sttlMgntUnqNo', '', ITP_GRID_COL_STYLE.link);
444
+					});
445
+				},
446
+				onPaging: function(action) {
447
+					itp_fn_grid_paging(SETTMNG02010_GRID_ID, action, param);
448
+				}
449
+			};
450
+			itp_fn_grid_make_remote(option);
451
+		},
452
+		clearData : function() {
453
+			$(SETTMNG02010_GRID_ID).jqGrid('clearGridData', true);
454
+			$(SETTMNG02010_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
455
+			$(SETTMNG02010_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
456
+			$(SETTMNG02010_GRID_EMPTY).show();
457
+		},
458
+		unload : function() {
459
+			$.jgrid.gridUnload(SETTMNG02010_GRID_ID);
460
+		}
461
+	}
462
+};
463
+
464
+/*상세화면 Object*/
465
+let modifyObj = {
466
+	init: function (param) {
467
+		this.load(param);
468
+	},
469
+	button: {
470
+		cancel: function() {
471
+			listObj.grid.search();
472
+		}
473
+	}, 
474
+	load: function(param) {
475
+		fn_ajax_call(STTL_REQ_INFO_STTL, param, this.callback, 'GET');
476
+	},
477
+	callback: function (result) {
478
+		// console.log(result);
479
+		pageObj.switchScreen('DETAIL');
480
+		$('#ITP_FORM_SETTMNG02010_DETAIL_BRAND_ID').val(result.brandId);
481
+		$('#ITP_FORM_SETTMNG02010_DETAIL_STORE_ID').val(result.storeId);
482
+		$('#ITP_FORM_SETTMNG02010_DETAIL_STTL_MGNT_UNQ_NO').val(result.sttlMgntUnqNo);
483
+		
484
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnBrandNm').text(result.brandNm);
485
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnStoreNm').text(result.storeNm);
486
+		$('#ITP_FORM_SETTMNG02010_DETAIL_STTL_DT').val(result.sttlDt);  // 정산일자
487
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnSttlStNm').text(result.sttlStNm);
488
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnSttlAmt').text(itp_fn_number_comma(result.sttlAmt));
489
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnAcctBal').text(itp_fn_number_comma(result.acctBal));
490
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnSysRegDttm').text(result.sysRegDttm);
491
+		$('#ITP_FORM_SETTMNG02010_DETAIL .fnSysRegNm').text(result.sysRegNm);
492
+
493
+		// 리스트 조회
494
+		modifyObj.grid.init();
495
+	},
496
+	grid: {
497
+		init: function() {
498
+			this.unload();
499
+			this.load();
500
+		},
501
+		load : function() {
502
+			let param = $('#ITP_FORM_SETTMNG02010_DETAIL').serializeObject();
503
+			param.gridSize = $.jgrid.defaults.rowNum;
504
+			param.pagingYn = false; // 페이징안함
505
+
506
+			var option = {
507
+				gridId: SETTMNG02010_DETAIL_GRID_ID,
508
+				colModel: gridColModel.view,
509
+				param: param,
510
+				url: DOMAIN + STTL_REQ_STL_GRID_LIST,
511
+				pager: SETTMNG02010_DETAIL_GRID_PAGER,
512
+				loadComplete: function(data) {
513
+					itp_fn_grid_load_complete(data, SETTMNG02010_DETAIL_GRID_ID, true, undefined, 'SETTMNG02010_DETAIL');
514
+				},
515
+				onPaging: function(action) {
516
+					var pagingFn = {
517
+						callBack: function(args) {
518
+							$(args).trigger('reloadGrid');
519
+						}
520
+					};
521
+					if (itp_fn_check_grid_is_writing(SETTMNG02010_DETAIL_GRID_ID)) {
522
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, pagingFn, SETTMNG02010_DETAIL_GRID_ID);
523
+						return 'stop';
524
+					} else {
525
+						itp_fn_grid_paging(SETTMNG02010_DETAIL_GRID_ID, action, param);
526
+					}
527
+				},
528
+				onSortCol: function(index, columnIndex, sortOrder) {
529
+					var sortingFn = {
530
+						callBack: function(args) {
531
+							$(args).trigger('reloadGrid');
532
+						}
533
+					};
534
+					if (itp_fn_check_grid_is_writing(SETTMNG02010_DETAIL_GRID_ID)) {
535
+						itp_fn_modal_confirm(ITP_MSG_LOCALE.message.ajax.cancelData, sortingFn, SETTMNG02010_DETAIL_GRID_ID);
536
+						return 'stop';
537
+					} else {
538
+						itp_fn_grid_sorting(SETTMNG02010_DETAIL_GRID_ID, index, sortOrder);
539
+					}
540
+				}
541
+			};
542
+			itp_fn_grid_make_remote(option);
543
+		},
544
+		clearData : function() {
545
+			$(SETTMNG02010_DETAIL_GRID_ID).jqGrid('clearGridData', true);
546
+			$(SETTMNG02010_DETAIL_GRID_LIST).find('.ui-jqgrid-bdiv').css('min-height', '100px');
547
+			$(SETTMNG02010_DETAIL_GRID_EMPTY).html(ITP_MSG_LOCALE.message.grid.noData);
548
+			$(SETTMNG02010_DETAIL_GRID_EMPTY).show();
549
+		},
550
+		unload : function() {
551
+			$.jgrid.gridUnload(SETTMNG02010_DETAIL_GRID_ID);
552
+		}
553
+	}
554
+};